소스 검색

feat: display version

GyDi 3 년 전
부모
커밋
61b9670b45
1개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. 13 1
      src/components/setting-verge.tsx

+ 13 - 1
src/components/setting-verge.tsx

@@ -1,5 +1,11 @@
 import useSWR, { useSWRConfig } from "swr";
-import { List, ListItemText, ListSubheader, Switch } from "@mui/material";
+import {
+  List,
+  ListItemText,
+  ListSubheader,
+  Switch,
+  Typography,
+} from "@mui/material";
 import {
   getVergeConfig,
   patchVergeConfig,
@@ -9,6 +15,7 @@ import { CmdType } from "../services/types";
 import GuardState from "./guard-state";
 import SettingItem from "./setting-item";
 import PaletteSwitch from "./palette-switch";
+import { version } from "../../package.json";
 
 interface Props {
   onError?: (err: Error) => void;
@@ -82,6 +89,11 @@ const SettingVerge = ({ onError }: Props) => {
           <Switch edge="end" />
         </GuardState>
       </SettingItem>
+
+      <SettingItem>
+        <ListItemText primary="Version" />
+        <Typography sx={{ py: "6px" }}>v{version}</Typography>
+      </SettingItem>
     </List>
   );
 };