summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/config.ts7
-rw-r--r--components/tweaks.tsx54
2 files changed, 60 insertions, 1 deletions
diff --git a/components/config.ts b/components/config.ts
index 6c73921..daf548c 100644
--- a/components/config.ts
+++ b/components/config.ts
@@ -34,6 +34,7 @@ export const initialPhysics = {
export const initialFilter = {
orphans: false,
parents: true,
+ fileless_cites: false,
tagsBlacklist: [],
tagsWhitelist: [],
nodes: [],
@@ -88,6 +89,12 @@ export const initialVisuals = {
citeLinkColor: 'gray.600',
citeLinkHighlightColor: '',
citeNodeColor: 'black',
+ refDashes: true,
+ refDashLength: 35,
+ refGapLength: 15,
+ refLinkColor: 'gray.400',
+ refLinkHighlightColor: '',
+ refNodeColor: 'black',
}
export interface TagColors {
diff --git a/components/tweaks.tsx b/components/tweaks.tsx
index 39a8a35..e23476e 100644
--- a/components/tweaks.tsx
+++ b/components/tweaks.tsx
@@ -233,6 +233,15 @@ export const Tweaks = (props: TweakProps) => {
isChecked={filter.parents}
></Switch>
</Flex>
+ <Flex justifyContent="space-between">
+ <Text>Citations without note files</Text>
+ <Switch
+ onChange={() => {
+ setFilter({ ...filter, fileless_cites: !filter.fileless_cites })
+ }}
+ isChecked={filter.fileless_cites}
+ ></Switch>
+ </Flex>
</VStack>
<Accordion padding={0} allowToggle allowMultiple paddingLeft={3}>
<AccordionItem>
@@ -772,12 +781,55 @@ export const Tweaks = (props: TweakProps) => {
/>
<ColorMenu
colorList={colorList}
- label="Citation link highlight"
+ label="Reference link highlight"
visuals={visuals}
setVisuals={setVisuals}
value={'citeLinkHighlightColor'}
visValue={visuals.citeLinkHighlightColor}
/>
+ <EnableSection
+ label="Dash ref links"
+ infoText="Add dashes to citation links, whose target has a note, made with org-roam-bibtex"
+ value={visuals.refDashes}
+ onChange={() => setVisuals({ ...visuals, refDashes: !visuals.refDashes })}
+ >
+ <SliderWithInfo
+ label="Dash length"
+ value={visuals.refDashLength / 10}
+ onChange={(value) =>
+ setVisuals({ ...visuals, refDashLength: value * 10 })
+ }
+ />
+ <SliderWithInfo
+ label="Gap length"
+ value={visuals.refGapLength / 5}
+ onChange={(value) => setVisuals({ ...visuals, refGapLength: value * 5 })}
+ />
+ </EnableSection>
+ <ColorMenu
+ colorList={colorList}
+ label="Reference node color"
+ visuals={visuals}
+ setVisuals={setVisuals}
+ value={'refNodeColor'}
+ visValue={visuals.refNodeColor}
+ />
+ <ColorMenu
+ colorList={colorList}
+ label="Reference link color"
+ visuals={visuals}
+ setVisuals={setVisuals}
+ value={'refLinkColor'}
+ visValue={visuals.refLinkColor}
+ />
+ <ColorMenu
+ colorList={colorList}
+ label="Reference link highlight"
+ visuals={visuals}
+ setVisuals={setVisuals}
+ value={'refLinkHighlightColor'}
+ visValue={visuals.refLinkHighlightColor}
+ />
<Box>
<Flex alignItems="center" justifyContent="space-between">
<Text>Labels</Text>