Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
douban-api-proxy
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
captainwong
douban-api-proxy
Commits
fb18ab1c
Commit
fb18ab1c
authored
Apr 29, 2020
by
Ozzieisaacs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #866 (Recent book sidebar element can't be removed anymore)
parent
01ff55c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
ub.py
cps/ub.py
+3
-1
No files found.
cps/ub.py
View file @
fb18ab1c
...
@@ -60,7 +60,7 @@ def get_sidebar_config(kwargs=None):
...
@@ -60,7 +60,7 @@ def get_sidebar_config(kwargs=None):
sidebar
=
list
()
sidebar
=
list
()
sidebar
.
append
({
"glyph"
:
"glyphicon-book"
,
"text"
:
_
(
'Recently Added'
),
"link"
:
'web.index'
,
"id"
:
"new"
,
sidebar
.
append
({
"glyph"
:
"glyphicon-book"
,
"text"
:
_
(
'Recently Added'
),
"link"
:
'web.index'
,
"id"
:
"new"
,
"visibility"
:
constants
.
SIDEBAR_RECENT
,
'public'
:
True
,
"page"
:
"root"
,
"visibility"
:
constants
.
SIDEBAR_RECENT
,
'public'
:
True
,
"page"
:
"root"
,
"show_text"
:
_
(
'Show recent books'
),
"config_show"
:
Tru
e
})
"show_text"
:
_
(
'Show recent books'
),
"config_show"
:
Fals
e
})
sidebar
.
append
({
"glyph"
:
"glyphicon-fire"
,
"text"
:
_
(
'Hot Books'
),
"link"
:
'web.books_list'
,
"id"
:
"hot"
,
sidebar
.
append
({
"glyph"
:
"glyphicon-fire"
,
"text"
:
_
(
'Hot Books'
),
"link"
:
'web.books_list'
,
"id"
:
"hot"
,
"visibility"
:
constants
.
SIDEBAR_HOT
,
'public'
:
True
,
"page"
:
"hot"
,
"show_text"
:
_
(
'Show Hot Books'
),
"visibility"
:
constants
.
SIDEBAR_HOT
,
'public'
:
True
,
"page"
:
"hot"
,
"show_text"
:
_
(
'Show Hot Books'
),
"config_show"
:
True
})
"config_show"
:
True
})
...
@@ -156,6 +156,8 @@ class UserBase:
...
@@ -156,6 +156,8 @@ class UserBase:
return
self
.
default_language
return
self
.
default_language
def
check_visibility
(
self
,
value
):
def
check_visibility
(
self
,
value
):
if
value
==
constants
.
SIDEBAR_RECENT
:
return
True
return
constants
.
has_flag
(
self
.
sidebar_view
,
value
)
return
constants
.
has_flag
(
self
.
sidebar_view
,
value
)
def
show_detail_random
(
self
):
def
show_detail_random
(
self
):
...
...
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