- 已配置标签预算
+ {{ t('dashboard.labels.configuredTagBudgets') }}
{{ overview.tagBudgetSummary.configuredCount }}
- 接近预算
+ {{ t('dashboard.labels.nearingBudget') }}
{{ overview.tagBudgetSummary.warningCount }}
- 超标
+ {{ t('dashboard.labels.overBudget') }}
{{ overview.tagBudgetSummary.overBudgetCount }}
-
使用率最高
+
{{ t('dashboard.labels.topUsageRate') }}
{{ tag.name }}
@@ -88,27 +88,27 @@
-
+
-
+
-
+
-
+
-
+
-
+
@@ -119,6 +119,7 @@ import { computed, h } from 'vue'
import { useWindowSize } from '@vueuse/core'
import { NCard, NDataTable, NEmpty, NGrid, NGridItem, NProgress, NTag, useThemeVars } from 'naive-ui'
import { CashOutline, GridOutline, LayersOutline, NotificationsOutline, WalletOutline } from '@vicons/ionicons5'
+import { t } from '@/locales'
import { useSettingsQuery } from '@/composables/settings-query'
import { useStatisticsOverviewQuery } from '@/composables/statistics-overview-query'
import ChartView from '@/components/ChartView.vue'
@@ -147,15 +148,15 @@ const halfSpan = computed(() => (width.value < 1100 ? 24 : 12))
const chartCols = computed(() => (width.value < 1100 ? 1 : 2))
const summaryCards = computed(() => [
- { label: '活跃订阅', value: overview.value?.activeSubscriptions ?? 0, icon: LayersOutline },
- { label: '7 天内续订', value: overview.value?.upcoming7Days ?? 0, icon: NotificationsOutline },
+ { label: t('dashboard.cards.activeSubscriptions'), value: overview.value?.activeSubscriptions ?? 0, icon: LayersOutline },
+ { label: t('dashboard.cards.renewalsIn7Days'), value: overview.value?.upcoming7Days ?? 0, icon: NotificationsOutline },
{
- label: '本月预计支出',
+ label: t('dashboard.cards.estimatedMonthlySpend'),
value: overview.value ? formatMoney(overview.value.monthlyEstimatedBase, baseCurrency.value) : '--',
icon: WalletOutline
},
{
- label: '年度预计支出',
+ label: t('dashboard.cards.estimatedYearlySpend'),
value: overview.value ? formatMoney(overview.value.yearlyEstimatedBase, baseCurrency.value) : '--',
icon: CashOutline
}
@@ -212,30 +213,30 @@ const trendOption = computed(() => {
}
})
-const columns = [
- { title: '订阅', key: 'name' },
+const columns = computed(() => [
+ { title: t('dashboard.table.subscription'), key: 'name' },
{
- title: '下次续订',
+ title: t('dashboard.table.nextRenewal'),
key: 'nextRenewalDate',
render: (row: StatisticsOverview['upcomingRenewals'][number]) => formatDateInTimezone(row.nextRenewalDate, settings.value?.timezone)
},
{
- title: '原始金额',
+ title: t('dashboard.table.originalAmount'),
key: 'amount',
render: (row: StatisticsOverview['upcomingRenewals'][number]) => formatMoney(row.amount, row.currency)
},
{
- title: '折算金额',
+ title: t('dashboard.table.convertedAmount'),
key: 'convertedAmount',
render: (row: StatisticsOverview['upcomingRenewals'][number]) => formatMoney(row.convertedAmount, baseCurrency.value)
},
{
- title: '状态',
+ title: t('dashboard.table.status'),
key: 'status',
render: (row: StatisticsOverview['upcomingRenewals'][number]) =>
h(NTag, { type: getSubscriptionStatusTagType(row.status) }, { default: () => getSubscriptionStatusText(row.status) })
}
-]
+])
function formatMoney(amount: number, currency: string) {
return `${currency} ${amount.toFixed(2)}`
diff --git a/apps/web/src/pages/LoginPage.vue b/apps/web/src/pages/LoginPage.vue
index 8d18a67..4395c20 100644
--- a/apps/web/src/pages/LoginPage.vue
+++ b/apps/web/src/pages/LoginPage.vue
@@ -6,63 +6,68 @@