mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-05 07:13:44 +08:00
feat: doc reference link on settings header
This commit is contained in:
parent
030d1f374a
commit
f1c21b642f
@ -1,15 +1,14 @@
|
|||||||
import { Box, Grid, IconButton, Paper } from "@mui/material";
|
import { Box, ButtonGroup, Grid, IconButton } from "@mui/material";
|
||||||
import { useLockFn } from "ahooks";
|
import { useLockFn } from "ahooks";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { BasePage, Notice } from "@/components/base";
|
import { BasePage, Notice } from "@/components/base";
|
||||||
import { GitHub } from "@mui/icons-material";
|
import { GitHub, HelpOutlineSharp } from "@mui/icons-material";
|
||||||
import { openWebUrl } from "@/services/cmds";
|
import { openWebUrl } from "@/services/cmds";
|
||||||
import SettingVerge from "@/components/setting/setting-verge";
|
import SettingVerge from "@/components/setting/setting-verge";
|
||||||
import SettingClash from "@/components/setting/setting-clash";
|
import SettingClash from "@/components/setting/setting-clash";
|
||||||
import SettingSystem from "@/components/setting/setting-system";
|
import SettingSystem from "@/components/setting/setting-system";
|
||||||
import { atomThemeMode } from "@/services/states";
|
import { atomThemeMode } from "@/services/states";
|
||||||
import { useRecoilState } from "recoil";
|
import { useRecoilState } from "recoil";
|
||||||
import { useCustomTheme } from "@/components/layout/use-custom-theme";
|
|
||||||
|
|
||||||
const SettingPage = () => {
|
const SettingPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@ -22,22 +21,35 @@ const SettingPage = () => {
|
|||||||
return openWebUrl("https://github.com/clash-verge-rev/clash-verge-rev");
|
return openWebUrl("https://github.com/clash-verge-rev/clash-verge-rev");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const toGithubDoc = useLockFn(() => {
|
||||||
|
return openWebUrl("https://clash-verge-rev.github.io/guide/log.html");
|
||||||
|
});
|
||||||
|
|
||||||
const [mode] = useRecoilState(atomThemeMode);
|
const [mode] = useRecoilState(atomThemeMode);
|
||||||
const isDark = mode === "light" ? false : true;
|
const isDark = mode === "light" ? false : true;
|
||||||
const { theme } = useCustomTheme();
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BasePage
|
<BasePage
|
||||||
title={t("Settings")}
|
title={t("Settings")}
|
||||||
header={
|
header={
|
||||||
<IconButton
|
<ButtonGroup variant="contained" aria-label="Basic button group">
|
||||||
size="medium"
|
<IconButton
|
||||||
color="inherit"
|
size="medium"
|
||||||
title="@clash-verge-rev/clash-verge-rev"
|
color="inherit"
|
||||||
onClick={toGithubRepo}
|
title="@clash-verge-rev/clash-verge-rev.github.io"
|
||||||
>
|
onClick={toGithubDoc}
|
||||||
<GitHub fontSize="inherit" />
|
>
|
||||||
</IconButton>
|
<HelpOutlineSharp fontSize="inherit" />
|
||||||
|
</IconButton>
|
||||||
|
<IconButton
|
||||||
|
size="medium"
|
||||||
|
color="inherit"
|
||||||
|
title="@clash-verge-rev/clash-verge-rev"
|
||||||
|
onClick={toGithubRepo}
|
||||||
|
>
|
||||||
|
<GitHub fontSize="inherit" />
|
||||||
|
</IconButton>
|
||||||
|
</ButtonGroup>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Grid container spacing={{ xs: 1.5, lg: 1.5 }}>
|
<Grid container spacing={{ xs: 1.5, lg: 1.5 }}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user