summaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
Diffstat (limited to 'components')
-rw-r--r--components/config.ts6
-rw-r--r--components/tweaks.tsx45
2 files changed, 51 insertions, 0 deletions
diff --git a/components/config.ts b/components/config.ts
index 0544b58..5cc7775 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,
tags: [],
nodes: [],
links: [],
@@ -86,6 +87,11 @@ export const initialVisuals = {
citeGapLength: 15,
citeLinkColor: 'gray.600',
citeNodeColor: 'black',
+ refDashes: true,
+ refDashLength: 35,
+ refGapLength: 15,
+ refLinkColor: 'gray.200',
+ refNodeColor: 'black',
}
export interface TagColors {
diff --git a/components/tweaks.tsx b/components/tweaks.tsx
index cb1fec0..ff7054f 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>
@@ -762,6 +771,42 @@ export const Tweaks = (props: TweakProps) => {
value={'citeLinkColor'}
visValue={visuals.citeLinkColor}
/>
+
+ <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="Referencelink color"
+ visuals={visuals}
+ setVisuals={setVisuals}
+ value={'refLinkColor'}
+ visValue={visuals.refLinkColor}
+ />
<Box>
<Flex alignItems="center" justifyContent="space-between">
<Text>Labels</Text>