diff --git a/src/components/SearchBar.tsx b/src/components/SearchBar.tsx index f69895d..90bc0e5 100644 --- a/src/components/SearchBar.tsx +++ b/src/components/SearchBar.tsx @@ -13,12 +13,11 @@ export function SearchBar({ onSearch, onFocus, searchKey }: Props) { onSearch(value)} value={searchKey} /> diff --git a/src/components/SettingsBar.tsx b/src/components/SettingsBar.tsx index 90e3420..0974402 100644 --- a/src/components/SettingsBar.tsx +++ b/src/components/SettingsBar.tsx @@ -4,8 +4,8 @@ import * as React from 'react' import { Config } from 'utils/configHelper' import { useStates } from 'utils/hooks/useStates' import { AccessTokenSettings } from './settings/AccessTokenSettings' -import { FileTreeIconSettings } from './settings/FileTreeIconSettings' -import { ShortcutSettings } from './settings/ShortcutSettings' +import { FileTreeSettings } from './settings/FileTreeSettings' +import { SidebarSettings } from './settings/SidebarSettings' import { SimpleToggleField } from './SimpleToggleField' const WIKI_HOME_LINK = 'https://github.com/EnixCoda/Gitako/wiki' @@ -34,30 +34,16 @@ export type SimpleField = { } const moreFields: SimpleField[] = [ - { - key: 'compressSingletonFolder', - label: 'Compress singleton folder', - wikiLink: wikiLinks.compressSingletonFolder, - }, { key: 'copyFileButton', - label: 'Copy File Shortcut', + label: 'Copy file shortcut', wikiLink: wikiLinks.copyFileButton, }, { key: 'copySnippetButton', - label: 'Copy Snippet Shortcut', + label: 'Copy snippet shortcut', wikiLink: wikiLinks.copySnippet, }, - { - key: 'intelligentToggle', - label: 'Intelligent Toggle', - description: `Gitako will open/close automatically according to page content when this is enabled.`, - overwrite: { - value: enabled => enabled === null, - onChange: checked => (checked ? null : true), - }, - }, ] function SettingsBarContent() { @@ -70,14 +56,13 @@ function SettingsBarContent() {
- - + +

More

{moreFields.map(field => ( -
))} diff --git a/src/components/SimpleToggleField.tsx b/src/components/SimpleToggleField.tsx index 62aeeed..3b8157c 100644 --- a/src/components/SimpleToggleField.tsx +++ b/src/components/SimpleToggleField.tsx @@ -12,8 +12,9 @@ export function SimpleToggleField({ field, onChange }: Props) { const configContext = useConfigs() const value = configContext.val[field.key] return ( -