diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-10-06 13:17:43 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-10-06 13:17:43 +0200 |
commit | bae6487afd5e6eec9f04b38b235bbac24042ca62 (patch) | |
tree | df6a72d934f8731f86524f2812481b8bcdfebd25 /components | |
parent | 0f22a091900c803fbca5023c56be923a2bafc248 (diff) |
feat: filter dailes (#68)
Diffstat (limited to 'components')
-rw-r--r-- | components/Tweaks/FilterPanel.tsx | 23 | ||||
-rw-r--r-- | components/Tweaks/ThemeSelect.tsx | 2 | ||||
-rw-r--r-- | components/config.ts | 1 |
3 files changed, 22 insertions, 4 deletions
diff --git a/components/Tweaks/FilterPanel.tsx b/components/Tweaks/FilterPanel.tsx index df1dd81..39233f9 100644 --- a/components/Tweaks/FilterPanel.tsx +++ b/components/Tweaks/FilterPanel.tsx @@ -46,9 +46,15 @@ const FilterPanel = (props: FilterPanelProps) => { color="gray.800" > <Flex alignItems="center" justifyContent="space-between"> - <Text>Link children to...</Text> + <Text>Link children to</Text> <Menu isLazy placement="right"> - <MenuButton as={Button} rightIcon={<ChevronDownIcon />} colorScheme="" color="black"> + <MenuButton + as={Button} + rightIcon={<ChevronDownIcon />} + colorScheme="" + color="black" + size="sm" + > {(() => { switch (filter.parent) { case 'parent': @@ -106,6 +112,17 @@ const FilterPanel = (props: FilterPanelProps) => { ></Switch> </Flex> <Flex justifyContent="space-between"> + <Text>Dailies</Text> + <Switch + onChange={() => { + setFilter((curr: typeof initialFilter) => { + return { ...curr, dailies: !curr.dailies } + }) + }} + isChecked={filter.dailies} + ></Switch> + </Flex> + <Flex justifyContent="space-between"> <Text>Citations without note files</Text> <Switch onChange={() => { @@ -150,7 +167,7 @@ const FilterPanel = (props: FilterPanelProps) => { </AccordionItem> <AccordionItem> <AccordionButton> - Tag Colors + Tag colors <AccordionIcon /> </AccordionButton> <AccordionPanel pr={0} mr={0}> diff --git a/components/Tweaks/ThemeSelect.tsx b/components/Tweaks/ThemeSelect.tsx index e56d48d..6a6b5d8 100644 --- a/components/Tweaks/ThemeSelect.tsx +++ b/components/Tweaks/ThemeSelect.tsx @@ -19,7 +19,7 @@ export const ThemeSelect = () => { type Theme = { [key: string]: string } const { emacsTheme, setEmacsTheme, highlightColor } = useContext(ThemeContext) return ( - <Flex alignItems="center" justifyContent="space-between" pl={7}> + <Flex alignItems="center" justifyContent="space-between" pl={7} pr={2}> <Text>Theme</Text> <Menu isLazy placement="bottom" closeOnSelect={false}> <MenuButton as={Button} colorScheme="" color="black" rightIcon={<ChevronDownIcon />}> diff --git a/components/config.ts b/components/config.ts index 56664df..532f960 100644 --- a/components/config.ts +++ b/components/config.ts @@ -34,6 +34,7 @@ export const initialPhysics = { export const initialFilter = { orphans: false, + dailies: false, parent: 'heading', filelessCites: false, tagsBlacklist: [], |