fix: 设置页同步信息引用未定义变量导致的运行时崩溃(loadError/isSyncConfigured/autoOn)
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
+11
-11
File diff suppressed because one or more lines are too long
+2
-2
@@ -1,2 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-B_APDX-X.js","./index-BGM1Hwum.js","./index-8NYf16v1.css"])))=>i.map(i=>d[i]);
|
||||
import{r as s,_ as i}from"./index-BGM1Hwum.js";var t;(function(e){e.Documents="DOCUMENTS",e.Data="DATA",e.Library="LIBRARY",e.Cache="CACHE",e.External="EXTERNAL",e.ExternalStorage="EXTERNAL_STORAGE"})(t||(t={}));var a;(function(e){e.UTF8="utf8",e.ASCII="ascii",e.UTF16="utf16"})(a||(a={}));const E=s("Filesystem",{web:()=>i(()=>import("./web-B_APDX-X.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>new e.FilesystemWeb)});export{t as Directory,a as Encoding,E as Filesystem};
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./web-D5I5nGnT.js","./index-DjjSc2o-.js","./index-BeZB7Poz.css"])))=>i.map(i=>d[i]);
|
||||
import{r as s,_ as i}from"./index-DjjSc2o-.js";var t;(function(e){e.Documents="DOCUMENTS",e.Data="DATA",e.Library="LIBRARY",e.Cache="CACHE",e.External="EXTERNAL",e.ExternalStorage="EXTERNAL_STORAGE"})(t||(t={}));var a;(function(e){e.UTF8="utf8",e.ASCII="ascii",e.UTF16="utf16"})(a||(a={}));const E=s("Filesystem",{web:()=>i(()=>import("./web-D5I5nGnT.js"),__vite__mapDeps([0,1,2]),import.meta.url).then(e=>new e.FilesystemWeb)});export{t as Directory,a as Encoding,E as Filesystem};
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -8,8 +8,8 @@
|
||||
<link rel="icon" href="./icons/icon.svg" type="image/svg+xml" />
|
||||
<link rel="apple-touch-icon" href="./icons/icon-192.png" />
|
||||
<title>实习工作日志</title>
|
||||
<script type="module" crossorigin src="./assets/index-BGM1Hwum.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-8NYf16v1.css">
|
||||
<script type="module" crossorigin src="./assets/index-DjjSc2o-.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-BeZB7Poz.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { onMounted, ref, watch } from 'vue'
|
||||
import Icon from '../components/Icon.vue'
|
||||
import ConfirmDialog from '../components/ConfirmDialog.vue'
|
||||
import {
|
||||
@@ -13,7 +13,7 @@ import { downloadCsv } from '../lib/csv'
|
||||
import { hhmm, parseDateStr, todayStr } from '../lib/date'
|
||||
import { computeDay } from '../domain/attendance'
|
||||
import { changeLoginPassword, deleteCurrentUser, getSession } from '../db/auth'
|
||||
import { ensureCloudBinding, getSyncBase, getSyncLastTime, syncWithStoredConfig, syncLastError, enableRealtimeSync, stopRealtime, type SyncResult } from '../sync/engine'
|
||||
import { ensureCloudBinding, getSyncBase, getSyncLastTime, isSyncConfigured, syncWithStoredConfig, syncLastError, type SyncResult } from '../sync/engine'
|
||||
import { getCloudCreds } from '../db/auth'
|
||||
import { showToast } from '../lib/toast'
|
||||
|
||||
@@ -49,10 +49,9 @@ async function loadSyncInfo() {
|
||||
syncBase.value = await getSyncBase()
|
||||
cloudUser.value = getCloudCreds()?.username || ''
|
||||
lastSync.value = await getSyncLastTime()
|
||||
loadError.value = syncLastError.value
|
||||
const conf = await isSyncConfigured()
|
||||
autoOn.value = conf
|
||||
autoSyncErr.value = syncLastError.value
|
||||
}
|
||||
watch(syncLastError, v => { autoSyncErr.value = v })
|
||||
|
||||
|
||||
async function saveSyncConfig() {
|
||||
@@ -364,7 +363,6 @@ async function doImport() {
|
||||
</div>
|
||||
<div v-if="syncStatus" class="muted acc-line">上次同步:{{ lastSync || '--' }} · {{ syncStatus }}</div>
|
||||
<div v-if="syncError" class="form-error">{{ syncError }}</div>
|
||||
<div v-if="autoSyncErr" class="form-error">最近自动同步失败:{{ autoSyncErr }}</div>
|
||||
<div v-if="autoSyncErr" class="form-error">最近自动同步失败:{{ autoSyncErr }}(可点「立即同步」重试)</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user