Commit f857c29f authored by Liang Ding's avatar Liang Ding

🎨 #12630

parent fe563199
......@@ -311,13 +311,6 @@ goTopLabel=Top
permalink1Label=Permalink:
permalinkLabel=Permalink
welcomeToSoloLabel=Welcome to
forgotLabel=forgot password
sendLabel=Send
userEmailNotFoundMsg=Sorry, email not found.
resetPwdSuccessMsg=Password reset successfully.
resetPwdFailedMsg=Can not find valid email by that token.
resetPwdMailSubject=[Solo]Password Reset
resetPwdMailBody=To reset your password please open the link below. If this is a mistake just ignore this email - your password will not be changed.<p>
killBrowserLabel=<h2>Let's kill outdated and insecure browser!</h2><p>Let's kill outdated and insecure browser for browser evolution, human progress and better experience.</p><p>You can download</p><ul><li><a href="http://www.mozilla.com/" target="_blank">Firefox</a></li><li><a href="http://www.google.com/chrome" target="_blank">Chrome</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">Maxthon</a> and <a href="http://www.google.com" target="_blank">so on</a>.</li></ul><span style="font-size: 10px">Tip: Remove "Util.killIE();" in /js/common.js can support all browser.</span>
closeLabel=Close
closeForeverLabel=Close Forever
......
......@@ -311,13 +311,6 @@ goTopLabel=\u9876\u90E8
permalink1Label=\u94FE\u63A5\uFF1A
permalinkLabel=\u94FE\u63A5
welcomeToSoloLabel=\u6B22\u8FCE\u4F7F\u7528
forgotLabel=\u5FD8\u8BB0\u5BC6\u7801
sendLabel=\u53D1\u9001
userEmailNotFoundMsg=\u90AE\u7BB1\u5730\u5740\u6709\u8BEF\uFF0C\u8BF7\u91CD\u8BD5
resetPwdSuccessMsg=\u5BC6\u7801\u4FEE\u6539\u6210\u529F
resetPwdFailedMsg=\u4E0D\u80FD\u6839\u636E\u6B64 token \u627E\u5230\u6709\u6548\u7684\u90AE\u7BB1
resetPwdMailSubject=[Solo]\u91CD\u7F6E\u5BC6\u7801
resetPwdMailBody=\u60F3\u66F4\u6539\u5BC6\u7801\uFF0C\u8BF7\u6253\u5F00\u4E0B\u9762\u94FE\u63A5\uFF1B\u82E5\u4E0D\u60F3\u4FEE\u6539\uFF0C\u53EA\u8981\u5FFD\u7565\u6B64\u6B21\u90AE\u4EF6\uFF0C\u7CFB\u7EDF\u5E76\u4E0D\u4F1A\u81EA\u52A8\u4FEE\u6539\u60A8\u7684\u5BC6\u7801\u3002<p>
killBrowserLabel=<h2>\u8BA9\u6211\u4EEC\u653E\u5F03\u4F7F\u7528\u90A3\u4E9B\u8FC7\u65F6\u3001\u4E0D\u5B89\u5168\u7684\u6D4F\u89C8\u5668\u5427\uFF01</h2><p>\u4E3A\u4E86\u8BA9\u6D4F\u89C8\u5668\u66F4\u597D\u7684\u53D1\u5C55\uFF0C\u4EBA\u7C7B\u66F4\u52A0\u7684\u8FDB\u6B65\uFF0C\u62E5\u6709\u66F4\u597D\u7684\u4F53\u9A8C\uFF0C\u8BA9\u6211\u4EEC\u653E\u5F03\u4F7F\u7528\u90A3\u4E9B\u8FC7\u65F6\u3001\u4E0D\u5B89\u5168\u7684\u6D4F\u89C8\u5668\u3002</p>\u60A8\u53EF\u4EE5\u4E0B\u8F7D<ul><li><a href="http://www.mozilla.com/" target="_blank">\u706B\u72D0</a></li><li><a href="http://www.google.com/chrome" target="_blank">\u8C37\u6B4C\u6D4F\u89C8\u5668</a></li><li><a href="http://windows.microsoft.com/en-US/internet-explorer/downloads/ie" target="_blank">IE8 / IE9</a></li><li><a href="http://www.maxthon.com/" target="_blank">\u9068\u6E38</a>\u6216\u8005<a href="http://www.google.com" target="_blank">\u5176\u5B83\u6D4F\u89C8\u5668</a>.</li></ul><span style="font-size: 10px">\u6CE8\uFF1A\u5220\u9664 /js/common.js \u4E2D\u7684 Util.killIE(); \u53EF\u5BF9\u6240\u6709\u6D4F\u89C8\u5668\u8FDB\u884C\u652F\u6301\u3002</span>
closeLabel=\u5173\u95ED
closeForeverLabel=\u6C38\u4E45\u5173\u95ED
......
<!--
Solo - A small and beautiful blogging system written in Java.
Copyright (c) 2010-2019, b3log.org & hacpai.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<!DOCTYPE html>
<html>
<head>
......@@ -45,6 +26,23 @@
</style>
</head>
<body>
<h2>Release 2.9.8 - Jan 16, 2019</h2>
<ul>
<li><a href="https://github.com/b3log/solo/issues/12497">12497</a> 支持阿里云 OSS <span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
<li><a href="https://github.com/b3log/solo/issues/12596">12596</a> nijigen 添加文章目录 <span style='background: #eb6420 !important;color:#FFFFFF !important;padding: 1px 4px;'>skin</span></li>
<li><a href="https://github.com/b3log/solo/issues/12599">12599</a> 皮肤 ease 加载更多问题 <span style='background: #eb6420 !important;color:#FFFFFF !important;padding: 1px 4px;'>skin</span></li>
<li><a href="https://github.com/b3log/solo/issues/12610">12610</a> 发文章时可选择是否同步到社区 <span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12611">12611</a> 移除内建的 Marked 改用 http-marked <span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12613">12613</a> 升级 highlight.js <span style='background: #84b6eb !important;color:#FFFFFF !important;padding: 1px 4px;'>enhancement</span></li>
<li><a href="https://github.com/b3log/solo/issues/12593">12593</a> 完善单元测试用例 <span style='background: #e102d8 !important;color:#FFFFFF !important;padding: 1px 4px;'>development</span></li>
<li><a href="https://github.com/b3log/solo/issues/12597">12597</a> 统一请求取参方式 <span style='background: #e102d8 !important;color:#FFFFFF !important;padding: 1px 4px;'>development</span></li>
<li><a href="https://github.com/b3log/solo/issues/12615">12615</a> 重构模板渲染构造器 <span style='background: #e102d8 !important;color:#FFFFFF !important;padding: 1px 4px;'>development</span></li>
<li><a href="https://github.com/b3log/solo/issues/12622">12622</a> ORM 层接口优化 <span style='background: #e102d8 !important;color:#FFFFFF !important;padding: 1px 4px;'>development</span></li>
<li><a href="https://github.com/b3log/solo/issues/12606">12606</a> 邮件发送依赖库补全 <span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
<li><a href="https://github.com/b3log/solo/issues/12614">12614</a> 使用 Marked 时代码高亮问题 <span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
<li><a href="https://github.com/b3log/solo/issues/12619">12619</a> 用户注册问题 <span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
<li><a href="https://github.com/b3log/solo/issues/12620">12620</a> 手机端无法添加到桌面 <span style='background: #fc2929 !important;color:#FFFFFF !important;padding: 1px 4px;'>bug</span></li>
</ul>
<h2>Release 2.9.7 - Dec 11, 2018</h2>
<ul>
<li><a href="https://github.com/b3log/solo/issues/12535">12535</a> 支持配置自定义模板变量 <span style='background: #02e10c !important;color:#FFFFFF !important;padding: 1px 4px;'>feature</span></li>
......
......@@ -72,13 +72,16 @@
<button id="articleSign0">${noSignLabel}</button>
</span>
<div class="right article-commentable__panel">
<label for="articleCommentable" style="margin: 13px 0 0 0">${allowComment1Label}</label>
<input type="checkbox" id="articleCommentable" checked="checked" />
<span id="postToCommunityPanel" class="none">
<label for="postToCommunity">
<a class="no-underline" href="https://hacpai.com/article/1440573175609" target="_blank">${syncToCommunity}</a>
<label class="checkbox">
<input type="checkbox" id="articleCommentable" checked />
${allowCommentLabel}
</label>
&nbsp;
<span id="postToCommunityPanel">
<label class="checkbox">
<input id="postToCommunity" type="checkbox" />
<a href="https://hacpai.com/article/1546941897596" target="_blank">${syncToCommunity}</a>
</label>
<input id="postToCommunity" type="checkbox" checked="checked"/>
</span>
</div>
<div class="clear"></div>
......
......@@ -32,7 +32,7 @@
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-base${miniPostfix}.css?${staticResourceVersion}" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/css/default-admin${miniPostfix}.css?${staticResourceVersion}" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/js/lib/CodeMirrorEditor/codemirror.min.css?${staticResourceVersion}" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/js/lib/highlight.js-9.6.0/styles/github.css?${staticResourceVersion}" />
<link type="text/css" rel="stylesheet" href="${staticServePath}/js/lib/highlight-9.13.1/styles/github.css?${staticResourceVersion}" />
<link rel="icon" type="image/png" href="${staticServePath}/favicon.png" />
<link rel="manifest" href="${servePath}/manifest.json">
</head>
......
......@@ -25,6 +25,7 @@
};
var Label = {
"markedAvailable": ${markedAvailable?c},
"skinDirName": "${skinDirName}",
"editorType": "${editorType}",
"userRole": "${userRole}",
......@@ -73,6 +74,7 @@
"pluginNameLabel": "${pluginNameLabel}",
"statusLabel": "${statusLabel}",
"versionLabel": "${versionLabel}",
"userNameLabel": "${userNameLabel}",
"commentNameLabel": "${commentNameLabel}",
"commentEmailLabel": "${commentEmailLabel}",
"roleLabel": "${roleLabel}",
......
......@@ -178,13 +178,20 @@
&nbsp;
<button onclick="admin.preference.updateOss()">${updateLabel}</button>
</span>
<span class="clear"></span>
<span class="fn__flex-inline">
<label class="fn__flex-inline">
${qiniuOssLabel}
<input name="ossServer" id= "qiniuOss" type="radio" value="qiniu" onclick="admin.preference.ossServerChange()"/>
<input name="ossServer" type="radio" value="qiniu" onclick="admin.preference.ossServerChange()"/>
</label>
<span>&nbsp; &nbsp; &nbsp;</span>
<label class="fn__flex-inline">
${aliyunOssLabel}
<input name="ossServer" id= "aliyunOss" type="radio" value="aliyun" onclick="admin.preference.ossServerChange()"/>
<div class="clear"></div>
<input name="ossServer" type="radio" value="aliyun" onclick="admin.preference.ossServerChange()"/>
</label>
</span>
<label for="osSAccessKey">${accessKey1Label}</label>
<input id="ossAccessKey" type="text"/>
<input id="ossAccessKey" type="text" />
<label for="ossSecretKey">${secretKey1Label}</label>
<input id="ossSecretKey" type="text"/>
<label for="ossDomain">${domain1Label}</label>
......
#
# Solo - A small and beautiful blogging system written in Java.
# Copyright (c) 2010-2019, b3log.org & hacpai.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#
# Description: B3log configurations for testing.
# Version: 1.2.0.1, Jul 9, 2017
# Author: Liang Ding
#
rhythm.servePath=http://localhost:8081
symphony.servePath=http://localhost:8084
gravatar=https://secure.gravatar.com/avatar/
faviconAPI=http://api.byi.pw/favicon?url=
\ No newline at end of file
......@@ -37,156 +37,15 @@
onclick="window.location.href = '${servePath}/oauth/github/redirect';$('#github').addClass('github--loading')">${useGitHubAccountLoginLabel}</button>
<br>
</div>
<div id="user" class="form none">
<label for="userEmail">
${commentEmail1Label}
</label>
<input id="userEmail"/>
<label for="userName">
${userName1Label}
</label>
<input id="userName"/>
<label for="userPassword">
${userPassword1Label}
</label>
<input type="password" id="userPassword"/>
<label for="userPasswordConfirm">
${userPasswordConfirm1Label}
</label>
<input type="password" id="userPasswordConfirm"/>
<button onclick='getUserInfo();'>${nextStepLabel}</button>
<span id="tip"></span>
</div>
<div id="sys" class="none">
<button onclick='returnTo();'>${previousStepLabel}</button>
<button onclick='initSys();' id="initButton">${initLabel}</button>
<span id="tipInit"></span>
<span class="clear"></span>
</div>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
var validate = function () {
var userName = $('#userName').val().replace(/(^\s*)|(\s*$)/g, '')
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(
$('#userEmail').val())) {
$('#tip').text("${mailInvalidLabel}")
$('#userEmail').focus()
} else if (2 > userName.length || userName.length > 20) {
$('#tip').text("${nameTooLongLabel}")
$('#userName').focus()
} else if ($('#userPassword').val().replace(/\s/g, '') === '') {
$('#tip').text("${passwordEmptyLabel}")
$('#userPassword').focus()
} else if ($('#userPassword').val() !== $('#userPasswordConfirm').val()) {
$('#tip').text("${passwordNotMatchLabel}")
$('#userPasswordConfirm').focus()
} else {
$('#tip').text('')
return true
}
return false
}
var getUserInfo = function () {
if (validate()) {
$('#init').animate({
'top': -$('#user').height() + ($('.main h2').offset().top + 10),
})
$('#user').animate({
'opacity': 0,
})
$('#sys').css({
'display': 'block',
'opacity': 1,
})
$(window).unbind().keydown(function (e) {
if (e.keyCode === 27) {// esc
returnTo()
$(window).unbind()
} else if (e.keyCode === 13) {// enter
initSys()
}
})
}
}
var returnTo = function () {
$('#init').animate({
'top': $('.main h2').offset().top + 42,
})
$('#user').animate({
'opacity': 1,
})
$('#sys').animate({
'opacity': 0,
}, 800, function () {
this.style.display = 'none'
})
}
var initSys = function () {
var requestJSONObject = {
'userName': $('#userName').val(),
'userEmail': $('#userEmail').val(),
'userPassword': $('#userPassword').val(),
}
if (confirm("${confirmInitLabel}")) {
$(window).unbind()
$('#tipInit').html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}/init",
type: 'POST',
data: JSON.stringify(requestJSONObject),
success: function (result, textStatus) {
if (!result.sc) {
$('#tipInit').text(result.msg)
return
}
window.location.href = "${servePath}/admin-index.do#main"
},
})
}
};
(function () {
try {
$('#userEmail').focus()
$('input').keypress(function (event) {
if (event.keyCode === 13) {
event.preventDefault()
}
})
$('#userPasswordConfirm').keypress(function (event) {
if (event.keyCode === 13) {
getUserInfo()
}
})
$('.wrap').css('padding', ($(window).height() - 450) / 2 + 'px 0')
} catch (e) {
document.querySelector('.main').innerHTML = "${staticErrorLabel}<br><br><br><br><br>"
}
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
$('.main').css({
height: '350px',
'overflow': 'hidden',
})
})()
</script>
</@commonPage>
\ No newline at end of file
#
# Solo - A small and beautiful blogging system written in Java.
# Copyright (c) 2010-2019, b3log.org & hacpai.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#
# Description: Solo default language configurations(zh_CN) for testing.
# Version: 1.0.0.0, Sep 11, 2012
# Author: Liang Ding
#
helloWorld.title=\u4e16\u754c\uff0c\u4f60\u597d\uff01
helloWorld.content=\u6b22\u8fce\u4f7f\u7528 \
<a style="text-decoration: none;" target="_blank" href="https://github.com/b3log/solo">\
<span style="color: orange;">B</span>\
<span style="font-size: 9px; color: blue;">\
<sup>3</sup></span><span style="color: green;">L</span>\
<span style="color: red;">O</span>\
<span style="color: blue;">G</span> \
<span style="color: orangered; font-weight: bold;">Solo</span></a>\
\u3002\u8fd9\u662f\u7cfb\u7edf\u81ea\u52a8\u751f\u6210\u7684\u6f14\u793a\u6587\u7ae0\u3002\u7f16\u8f91\u6216\u8005\u5220\u9664\u5b83\uff0c\u7136\u540e\u5f00\u59cb\u60a8\u7684\u535a\u5ba2\uff01
helloWorld.comment.content=\u60a8\u597d\uff0c\u8fd9\u662f\u4e00\u6761\u8bc4\u8bba\u3002_esc_enter_88250_\u8981\u5220\u9664\u8bc4\u8bba\uff0c\u8bf7\u5148\u767b\u5f55\uff0c\u7136\u540e\u518d\u67e5\u770b\u8fd9\u7bc7\u6587\u7ae0\u7684\u8bc4\u8bba\u3002\u5728\u90a3\u91cc\uff0c\u60a8\u53ef\u4ee5\u770b\u5230\u7f16\u8f91\u6216\u8005\u5220\u9664\u8bc4\u8bba\u7684\u9009\u9879\u3002
updateFailLabel=\u66f4\u65b0\u5931\u8d25
\ No newline at end of file
#
# Solo - A small and beautiful blogging system written in Java.
# Copyright (c) 2010-2019, b3log.org & hacpai.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#
# Description: Latke configurations for test.
# Version: 2.0.0.2, Jan 8, 2016
# Author: Liang Ding
#
serverScheme=http
serverHost=localhost
serverPort=8080
#
# Solo - A small and beautiful blogging system written in Java.
# Copyright (c) 2010-2019, b3log.org & hacpai.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#
# Description: Solo local environment configurations.
# Version: 1.1.3.10, Sep 13, 2018
# Author: Liang Ding
#
#### H2 runtime ####
runtimeDatabase=H2
jdbc.username=root
jdbc.password=
jdbc.driver=org.h2.Driver
jdbc.URL=jdbc:h2:./target/solo_h2_test/db
#### MySQL runtime ####
#runtimeDatabase=MYSQL
#jdbc.username=root
#jdbc.password=
#jdbc.driver=com.mysql.jdbc.Driver
#jdbc.URL=jdbc:mysql://localhost:3306/solo?useUnicode=yes&characterEncoding=utf8
# The minConnCnt MUST larger or equal to 3
jdbc.minConnCnt=5
jdbc.maxConnCnt=10
# Be care to change the transaction isolation
jdbc.transactionIsolation=REPEATABLE_READ
# The specific table name prefix
jdbc.tablePrefix=b3_solo
\ No newline at end of file
#
# Solo - A small and beautiful blogging system written in Java.
# Copyright (c) 2010-2019, b3log.org & hacpai.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#
# Description: Solo logging configurations for tesing.
# Version: 1.0.0.0, Sep 30, 2015
# Author: Liang Ding
#
log4j.rootLogger=WARN, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=[%-5p]-[%d{yyyy-MM-dd HH:mm:ss}]-[%c:%L]: %m%n
log4j.logger.org.b3log.solo=WARN
log4j.logger.org.b3log.latke=ERROR
......@@ -20,72 +20,19 @@
<#include "macro-common-page.ftl">
<@commonPage "${loginLabel}">
<h2>
${loginLabel}
</h2>
<div id="github">
<h2>
${loginLabel}
</h2>
<div id="github">
<div class="github__icon"
onclick="window.location.href = '${servePath}/oauth/github/redirect';$('#github').addClass('github--loading')">
<img src="${staticServePath}/images/github-init.gif"/>
</div>
<button class="hover" onclick="window.location.href = '${servePath}/oauth/github/redirect';$('#github').addClass('github--loading')">${useGitHubAccountLoginLabel}</button>
<br>
</div>
<div class="form none">
<label for="userEmail">
${userLabel}
</label>
<input id="userEmail" tabindex="1" />
<label for="userPassword">
${userPasswordLabel} <a href="${servePath}/forgot">(${forgotLabel})</a>
</label>
<input type="password" id="userPassword" tabindex="2" />
<button onclick='login();'>${loginLabel}</button>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
(function() {
$("#userEmail").focus();
$("#userPassword, #userEmail").keypress(function(event) {
if (13 === event.keyCode) { // Enter pressed
login();
}
});
})();
var login = function() {
if ($("#userPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#userPassword").focus();
return;
}
var requestJSONObject = {
"userEmail": $("#userEmail").val(),
"userPassword": $("#userPassword").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}/login",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function() {
// alert("Login error!");
},
success: function(data, textStatus) {
if (!data.isLoggedIn) {
$("#tip").text(data.msg);
return;
}
window.location.href = data.to;
}
});
};
</script>
</div>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
$('.wrap').css('padding', ($(window).height() - 450) / 2 + 'px 0')
</script>
</@commonPage>
\ No newline at end of file
#
# Solo - A small and beautiful blogging system written in Java.
# Copyright (c) 2010-2019, b3log.org & hacpai.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#
# Description: Solo mail configurations for test.
# Version: 1.0.0.0, Jul 19, 2017
# Author: Liang Ding
#
mail.user=
mail.password=
mail.debug=false
mail.smtp.host=
mail.smtp.port=
mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
mail.smtp.socketFactory.fallback=false
mail.smtp.socketFactory.port=465
This diff is collapsed.
<#--
Solo - A small and beautiful blogging system written in Java.
Copyright (c) 2010-2019, b3log.org & hacpai.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<#include "macro-common-page.ftl">
<@commonPage "${forgotLabel}!">
<h2>
${forgotLabel}
</h2>
<#if "email" == inputType>
<div class="form">
<label for="emailOrPassword">
${commentEmailLabel}
</label>
<input id="emailOrPassword"/>
<button id="sendBtn" onclick='forgot();'>${sendLabel}</button>
<span id="tip"></span>
</div>
<#else>
<div class="form">
<label for="emailOrPassword">
${userPasswordLabel}
</label>
<input type="password" id="emailOrPassword"/>
<input type="hidden" id="token" value="${tokenHidden}"/>
<button id="sendBtn" onclick='reset();'>${ok}</button>
<span id="tip"></span>
</div>
</#if>
<script type="text/javascript" src="${staticServePath}/js/lib/jquery/jquery.min.js" charset="utf-8"></script>
<script type="text/javascript">
(function () {
$("#emailOrPassword").focus();
$("#emailOrPassword").keypress(function (event) {
if (13 === event.keyCode) { // Enter pressed
$('#sendBtn').click();
}
});
// if no JSON, add it.
try {
JSON
} catch (e) {
document.write("<script src=\"${staticServePath}/js/lib/json2.js\"><\/script>");
}
})();
var reset = function () {
if ($("#emailOrPassword").val() === "") {
$("#tip").text("${passwordEmptyLabel}");
$("#emailOrPassword").focus();
return;
}
var requestJSONObject = {
"newPwd": $("#emailOrPassword").val(),
"token": $("#token").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...");
$.ajax({
url: "${servePath}/reset",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function () {
// alert("reset password error!");
},
success: function (data, textStatus) {
if (data.succeed) {
window.location.href = data.to;
} else {
$("#tip").text(data.msg);
}
}
});
};
var forgot = function () {
if (!/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test($("#emailOrPassword" + status).val())) {
$("#tip").text("${mailInvalidLabel}");
$("#emailOrPassword").focus();
return;
}
var requestJSONObject = {
"userEmail": $("#emailOrPassword").val()
};
$("#tip").html("<img src='${staticServePath}/images/loading.gif'/> loading...")
$.ajax({
url: "${servePath}/forgot",
type: "POST",
contentType: "application/json",
data: JSON.stringify(requestJSONObject),
error: function () {
// alert("reset password error!");
},
success: function (data, textStatus) {
if (data.succeed) {
window.location.href = data.to;
} else {
$("#tip").text(data.msg);
}
}
});
};
</script>
</@commonPage>
\ No newline at end of file
====
Solo - A small and beautiful blogging system written in Java.
Copyright (c) 2010-2019, b3log.org & hacpai.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
====
User-agent: *
Disallow: /*.do
Disallow: /login
......
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
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