mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-30 01:27:26 +08:00
1 parent
10e724d57f
commit
8864f6c7ba
2 files changed
+7
-4
No files matched your search
@@ -611,7 +611,7 @@
|
|||||||
</aside>
|
</aside>
|
||||||
|
|
||||||
<section class="viewer-panel" tabindex="0" aria-label="阅读区">
|
<section class="viewer-panel" tabindex="0" aria-label="阅读区">
|
||||||
<div id="emptyState" class="empty-state">选择 OFD 文件</div>
|
<div id="emptyState" class="empty-state">选择 OFD、PDF 文件</div>
|
||||||
<div id="progressPanel" class="progress-panel" role="status" aria-live="polite" hidden>
|
<div id="progressPanel" class="progress-panel" role="status" aria-live="polite" hidden>
|
||||||
<div class="progress-spinner"></div>
|
<div class="progress-spinner"></div>
|
||||||
<div id="progressLabel" class="progress-label">加载中</div>
|
<div id="progressLabel" class="progress-label">加载中</div>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const PAGE_CACHE_BYTES = 32 * 1024 * 1024;
|
|||||||
const SCROLL_SEGMENT_SIZE = 1000000;
|
const SCROLL_SEGMENT_SIZE = 1000000;
|
||||||
const OBJECT_CLIPBOARD_TYPE = "application/x-ofdgo-objects";
|
const OBJECT_CLIPBOARD_TYPE = "application/x-ofdgo-objects";
|
||||||
const STATUS = {
|
const STATUS = {
|
||||||
ready: "选择 OFD 文件",
|
ready: "选择 OFD、PDF 文件",
|
||||||
opening: "正在打开文档",
|
opening: "正在打开文档",
|
||||||
engine: "正在准备引擎",
|
engine: "正在准备引擎",
|
||||||
recovering: "正在恢复引擎",
|
recovering: "正在恢复引擎",
|
||||||
@@ -3664,7 +3664,7 @@ async function boot() {
|
|||||||
}
|
}
|
||||||
if (openSeq === state.openSeq) setProgress("引擎准备完成", 70);
|
if (openSeq === state.openSeq) setProgress("引擎准备完成", 70);
|
||||||
await loadExportFormats();
|
await loadExportFormats();
|
||||||
if (openSeq === state.openSeq) setEmpty("选择 OFD 文件");
|
if (openSeq === state.openSeq) setEmpty("选择 OFD、PDF 文件");
|
||||||
updateFontSummary();
|
updateFontSummary();
|
||||||
renderFontList();
|
renderFontList();
|
||||||
updateControls();
|
updateControls();
|
||||||
@@ -3725,6 +3725,9 @@ async function prepareOffline() {
|
|||||||
location.reload();
|
location.reload();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (navigator.storage?.persist) {
|
||||||
|
navigator.storage.persist().catch(() => false);
|
||||||
|
}
|
||||||
el.offlineStatus.textContent = "可离线";
|
el.offlineStatus.textContent = "可离线";
|
||||||
watchApplicationUpdates(result.checksum);
|
watchApplicationUpdates(result.checksum);
|
||||||
} catch {
|
} catch {
|
||||||
@@ -4094,7 +4097,7 @@ async function openOFD(file, remote = null) {
|
|||||||
}
|
}
|
||||||
if (!remote && !isDocumentFile(file)) {
|
if (!remote && !isDocumentFile(file)) {
|
||||||
el.ofdInput.value = "";
|
el.ofdInput.value = "";
|
||||||
showError(new Error("选择 OFD 文件"), !state.doc);
|
showError(new Error("选择 OFD、PDF 文件"), !state.doc);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!discardChanges()) {
|
if (!discardChanges()) {
|
||||||
|
|||||||
Reference in new issue
Block a user