diff --git a/routers/web/devtest/mock_actions.go b/routers/web/devtest/mock_actions.go
index 87b25d86fc..48acb90094 100644
--- a/routers/web/devtest/mock_actions.go
+++ b/routers/web/devtest/mock_actions.go
@@ -6,7 +6,6 @@ package devtest
import (
"archive/zip"
"fmt"
- "html/template"
"io"
mathRand "math/rand/v2"
"net/http"
@@ -31,12 +30,13 @@ type mockArtifactFile struct {
}
type mockArtifactPreviewTemplateData struct {
- ArtifactName string
- Files []mockArtifactPreviewTemplateFile
- PreviewURL string
- PreviewRaw string
- DownloadURL string
- SelectedPath string
+ ArtifactName string
+ PreviewFiles []mockArtifactPreviewTemplateFile
+ RunURL string
+ PreviewURL string
+ PreviewRawURL string
+ DownloadURL string
+ SelectedPath string
}
type mockArtifactPreviewTemplateFile struct {
@@ -69,40 +69,6 @@ var mockActionsArtifactFiles = map[string][]mockArtifactFile{
},
}
-var mockArtifactPreviewTemplate = template.Must(template.New("mock-artifact-preview").Parse(`
-
-
-
+
+ {{template "shared/actions/artifact_preview_content" .}}
+
+
+
+
+{{template "base/footer" .}}
diff --git a/templates/repo/actions/artifact_preview.tmpl b/templates/repo/actions/artifact_preview.tmpl
index 86993f271d..d557f21518 100644
--- a/templates/repo/actions/artifact_preview.tmpl
+++ b/templates/repo/actions/artifact_preview.tmpl
@@ -3,43 +3,9 @@
{{template "repo/header" .}}
-
-
-
-
-
-
-
-
- {{if .SelectedPath}}
-
- {{else}}
-
{{ctx.Locale.Tr "none"}}
- {{end}}
-
-
+
+ {{template "base/alert" .}}
+ {{template "shared/actions/artifact_preview_content" .}}
@@ -48,22 +14,10 @@
margin-top: 1rem;
}
-.artifact-preview-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- gap: 1rem;
- margin-bottom: 1rem;
-}
-
.artifact-preview-title {
min-width: 0;
}
-.artifact-preview-title .ui.header {
- margin-bottom: 0.25rem;
-}
-
.artifact-preview-subtitle {
color: var(--color-text-light-3);
}
diff --git a/templates/shared/actions/artifact_preview_content.tmpl b/templates/shared/actions/artifact_preview_content.tmpl
new file mode 100644
index 0000000000..0c787777a6
--- /dev/null
+++ b/templates/shared/actions/artifact_preview_content.tmpl
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+ {{if .SelectedPath}}
+
+ {{else}}
+
{{ctx.Locale.Tr "none"}}
+ {{end}}
+
+
+
diff --git a/web_src/js/components/RepoActionView.vue b/web_src/js/components/RepoActionView.vue
index 74e23f11d9..46460ba501 100644
--- a/web_src/js/components/RepoActionView.vue
+++ b/web_src/js/components/RepoActionView.vue
@@ -133,12 +133,12 @@ async function deleteArtifact(name: string) {
-
+
{{ artifact.name }}
-
+