Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
6841594b
Unverified
Commit
6841594b
authored
Mar 29, 2019
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
#12724
parent
8728b9c7
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
178 additions
and
32 deletions
+178
-32
gulpfile.js
gulpfile.js
+2
-1
src/main/java/org/b3log/solo/SoloServletListener.java
src/main/java/org/b3log/solo/SoloServletListener.java
+3
-1
src/main/resources/lang_en_US.properties
src/main/resources/lang_en_US.properties
+1
-1
src/main/resources/lang_zh_CN.properties
src/main/resources/lang_zh_CN.properties
+1
-1
src/main/webapp/admin/admin-index.ftl
src/main/webapp/admin/admin-index.ftl
+7
-0
src/main/webapp/admin/admin-preference.ftl
src/main/webapp/admin/admin-preference.ftl
+0
-22
src/main/webapp/admin/admin-theme-list.ftl
src/main/webapp/admin/admin-theme-list.ftl
+35
-0
src/main/webapp/error/401.ftl
src/main/webapp/error/401.ftl
+1
-1
src/main/webapp/error/404.ftl
src/main/webapp/error/404.ftl
+1
-1
src/main/webapp/js/admin/admin.js
src/main/webapp/js/admin/admin.js
+2
-2
src/main/webapp/js/admin/preference.js
src/main/webapp/js/admin/preference.js
+0
-2
src/main/webapp/js/admin/themeList.js
src/main/webapp/js/admin/themeList.js
+125
-0
No files found.
gulpfile.js
View file @
6841594b
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
*
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.7.0.
1, Jan 2
, 2019
* @version 1.7.0.
2, Mar 29
, 2019
*/
*/
'
use strict
'
'
use strict
'
...
@@ -79,6 +79,7 @@ function miniAdmin () {
...
@@ -79,6 +79,7 @@ function miniAdmin () {
'
./src/main/webapp/js/admin/others.js
'
,
'
./src/main/webapp/js/admin/others.js
'
,
'
./src/main/webapp/js/admin/linkList.js
'
,
'
./src/main/webapp/js/admin/linkList.js
'
,
'
./src/main/webapp/js/admin/preference.js
'
,
'
./src/main/webapp/js/admin/preference.js
'
,
'
./src/main/webapp/js/admin/theme-list.js
'
,
'
./src/main/webapp/js/admin/pluginList.js
'
,
'
./src/main/webapp/js/admin/pluginList.js
'
,
'
./src/main/webapp/js/admin/userList.js
'
,
'
./src/main/webapp/js/admin/userList.js
'
,
'
./src/main/webapp/js/admin/categoryList.js
'
,
'
./src/main/webapp/js/admin/categoryList.js
'
,
...
...
src/main/java/org/b3log/solo/SoloServletListener.java
View file @
6841594b
...
@@ -58,7 +58,8 @@ import javax.servlet.http.HttpSessionEvent;
...
@@ -58,7 +58,8 @@ import javax.servlet.http.HttpSessionEvent;
* Solo Servlet listener.
* Solo Servlet listener.
*
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @author <a href="http://88250.b3log.org">Liang Ding</a>
* @version 1.10.0.13, Mar 26, 2019
* @author <a href="http://vanessa.b3log.org">Vanessa</a>
* @version 1.11.0.13, Mar 29, 2019
* @since 0.3.1
* @since 0.3.1
*/
*/
public
final
class
SoloServletListener
extends
AbstractServletListener
{
public
final
class
SoloServletListener
extends
AbstractServletListener
{
...
@@ -336,6 +337,7 @@ public final class SoloServletListener extends AbstractServletListener {
...
@@ -336,6 +337,7 @@ public final class SoloServletListener extends AbstractServletListener {
"/admin-draft-list.do"
,
"/admin-draft-list.do"
,
"/admin-user-list.do"
,
"/admin-user-list.do"
,
"/admin-category-list.do"
,
"/admin-category-list.do"
,
"/admin-theme-list.do"
,
"/admin-plugin-list.do"
,
"/admin-plugin-list.do"
,
"/admin-main.do"
,
"/admin-main.do"
,
"/admin-about.do"
},
adminConsole:
:
showAdminFunctions
);
"/admin-about.do"
},
adminConsole:
:
showAdminFunctions
);
...
...
src/main/resources/lang_en_US.properties
View file @
6841594b
...
@@ -211,7 +211,7 @@ submitUploadLabel=Upload
...
@@ -211,7 +211,7 @@ submitUploadLabel=Upload
fileNameLabel
=
File Name
fileNameLabel
=
File Name
paramSettingsLabel
=
Parameters
paramSettingsLabel
=
Parameters
configSettingsLabel
=
Configuration
configSettingsLabel
=
Configuration
skinLabel
=
Skins
skinLabel
=
Theme
signLabel
=
Signs
signLabel
=
Signs
sign1Label
=
Signs:
sign1Label
=
Signs:
noSignLabel
=
None
noSignLabel
=
None
...
...
src/main/resources/lang_zh_CN.properties
View file @
6841594b
...
@@ -211,7 +211,7 @@ submitUploadLabel=\u4E0A\u4F20
...
@@ -211,7 +211,7 @@ submitUploadLabel=\u4E0A\u4F20
fileNameLabel
=
\u6587\u
4EF6
\u
540D
fileNameLabel
=
\u6587\u
4EF6
\u
540D
paramSettingsLabel
=
\u
53C2
\u6570\u
8BBE
\u
7F6E
paramSettingsLabel
=
\u
53C2
\u6570\u
8BBE
\u
7F6E
configSettingsLabel
=
\u
4FE1
\u
606F
\u
914D
\u
7F6E
configSettingsLabel
=
\u
4FE1
\u
606F
\u
914D
\u
7F6E
skinLabel
=
\u
76AE
\u
80A4
skinLabel
=
\u
76AE
\u
80A4
\u
7BA1
\u7406
signLabel
=
\u
7B7E
\u
540D
\u6863
signLabel
=
\u
7B7E
\u
540D
\u6863
sign1Label
=
\u
7B7E
\u
540D
\u6863\u
FF1A
sign1Label
=
\u
7B7E
\u
540D
\u6863\u
FF1A
noSignLabel
=
\u
4E0D
\u
4F7F
\u7528
noSignLabel
=
\u
4E0D
\u
4F7F
\u7528
...
...
src/main/webapp/admin/admin-index.ftl
View file @
6841594b
...
@@ -96,6 +96,11 @@
...
@@ -96,6 +96,11 @@
<a
href=
"#tools/preference"
>
${preferenceLabel}
</a>
<a
href=
"#tools/preference"
>
${preferenceLabel}
</a>
</div>
</div>
</li>
</li>
<li>
<div
id=
"tabs_preference"
>
<a
href=
"#tools/theme-list"
>
${skinLabel}
</a>
</div>
</li>
<li>
<li>
<div
id=
"tabs_category-list"
>
<div
id=
"tabs_category-list"
>
<a
href=
"#tools/category-list"
>
${categoryListLabel}
</a>
<a
href=
"#tools/category-list"
>
${categoryListLabel}
</a>
...
@@ -145,6 +150,7 @@
...
@@ -145,6 +150,7 @@
<div
id=
"tabsPanel_draft-list"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_draft-list"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_link-list"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_link-list"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_preference"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_preference"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_theme-list"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_category-list"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_category-list"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_page-list"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_page-list"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_others"
class=
"fn__none"
></div>
<div
id=
"tabsPanel_others"
class=
"fn__none"
></div>
...
@@ -180,6 +186,7 @@
...
@@ -180,6 +186,7 @@
<script
src=
"${staticServePath}/js/admin/plugin.js"
></script>
<script
src=
"${staticServePath}/js/admin/plugin.js"
></script>
<script
src=
"${staticServePath}/js/admin/main.js"
></script>
<script
src=
"${staticServePath}/js/admin/main.js"
></script>
<script
src=
"${staticServePath}/js/admin/about.js"
></script>
<script
src=
"${staticServePath}/js/admin/about.js"
></script>
<script
src=
"${staticServePath}/js/admin/themeList.js"
></script>
<
#else
>
<
#else
>
<script
src=
"${staticServePath}/js/admin/admin.min.js?${staticResourceVersion}"
></script>
<script
src=
"${staticServePath}/js/admin/admin.min.js?${staticResourceVersion}"
></script>
</
#
if>
</
#
if>
...
...
src/main/webapp/admin/admin-preference.ftl
View file @
6841594b
...
@@ -24,11 +24,6 @@
...
@@ -24,11 +24,6 @@
<a class="tab-current" href="#tools/preference/config">${configSettingsLabel}</a>
<a class="tab-current" href="#tools/preference/config">${configSettingsLabel}</a>
</div>
</div>
</li>
</li>
<li>
<div id="tabPreference_skins">
<a href="#tools/preference/skins">${skinLabel}</a>
</div>
</li>
<li>
<li>
<div id="tabPreference_signs">
<div id="tabPreference_signs">
<a href="#tools/preference/signs">${signLabel}</a>
<a href="#tools/preference/signs">${signLabel}</a>
...
@@ -235,23 +230,6 @@
...
@@ -235,23 +230,6 @@
<button class="fn__right" onclick="admin.preference.update()">${updateLabel}</button>
<button class="fn__right" onclick="admin.preference.update()">${updateLabel}</button>
<div class="fn__clear"></div>
<div class="fn__clear"></div>
</div>
</div>
<div id="tabPreferencePanel_skins" class="fn__none form">
<table class="form" width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<a href="https://github.com/b3log/solo/issues/12449" target="_blank">新皮肤推荐</a> •
<a href="https://hacpai.com/article/1493814851007" target="_blank">皮肤开发指南</a>
</td>
</tr>
<tr>
<td>
<div id="skinMain"></div>
</td>
</tr>
</tbody>
</table>
</div>
<div id="tabPreferencePanel_signs" class="fn__none form">
<div id="tabPreferencePanel_signs" class="fn__none form">
<button onclick="admin.preference.update()" class="fn__right">${updateLabel}</button>
<button onclick="admin.preference.update()" class="fn__right">${updateLabel}</button>
<div class="fn__clear"></div>
<div class="fn__clear"></div>
...
...
src/main/webapp/admin/admin-theme-list.ftl
0 → 100644
View file @
6841594b
<#--
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/>.
-->
<table class="form" width="100%" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<a href="https://github.com/b3log/solo/issues/12449" target="_blank">新皮肤推荐</a> •
<a href="https://hacpai.com/article/1493814851007" target="_blank">皮肤开发指南</a>
</td>
</tr>
<tr>
<td>
<div id="skinMain"></div>
</td>
</tr>
</tbody>
</table>
${plugins}
src/main/webapp/error/401.ftl
View file @
6841594b
...
@@ -23,6 +23,6 @@
...
@@ -23,6 +23,6 @@
<h2>401 Unauthorized!</h2>
<h2>401 Unauthorized!</h2>
<img class="img-error" src="${staticServePath}/images/401.png" alt="401" title="401 Unauthorized!" />
<img class="img-error" src="${staticServePath}/images/401.png" alt="401" title="401 Unauthorized!" />
<div class="a-error">
<div class="a-error">
Please <a href="${loginURL}">
Login
</a> or return to <a href="${servePath}">Index</a>.
Please <a href="${loginURL}">
Star
</a> or return to <a href="${servePath}">Index</a>.
</div>
</div>
</@commonPage>
</@commonPage>
src/main/webapp/error/404.ftl
View file @
6841594b
...
@@ -23,6 +23,6 @@
...
@@ -23,6 +23,6 @@
<h2>404 Not Found!</h2>
<h2>404 Not Found!</h2>
<img class="img-error" src="${staticServePath}/images/404.gif" title="404" alt="404 Not Found!"/>
<img class="img-error" src="${staticServePath}/images/404.gif" title="404" alt="404 Not Found!"/>
<div class="a-error">
<div class="a-error">
Please <a href="${loginURL}">
Login
</a> or return to <a href="${servePath}">Index</a>.
Please <a href="${loginURL}">
Star
</a> or return to <a href="${servePath}">Index</a>.
</div>
</div>
</@commonPage>
</@commonPage>
\ No newline at end of file
src/main/webapp/js/admin/admin.js
View file @
6841594b
...
@@ -44,11 +44,11 @@ var Admin = function () {
...
@@ -44,11 +44,11 @@ var Admin = function () {
this
.
register
=
{}
this
.
register
=
{}
// 工具栏下的工具
// 工具栏下的工具
this
.
tools
=
[
this
.
tools
=
[
'
#page-list
'
,
'
#
fil
e-list
'
,
'
#link-list
'
,
'
#preference
'
,
'
#page-list
'
,
'
#
them
e-list
'
,
'
#link-list
'
,
'
#preference
'
,
'
#user-list
'
,
'
#plugin-list
'
,
'
#others
'
,
'
#category-list
'
]
'
#user-list
'
,
'
#plugin-list
'
,
'
#others
'
,
'
#category-list
'
]
// 多用户时,一般用户不能使用的功能
// 多用户时,一般用户不能使用的功能
this
.
adTools
=
[
this
.
adTools
=
[
'
link-list
'
,
'
preference
'
,
'
fil
e-list
'
,
'
page-list
'
,
'
link-list
'
,
'
preference
'
,
'
them
e-list
'
,
'
page-list
'
,
'
user-list
'
,
'
plugin-list
'
,
'
others
'
,
'
category-list
'
]
'
user-list
'
,
'
plugin-list
'
,
'
others
'
,
'
category-list
'
]
}
}
...
...
src/main/webapp/js/admin/preference.js
View file @
6841594b
...
@@ -77,8 +77,6 @@ admin.preference = {
...
@@ -77,8 +77,6 @@ admin.preference = {
'
true
'
===
preference
.
commentable
?
$
(
'
#commentable
'
).
attr
(
'
checked
'
,
'
checked
'
)
:
$
(
'
commentable
'
).
removeAttr
(
'
checked
'
)
'
true
'
===
preference
.
commentable
?
$
(
'
#commentable
'
).
attr
(
'
checked
'
,
'
checked
'
)
:
$
(
'
commentable
'
).
removeAttr
(
'
checked
'
)
'
true
'
===
preference
.
syncGitHub
?
$
(
'
#syncGitHub
'
).
attr
(
'
checked
'
,
'
checked
'
)
:
$
(
'
syncGitHub
'
).
removeAttr
(
'
checked
'
)
'
true
'
===
preference
.
syncGitHub
?
$
(
'
#syncGitHub
'
).
attr
(
'
checked
'
,
'
checked
'
)
:
$
(
'
syncGitHub
'
).
removeAttr
(
'
checked
'
)
syncGitHub
admin
.
preference
.
locale
=
preference
.
localeString
admin
.
preference
.
locale
=
preference
.
localeString
// skin
// skin
...
...
src/main/webapp/js/admin/themeList.js
0 → 100644
View file @
6841594b
/*
* 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/>.
*/
/**
* preference for admin.
*
* @author <a href="http://vanessa.b3log.org">Liyuan Li</a>
* @version 0.1.0.0, Mar 29, 2019
*/
/* theme list 相关操作 */
admin
.
themeList
=
{
/*
* 初始化
*/
init
:
function
()
{
$
.
ajax
({
url
:
Label
.
servePath
+
'
/console/preference/
'
,
type
:
'
GET
'
,
cache
:
false
,
success
:
function
(
result
,
textStatus
)
{
$
(
'
#tipMsg
'
).
text
(
result
.
msg
)
if
(
!
result
.
sc
)
{
$
(
'
#loadMsg
'
).
text
(
''
)
return
}
var
preference
=
result
.
preference
// skin
$
(
'
#skinMain
'
).
data
(
'
skinDirName
'
,
preference
.
skinDirName
)
var
skins
=
eval
(
'
(
'
+
preference
.
skins
+
'
)
'
)
var
skinsHTML
=
''
for
(
var
i
=
0
;
i
<
skins
.
length
;
i
++
)
{
var
selectedClass
=
''
if
(
skins
[
i
].
skinName
===
preference
.
skinName
&&
skins
[
i
].
skinDirName
===
preference
.
skinDirName
)
{
selectedClass
+=
'
selected
'
}
skinsHTML
+=
'
<div class="fn__left skinItem
'
+
selectedClass
+
'
"><div class="ft__center">
'
+
skins
[
i
].
skinName
+
'
</div><img class="skinPreview" src="
'
+
Label
.
staticServePath
+
'
/skins/
'
+
skins
[
i
].
skinDirName
+
'
/preview.png"/><div><button class="update small" data-name="
'
+
skins
[
i
].
skinDirName
+
'
">
'
+
Label
.
enableLabel
+
'
</button><button class="small" onclick="window.open(
\'
'
+
Label
.
servePath
+
'
?skin=
'
+
skins
[
i
].
skinName
+
'
\'
)">
'
+
Label
.
previewLabel
+
'
</button></div></div>
'
}
$
(
'
#skinMain
'
).
append
(
skinsHTML
+
'
<div class=
\'
fn__clear
\'
></div>
'
)
$
(
'
.skinItem .update
'
).
click
(
function
()
{
$
(
'
.skinItem
'
).
removeClass
(
'
selected
'
)
$
(
this
).
closest
(
'
.skinItem
'
).
addClass
(
'
selected
'
)
$
(
'
#skinMain
'
).
data
(
'
skinDirName
'
,
$
(
this
).
data
(
'
name
'
))
admin
.
preference
.
update
()
})
$
(
'
#loadMsg
'
).
text
(
''
)
},
})
},
/*
* @description 更新
*/
update
:
function
()
{
if
(
!
admin
.
preference
.
validate
())
{
return
}
$
(
'
#tipMsg
'
).
text
(
''
)
$
(
'
#loadMsg
'
).
text
(
Label
.
loadingLabel
)
var
requestJSONObject
=
{
'
preference
'
:
{
'
skinDirName
'
:
$
(
'
#skinMain
'
).
data
(
'
skinDirName
'
),
},
}
$
.
ajax
({
url
:
Label
.
servePath
+
'
/console/preference/
'
,
type
:
'
PUT
'
,
cache
:
false
,
data
:
JSON
.
stringify
(
requestJSONObject
),
success
:
function
(
result
,
textStatus
)
{
$
(
'
#tipMsg
'
).
text
(
result
.
msg
)
if
(
!
result
.
sc
)
{
$
(
'
#loadMsg
'
).
text
(
''
)
return
}
if
(
$
(
'
#localeString
'
).
val
()
!==
admin
.
preference
.
locale
)
{
window
.
location
.
reload
()
}
$
(
'
#loadMsg
'
).
text
(
''
)
},
})
},
}
/*
* 注册到 admin 进行管理
*/
admin
.
register
[
'
theme-list
'
]
=
{
'
obj
'
:
admin
.
themeList
,
'
init
'
:
admin
.
themeList
.
init
,
'
refresh
'
:
admin
.
themeList
.
init
,
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment