From 9b9171be2104ed3263366348cddbe03aaffbdc73 Mon Sep 17 00:00:00 2001 From: Nikolaj Frey Date: Sun, 2 Jul 2023 00:22:04 +1000 Subject: [PATCH] feat: main Added hideable keys to objects --- remix/app/Providers/ThingtimeProvider.tsx | 18 ++++++++++++++---- remix/app/components/Thingtime/Thingtime.tsx | 3 +++ remix/app/routes/index.tsx | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/remix/app/Providers/ThingtimeProvider.tsx b/remix/app/Providers/ThingtimeProvider.tsx index 8524a83..512dbd2 100644 --- a/remix/app/Providers/ThingtimeProvider.tsx +++ b/remix/app/Providers/ThingtimeProvider.tsx @@ -17,9 +17,21 @@ try { // nothing } +const forceable = { + 'Bottom Content': { + Content: { + hidden1: "Edit this to your heart's desire.", + hidden2: '?', + 'How?': + 'Just search for Bottom Content.Content and edit the value to whatever you want.' + } + } +} + const initialThingtime = { nav: {}, - version: 4 + version: 9, + ...forceable } const userData = { @@ -28,9 +40,7 @@ const userData = { clearCommanderOnToggle: true, clearCommanderContextOnToggle: true }, - 'Bottom Content': { - Content: "Edit this to your heart's desire" - } + ...forceable } export const ThingtimeProvider = (props: any): JSX.Element => { diff --git a/remix/app/components/Thingtime/Thingtime.tsx b/remix/app/components/Thingtime/Thingtime.tsx index 65d47a1..fa387d2 100644 --- a/remix/app/components/Thingtime/Thingtime.tsx +++ b/remix/app/components/Thingtime/Thingtime.tsx @@ -194,6 +194,9 @@ export const Thingtime = props => { const [showContextMenu, setShowContextMenu] = React.useState(false) const path = React.useMemo(() => { + if (props?.path?.human?.includes?.('hidden')) { + return null + } return ( {props?.path?.human} diff --git a/remix/app/routes/index.tsx b/remix/app/routes/index.tsx index 48d72a0..fc15e04 100644 --- a/remix/app/routes/index.tsx +++ b/remix/app/routes/index.tsx @@ -16,8 +16,8 @@ export default function Index () { justifyContent='center' > - + )