feat: main Fixed a couple bugs and added hideable key names

This commit is contained in:
Nikolaj Frey 2023-07-02 00:29:07 +10:00
parent 046f02e239
commit ae6be981bb
2 changed files with 4 additions and 3 deletions

View File

@ -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
}

View File

@ -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()
}