chore: Adjust the directory structure in preparation for real-time.

This commit is contained in:
ccbikai 2025-05-11 14:17:57 +08:00
parent e4a0abdebb
commit d580a9f882
22 changed files with 204 additions and 180 deletions

View file

@ -18,6 +18,9 @@ const route = useRoute()
<TabsTrigger value="/dashboard/analysis">
{{ $t('nav.analysis') }}
</TabsTrigger>
<TabsTrigger value="/dashboard/realtime">
{{ $t('nav.realtime') }}
</TabsTrigger>
</TabsList>
</Tabs>
<slot name="left" />

View file

@ -74,8 +74,8 @@ onBeforeMount(() => {
</DashboardNav>
<DashboardFilters v-if="!link" @change="changeFilter" />
</div>
<DashboardCounters />
<DashboardViews />
<DashboardMetrics />
<DashboardAnalysisCounters />
<DashboardAnalysisViews />
<DashboardAnalysisMetrics />
</main>
</template>

View file

@ -31,7 +31,7 @@ defineProps({
:value="rawTabs[index]"
class="flex-1"
>
<DashboardMetricsMetric
<DashboardAnalysisMetricsMetric
:type="rawTabs[index]"
:name="tab"
class="h-full"

View file

@ -20,28 +20,28 @@ const translatedTabs = computed(() => ({
<template>
<main class="grid gap-8 lg:grid-cols-12">
<LazyDashboardMetricsLocations class="col-span-1 lg:col-span-8" />
<DashboardMetricsGroup
<LazyDashboardAnalysisMetricsLocations class="col-span-1 lg:col-span-8" />
<DashboardAnalysisMetricsGroup
class="lg:col-span-4"
:tabs="translatedTabs.location"
:raw-tabs="tabs.location"
/>
<DashboardMetricsGroup
<DashboardAnalysisMetricsGroup
class="lg:col-span-6"
:tabs="translatedTabs.referer"
:raw-tabs="tabs.referer"
/>
<DashboardMetricsGroup
<DashboardAnalysisMetricsGroup
class="lg:col-span-6"
:tabs="translatedTabs.time"
:raw-tabs="tabs.time"
/>
<DashboardMetricsGroup
<DashboardAnalysisMetricsGroup
class="lg:col-span-6"
:tabs="translatedTabs.device"
:raw-tabs="tabs.device"
/>
<DashboardMetricsGroup
<DashboardAnalysisMetricsGroup
class="lg:col-span-6"
:tabs="translatedTabs.browser"
:raw-tabs="tabs.browser"

View file

@ -39,7 +39,7 @@ defineProps({
<div
class="flex-1 leading-5 truncate font-mediums"
>
<DashboardMetricsName
<DashboardAnalysisMetricsName
:name="metric.name"
:type="type"
/>

View file

@ -61,7 +61,7 @@ onBeforeUnmount(() => {
<template>
<Card class="flex flex-col">
<template v-if="metrics.length">
<DashboardMetricsList
<DashboardAnalysisMetricsList
class="flex-1"
:metrics="top6"
:type="type"
@ -83,7 +83,7 @@ onBeforeUnmount(() => {
<DialogHeader>
<DialogTitle>{{ name }}</DialogTitle>
</DialogHeader>
<DashboardMetricsList
<DashboardAnalysisMetricsList
class="overflow-y-auto"
:metrics="metrics"
:type="type"

View file

@ -36,15 +36,15 @@ function formatName(name, type) {
<TooltipProvider>
<Tooltip>
<TooltipTrigger class="w-full text-left">
<DashboardMetricsNameReferer
<DashboardAnalysisMetricsNameReferer
v-if="name && type === 'referer'"
:name="name"
/>
<DashboardMetricsNameSlug
<DashboardAnalysisMetricsNameSlug
v-else-if="name && type === 'slug'"
:name="name"
/>
<DashboardMetricsNameIcon
<DashboardAnalysisMetricsNameIcon
v-else-if="name && ['os', 'browser', 'browserType', 'device', 'deviceType'].includes(type)"
:name="name"
:type="type"

View file

@ -0,0 +1,10 @@
<template>
<main class="space-y-6">
<div class="flex flex-col gap-6 sm:gap-2 sm:flex-row sm:justify-between">
<DashboardNav />
</div>
<div>
Realtime
</div>
</main>
</template>

View file

@ -5,6 +5,6 @@ provide('id', ref())
<template>
<main class="space-y-6">
<DashboardBreadcrumb title="Analysis" />
<Dashboard />
<DashboardAnalysis />
</main>
</template>

View file

@ -0,0 +1,6 @@
<template>
<main class="space-y-6">
<DashboardBreadcrumb title="Realtime" />
<DashboardRealtime />
</main>
</template>

View file

@ -50,7 +50,8 @@
},
"nav": {
"links": "Links",
"analysis": "Analysis"
"analysis": "Analysis",
"realtime": "Realtime"
},
"home": {
"features": {

View file

@ -50,7 +50,8 @@
},
"nav": {
"links": "Liens",
"analysis": "Statistique"
"analysis": "Statistiques",
"realtime": "Realtime"
},
"home": {
"features": {

View file

@ -50,7 +50,8 @@
},
"nav": {
"links": "Liên kết",
"analysis": "Phân tích"
"analysis": "Phân tích",
"realtime": "Thời gian thực"
},
"home": {
"features": {

View file

@ -50,7 +50,8 @@
},
"nav": {
"links": "链接",
"analysis": "分析"
"analysis": "分析",
"realtime": "实时"
},
"home": {
"features": {

View file

@ -1,170 +1,170 @@
{
"common": {
"i18n": "多語言",
"abbreviations": "繁",
"current_language": "繁體中文",
"try_again": "重試",
"cancel": "取消",
"continue": "繼續",
"close": "關閉",
"save": "保存",
"edit": "編輯",
"delete": "刪除",
"delete_success": "刪除成功!",
"search": "搜尋"
},
"theme": {
"toggle": "切換主题",
"light": "淺色",
"dark": "深色",
"system": "跟隨系統"
},
"login": {
"title": "登入",
"description": "請輸入站點密碼以登入",
"tips": "提示",
"preview_token": "預覽模式的站點密碼是",
"submit": "登入",
"failed": "登入失敗,請重試"
},
"logout": {
"title": "登出?",
"confirm": "確定要登出嗎?",
"action": "登出"
},
"layouts": {
"footer": {
"copyright": "產品來自 HTML.ZONE",
"social": {
"email": "郵箱",
"telegram": "Telegram",
"blog": "部落個",
"twitter": "Twitter",
"mastodon": "Mastodon",
"github": "GitHub"
}
},
"header": {
"select_language": "選擇語言"
"common": {
"i18n": "多語言",
"abbreviations": "繁",
"current_language": "繁體中文",
"try_again": "重試",
"cancel": "取消",
"continue": "繼續",
"close": "關閉",
"save": "保存",
"edit": "編輯",
"delete": "刪除",
"delete_success": "刪除成功!",
"search": "搜尋"
},
"theme": {
"toggle": "切換主题",
"light": "淺色",
"dark": "深色",
"system": "跟隨系統"
},
"login": {
"title": "登入",
"description": "請輸入站點密碼以登入",
"tips": "提示",
"preview_token": "預覽模式的站點密碼是",
"submit": "登入",
"failed": "登入失敗,請重試"
},
"logout": {
"title": "登出?",
"confirm": "確定要登出嗎?",
"action": "登出"
},
"layouts": {
"footer": {
"copyright": "產品來自 HTML.ZONE",
"social": {
"email": "郵箱",
"telegram": "Telegram",
"blog": "部落個",
"twitter": "Twitter",
"mastodon": "Mastodon",
"github": "GitHub"
}
},
"nav": {
"links": "連結",
"analysis": "分析"
},
"home": {
"features": {
"title": "功能特色",
"subtitle": "簡單而實用的功能",
"url_shortening": {
"title": "URL 縮短",
"description": "將您的 URL 壓縮到最小長度"
},
"analytics": {
"title": "數據分析",
"description": "監控連結分析病收集有價值的統計數據"
},
"serverless": {
"title": "免伺服器",
"description": "無需傳統伺服器即可部署"
},
"customizable_slug": {
"title": "自定義短連結",
"description": "支持自訂連結和大小寫敏感"
},
"ai_slug": {
"title": "AI 短連結",
"description": "利用 AI 生成短連接"
},
"link_expiration": {
"title": "短連結過期",
"description": "為您的短連結設置過期日期"
}
"header": {
"select_language": "選擇語言"
}
},
"nav": {
"links": "連結",
"analysis": "分析",
"realtime": "即時"
},
"home": {
"features": {
"title": "功能特色",
"subtitle": "簡單而實用的功能",
"url_shortening": {
"title": "URL 縮短",
"description": "將您的 URL 壓縮到最小長度"
},
"cta": {
"title": "立即部署",
"description": "只需幾個簡單的點擊,您就可以免費開始部署",
"button": "開始部署"
"analytics": {
"title": "數據分析",
"description": "監控連結分析病收集有價值的統計數據"
},
"logos": {
"title": "使用優秀的技術構建"
"serverless": {
"title": "免伺服器",
"description": "無需傳統伺服器即可部署"
},
"twitter": {
"follow": "在 X(Twitter) 上關注我"
"customizable_slug": {
"title": "自定義短連結",
"description": "支持自訂連結和大小寫敏感"
},
"ai_slug": {
"title": "AI 短連結",
"description": "利用 AI 生成短連接"
},
"link_expiration": {
"title": "短連結過期",
"description": "為您的短連結設置過期日期"
}
},
"dashboard": {
"title": "儀表板",
"visits": "訪問次數",
"views": "瀏覽次數",
"visitors": "訪客人數",
"referers": "引薦來源",
"stats": "的統計",
"custom_date": "自定義日期",
"date": "日期",
"date_range": "日期範圍",
"locations": "地理位置",
"details": "詳細資料",
"name": "名稱",
"count": "數量",
"loading": "載入中",
"no_data": "暫無數據",
"none": "(無)",
"filter_placeholder": "過濾連結...",
"date_picker": {
"today": "今天",
"last_24h": "最近24小時",
"this_week": "本週",
"last_7d": "最近7天",
"this_month": "本月",
"last_30d": "最近30天",
"last_90d": "最近90天",
"custom": "自定義",
"custom_title": "自定義日期",
"single_date": "單個日期",
"date_range": "日期範圍"
},
"metrics": {
"country": "國家",
"region": "地區",
"city": "城市",
"referer": "來源",
"slug": "短連結",
"language": "語言",
"timezone": "時區",
"device": "設備",
"deviceType": "設備類型",
"os": "操作系統",
"browser": "瀏覽器",
"browserType": "瀏覽器類型"
}
"cta": {
"title": "立即部署",
"description": "只需幾個簡單的點擊,您就可以免費開始部署",
"button": "開始部署"
},
"links": {
"create": "創建連結",
"edit": "編輯連結",
"delete_confirm_title": "確定要刪除嗎?",
"delete_confirm_desc": "此操作無法撤銷。这將從伺服器中永久刪除您的連結。",
"delete_success": "刪除成功!",
"update_success": "連結更新成功",
"create_success": "連結創建成功",
"preview_mode_tip": "預覽模式下的連結最多有效5分鐘",
"search_placeholder": "搜尋連結...",
"no_results": "未找到連結。",
"group_title": "連結列表",
"copy_success": "複製成功!",
"created_at": "創建時間",
"updated_at": "更新時間",
"expires_at": "過期時間",
"no_more": "沒有更多連結",
"load_failed": "加載連接失敗,",
"download_qr_code": "下載QR code",
"sort": {
"newest": "最新",
"oldest": "最舊",
"az": "短連結(A-Z)",
"za": "短連結(Z-A)",
"tip": "體驗功能: 僅對已經加載的連結有效"
}
"logos": {
"title": "使用優秀的技術構建"
},
"twitter": {
"follow": "在 X(Twitter) 上關注我"
}
},
"dashboard": {
"title": "儀表板",
"visits": "訪問次數",
"views": "瀏覽次數",
"visitors": "訪客人數",
"referers": "引薦來源",
"stats": "的統計",
"custom_date": "自定義日期",
"date": "日期",
"date_range": "日期範圍",
"locations": "地理位置",
"details": "詳細資料",
"name": "名稱",
"count": "數量",
"loading": "載入中",
"no_data": "暫無數據",
"none": "(無)",
"filter_placeholder": "過濾連結...",
"date_picker": {
"today": "今天",
"last_24h": "最近24小時",
"this_week": "本週",
"last_7d": "最近7天",
"this_month": "本月",
"last_30d": "最近30天",
"last_90d": "最近90天",
"custom": "自定義",
"custom_title": "自定義日期",
"single_date": "單個日期",
"date_range": "日期範圍"
},
"metrics": {
"country": "國家",
"region": "地區",
"city": "城市",
"referer": "來源",
"slug": "短連結",
"language": "語言",
"timezone": "時區",
"device": "設備",
"deviceType": "設備類型",
"os": "操作系統",
"browser": "瀏覽器",
"browserType": "瀏覽器類型"
}
},
"links": {
"create": "創建連結",
"edit": "編輯連結",
"delete_confirm_title": "確定要刪除嗎?",
"delete_confirm_desc": "此操作無法撤銷。这將從伺服器中永久刪除您的連結。",
"delete_success": "刪除成功!",
"update_success": "連結更新成功",
"create_success": "連結創建成功",
"preview_mode_tip": "預覽模式下的連結最多有效5分鐘",
"search_placeholder": "搜尋連結...",
"no_results": "未找到連結。",
"group_title": "連結列表",
"copy_success": "複製成功!",
"created_at": "創建時間",
"updated_at": "更新時間",
"expires_at": "過期時間",
"no_more": "沒有更多連結",
"load_failed": "加載連接失敗,",
"download_qr_code": "下載QR code",
"sort": {
"newest": "最新",
"oldest": "最舊",
"az": "短連結(A-Z)",
"za": "短連結(Z-A)",
"tip": "體驗功能: 僅對已經加載的連結有效"
}
}
}

View file

@ -11,6 +11,7 @@ export default defineNuxtConfig({
'@nuxtjs/color-mode',
'@nuxtjs/i18n',
],
devtools: { enabled: true },
colorMode: {