fix(revisions): connect safe restore UI and readable change history
Build and publish container images / images (push) Successful in 9m28s
Release container images / release (push) Successful in 19s

This commit is contained in:
Anya Tokugawa committed 2026-11-10 11:34:28 +09:00
1 parent 2cbaa9342d
commit 96065d1e89
11 files changed
+166 -96

No files matched your search

+2 -1
View File
@@ -53,6 +53,7 @@
<div class="editor-head-left">
<label class="editor-change-message"><span>{{ T "history.message" }}</span><input id="revision-message" type="text" maxlength="1000" placeholder="{{ T "history.message_optional" }}"></label>
<button type="button" class="editor-action-icon" data-editor-action="tools" title="{{ T "editor.tools" }}" aria-label="{{ T "editor.tools" }}">+</button>
<button type="button" class="editor-action-icon" data-editor-action="language" title="{{ T "editor.language" }}" aria-label="{{ T "editor.language" }}">文</button>
<button type="button" class="editor-action-icon" data-editor-action="restore" title="{{ T "editor.restore" }}" aria-label="{{ T "editor.restore" }}">↶</button>
@@ -277,7 +278,7 @@ Ln 1, Col 1
<script src="/static/js/editor-core.js?v=priority-ux-1"></script>
{{ if .CSVEditor }}<script>window.PagesCSVSource = {{ .Body }};</script><script src="/static/js/csv-core.js?v=2"></script><script src="/static/js/csv-editor.js?v=2"></script>{{ end }}
<script src="/static/js/editor.js?v=slides-1"></script>
<script src="/static/js/editor.js?v=revision-message-1"></script>
<script src="/static/js/path-actions.js"></script>
+1
View File
@@ -80,6 +80,7 @@
</div>
{{ if .ObjectUUID }}
<a class="breadcrumb-action-icon" href="/r/history/{{ .ObjectUUID }}" title="{{ T "history.title" }}" aria-label="{{ T "history.title" }}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 5v5h5M5.5 9a8 8 0 1 1-.5 6M12 7v5l3 2"/></svg></a>
{{ if and .SlidesEnabled (eq .ContentView.Kind "html") }}<a class="breadcrumb-action-icon" href="/v/slides{{ .Path }}" title="{{ T "slides.title" }}" aria-label="{{ T "slides.title" }}"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 4h18v12H3zM12 16v5m-5 0 5-5 5 5M8 8h8m-8 4h5"/></svg></a>{{ end }}
<a class="breadcrumb-action-icon" href="/_/view/print/uuid:{{ .ObjectUUID }}" title="{{ T "viewer.print" }}" aria-label="{{ T "viewer.print" }}">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7 9V4h10v5M7 17H5a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-2M7 14h10v6H7z"></path></svg>
+4 -1
View File
@@ -38,7 +38,7 @@
<a
href="/r/history/{{ .Revision.ObjectUUID }}"
>
History
{{ T "history.title" }}
</a>
</nav>
@@ -52,6 +52,8 @@ History
<h1>Revision View</h1>
<div class="revision-meta">
<div><time data-revision-time="{{ .Revision.CreatedAt }}">{{ .Revision.CreatedAt }}</time> · {{ .Revision.Language }}</div>
<div>{{ T "history.message" }}: {{ if .Revision.Message }}{{ .Revision.Message }}{{ else }}—{{ end }}</div>
<div>
Revision UUID:
@@ -166,6 +168,7 @@ Raw HTML Source
</main>
<script src="/static/js/revisions.js?v=2" defer></script>
</body>
</html>
{{ end }}
+6 -2
View File
@@ -66,17 +66,20 @@ Object UUID:
</div>
<div>
{{ $r.CreatedAt }}
<time data-revision-time="{{ $r.CreatedAt }}">{{ $r.CreatedAt }}</time>
· {{ $r.Language }}
</div>
</div>
<div class="revision-message">
{{ $r.Message }}
{{ if $r.Message }}{{ $r.Message }}{{ else }}—{{ end }}
</div>
<div class="revision-actions">
{{ if $.CanRestore }}{{ $head := index $.RevisionHeads $r.Language }}{{ if $head }}{{ if ne $head $r.UUID }}
<button type="button" data-restore-revision="{{ $r.UUID }}" data-base-revision="{{ $head }}">{{ T "editor.restore" }}</button>
{{ end }}{{ end }}{{ end }}
<a
class="button"
@@ -112,6 +115,7 @@ Object UUID:
</nav>
</main>
<script src="/static/js/revisions.js?v=2" defer></script>
</body>
</html>
{{ end }}