Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
sumeiqiao
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
xuchentao
sumeiqiao
Commits
9f0732da
Commit
9f0732da
authored
Jul 29, 2026
by
xuchentao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: hide redundant build success message
parent
9489de6e
Pipeline
#420
passed with stages
in 17 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
app.js
public/admin/app.js
+6
-1
No files found.
public/admin/app.js
View file @
9f0732da
...
@@ -590,6 +590,7 @@ $("#file").addEventListener("change", async (event) => {
...
@@ -590,6 +590,7 @@ $("#file").addEventListener("change", async (event) => {
async
function
triggerBuild
(
endpoint
,
{
action
=
"发布"
,
method
=
"POST"
,
body
}
=
{})
{
async
function
triggerBuild
(
endpoint
,
{
action
=
"发布"
,
method
=
"POST"
,
body
}
=
{})
{
show
(
"#build-modal"
);
show
(
"#build-modal"
);
hide
(
"#close-modal"
);
hide
(
"#close-modal"
);
show
(
"#build-log"
);
$
(
"#build-title"
).
textContent
=
`正在
${
action
}
…`
;
$
(
"#build-title"
).
textContent
=
`正在
${
action
}
…`
;
$
(
"#build-log"
).
textContent
=
"系统正在更新官网,请稍候。"
;
$
(
"#build-log"
).
textContent
=
"系统正在更新官网,请稍候。"
;
try
{
try
{
...
@@ -605,7 +606,11 @@ async function triggerBuild(endpoint, { action = "发布", method = "POST", body
...
@@ -605,7 +606,11 @@ async function triggerBuild(endpoint, { action = "发布", method = "POST", body
const
state
=
await
api
(
"/build"
);
const
state
=
await
api
(
"/build"
);
if
(
state
.
status
===
"building"
)
continue
;
if
(
state
.
status
===
"building"
)
continue
;
$
(
"#build-title"
).
textContent
=
state
.
ok
?
`
${
action
}
成功`
:
`
${
action
}
失败`
;
$
(
"#build-title"
).
textContent
=
state
.
ok
?
`
${
action
}
成功`
:
`
${
action
}
失败`
;
$
(
"#build-log"
).
textContent
=
state
.
ok
?
"静态页面已经生成,官网内容已更新。"
:
(
state
.
log
||
`
${
action
}
失败,请联系技术人员。`
);
if
(
state
.
ok
)
{
hide
(
"#build-log"
);
}
else
{
$
(
"#build-log"
).
textContent
=
state
.
log
||
`
${
action
}
失败,请联系技术人员。`
;
}
show
(
"#close-modal"
);
show
(
"#close-modal"
);
if
(
!
state
.
ok
)
throw
new
Error
(
`
${
action
}
失败,原文章已恢复,请检查操作日志。`
);
if
(
!
state
.
ok
)
throw
new
Error
(
`
${
action
}
失败,原文章已恢复,请检查操作日志。`
);
return
;
return
;
...
...
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