Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
M
macos-runtime
Project
Project
Details
Activity
Releases
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
郭阔
macos-runtime
Commits
f313bd51
Commit
f313bd51
authored
Oct 29, 2026
by
郭阔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui(edit): 抓取条数回写当前生效值(源覆盖→default.conf→20 兜底)
parent
c06ad75a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
app.py
web/app.py
+3
-1
edit.html
web/templates/edit.html
+2
-2
No files found.
web/app.py
View file @
f313bd51
...
...
@@ -870,8 +870,10 @@ def edit_source(name):
if
request
.
method
==
"GET"
:
current_time
=
","
.
join
(
t
for
t
in
pl
.
schedule_times
(
name
)
.
split
(
","
)
if
t
.
strip
())
or
"-"
conf
=
read_conf
(
name
)
# 回写当前生效的抓取条数(源覆盖优先,否则 default.conf,再兜底 20)
current_count
=
conf
.
get
(
"COUNT"
)
or
read_conf
(
"default"
)
.
get
(
"COUNT"
)
or
"20"
return
render_template
(
"edit.html"
,
name
=
name
,
current_time
=
current_time
,
conf
=
conf
,
providers
=
get_providers
())
current_count
=
current_count
,
providers
=
get_providers
())
# POST: 执行 modify-source.sh
time
=
request
.
form
.
get
(
"time"
,
""
)
.
strip
()
...
...
web/templates/edit.html
View file @
f313bd51
...
...
@@ -17,8 +17,8 @@
<label
for=
"count"
>
抓取条数
</label>
<input
type=
"number"
id=
"count"
name=
"count"
min=
"1"
placeholder=
"留空不变"
value=
"{{ c
onf.get('COUNT', '')
}}"
>
<div
class=
"hint"
>
当前
: {{ conf.get('COUNT', '(继承 default.conf)') }
}
</div>
value=
"{{ c
urrent_count
}}"
>
<div
class=
"hint"
>
当前
生效 {{ current_count }} 条{% if not conf.get('COUNT') %}(继承全局默认,保存后写入本源覆盖){% endif %
}
</div>
</div>
<div
class=
"form-group"
>
...
...
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