diff --git a/public/lab.png b/public/lab.png new file mode 100644 index 0000000..f92d43d Binary files /dev/null and b/public/lab.png differ diff --git a/src/pages/Dev.tsx b/src/pages/Dev.tsx index 7921e69..a3aed3c 100644 --- a/src/pages/Dev.tsx +++ b/src/pages/Dev.tsx @@ -1,17 +1,21 @@ import { Button } from '@nextui-org/react' import { Response } from '@tauri-apps/api/http' +import { motion } from 'framer-motion' import { useTheme } from 'next-themes' +import { useState } from 'react' import { useNavigate } from 'react-router-dom' import i18n from '../i18n/index.ts' import { getNetworks } from '../services/zerotierService.ts' import { useAppStore } from '../store/app.ts' +import { InvokeEvent } from '../typings/enum.ts' import { invokeCommand, readTextFile, writeTextFile } from '../utils/helpers/tauriHelpers.ts' function Dev() { const { restartAsAdmin } = useAppStore() const { theme, setTheme } = useTheme() const navigate = useNavigate() + const [assList, setAssList] = useState([]) async function readConfiguration() { return await readTextFile() @@ -36,8 +40,9 @@ function Dev() { }) const btnList = [ - invokeCommandButton('get_config'), - invokeCommandButton('get_zerotier_server_info'), + invokeCommandButton(InvokeEvent.GET_CONFIG), + invokeCommandButton(InvokeEvent.GET_ZEROTIER_SERVER_INFO), + invokeCommandButton(InvokeEvent.HIDE_MAIN_WINDOW), apiButton(getNetworks), { text: '[i18n]: translation', @@ -79,14 +84,55 @@ function Dev() { }, ] + function ass(): JSX.Element { + return ( + + kiss my ass! + + ) + } + + const kissMyAssBtn = ( +
+ + {assList.map((item, index) => ( +
{item}
+ ))} +
+ ) + return (
+
+ +
{btnList.map(({ text, onClick }) => ( ))} + {kissMyAssBtn}
)