From bae6487afd5e6eec9f04b38b235bbac24042ca62 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Wed, 6 Oct 2021 13:17:43 +0200 Subject: feat: filter dailes (#68) --- components/Tweaks/FilterPanel.tsx | 23 ++++++++++++++++++++--- components/Tweaks/ThemeSelect.tsx | 2 +- components/config.ts | 1 + 3 files changed, 22 insertions(+), 4 deletions(-) (limited to 'components') 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" > - Link children to... + Link children to - } colorScheme="" color="black"> + } + colorScheme="" + color="black" + size="sm" + > {(() => { switch (filter.parent) { case 'parent': @@ -105,6 +111,17 @@ const FilterPanel = (props: FilterPanelProps) => { isChecked={filter.orphans} > + + Dailies + { + setFilter((curr: typeof initialFilter) => { + return { ...curr, dailies: !curr.dailies } + }) + }} + isChecked={filter.dailies} + > + Citations without note files { - Tag Colors + Tag colors 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 ( - + Theme }> 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: [], -- cgit v1.2.3