diff --git a/index.html b/index.html
index 2db30a9..aa5351b 100644
--- a/index.html
+++ b/index.html
@@ -2,7 +2,7 @@
-
+
-
+
@@ -311,6 +311,9 @@
+
+ {{ ui[lang].syncing }}
+
@@ -327,9 +330,9 @@ createApp({
const defaultIcon = 'https://cdn-icons-png.flaticon.com/512/684/684831.png';
const ui = {
- cn: { subtitle: '全球数据资源索引', searchPlaceholder: '搜索...', colName: '项目描述', colType: '类型', colPlat: '平台', colSafety: '安全性', colDate: '最近更新', colAction: '操作', linkBtn: '访问官网' },
- en: { subtitle: 'GLOBAL INDEX', searchPlaceholder: 'Search...', colName: 'Description', colType: 'Type', colPlat: 'Platform', colSafety: 'Security', colDate: 'Updated', colAction: 'Action', linkBtn: 'VISIT' },
- es: { subtitle: 'ÍNDICE GLOBAL', searchPlaceholder: 'Buscar...', colName: 'Descripción', colType: 'Tipo', colPlat: 'Plataforma', colSafety: 'Seguridad', colDate: 'Fecha', colAction: 'Acción', linkBtn: 'VISITAR' }
+ cn: { subtitle: '全球数据资源索引', searchPlaceholder: '搜索...', colName: '项目描述', colType: '类型', colPlat: '平台', colSafety: '安全性', colDate: '最近更新', colAction: '操作', linkBtn: '访问官网', syncing: '同步云端数据中...' },
+ en: { subtitle: 'GLOBAL INDEX', searchPlaceholder: 'Search...', colName: 'Description', colType: 'Type', colPlat: 'Platform', colSafety: 'Security', colDate: 'Updated', colAction: 'Action', linkBtn: 'VISIT', syncing: 'Syncing...' },
+ es: { subtitle: 'ÍNDICE GLOBAL', searchPlaceholder: 'Buscar...', colName: 'Descripción', colType: 'Tipo', colPlat: 'Plataforma', colSafety: 'Seguridad', colDate: 'Fecha', colAction: 'Acción', linkBtn: 'VISITAR', syncing: 'Sincronizando...' }
};
const staticMap = {
@@ -398,7 +401,15 @@ createApp({
return d.toISOString().split('T')[0].replace(/-/g, '/');
};
- const toggleDark = () => isDark.value = !isDark.value;
+ // 修复切换逻辑:通过 JavaScript 直接操作 body 类名
+ const toggleDark = () => {
+ isDark.value = !isDark.value;
+ if (isDark.value) {
+ document.body.classList.add('dark-mode');
+ } else {
+ document.body.classList.remove('dark-mode');
+ }
+ };
onMounted(fetchData);