文档
diff --git a/assets/webui/ofdgo.css b/assets/webui/ofdgo.css
index a71d3aa..d3888e3 100644
--- a/assets/webui/ofdgo.css
+++ b/assets/webui/ofdgo.css
@@ -458,6 +458,7 @@ a:focus-visible {
}
.app-update {
+ order: 2;
flex: 0 0 auto;
align-self: center;
margin: 0 10px 0 0;
@@ -473,6 +474,17 @@ a:focus-visible {
background: #f2faf7;
}
+.toolbar-frame:has(.app-update:not([hidden]))::before {
+ order: 1;
+ flex: 0 0 1px;
+ align-self: center;
+ width: 1px;
+ height: 22px;
+ margin: 0 12px 0 2px;
+ background: var(--line);
+ content: "";
+}
+
.app-update[hidden] {
display: none;
}
@@ -2297,22 +2309,6 @@ body[data-hide-meta] .meta-panel {
font-variant-numeric: tabular-nums;
}
-.app-panel {
- margin-bottom: 12px;
- padding-bottom: 12px;
- border-bottom: 1px solid var(--line);
-}
-
-.app-panel .panel-row {
- margin-bottom: 0;
- flex-wrap: nowrap;
-}
-
-.app-status {
- color: var(--text-muted);
- font-size: 12px;
-}
-
.navigation-tabs {
display: flex;
flex-shrink: 0;
@@ -4156,7 +4152,8 @@ audio.page-media {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
- .tool-group + .tool-group::before {
+ .tool-group + .tool-group::before,
+ .toolbar-frame:has(.app-update:not([hidden]))::before {
display: none;
}
diff --git a/assets/webui/ofdgo.js b/assets/webui/ofdgo.js
index 3ab25ef..df380a1 100644
--- a/assets/webui/ofdgo.js
+++ b/assets/webui/ofdgo.js
@@ -522,10 +522,8 @@ const el = {
searchNext: document.querySelector("#searchNext"),
searchResults: document.querySelector("#searchResults"),
metaPanel: document.querySelector(".meta-panel"),
- appPanel: document.querySelector("#appPanel"),
renderVectorButton: document.querySelector("#renderVectorButton"),
renderRasterButton: document.querySelector("#renderRasterButton"),
- offlineStatus: document.querySelector("#offlineStatus"),
refreshAppButton: document.querySelector("#refreshAppButton"),
metaFile: document.querySelector("#metaFile"),
metaTitle: document.querySelector("#metaTitle"),
@@ -4164,14 +4162,11 @@ async function registerOffline() {
async function prepareOffline() {
if (nativeHost) {
- el.appPanel.hidden = false;
- el.offlineStatus.textContent = "可离线";
return true;
}
if (!window.isSecureContext || !("serviceWorker" in navigator) || !("caches" in window) || !("locks" in navigator)) {
return true;
}
- el.appPanel.hidden = false;
setProgress("正在准备离线", null, "正在准备离线");
try {
const registration = await registerOffline();
@@ -4183,10 +4178,8 @@ async function prepareOffline() {
if (navigator.storage?.persist) {
navigator.storage.persist().catch(() => false);
}
- el.offlineStatus.textContent = "可离线";
watchApplicationUpdates(result.checksum);
} catch {
- el.offlineStatus.textContent = "未就绪";
}
el.refreshAppButton.disabled = false;
return true;