From 141cf4123455638ee61283b4ccb093c8ac1ed3fa Mon Sep 17 00:00:00 2001 From: codytseng Date: Mon, 14 Oct 2024 14:29:03 +0800 Subject: [PATCH] feat: move pow option to wot page --- src/renderer/src/App.tsx | 4 ++-- src/renderer/src/main.tsx | 4 ++-- src/renderer/src/pages/settings/index.tsx | 2 -- .../components/PowOption.tsx} | 4 ++-- .../src/pages/{wot => wotAndPow}/index.tsx | 16 ++++++++++++---- 5 files changed, 18 insertions(+), 12 deletions(-) rename src/renderer/src/pages/{settings/components/PowDifficultyOption.tsx => wotAndPow/components/PowOption.tsx} (91%) rename src/renderer/src/pages/{wot => wotAndPow}/index.tsx (92%) diff --git a/src/renderer/src/App.tsx b/src/renderer/src/App.tsx index 8cd4e64..3693041 100644 --- a/src/renderer/src/App.tsx +++ b/src/renderer/src/App.tsx @@ -12,8 +12,8 @@ const navItems = [ href: '/data' }, { - title: 'WoT', - href: '/wot' + title: 'WoT & PoW', + href: '/wotandpow' }, { title: 'Rules', diff --git a/src/renderer/src/main.tsx b/src/renderer/src/main.tsx index 6a0325d..1cb3f9c 100644 --- a/src/renderer/src/main.tsx +++ b/src/renderer/src/main.tsx @@ -7,7 +7,7 @@ import Logs from '@renderer/pages/logs' import Rules from '@renderer/pages/rules' import EditRule from '@renderer/pages/rules/edit' import Settings from '@renderer/pages/settings' -import Wot from '@renderer/pages/wot' +import WotAndPow from '@renderer/pages/wotAndPow' import React from 'react' import ReactDOM from 'react-dom/client' import { createHashRouter, RouterProvider } from 'react-router-dom' @@ -19,7 +19,7 @@ export const router = createHashRouter([ children: [ { index: true, element: }, { path: '/data', element: }, - { path: '/wot', element: }, + { path: '/wotandpow', element: }, { path: '/rules', element: }, { path: '/rules/create', element: }, { path: '/rules/:id/edit', element: }, diff --git a/src/renderer/src/pages/settings/index.tsx b/src/renderer/src/pages/settings/index.tsx index 0eb97e2..da959b0 100644 --- a/src/renderer/src/pages/settings/index.tsx +++ b/src/renderer/src/pages/settings/index.tsx @@ -3,7 +3,6 @@ import AutoLaunchOption from './components/AutoLaunchOption' import DefaultFilterLimitOption from './components/DefaultFilterLimitOption' import JoinTrayHubOption from './components/JoinTrayHubOption' import MaxPayloadOption from './components/MaxPayloadOption' -import PowDifficultyOption from './components/PowDifficultyOption' import TrayIconColorOption from './components/TrayIconColorOption' export default function Settings() { @@ -14,7 +13,6 @@ export default function Settings() { - ) diff --git a/src/renderer/src/pages/settings/components/PowDifficultyOption.tsx b/src/renderer/src/pages/wotAndPow/components/PowOption.tsx similarity index 91% rename from src/renderer/src/pages/settings/components/PowDifficultyOption.tsx rename to src/renderer/src/pages/wotAndPow/components/PowOption.tsx index af05a62..b8d7951 100644 --- a/src/renderer/src/pages/settings/components/PowDifficultyOption.tsx +++ b/src/renderer/src/pages/wotAndPow/components/PowOption.tsx @@ -31,9 +31,9 @@ export default function PowOption() { return (
-
Pow difficulty
+
Difficulty
- The minimum pow difficulty for accepting events + The minimum pow difficulty for accepting events. 0 means disabled.
+
WoT
-
Enable WoT
+
Enable
handleEnableToggle(!enabled)} disabled={loading} />
@@ -201,15 +203,14 @@ export default function Wot() { Refresh
-
+
The most recent refresh of the WoT was at{' '} {lastRefreshedAt ? dayjs(lastRefreshedAt).format('YYYY-MM-DD HH:mm:ss') : ''}
There are {trustedPubkeyCount} users in the WoT
- -
+
Check if a pubkey is in the WoT
+
+ +
or
+ +
+
PoW
+
) }