From c902fba6a800e1e270c8a1e3fcda1c249ea4a7fc Mon Sep 17 00:00:00 2001 From: Kirill Zhumarin Date: Thu, 15 Jan 2026 09:44:03 +0000 Subject: [PATCH] disable WIP sections --- src/components/Layout/Sidebar/Sidebar.scss | 5 +++++ src/components/Layout/Sidebar/Sidebar.tsx | 10 +++++----- src/components/Layout/Sidebar/SidebarLink.tsx | 7 ++++++- src/context/ThemeProvider.tsx | 3 ++- src/store/globalSettingsStore.tsx | 13 ------------- 5 files changed, 18 insertions(+), 20 deletions(-) delete mode 100644 src/store/globalSettingsStore.tsx diff --git a/src/components/Layout/Sidebar/Sidebar.scss b/src/components/Layout/Sidebar/Sidebar.scss index 2848ff4..1b303cd 100644 --- a/src/components/Layout/Sidebar/Sidebar.scss +++ b/src/components/Layout/Sidebar/Sidebar.scss @@ -52,6 +52,11 @@ color: var(--sidebar-link-active-color); font-weight: 400; } + + &--disabled { + color: var(--bs-gray-500); + pointer-events: none; + } } &__label { diff --git a/src/components/Layout/Sidebar/Sidebar.tsx b/src/components/Layout/Sidebar/Sidebar.tsx index 5697335..6785a0a 100644 --- a/src/components/Layout/Sidebar/Sidebar.tsx +++ b/src/components/Layout/Sidebar/Sidebar.tsx @@ -18,15 +18,15 @@ export const Sidebar: Component = (props) => { title: "Functions library", links: [ { label: "Swilib analysis", href: "/swilib/analysis/summary", icon: "bi bi-activity" }, - { label: "Check swilib.vkp", href: "/swilib/check", icon: "bi bi-file-earmark-check" }, - { label: "Merge swilib.vkp", href: "/swilib/merge", icon: "bi bi-arrow-left-right" } + { label: "Check swilib.vkp", href: "/swilib/check", icon: "bi bi-file-earmark-check", disabled: true }, + { label: "Merge swilib.vkp", href: "/swilib/merge", icon: "bi bi-arrow-left-right", disabled: true } ] }, { title: "Reverse engineering", links: [ - { label: "Patterns finder", href: "/re/ptr89", icon: "bi bi-search" }, + { label: "Patterns finder", href: "/re/ptr89", icon: "bi bi-search", disabled: true }, { label: "Download symbols", href: "/re/symbols", icon: "bi bi-download" } ] }, @@ -34,8 +34,8 @@ export const Sidebar: Component = (props) => { { title: "Database", links: [ - { label: "Patches map", href: "/db/patches-map", icon: "bi bi-diagram-3" }, - { label: "Memory map", href: "/db/memory-map", icon: "bi bi-grid-3x3-gap" } + { label: "Patches map", href: "/db/patches-map", icon: "bi bi-diagram-3", disabled: true }, + { label: "Memory map", href: "/db/memory-map", icon: "bi bi-grid-3x3-gap", disabled: true } ] } ]; diff --git a/src/components/Layout/Sidebar/SidebarLink.tsx b/src/components/Layout/Sidebar/SidebarLink.tsx index 2d07e1f..6b5c02f 100644 --- a/src/components/Layout/Sidebar/SidebarLink.tsx +++ b/src/components/Layout/Sidebar/SidebarLink.tsx @@ -7,13 +7,18 @@ export interface SidebarLinkProps { label: string; href: string; icon: string; + disabled?: boolean; } export const SidebarLink: Component = (props) => { const match = useMatch(() => resolveURL(props.href)); return ( diff --git a/src/context/ThemeProvider.tsx b/src/context/ThemeProvider.tsx index 3034bb5..ab269e3 100644 --- a/src/context/ThemeProvider.tsx +++ b/src/context/ThemeProvider.tsx @@ -8,9 +8,10 @@ import { ParentComponent, useContext } from "solid-js"; -import { ThemeType } from "@/store/globalSettingsStore"; import { makePersistedSignal } from "@/utils/makePersistedSignal"; +type ThemeType = "light" | "dark" | "system"; + interface ThemeContext { theme: Accessor; effectiveTheme: Accessor; diff --git a/src/store/globalSettingsStore.tsx b/src/store/globalSettingsStore.tsx deleted file mode 100644 index 93b6054..0000000 --- a/src/store/globalSettingsStore.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { makePersistedStore } from "@/utils/makePersistedStore"; -import { createStore } from "solid-js/store"; -import { createRoot } from "solid-js"; - -export type ThemeType = "light" | "dark" | "system"; - -const globalSettingsStore = createRoot(() => - makePersistedStore(createStore({ - theme: "system" as ThemeType, - }), { name: 'globalSettings' }) -); - -export const useGlobalSettingsStore = () => globalSettingsStore;