feat(文件关联): 文件关联移至设置面板
build.yaml / build (push) Successful in 45s

This commit is contained in:
xiaoqidun committed 2026-10-30 14:17:25 +08:00
1 parent 12b04c184c
commit 1abeba6f99
3 files changed
+9 -15

No files matched your search

+6 -6
View File
@@ -203,12 +203,6 @@
<div class="about-row"><span>桌面软件</span><a href="https://ofdgo.aite.me/releases/" target="_blank" rel="noreferrer">https://ofdgo.aite.me/releases/</a></div>
<div class="about-row"><span>项目仓库</span><a href="https://github.com/xiaoqidun/ofdgo" target="_blank" rel="noreferrer">https://github.com/xiaoqidun/ofdgo</a></div>
</form>
<section id="associationSection" class="about-associations" hidden>
<div class="association-heading">文件关联</div>
<div class="association-row" data-scope="user"><span>当前用户</span><span class="association-state"></span><div class="association-actions"><button class="small-button" type="button" data-action="register">注册</button><button class="small-button" type="button" data-action="remove">撤销</button></div></div>
<div class="association-row" data-scope="machine"><span>所有用户</span><span class="association-state"></span><div class="association-actions"><button class="small-button" type="button" data-action="register">注册</button><button class="small-button" type="button" data-action="remove">撤销</button></div></div>
<div id="associationMessage" class="form-status" hidden></div>
</section>
</dialog>
<dialog id="closePanel" class="form-dialog confirm-dialog">
<form method="dialog">
@@ -462,6 +456,12 @@
<button type="button" data-theme-choice="dark"><span class="theme-dark-icon"></span><span>深色</span></button>
</div>
</form>
<section id="associationSection" class="appearance-associations" hidden>
<div class="appearance-label">文件关联</div>
<div class="association-row" data-scope="user"><span>当前用户</span><span class="association-state"></span><div class="association-actions"><button class="small-button" type="button" data-action="register">注册</button><button class="small-button" type="button" data-action="remove">撤销</button></div></div>
<div class="association-row" data-scope="machine"><span>所有用户</span><span class="association-state"></span><div class="association-actions"><button class="small-button" type="button" data-action="register">注册</button><button class="small-button" type="button" data-action="remove">撤销</button></div></div>
<div id="associationMessage" class="form-status" hidden></div>
</section>
</dialog>
<dialog id="settingsPanel" class="form-dialog settings-dialog">
<form id="settingsForm">
+1 -7
View File
@@ -1075,17 +1075,11 @@ button:not(:disabled):hover {
overflow-wrap: anywhere;
}
.about-associations {
.appearance-associations {
padding: 12px;
border-top: 1px solid var(--line);
}
.association-heading {
margin-bottom: 12px;
font-weight: 600;
white-space: nowrap;
}
.association-row {
display: grid;
grid-template-columns: 4em minmax(0, 1fr) auto;
+2 -2
View File
@@ -2096,9 +2096,7 @@ function formDialogOpen() {
async function openAboutPanel() {
el.aboutVersion.textContent = "读取中";
el.associationMessage.hidden = true;
documentDialogs.showApplication(el.aboutPanel);
if (nativeHost) void refreshFileAssociations();
let raw = "";
try {
const response = await fetch("./", { cache: "no-store" });
@@ -5521,7 +5519,9 @@ async function boot() {
const bounds = el.appearanceButton.getBoundingClientRect();
el.appearancePanel.style.setProperty("--appearance-top", `${bounds.bottom + 4}px`);
el.appearancePanel.style.setProperty("--appearance-right", `${Math.max(12, innerWidth - bounds.right)}px`);
el.associationMessage.hidden = true;
documentDialogs.showApplication(el.appearancePanel);
if (nativeHost) void refreshFileAssociations();
});
for (const button of el.appearancePanel.querySelectorAll("[data-theme-choice]")) button.addEventListener("click", () => window.ofdgoTheme.set(button.dataset.themeChoice));
documentDialogs = new DocumentDialogs({document, titlebar: el.documentTitleBar,