From ae6be981bb1676f604ee20d31f695f4bbe9be0d4 Mon Sep 17 00:00:00 2001 From: Nikolaj Frey Date: Sun, 2 Jul 2023 00:29:07 +1000 Subject: [PATCH] feat: main Fixed a couple bugs and added hideable key names --- remix/app/Providers/ThingtimeProvider.tsx | 3 +-- remix/app/components/Commander/Commander.tsx | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/remix/app/Providers/ThingtimeProvider.tsx b/remix/app/Providers/ThingtimeProvider.tsx index 512dbd2..c04fb7d 100644 --- a/remix/app/Providers/ThingtimeProvider.tsx +++ b/remix/app/Providers/ThingtimeProvider.tsx @@ -21,7 +21,6 @@ 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.' } @@ -30,7 +29,7 @@ const forceable = { const initialThingtime = { nav: {}, - version: 9, + version: 10, ...forceable } diff --git a/remix/app/components/Commander/Commander.tsx b/remix/app/components/Commander/Commander.tsx index 25f2319..e81ca4b 100644 --- a/remix/app/components/Commander/Commander.tsx +++ b/remix/app/components/Commander/Commander.tsx @@ -135,7 +135,7 @@ export const Commander = props => { const val = obj[key] const newPath = path ? `${path}.${key}` : key if (typeof val === 'object') { - suggestions.push(key) + suggestions.push(newPath) recurse(val, newPath) } else { suggestions.push(newPath) @@ -219,6 +219,7 @@ export const Commander = props => { const closeCommander = React.useCallback(() => { setThingtime('settings.showCommander', false) + setValue('') setShowContext(false) setContextPath(undefined) }, [setThingtime, setShowContext]) @@ -239,6 +240,7 @@ export const Commander = props => { toggleCommander() } // if key escape close all modals + console.log('commander key listener e?.code', e?.code) if (e?.code === 'Escape') { closeCommander() }