From b2e10d4b9886ecf56e73e17eb2cfc963bc352795 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Thu, 18 Nov 2021 16:12:31 +0200 Subject: [PATCH] feat(nextPrev): :sparkles: Show fieldName --- src/Components/NextPrev.svelte | 8 ++-- src/Components/UserHierarchies.svelte | 5 +-- src/interfaces.ts | 16 ++++--- src/main.ts | 31 ++++--------- src/sharedFunctions.ts | 64 ++++++++++++++++++++++++++- 5 files changed, 86 insertions(+), 38 deletions(-) diff --git a/src/Components/NextPrev.svelte b/src/Components/NextPrev.svelte index 86c84c53..f3625252 100644 --- a/src/Components/NextPrev.svelte +++ b/src/Components/NextPrev.svelte @@ -3,10 +3,11 @@ import { openOrSwitch } from "obsidian-community-lib"; import { linkClass } from "src/sharedFunctions"; import type BCPlugin from "src/main"; + import type { PrevNext } from "src/interfaces"; export let app: App; export let plugin: BCPlugin; - export let next: { to: string; real: boolean }[]; - export let prev: { to: string; real: boolean }[]; + export let next: PrevNext[]; + export let prev: PrevNext[];
@@ -18,6 +19,7 @@ on:click={async (e) => openOrSwitch(app, p.to, e)} class={linkClass(app, p.to, p.real)} > + {p.fieldName} {p.to}
{/each} @@ -31,7 +33,7 @@ on:click={async (e) => openOrSwitch(app, n.to, e)} class="{linkClass(app, n.to, n.real)} BC-next" > - {n.to} + {n.to} {n.fieldName} {/each} diff --git a/src/Components/UserHierarchies.svelte b/src/Components/UserHierarchies.svelte index 8d3d26dc..c533e960 100644 --- a/src/Components/UserHierarchies.svelte +++ b/src/Components/UserHierarchies.svelte @@ -20,10 +20,7 @@