diff --git a/index.html b/index.html
index 0a9a94c..2db30a9 100644
--- a/index.html
+++ b/index.html
@@ -4,7 +4,7 @@
@@ -279,68 +252,65 @@
-
-
-
+
-
+
- | {{ ui[lang].colName }} |
- {{ ui[lang].colType }} |
- Platforms |
+ {{ ui[lang].colName }} |
+ {{ ui[lang].colType }} |
+ {{ ui[lang].colPlat }} |
{{ ui[lang].colSafety }} |
- Action |
+ {{ ui[lang].colDate }} |
+ {{ ui[lang].colAction }} |
-
-
- ![]() e.target.src = defaultIcon" class="item-icon">
-
+
+
+ ![]() e.target.src = defaultIcon" class="icon-img">
+
-
+
{{ item.name }}
{{ item.note }}
|
-
+
{{ translateStatic(item.type) }}
|
- {{ p }}
+
+ {{ p }}
+
|
● {{ translateStatic(item.safety) }}
|
+
+ {{ formatDate(item.date) }}
+ |
- {{ formatDate(item.date) }}
- {{ ui[lang].linkBtn }}
+ {{ ui[lang].linkBtn }}
|
-
-
- 同步云端数据中...
-
@@ -357,9 +327,9 @@ createApp({
const defaultIcon = 'https://cdn-icons-png.flaticon.com/512/684/684831.png';
const ui = {
- cn: { subtitle: '全球数据资源索引', searchPlaceholder: '搜索名称、备注...', colName: '项目描述', colType: '类型', colSafety: '安全性', linkBtn: '访问官网' },
- en: { subtitle: 'GLOBAL RESOURCE INDEX', searchPlaceholder: 'Search...', colName: 'Description', colType: 'Type', colSafety: 'Security', linkBtn: 'VISIT' },
- es: { subtitle: 'ÍNDICE DE RECURSOS', searchPlaceholder: 'Buscar...', colName: 'Descripción', colType: 'Tipo', colSafety: 'Seguridad', linkBtn: 'VISITAR' }
+ 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' }
};
const staticMap = {
@@ -416,17 +386,23 @@ createApp({
return '#f59e0b';
};
+ const getTypeColor = (type) => {
+ if (type === '网站') return '#06b6d4';
+ if (type === '软件') return '#6366f1';
+ return '#f59e0b';
+ };
+
const formatDate = (dateStr) => {
- if (!dateStr) return '';
+ if (!dateStr) return '--';
const d = new Date(dateStr);
- return d.toLocaleDateString(lang.value === 'cn' ? 'zh-CN' : 'en-US');
+ return d.toISOString().split('T')[0].replace(/-/g, '/');
};
const toggleDark = () => isDark.value = !isDark.value;
onMounted(fetchData);
- return { lang, searchTerm, loading, isDark, filteredItems, ui, defaultIcon, toggleDark, translateStatic, getSafetyColor, formatDate, splitPlatform };
+ return { lang, searchTerm, loading, isDark, filteredItems, ui, defaultIcon, toggleDark, translateStatic, getSafetyColor, getTypeColor, formatDate, splitPlatform };
}
}).mount('#app');