Thing init
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { ClipboardList } from '@lucide/vue'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full p-6 overflow-y-auto">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<ClipboardList class="h-5 w-5 text-primary" />
|
||||
剪贴板增强模块
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="flex flex-col items-center justify-center h-64 text-muted-foreground">
|
||||
<ClipboardList class="h-16 w-16 mb-4 opacity-50" />
|
||||
<p>剪贴板增强功能开发中...</p>
|
||||
<p class="text-sm mt-2">支持剪贴板历史记录、搜索、固定常用条目等功能</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { Download } from '@lucide/vue'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full p-6 overflow-y-auto">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<Download class="h-5 w-5 text-primary" />
|
||||
下载器模块
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="flex flex-col items-center justify-center h-64 text-muted-foreground">
|
||||
<Download class="h-16 w-16 mb-4 opacity-50" />
|
||||
<p>下载器功能开发中...</p>
|
||||
<p class="text-sm mt-2">支持 HTTP 下载、BT/磁力链接、下载任务管理等功能</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { Search } from '@lucide/vue'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full p-6 overflow-y-auto">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<Search class="h-5 w-5 text-primary" />
|
||||
文件搜索模块
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="flex flex-col items-center justify-center h-64 text-muted-foreground">
|
||||
<Search class="h-16 w-16 mb-4 opacity-50" />
|
||||
<p>文件搜索功能开发中...</p>
|
||||
<p class="text-sm mt-2">支持快速搜索弹窗、文件搜索、应用程序搜索等功能</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,184 @@
|
||||
<script setup lang="ts">
|
||||
import { Monitor, Sun, Moon, Sparkles, Layers, LogOut } from '@lucide/vue'
|
||||
import { Switch } from '@/components/ui/switch'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { useAppStore, type Theme, type EffectType } from '@/stores/appStore'
|
||||
import { useSearchStore } from '@/stores/searchStore'
|
||||
import { invoke } from '@tauri-apps/api/core'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const appStore = useAppStore()
|
||||
const searchStore = useSearchStore()
|
||||
|
||||
onMounted(() => {
|
||||
searchStore.registerAction('settings', 0, () => appStore.setTheme('light'))
|
||||
searchStore.registerAction('settings', 1, () => appStore.setTheme('dark'))
|
||||
searchStore.registerAction('settings', 2, () => appStore.setTheme('system'))
|
||||
searchStore.registerAction('settings', 3, () => appStore.setEffect('normal'))
|
||||
searchStore.registerAction('settings', 4, () => appStore.setEffect('mica'))
|
||||
searchStore.registerAction('settings', 5, () => appStore.setEffect('acrylic'))
|
||||
searchStore.registerAction('settings', 6, () => appStore.toggleAutoStart())
|
||||
})
|
||||
|
||||
const themes: Array<{ id: Theme; name: string; color: string; icon: typeof Sun }> = [
|
||||
{ id: 'light', name: '浅色模式', color: '#f8fafc', icon: Sun },
|
||||
{ id: 'dark', name: '深色模式', color: '#1e293b', icon: Moon },
|
||||
{ id: 'system', name: '跟随系统', color: '#64748b', icon: Monitor }
|
||||
]
|
||||
|
||||
const effects: Array<{ id: EffectType; name: string; color: string; description: string }> = [
|
||||
{ id: 'normal', name: '普通模式', color: '#ffffff', description: '标准背景效果' },
|
||||
{ id: 'mica', name: 'Win 云母', color: '#e2e8f0', description: 'Windows 11 云母效果' },
|
||||
{ id: 'acrylic', name: 'Win 亚克力', color: '#cbd5e1', description: 'Windows 11 亚克力效果' }
|
||||
]
|
||||
|
||||
const getThemeColor = (themeId: Theme) => {
|
||||
if (themeId === 'system') {
|
||||
return appStore.theme === 'dark' ? '#1e293b' : '#f8fafc'
|
||||
}
|
||||
const theme = themes.find(t => t.id === themeId)
|
||||
return theme?.color || '#f8fafc'
|
||||
}
|
||||
|
||||
const quitApp = async () => {
|
||||
await invoke('quit_app')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full p-6 overflow-y-auto">
|
||||
<div class="max-w-3xl mx-auto space-y-6">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<Sparkles class="h-5 w-5 text-primary" />
|
||||
常规设置
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="flex items-center justify-between py-2">
|
||||
<div class="space-y-1">
|
||||
<Label class="text-base font-medium">开机自启</Label>
|
||||
<p class="text-sm text-muted-foreground">启动 Windows 时自动运行应用</p>
|
||||
</div>
|
||||
<Switch
|
||||
:checked="appStore.isAutoStart"
|
||||
@update:checked="appStore.toggleAutoStart"
|
||||
/>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<Layers class="h-5 w-5 text-primary" />
|
||||
主题切换
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="grid grid-cols-3 gap-4">
|
||||
<button
|
||||
v-for="theme in themes"
|
||||
:key="theme.id"
|
||||
class="group relative rounded-lg overflow-hidden border-2 transition-all duration-300 hover:shadow-lg"
|
||||
:class="appStore.theme === theme.id ? 'border-primary shadow-md' : 'border-border hover:border-primary/50'"
|
||||
@click="appStore.setTheme(theme.id)"
|
||||
>
|
||||
<div
|
||||
class="h-16 w-full flex items-center justify-center transition-all duration-300"
|
||||
:style="{ backgroundColor: getThemeColor(theme.id) }"
|
||||
>
|
||||
<component
|
||||
:is="theme.icon"
|
||||
class="h-8 w-8 transition-colors duration-300"
|
||||
:class="theme.id === 'dark' || (theme.id === 'system' && appStore.theme === 'dark') ? 'text-white' : 'text-gray-800'"
|
||||
/>
|
||||
</div>
|
||||
<div class="h-10 flex items-center justify-center bg-card">
|
||||
<span class="text-sm font-medium">{{ theme.name }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="appStore.theme === theme.id"
|
||||
class="absolute top-2 right-2 w-5 h-5 bg-primary rounded-full flex items-center justify-center"
|
||||
>
|
||||
<svg class="w-3 h-3 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M5 13l4 4L19 7"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<Sparkles class="h-5 w-5 text-primary" />
|
||||
效果切换
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="grid grid-cols-3 gap-4">
|
||||
<button
|
||||
v-for="effect in effects"
|
||||
:key="effect.id"
|
||||
class="group relative rounded-lg overflow-hidden border-2 transition-all duration-300 hover:shadow-lg"
|
||||
:class="appStore.effect === effect.id ? 'border-primary shadow-md' : 'border-border hover:border-primary/50'"
|
||||
@click="appStore.setEffect(effect.id)"
|
||||
>
|
||||
<div
|
||||
class="h-16 w-full flex items-center justify-center transition-all duration-300"
|
||||
:style="{
|
||||
backgroundColor: effect.id === 'normal' ? '#ffffff' : effect.id === 'mica' ? '#e2e8f040' : '#cbd5e120',
|
||||
backdropFilter: effect.id === 'mica' ? 'blur(12px)' : effect.id === 'acrylic' ? 'blur(20px)' : 'none'
|
||||
}"
|
||||
>
|
||||
<div
|
||||
class="w-12 h-12 rounded-lg border border-border/50"
|
||||
:style="{
|
||||
backgroundColor: effect.color,
|
||||
backdropFilter: effect.id === 'mica' ? 'blur(8px)' : effect.id === 'acrylic' ? 'blur(16px)' : 'none'
|
||||
}"
|
||||
></div>
|
||||
</div>
|
||||
<div class="h-14 flex flex-col items-center justify-center bg-card p-2">
|
||||
<span class="text-sm font-medium">{{ effect.name }}</span>
|
||||
<span class="text-xs text-muted-foreground">{{ effect.description }}</span>
|
||||
</div>
|
||||
<div
|
||||
v-if="appStore.effect === effect.id"
|
||||
class="absolute top-2 right-2 w-5 h-5 bg-primary rounded-full flex items-center justify-center"
|
||||
>
|
||||
<svg class="w-3 h-3 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M5 13l4 4L19 7"></path>
|
||||
</svg>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<LogOut class="h-5 w-5 text-destructive" />
|
||||
退出程序
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<Button
|
||||
variant="outline"
|
||||
class="text-destructive border-destructive/20 hover:bg-destructive/10"
|
||||
@click="quitApp"
|
||||
>
|
||||
<LogOut class="h-4 w-4 mr-2" />
|
||||
彻底退出
|
||||
</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { Activity } from '@lucide/vue'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full p-6 overflow-y-auto">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<Activity class="h-5 w-5 text-primary" />
|
||||
硬件监控模块
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="flex flex-col items-center justify-center h-64 text-muted-foreground">
|
||||
<Activity class="h-16 w-16 mb-4 opacity-50" />
|
||||
<p>硬件监控功能开发中...</p>
|
||||
<p class="text-sm mt-2">支持 CPU、GPU、内存、硬盘等硬件数据监控</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { Globe } from '@lucide/vue'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full p-6 overflow-y-auto">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<Globe class="h-5 w-5 text-primary" />
|
||||
代理管理模块
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="flex flex-col items-center justify-center h-64 text-muted-foreground">
|
||||
<Globe class="h-16 w-16 mb-4 opacity-50" />
|
||||
<p>代理管理功能开发中...</p>
|
||||
<p class="text-sm mt-2">支持系统代理切换、规则配置、延迟测速等功能</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { Camera } from '@lucide/vue'
|
||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="h-full p-6 overflow-y-auto">
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle class="flex items-center gap-2">
|
||||
<Camera class="h-5 w-5 text-primary" />
|
||||
截图模块
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<div class="flex flex-col items-center justify-center h-64 text-muted-foreground">
|
||||
<Camera class="h-16 w-16 mb-4 opacity-50" />
|
||||
<p>截图功能开发中...</p>
|
||||
<p class="text-sm mt-2">支持区域截图、窗口截图、全屏截图、滚动截图等功能</p>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user