From 83f8b552ecad1c648929f8a9dc1088d6f96b90d4 Mon Sep 17 00:00:00 2001 From: Ross Keenan Date: Sat, 8 Jan 2022 18:30:50 +0200 Subject: [PATCH] feat(List/Matrix View): :lipstick: Add `BC-active-note` class to current note (Fix #245) --- src/Components/Lists.svelte | 24 ++++++++++++++++++------ src/Components/Matrix.svelte | 24 ++++++++++++++++++------ 2 files changed, 36 insertions(+), 12 deletions(-) diff --git a/src/Components/Lists.svelte b/src/Components/Lists.svelte index 32482893..c3a26d20 100644 --- a/src/Components/Lists.svelte +++ b/src/Components/Lists.svelte @@ -10,6 +10,13 @@ export let settings: BCSettings; export let matrixView: MatrixView; export let app: App; + + const { + showImpliedRelations, + rlLeaf, + treatCurrNodeAsImpliedSibling, + showRelationType, + } = settings;
{#each squares as square} - {#if square.realItems.length || (settings.showImpliedRelations && square.impliedItems.length)} + {#if square.realItems.length || (showImpliedRelations && square.impliedItems.length)}
{square.field} {#if square.realItems.length} - {#if settings.showRelationType} + {#if showRelationType}
Real
{/if} @@ -48,14 +55,19 @@ {/if} - {#if settings.showImpliedRelations && square.impliedItems.length} - {#if settings.showRelationType} + {#if showImpliedRelations && square.impliedItems.length} + {#if showRelationType}
Implied
{/if}
    {#each square.impliedItems as impliedItem} -
  1. +
  2. @@ -63,7 +75,7 @@ on:mouseover={(e) => hoverPreview(e, matrixView, impliedItem.to)} aria-label={impliedItem.parent ?? ""} - aria-label-position={settings.rlLeaf ? "left" : "right"} + aria-label-position={rlLeaf ? "left" : "right"} > {impliedItem.alt ?? dropPathNDendron(impliedItem.to, settings)} diff --git a/src/Components/Matrix.svelte b/src/Components/Matrix.svelte index 9ceeaf74..88d64113 100644 --- a/src/Components/Matrix.svelte +++ b/src/Components/Matrix.svelte @@ -10,6 +10,13 @@ export let settings: BCSettings; export let matrixView: MatrixView; export let app: App; + + const { + showImpliedRelations, + rlLeaf, + treatCurrNodeAsImpliedSibling, + showRelationType, + } = settings;
    {#each squares as square} - {#if square.realItems.length || (settings.showImpliedRelations && square.impliedItems.length)} + {#if square.realItems.length || (showImpliedRelations && square.impliedItems.length)}

    {square.field}

    - {#if settings.showRelationType} + {#if showRelationType}
    {square.realItems.length ? "Real" : "Implied"}
    @@ -48,18 +55,23 @@
{/if} - {#if settings.showImpliedRelations && square.impliedItems.length} + {#if showImpliedRelations && square.impliedItems.length}

{#if square.impliedItems.length} - {#if settings.showRelationType && square.realItems.length} + {#if showRelationType && square.realItems.length}

Implied
{/if} {/if}
    {#each square.impliedItems as impliedItem} -
  1. +
  2. @@ -69,7 +81,7 @@ aria-label={impliedItem.parent ? "↑ " + impliedItem.parent : ""} - aria-label-position={settings.rlLeaf ? "left" : "right"} + aria-label-position={rlLeaf ? "left" : "right"} > {impliedItem.alt ?? dropPathNDendron(impliedItem.to, settings)}