Skip to content

Commit a30857c

Browse files
committed
优化登录页面UI
1 parent 96d4ca3 commit a30857c

File tree

13 files changed

+778
-129
lines changed

13 files changed

+778
-129
lines changed

fix-app-vue.sh

Whitespace-only changes.

web/App.vue

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<template>
2-
<!-- Top Navbar: Feishu style minimal header -->
3-
<header class="fixed top-0 left-0 right-0 z-50" :style="navStyle">
2+
<!-- Top Navbar: Feishu style minimal header (hidden on login page) -->
3+
<header v-if="!isLoginPage" class="fixed top-0 left-0 right-0 z-50" :style="navStyle">
44
<div class="flex items-center justify-between h-14 px-6 md:px-[10%]">
55
<div class="flex items-center gap-8">
6-
<div class="font-semibold text-[20px]" style="color:#1F2329">TinyFlow</div>
6+
<div class="flex items-center gap-2">
7+
<img src="/logo.png" alt="TinyFlow" class="h-7 w-auto" />
8+
<div class="font-semibold text-[20px]" style="color:#1F2329">TinyFlow</div>
9+
</div>
710
<nav class="hidden md:flex items-center gap-6">
811
<a href="#" @click.prevent="$router.push('/')" class="text-[14px] hover:text-[#3370FF] transition" style="color:#646A73">{{ $t('common.home') }}</a>
912
<a href="#" @click.prevent="goToDashboard" class="text-[14px] hover:text-[#3370FF] transition" style="color:#646A73">{{ $t('nav.dashboard') }}</a>
@@ -43,8 +46,8 @@
4346
</header>
4447

4548
<!-- Rest of page -->
46-
<router-view v-if="isStatsOrDashboardOrAbout" class="pt-14" />
47-
<main class="min-h-screen pt-14" v-show="!isStatsOrDashboardOrAbout" style="background-color:var(--tf-bg-page)">
49+
<router-view v-if="isRouterViewPage" :class="{ 'pt-14': !isLoginPage }" />
50+
<main class="min-h-screen pt-14" v-show="!isRouterViewPage" style="background-color:var(--tf-bg-page)">
4851
<section class="hero pt-24 pb-16">
4952
<div class="hero-inner max-w-5xl mx-auto px-6 flex flex-col items-center text-center gap-8">
5053
<!-- 标题区 -->
@@ -286,12 +289,16 @@ export default {
286289
},
287290
githubBtnStyle() {
288291
return {
289-
background: 'linear-gradient(135deg, #3370FF 0%, #2B5FE6 45%, #38BDF8 100%)'
292+
background: 'linear-gradient(135deg, #1D9BF0 0%, #2B6BFF 50%, #37B4FF 100%)'
290293
}
291294
},
292-
isStatsOrDashboardOrAbout() {
295+
isLoginPage() {
296+
const p = this.$route?.path || ''
297+
return p === '/login'
298+
},
299+
isRouterViewPage() {
293300
const p = this.$route?.path || ''
294-
return p.startsWith('/stats/') || p === '/dashboard' || p === '/login' || p === '/about'
301+
return p.startsWith('/stats/') || p === '/dashboard' || p === '/login' || p === '/about' || p === '/'
295302
},
296303
statsMap() {
297304
const map = {}

web/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
5+
<link rel="icon" type="image/png" href="/logo.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>TinyFlow</title>
88
</head>

web/public/logo.png

359 KB
Loading

web/public/logo.svg

Loading

web/src/components/Favicon.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<!-- Fallback: 首字母徽标 -->
33
<div v-if="!hasValidSource || !hasIcon" class="w-5 h-5 rounded-full flex items-center justify-center text-[10px] font-semibold"
4-
style="flex:none;transition: all 0.2s ease; background: linear-gradient(135deg, #6B72FF 0%, #8A6BFF 50%, #A66BFF 100%); color: #FFFFFF">
4+
style="flex:none;transition: all 0.2s ease; background: linear-gradient(135deg, #1D9BF0 0%, #2B6BFF 50%, #37B4FF 100%); color: #FFFFFF">
55
{{ initial }}
66
</div>
77
<!-- Favicon with multi-source fallback -->

web/src/components/ShortenerForm.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</div>
4646
<div class="flex-1"></div>
4747
<!-- 二维码 -->
48-
<QrcodeVue :value="redirectUrl" :size="140" level="M" :foreground="'#2B6CEF'" :background="'#ffffff'"/>
48+
<QrcodeVue :value="redirectUrl" :size="140" level="M" :foreground="'#1D9BF0'" :background="'#ffffff'"/>
4949
</div>
5050
</div>
5151
</div>
@@ -60,8 +60,8 @@ import { useI18n } from 'vue-i18n'
6060
import { SHORT_BASE } from '../composables/shortBase'
6161
6262
// UI 风格:通义千问蓝紫
63-
const BLUE = '#2B6CEF'
64-
const PURPLE = '#8B7DFF'
63+
const BLUE = '#1D9BF0'
64+
const PURPLE = '#2B6BFF'
6565
6666
const longUrl = ref<string>('')
6767
const customAlias = ref<string>('')
@@ -91,7 +91,7 @@ const resultCardStyle = computed(() => ({
9191
borderColor: '#E5E7EB'
9292
}))
9393
94-
const linkStyle = computed(() => ({ color: '#2B6CEF' }))
94+
const linkStyle = computed(() => ({ color: '#1D9BF0' }))
9595
// 展示使用统一基域短链(SHORT_BASE),不包含 /api/redirect
9696
const redirectUrl = computed(() => {
9797
const url = shortUrl.value || ''

web/src/composables/shortBase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
????????export const SHORT_BASE = (
1+
export const SHORT_BASE = (
22
import.meta?.env?.VITE_SHORT_BASE
33
) || (
44
typeof window !== 'undefined' && window.location && window.location.origin

web/src/pages/DashboardPage.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<td class="md-td">
8383
<div class="flex items-center gap-2">
8484
<div class="w-[160px] h-2 rounded" style="background: var(--divider)">
85-
<div class="h-2 rounded" :style="{ width: (percentMap[row.shortCode]||0).toFixed(2) + '%', background: '#2563EB' }"></div>
85+
<div class="h-2 rounded" :style="{ width: (percentMap[row.shortCode]||0).toFixed(2) + '%', background: 'var(--tf-brand-primary)' }"></div>
8686
</div>
8787
<span class="md-muted">{{ (percentMap[row.shortCode]||0).toFixed(2) }}%</span>
8888
</div>
@@ -142,7 +142,7 @@ const { data: clickStatsRef, loading: clickLoading, error: clickError, refresh:
142142
const list = listRef
143143
144144
// Pie data and colors
145-
const pieColors = ['#3370FF','#2B5FE6','#1F4ED8','#00C875','#FFAB00','#6366F1','#38BDF8','#14B8A6','#22C55E']
145+
const pieColors = ['#1D9BF0','#2B6BFF','#37B4FF','#00C875','#FFAB00','#6366F1','#38BDF8','#14B8A6','#22C55E']
146146
// 使用 click-stats 数据源生成饼图数据
147147
const pieTotalData = computed(() => buildPieData(clickStatsRef.value || [], 'totalVisits'))
148148
const pieTodayData = computed(() => buildPieData(clickStatsRef.value || [], 'todayVisits'))

0 commit comments

Comments
 (0)