|
1 | 1 | import { Settings } from "@/core/service/Settings"; |
2 | 2 | import { SoundService } from "@/core/service/feedbackService/SoundService"; |
3 | | -import { Volume2, VolumeX } from "lucide-react"; |
| 3 | +import { ExternalLink, Volume2, VolumeX } from "lucide-react"; |
4 | 4 | import { useTranslation } from "react-i18next"; |
5 | 5 | import { Switch } from "@/components/ui/switch"; |
6 | 6 | import FileChooser from "@/components/ui/file-chooser"; |
| 7 | +import { Popover } from "@/components/ui/popover"; |
| 8 | +import { open } from "@tauri-apps/plugin-shell"; |
7 | 9 |
|
8 | 10 | // 音效配置列表 |
9 | 11 | const SOUND_CONFIGS = [ |
@@ -39,6 +41,24 @@ export default function SoundEffectsPage() { |
39 | 41 |
|
40 | 42 | return ( |
41 | 43 | <div className="space-y-4"> |
| 44 | + <p>提示:目前此页面有一个bug:需要切换一下页面再切回来,才能看到改动的效果</p> |
| 45 | + <Popover.Confirm |
| 46 | + title="提示" |
| 47 | + description="即将跳转github页面。如果github页面无法打开,请自行解决或使用自定义音效。" |
| 48 | + onConfirm={() => open("https://github.com/LiRenTech/project-graph-cdn")} |
| 49 | + > |
| 50 | + <div className="bg-muted/50 **:cursor-pointer group flex flex-1 cursor-pointer flex-col justify-center gap-2 rounded-lg border p-4"> |
| 51 | + <div className="flex items-center justify-center gap-2"> |
| 52 | + <ExternalLink className="h-5 w-5" /> |
| 53 | + <span className="text-lg">前往官方音效库Github仓库:</span> |
| 54 | + </div> |
| 55 | + <div className="flex items-end justify-center gap-2 text-center"> |
| 56 | + <span className="underline-offset-4 group-hover:underline"> |
| 57 | + https://github.com/LiRenTech/project-graph-cdn |
| 58 | + </span> |
| 59 | + </div> |
| 60 | + </div> |
| 61 | + </Popover.Confirm> |
42 | 62 | <div className="bg-muted flex items-center justify-between rounded-lg p-4"> |
43 | 63 | <div className="flex items-center gap-2"> |
44 | 64 | {soundEnabled ? <Volume2 /> : <VolumeX />} |
@@ -89,7 +109,6 @@ export default function SoundEffectsPage() { |
89 | 109 | <p>{t("soundDisabledHint")}</p> |
90 | 110 | </div> |
91 | 111 | )} |
92 | | - <p>提示:目前此页面有一个bug:需要切换一下页面再切回来,才能看到改动的效果</p> |
93 | 112 | </div> |
94 | 113 | ); |
95 | 114 | } |
0 commit comments