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
b207ce24
Commit
b207ce24
authored
Oct 28, 2026
by
郭阔
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ui(schedules): 交付详情由行下抽屉改为居中弹窗
点徽标弹浮层(成功数量+标题 / 失败数量+原因),Esc/点遮罩/✕ 关闭, 不再把表格向下撑开;数据块随页面渲染,无需请求。排程编辑抽屉保持不变。
parent
2cbef105
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
53 additions
and
34 deletions
+53
-34
schedules.html
web/templates/schedules.html
+53
-34
No files found.
web/templates/schedules.html
View file @
b207ce24
...
...
@@ -3,6 +3,13 @@
{% block extra_head %}
<meta
http-equiv=
"refresh"
content=
"60"
>
<script>
function
openLast
(
name
,
display
)
{
document
.
getElementById
(
'lastModalBody'
).
innerHTML
=
document
.
getElementById
(
'lastdata-'
+
name
).
innerHTML
;
document
.
getElementById
(
'lastModalTitle'
).
textContent
=
display
||
name
;
document
.
getElementById
(
'lastModal'
).
classList
.
add
(
'open'
);
}
function
closeLast
()
{
document
.
getElementById
(
'lastModal'
).
classList
.
remove
(
'open'
);
}
document
.
addEventListener
(
'keydown'
,
function
(
e
)
{
if
(
e
.
key
===
'Escape'
)
closeLast
();
});
function
toggleRuns
(
sel
)
{
var
f
=
parseInt
(
sel
.
value
,
10
);
sel
.
form
.
querySelectorAll
(
'.runwin'
).
forEach
(
function
(
sp
)
{
...
...
@@ -37,6 +44,9 @@ function toggleDrawer(id) {
.decho
{
color
:
#e8c34a
;
font-family
:
monospace
;
min-width
:
44px
;
}
.dnote
{
color
:
#666
;
font-size
:
12px
;
margin-left
:
12px
;
}
.linkbadge
{
cursor
:
pointer
;
}
.modal-mask
{
position
:
fixed
;
inset
:
0
;
background
:
rgba
(
0
,
0
,
0
,
.6
);
display
:
none
;
z-index
:
50
;
align-items
:
flex-start
;
justify-content
:
center
;
padding
:
56px
16px
;
}
.modal-mask.open
{
display
:
flex
;
}
.modal-card
{
background
:
#161923
;
border
:
1px
solid
#2a2d37
;
border-radius
:
8px
;
max-width
:
760px
;
width
:
100%
;
max-height
:
78vh
;
overflow-y
:
auto
;
padding
:
16px
20px
14px
;
box-shadow
:
0
12px
40px
rgba
(
0
,
0
,
0
,
.5
);
}
.linkbadge
:hover
{
filter
:
brightness
(
1.3
);
text-decoration
:
underline
dotted
;
}
ul
.arts
{
margin
:
2px
0
8px
28px
;
padding
:
0
;
list-style
:
none
;
}
ul
.arts
li
{
padding
:
3px
0
;
display
:
flex
;
gap
:
8px
;
align-items
:
baseline
;
flex-wrap
:
wrap
;
}
...
...
@@ -114,9 +124,9 @@ function toggleDrawer(id) {
{{ r.last.mtime }}
<br>
{% set st = r.last.status or '' %}
{% if '熔断' in st %}
<span
class=
"badge unknown"
>
{{ st }}
</span>
{% elif '部分交付' in st or '⚠' in st %}
<span
class=
"badge warn linkbadge"
onclick=
"
toggleDrawer('last-{{ r.name
}}')"
>
{{ st }} ▾
</span>
{% elif '成功' in st %}
<span
class=
"badge ok linkbadge"
onclick=
"
toggleDrawer('last-{{ r.name
}}')"
>
{{ st }} ▾
</span>
{% elif st %}
<span
class=
"badge fail linkbadge"
onclick=
"
toggleDrawer('last-{{ r.name
}}')"
>
{{ st }} ▾
</span>
{% endif %}
{% elif '部分交付' in st or '⚠' in st %}
<span
class=
"badge warn linkbadge"
onclick=
"
openLast('{{ r.name }}', '{{ r.display
}}')"
>
{{ st }} ▾
</span>
{% elif '成功' in st %}
<span
class=
"badge ok linkbadge"
onclick=
"
openLast('{{ r.name }}', '{{ r.display
}}')"
>
{{ st }} ▾
</span>
{% elif st %}
<span
class=
"badge fail linkbadge"
onclick=
"
openLast('{{ r.name }}', '{{ r.display
}}')"
>
{{ st }} ▾
</span>
{% endif %}
{% else %}
<span
style=
"color:#666"
>
从未
</span>
{% endif %}
</td>
<td>
...
...
@@ -197,19 +207,23 @@ function toggleDrawer(id) {
</div>
</td>
</tr>
<tr
id=
"last-{{ r.name }}"
class=
"drawer"
style=
"display:none"
>
<td
colspan=
"6"
>
{% endfor %}
</tbody>
</table>
</div>
{% for r in rows %}
<div
id=
"lastdata-{{ r.name }}"
hidden
>
{% set ok_arts = r.last_articles | selectattr('status', 'equalto', 'SUCCESS') | list %}
{% set bad_arts = r.last_articles | rejectattr('status', 'equalto', 'SUCCESS') | list %}
<div
class=
"drawer-box"
>
<div
class=
"drow"
>
<span
class=
"dlabel"
>
上次交付
</span>
<span
class=
"dlabel"
>
交付明细
</span>
<span
class=
"badge ok"
>
成功 {{ ok_arts|length }} 篇
</span>
{% if bad_arts %}
<span
class=
"badge fail"
>
失败 {{ bad_arts|length }} 篇
</span>
{% endif %}
<span
class=
"dnote"
>
{{ r.last.mtime if r.last }} · 点击标题打开原文 · 再点徽标收起
</span>
<span
class=
"dnote"
>
{{ r.last.mtime if r.last }}
</span>
</div>
{% if ok_arts %}
<div
class=
"hint"
style=
"color:#6bbb6b;margin-left:28px"
>
✓ 成功文章
</div>
<div
class=
"hint"
style=
"color:#6bbb6b"
>
✓ 成功文章(点击标题打开原文)
</div>
<ul
class=
"arts"
>
{% for a in ok_arts %}
<li><span
class=
"t"
>
{% if a.url and a.url.startswith('http') %}
<a
class=
"source-link"
href=
"{{ a.url }}"
target=
"_blank"
rel=
"noopener noreferrer"
>
{{ a.title }}
</a>
{% else %}{{ a.title }}{% endif %}
</span></li>
...
...
@@ -217,7 +231,7 @@ function toggleDrawer(id) {
</ul>
{% endif %}
{% if bad_arts %}
<div
class=
"hint"
style=
"color:#bb6b6b;margin-left:28px
"
>
✗ 失败及原因
</div>
<div
class=
"hint"
style=
"color:#bb6b6b
"
>
✗ 失败及原因
</div>
<ul
class=
"arts"
>
{% for a in bad_arts %}
<li><span
class=
"t"
>
{% if a.url and a.url.startswith('http') %}
<a
class=
"source-link"
href=
"{{ a.url }}"
target=
"_blank"
rel=
"noopener noreferrer"
>
{{ a.title }}
</a>
{% else %}{{ a.title }}{% endif %}
</span>
...
...
@@ -225,12 +239,17 @@ function toggleDrawer(id) {
{% endfor %}
</ul>
{% endif %}
</div>
{% endfor %}
<div
class=
"modal-mask"
id=
"lastModal"
onclick=
"if(event.target===this)closeLast()"
>
<div
class=
"modal-card"
>
<div
style=
"display:flex;align-items:center;gap:10px;margin-bottom:10px"
>
<h3
id=
"lastModalTitle"
style=
"margin:0;font-size:16px"
></h3>
<button
type=
"button"
class=
"btn btn-sm"
style=
"margin-left:auto"
onclick=
"closeLast()"
>
✕ 关闭
</button>
</div>
<div
id=
"lastModalBody"
></div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endblock %}
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