mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-08-30 12:12:40 +08:00
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
--text-muted: #66737f;
|
||||
--accent: #0f7b68;
|
||||
--accent-strong: #095c4e;
|
||||
--focus: #c9892b;
|
||||
--focus: #0f7b68;
|
||||
--sidebar-width: clamp(220px, 20vw, 292px);
|
||||
--bar-bg: #fbfcfd;
|
||||
--bar-height: 40px;
|
||||
|
||||
@@ -128,7 +128,7 @@ const el = {
|
||||
el.ofdButton.addEventListener("click", openOFDFile);
|
||||
el.togglePagesButton.addEventListener("click", () => toggleSidebar("pages"));
|
||||
el.toggleMetaButton.addEventListener("click", () => toggleSidebar("meta"));
|
||||
el.fontAddButton.addEventListener("click", () => el.fontInput.click());
|
||||
el.fontAddButton.addEventListener("click", openFontFile);
|
||||
el.localFontButton.addEventListener("click", loadLocalFonts);
|
||||
el.ofdInput.addEventListener("change", openSelectedOFD);
|
||||
el.fontInput.addEventListener("change", openSelectedFonts);
|
||||
@@ -167,6 +167,7 @@ async function openOFDFile() {
|
||||
return;
|
||||
}
|
||||
await requestLocalFontsBeforeOpen();
|
||||
el.ofdInput.value = "";
|
||||
el.ofdInput.click();
|
||||
}
|
||||
|
||||
@@ -177,6 +178,11 @@ async function openOFDFromViewer() {
|
||||
await openOFDFile();
|
||||
}
|
||||
|
||||
function openFontFile() {
|
||||
el.fontInput.value = "";
|
||||
el.fontInput.click();
|
||||
}
|
||||
|
||||
function toggleSidebar(side) {
|
||||
if (side === "pages") {
|
||||
state.showPages = !state.showPages;
|
||||
|
||||
Reference in New Issue
Block a user