Skip to content

Commit 06266c0

Browse files
committed
doc: 添加音效文档链接
1 parent 633be7a commit 06266c0

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

app/src/sub/SettingsWindow/appearance/sounds.tsx

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
import { Settings } from "@/core/service/Settings";
22
import { SoundService } from "@/core/service/feedbackService/SoundService";
3-
import { Volume2, VolumeX } from "lucide-react";
3+
import { ExternalLink, Volume2, VolumeX } from "lucide-react";
44
import { useTranslation } from "react-i18next";
55
import { Switch } from "@/components/ui/switch";
66
import FileChooser from "@/components/ui/file-chooser";
7+
import { Popover } from "@/components/ui/popover";
8+
import { open } from "@tauri-apps/plugin-shell";
79

810
// 音效配置列表
911
const SOUND_CONFIGS = [
@@ -39,6 +41,24 @@ export default function SoundEffectsPage() {
3941

4042
return (
4143
<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>
4262
<div className="bg-muted flex items-center justify-between rounded-lg p-4">
4363
<div className="flex items-center gap-2">
4464
{soundEnabled ? <Volume2 /> : <VolumeX />}
@@ -89,7 +109,6 @@ export default function SoundEffectsPage() {
89109
<p>{t("soundDisabledHint")}</p>
90110
</div>
91111
)}
92-
<p>提示:目前此页面有一个bug:需要切换一下页面再切回来,才能看到改动的效果</p>
93112
</div>
94113
);
95114
}

0 commit comments

Comments
 (0)