Commit 34ce91f9 authored by Van's avatar Van

Merge remote-tracking branch 'origin/2.9.5-dev' into 2.9.5-dev

# Conflicts:
#	src/main/webapp/skins
parents 5e1a70cb 1bd6dfff
...@@ -20,6 +20,7 @@ package org.b3log.solo.processor; ...@@ -20,6 +20,7 @@ package org.b3log.solo.processor;
import freemarker.template.Template; import freemarker.template.Template;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.b3log.latke.Keys; import org.b3log.latke.Keys;
import org.b3log.latke.Latkes;
import org.b3log.latke.ioc.inject.Inject; import org.b3log.latke.ioc.inject.Inject;
import org.b3log.latke.logging.Level; import org.b3log.latke.logging.Level;
import org.b3log.latke.logging.Logger; import org.b3log.latke.logging.Logger;
...@@ -219,7 +220,7 @@ public class IndexProcessor { ...@@ -219,7 +220,7 @@ public class IndexProcessor {
final Map<String, Object> dataModel = renderer.getDataModel(); final Map<String, Object> dataModel = renderer.getDataModel();
try { try {
final Map<String, String> langs = langPropsService.getAll(Locales.getLocale(request)); final Map<String, String> langs = langPropsService.getAll(Latkes.getLocale());
dataModel.putAll(langs); dataModel.putAll(langs);
final JSONObject preference = preferenceQueryService.getPreference(); final JSONObject preference = preferenceQueryService.getPreference();
filler.fillCommon(request, response, dataModel, preference); filler.fillCommon(request, response, dataModel, preference);
......
...@@ -138,7 +138,7 @@ public class OAuthGitHubProcessor { ...@@ -138,7 +138,7 @@ public class OAuthGitHubProcessor {
* @throws Exception exception * @throws Exception exception
*/ */
@RequestProcessing(value = "/oauth/github", method = HTTPRequestMethod.GET) @RequestProcessing(value = "/oauth/github", method = HTTPRequestMethod.GET)
public void showGitHubCallback(final HttpServletRequest request, final HttpServletResponse response) throws Exception { public synchronized void showGitHubCallback(final HttpServletRequest request, final HttpServletResponse response) throws Exception {
final String state = request.getParameter("state"); final String state = request.getParameter("state");
String referer = STATES.get(state); String referer = STATES.get(state);
if (StringUtils.isBlank(referer)) { if (StringUtils.isBlank(referer)) {
......
...@@ -18,12 +18,14 @@ ...@@ -18,12 +18,14 @@
# #
# Description: Solo language configurations(en_US). # Description: Solo language configurations(en_US).
# Version: 2.22.0.0, Sep 21, 2018 # Version: 2.23.0.0, Sep 21, 2018
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
# #
useGitHubAccountLoginLabel=Use GitHub account
useLocalAccountLabel=Use local account
chageLabel=Change chageLabel=Change
useTumbnailLabel=Use Tumbnail useTumbnailLabel=Use Tumbnail
iconLabel=Icon iconLabel=Icon
......
...@@ -18,12 +18,14 @@ ...@@ -18,12 +18,14 @@
# #
# Description: Solo default language configurations(zh_CN). # Description: Solo default language configurations(zh_CN).
# Version: 2.22.0.0, Sep 21, 2018 # Version: 2.23.0.0, Sep 21, 2018
# Author: Liang Ding # Author: Liang Ding
# Author: Liyuan Li # Author: Liyuan Li
# Author: Dongxu Wang # Author: Dongxu Wang
# #
useGitHubAccountLoginLabel=\u4F7F\u7528 GitHub \u8D26\u53F7\u767B\u5F55
useLocalAccountLabel=\u4F7F\u7528\u672C\u5730\u8D26\u53F7
chageLabel=\u66F4\u6362 chageLabel=\u66F4\u6362
useTumbnailLabel=\u542F\u7528\u914D\u56FE useTumbnailLabel=\u542F\u7528\u914D\u56FE
iconLabel=\u56FE\u6807 iconLabel=\u56FE\u6807
......
...@@ -32,9 +32,9 @@ ...@@ -32,9 +32,9 @@
<a class="github__icon" href="${servePath}/oauth/github/redirect"> <a class="github__icon" href="${servePath}/oauth/github/redirect">
<img src="${staticServePath}/images/github-init.gif"/> <img src="${staticServePath}/images/github-init.gif"/>
</a> </a>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号初始化</button> <button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">${useGitHubAccountLoginLabel}</button>
<br> <br>
<span onclick="$('#github').hide();$('#user').show()">使用本地账号</span> <span onclick="$('#github').hide();$('#user').show()">${useLocalAccountLabel}</span>
</div> </div>
<div id="user" class="form none"> <div id="user" class="form none">
<label for="userEmail"> <label for="userEmail">
...@@ -53,14 +53,13 @@ ...@@ -53,14 +53,13 @@
${userPasswordConfirm1Label} ${userPasswordConfirm1Label}
</label> </label>
<input type="password" id="userPasswordConfirm"/> <input type="password" id="userPasswordConfirm"/>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号初始化</button>
<button onclick='getUserInfo();'>${nextStepLabel}</button> <button onclick='getUserInfo();'>${nextStepLabel}</button>
<span id="tip"></span> <span id="tip"></span>
</div> </div>
<div id="sys" class="none"> <div id="sys" class="none">
${initIntroLabel} ${initIntroLabel}
<button onclick='initSys();' id="initButton">${initLabel}</button>
<button onclick='returnTo();'>${previousStepLabel}</button> <button onclick='returnTo();'>${previousStepLabel}</button>
<button onclick='initSys();' id="initButton">${initLabel}</button>
<span id="tipInit"></span> <span id="tipInit"></span>
<span class="clear"></span> <span class="clear"></span>
</div> </div>
......
...@@ -27,9 +27,9 @@ ${loginLabel} ...@@ -27,9 +27,9 @@ ${loginLabel}
<a class="github__icon" href="${servePath}/oauth/github/redirect"> <a class="github__icon" href="${servePath}/oauth/github/redirect">
<img src="${staticServePath}/images/github-init.gif"/> <img src="${staticServePath}/images/github-init.gif"/>
</a> </a>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号登录</button> <button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">${useGitHubAccountLoginLabel}</button>
<br> <br>
<span onclick="$('#github').hide();$('.form').show()">使用本地账号</span> <span onclick="$('#github').hide();$('.form').show()">${useLocalAccountLabel}</span>
</div> </div>
<div class="form none"> <div class="form none">
...@@ -41,7 +41,6 @@ ${loginLabel} ...@@ -41,7 +41,6 @@ ${loginLabel}
${userPasswordLabel} <a href="${servePath}/forgot">(${forgotLabel})</a> ${userPasswordLabel} <a href="${servePath}/forgot">(${forgotLabel})</a>
</label> </label>
<input type="password" id="userPassword" tabindex="2" /> <input type="password" id="userPassword" tabindex="2" />
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号登录</button>
<button onclick='login();'>${loginLabel}</button> <button onclick='login();'>${loginLabel}</button>
<span id="tip">${resetMsg}</span> <span id="tip">${resetMsg}</span>
</div> </div>
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
<a class="github__icon" href="${servePath}/oauth/github/redirect"> <a class="github__icon" href="${servePath}/oauth/github/redirect">
<img src="${staticServePath}/images/github-init.gif"/> <img src="${staticServePath}/images/github-init.gif"/>
</a> </a>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号注册</button> <button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">${useGitHubAccountLoginLabel}</button>
<br> <br>
<span onclick="$('#github').hide();$('.form').show()">使用本地账号</span> <span onclick="$('#github').hide();$('.form').show()">${useLocalAccountLabel}</span>
</div> </div>
<div class="form none"> <div class="form none">
<label for="userEmail"> <label for="userEmail">
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
${userPasswordConfirm1Label} ${userPasswordConfirm1Label}
</label> </label>
<input type="password" id="userPasswordConfirm" /> <input type="password" id="userPasswordConfirm" />
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect'">使用 GitHub 账号注册</button>
<button onclick='getUserInfo();'>${registerSoloUserLabel}</button> <button onclick='getUserInfo();'>${registerSoloUserLabel}</button>
<span id="tip" ></span> <span id="tip" ></span>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment