From e9a6233655305c733abc70745bb7cff4987ea17b Mon Sep 17 00:00:00 2001 From: fawney19 Date: Fri, 12 Dec 2025 16:15:16 +0800 Subject: [PATCH] =?UTF-8?q?refactor(frontend):=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=85=AC=E5=85=B1=E7=BB=84=E4=BB=B6=E5=92=8C=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 Logo 相关组件 (AetherLogo, HeaderLogo, RippleLogo 等) - 优化图表组件 (BarChart, LineChart, ScatterChart) - 改进公共组件 (AlertDialog, EmptyState, LoadingState) - 调整布局组件 (AppShell, SidebarNav, PageHeader 等) - 优化 ActivityHeatmap 统计组件 --- .../src/components/AetherLineByLineLogo.vue | 110 ++- frontend/src/components/CodeHighlight.vue | 16 +- frontend/src/components/GeminiStarCluster.vue | 185 +++- frontend/src/components/HeaderLogo.vue | 4 +- frontend/src/components/PlatformSelect.vue | 36 +- frontend/src/components/RippleLogo.vue | 894 +++++++++++------- frontend/src/components/ToastWithProgress.vue | 24 +- frontend/src/components/charts/BarChart.vue | 12 +- frontend/src/components/charts/LineChart.vue | 10 +- .../src/components/charts/ScatterChart.vue | 28 +- .../src/components/common/AlertDialog.vue | 33 +- frontend/src/components/common/EmptyState.vue | 37 +- .../src/components/common/LoadingState.vue | 24 +- frontend/src/components/icons/AetherLogo.vue | 12 +- frontend/src/components/layout/AppShell.vue | 14 +- .../src/components/layout/CardSection.vue | 20 +- frontend/src/components/layout/MobileNav.vue | 6 +- frontend/src/components/layout/PageHeader.vue | 20 +- frontend/src/components/layout/Section.vue | 15 +- frontend/src/components/layout/SidebarNav.vue | 20 +- .../src/components/stats/ActivityHeatmap.vue | 127 ++- 21 files changed, 1130 insertions(+), 517 deletions(-) diff --git a/frontend/src/components/AetherLineByLineLogo.vue b/frontend/src/components/AetherLineByLineLogo.vue index dfceb6d..5383dd3 100644 --- a/frontend/src/components/AetherLineByLineLogo.vue +++ b/frontend/src/components/AetherLineByLineLogo.vue @@ -1,5 +1,8 @@ @@ -12,6 +15,11 @@ import json from 'highlight.js/lib/languages/json' import ini from 'highlight.js/lib/languages/ini' import javascript from 'highlight.js/lib/languages/javascript' +const props = defineProps<{ + code: string + language: string + dense?: boolean +}>() // 注册需要的语言 hljs.registerLanguage('bash', bash) hljs.registerLanguage('sh', bash) @@ -20,12 +28,6 @@ hljs.registerLanguage('toml', ini) hljs.registerLanguage('ini', ini) hljs.registerLanguage('javascript', javascript) -const props = defineProps<{ - code: string - language: string - dense?: boolean -}>() - const wrapperClass = computed(() => ['code-highlight', props.dense ? 'code-highlight--dense' : ''] .filter(Boolean) diff --git a/frontend/src/components/GeminiStarCluster.vue b/frontend/src/components/GeminiStarCluster.vue index 5762e91..f13e313 100644 --- a/frontend/src/components/GeminiStarCluster.vue +++ b/frontend/src/components/GeminiStarCluster.vue @@ -5,34 +5,106 @@ :class="{ 'scattering': isScattering, 'fading-out': isFadingOut }" > -
- +
-

{{ currentOption.label }}

-

{{ currentOption.hint }}

+

+ {{ currentOption.label }} +

+

+ {{ currentOption.hint }} +

-
    +
    • - +
      -

      {{ option.label }}

      -

      {{ option.hint }}

      +

      + {{ option.label }} +

      +

      + {{ option.hint }} +

      - +
    diff --git a/frontend/src/components/RippleLogo.vue b/frontend/src/components/RippleLogo.vue index a223a2e..b03483c 100644 --- a/frontend/src/components/RippleLogo.vue +++ b/frontend/src/components/RippleLogo.vue @@ -1,355 +1,599 @@ - - + + - - - - + + diff --git a/frontend/src/components/ToastWithProgress.vue b/frontend/src/components/ToastWithProgress.vue index a7d642a..76deb20 100644 --- a/frontend/src/components/ToastWithProgress.vue +++ b/frontend/src/components/ToastWithProgress.vue @@ -35,28 +35,42 @@ /> -
    - +
    +
    -

    +

    {{ toast.title }}

    -

    +

    {{ toast.message }}

    diff --git a/frontend/src/components/charts/BarChart.vue b/frontend/src/components/charts/BarChart.vue index b8634a6..9791aa3 100644 --- a/frontend/src/components/charts/BarChart.vue +++ b/frontend/src/components/charts/BarChart.vue @@ -1,6 +1,6 @@ @@ -19,6 +19,11 @@ import { type ChartOptions } from 'chart.js' +const props = withDefaults(defineProps(), { + height: 300, + stacked: true +}) + ChartJS.register( CategoryScale, LinearScale, @@ -36,11 +41,6 @@ interface Props { stacked?: boolean } -const props = withDefaults(defineProps(), { - height: 300, - stacked: true -}) - const chartRef = ref() let chart: ChartJS<'bar'> | null = null diff --git a/frontend/src/components/charts/LineChart.vue b/frontend/src/components/charts/LineChart.vue index bedd944..2d2d2dd 100644 --- a/frontend/src/components/charts/LineChart.vue +++ b/frontend/src/components/charts/LineChart.vue @@ -1,6 +1,6 @@ @@ -20,6 +20,10 @@ import { type ChartOptions } from 'chart.js' +const props = withDefaults(defineProps(), { + height: 300 +}) + // 注册 Chart.js 组件 ChartJS.register( CategoryScale, @@ -38,10 +42,6 @@ interface Props { height?: number } -const props = withDefaults(defineProps(), { - height: 300 -}) - const chartRef = ref() let chart: ChartJS<'line'> | null = null diff --git a/frontend/src/components/charts/ScatterChart.vue b/frontend/src/components/charts/ScatterChart.vue index 3ecd639..8c08d99 100644 --- a/frontend/src/components/charts/ScatterChart.vue +++ b/frontend/src/components/charts/ScatterChart.vue @@ -1,18 +1,26 @@