fix: 视频源消息移到顶部,删除加确认对话框

This commit is contained in:
tian 2026-07-26 12:21:49 +08:00
parent 50c74e5339
commit 30a93d1c84

View File

@ -41,7 +41,7 @@
<a class="btn secondary" href="/assets/integrations?new=1">{{icon "apply"}}<span>新增服务</span></a>
{{if .AssetIntegration}}{{if .AssetIntegration.Name}}
<a class="btn secondary" href="/assets/integrations?name={{.AssetIntegration.Name}}&edit=1">{{icon "edit"}}<span>编辑</span></a>
<form method="post" action="/assets/integrations/{{.AssetIntegration.Name}}/delete">
<form method="post" action="/assets/integrations/{{.AssetIntegration.Name}}/delete" onsubmit="return confirm('确认删除服务 {{.AssetIntegration.Name}}')">
<button class="btn secondary" type="submit">删除</button>
</form>
{{end}}{{end}}
@ -177,6 +177,8 @@ function toggleIntegrationFields(type) {
toggleIntegrationFields('{{.AssetIntegration.Type}}');
</script>
{{else if eq .AssetTab "video-sources"}}
{{if .Message}}<div class="msg">{{.Message}}</div>{{end}}
{{if .Error}}<div class="error">{{.Error}}</div>{{end}}
<div class="card">
<div class="section-title">
<div>
@ -188,7 +190,7 @@ toggleIntegrationFields('{{.AssetIntegration.Type}}');
<a class="btn secondary" href="/assets/video-sources?new=1">{{icon "apply"}}<span>新增视频源</span></a>
{{if .AssetVideoSource}}{{if .AssetVideoSource.Name}}
<a class="btn secondary" href="/assets/video-sources?name={{.AssetVideoSource.Name}}&edit=1">{{icon "edit"}}<span>编辑</span></a>
<form method="post" action="/assets/video-sources/{{.AssetVideoSource.Name}}/delete">
<form method="post" action="/assets/video-sources/{{.AssetVideoSource.Name}}/delete" onsubmit="return confirm('确认删除视频源 {{.AssetVideoSource.Name}}')">
<button class="btn secondary" type="submit">删除</button>
</form>
{{end}}{{end}}