diff --git a/assets/webui/index.html b/assets/webui/index.html index 79b6a5e..a0ab21f 100644 --- a/assets/webui/index.html +++ b/assets/webui/index.html @@ -13,10 +13,10 @@
-
+
- +
@@ -193,7 +193,7 @@
- +

OFDGo

构建版本develop
@@ -202,14 +202,14 @@
- +

关闭文档

文档尚未保存

- +

批量转换

@@ -228,7 +228,7 @@
- +

复制页面

@@ -237,7 +237,7 @@
- +

对象样式

组合
@@ -299,7 +299,7 @@
- +

结构标引

@@ -320,7 +320,7 @@
- +

新增目录

@@ -330,7 +330,7 @@
- +

位置尺寸

@@ -345,7 +345,7 @@
- +

新建文档

@@ -374,7 +374,7 @@
- +

插入页面

@@ -386,7 +386,7 @@
- +

段落设置

mm
@@ -397,7 +397,7 @@
- +

资源管理

@@ -428,7 +428,7 @@
- +

文档管理

@@ -444,7 +444,7 @@
- +

文档配置

@@ -461,7 +461,7 @@
- +

版本管理

@@ -479,7 +479,7 @@
- +

文档信息

@@ -489,7 +489,7 @@
- +

添加批注

@@ -520,14 +520,14 @@
- +

选择对象

- +

注解详情

@@ -538,7 +538,7 @@
- +

页面设置

@@ -566,7 +566,7 @@
- +

嵌入字体

字体
@@ -576,7 +576,7 @@
- +

添加图片

@@ -594,7 +594,7 @@
- +

签署文档

@@ -622,7 +622,7 @@ - +

验证签名

@@ -635,7 +635,7 @@
- +

解锁文档

@@ -647,7 +647,7 @@
- +

添加附件

@@ -659,7 +659,7 @@
- +

加密文档

@@ -671,7 +671,7 @@
- +

导出文档

diff --git a/assets/webui/ofdgo.css b/assets/webui/ofdgo.css index 6ba47a5..32d3a8b 100644 --- a/assets/webui/ofdgo.css +++ b/assets/webui/ofdgo.css @@ -99,7 +99,8 @@ } .document-tab-close, -.document-new-tab { +.document-new-tab, +.app-update { display: grid; place-items: center; flex: 0 0 28px; @@ -113,7 +114,8 @@ } .document-tab-close:hover, -.document-new-tab:hover { +.document-new-tab:hover, +.app-update:not(:disabled):hover { background: var(--accent-soft); } @@ -567,19 +569,9 @@ a:focus-visible { } .app-update { - flex: 0 0 auto; - align-self: center; - margin-left: 8px; - border-color: var(--accent); - background: #e4f3ef; + margin-left: var(--tab-action-gap); + margin-right: -6px; color: var(--accent-strong); - font-size: 13px; - line-height: 1; -} - -.app-update:not(:disabled):hover { - border-color: var(--accent); - background: #f2faf7; } .app-update[hidden] { @@ -659,6 +651,7 @@ button:not(:disabled):hover { .open-icon, .close-icon, .new-icon, +.update-icon, .save-icon, .save-as-icon, .edit-icon, @@ -683,6 +676,10 @@ button:not(:disabled):hover { mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v18M3 12h18'/%3E%3C/svg%3E") center / contain no-repeat; } +.update-icon { + mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 0 0-14.9-3M4 4v4h4M4 13a8 8 0 0 0 14.9 3M20 20v-4h-4'/%3E%3C/svg%3E") center / contain no-repeat; +} + .save-icon { mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2Z'/%3E%3Cpath d='M17 21v-8H7v8M7 3v5h8'/%3E%3C/svg%3E") center / contain no-repeat; } @@ -4351,6 +4348,10 @@ audio.page-media { --bar-pad: 5px 8px; } + .app-update { + margin-right: -8px; + } + .workspace { grid-template-columns: 1fr; } diff --git a/assets/webui/ofdgo.js b/assets/webui/ofdgo.js index fed7f22..6a82030 100644 --- a/assets/webui/ofdgo.js +++ b/assets/webui/ofdgo.js @@ -2565,15 +2565,13 @@ function copyApplicationPreferences(target) { function renderDocumentTabs() { documentTab(); - const focused = el.documentTabs.contains(document.activeElement) ? document.activeElement.closest('[role="tab"]')?.dataset.id : null; + const focused = el.documentTabs.contains(document.activeElement) ? document.activeElement.closest(".document-tab")?.dataset.id : null; el.documentTabs.replaceChildren(); for (const tab of workspace.tabs) { const item = document.createElement("div"); item.className = "document-tab"; item.dataset.id = String(tab.id); item.dataset.selected = String(tab === workspace.active); - item.setAttribute("role", "tab"); - item.setAttribute("aria-selected", String(tab === workspace.active)); item.tabIndex = tab === workspace.active ? 0 : -1; item.draggable = true; const name = document.createElement("span"); @@ -2588,7 +2586,6 @@ function renderDocumentTabs() { close.type = "button"; close.className = "document-tab-close"; close.title = "关闭"; - close.setAttribute("aria-label", `关闭 ${title}`); const icon = document.createElement("span"); icon.className = "close-icon"; close.append(icon); @@ -5262,7 +5259,6 @@ async function refreshApplication() { } setBusy(true, "正在更新应用", null, "正在更新应用"); el.refreshAppButton.disabled = true; - el.refreshAppButton.textContent = "更新"; const panels = document.querySelectorAll(".document-titlebar, .toolbar-frame, .workspace"); panels.forEach((panel) => { panel.inert = true; }); try { @@ -5297,7 +5293,6 @@ async function refreshApplication() { } finally { panels.forEach((panel) => { panel.inert = false; }); el.refreshAppButton.disabled = false; - el.refreshAppButton.textContent = "更新"; setBusy(false); } } @@ -10539,7 +10534,6 @@ function placeMediaPlayer(id, entry) { header.className = "form-title"; const title = document.createElement("span"); title.textContent = `${label}播放`; - dialog.setAttribute("aria-label", title.textContent); const close = document.createElement("button"); close.type = "button"; close.className = "small-button"; diff --git a/assets/webui/ofdgo_util.js b/assets/webui/ofdgo_util.js index fcb7be2..a02b74f 100644 --- a/assets/webui/ofdgo_util.js +++ b/assets/webui/ofdgo_util.js @@ -4,7 +4,6 @@ export class DocumentDialogs { this.backdrop = root.createElement("div"); this.backdrop.className = "document-dialog-backdrop"; this.backdrop.hidden = true; - this.backdrop.setAttribute("aria-hidden", "true"); Object.assign(this.backdrop.style, { position: "fixed", inset: "0", background: "rgb(31 36 40 / 18%)", zIndex: "1000" }); root.body.append(this.backdrop); root.addEventListener("keydown", event => {