feat: main Fixed a couple bugs and added hideable key names
This commit is contained in:
parent
046f02e239
commit
ae6be981bb
@ -21,7 +21,6 @@ const forceable = {
|
|||||||
'Bottom Content': {
|
'Bottom Content': {
|
||||||
Content: {
|
Content: {
|
||||||
hidden1: "Edit this to your heart's desire.",
|
hidden1: "Edit this to your heart's desire.",
|
||||||
hidden2: '?',
|
|
||||||
'How?':
|
'How?':
|
||||||
'Just search for Bottom Content.Content and edit the value to whatever you want.'
|
'Just search for Bottom Content.Content and edit the value to whatever you want.'
|
||||||
}
|
}
|
||||||
@ -30,7 +29,7 @@ const forceable = {
|
|||||||
|
|
||||||
const initialThingtime = {
|
const initialThingtime = {
|
||||||
nav: {},
|
nav: {},
|
||||||
version: 9,
|
version: 10,
|
||||||
...forceable
|
...forceable
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +135,7 @@ export const Commander = props => {
|
|||||||
const val = obj[key]
|
const val = obj[key]
|
||||||
const newPath = path ? `${path}.${key}` : key
|
const newPath = path ? `${path}.${key}` : key
|
||||||
if (typeof val === 'object') {
|
if (typeof val === 'object') {
|
||||||
suggestions.push(key)
|
suggestions.push(newPath)
|
||||||
recurse(val, newPath)
|
recurse(val, newPath)
|
||||||
} else {
|
} else {
|
||||||
suggestions.push(newPath)
|
suggestions.push(newPath)
|
||||||
@ -219,6 +219,7 @@ export const Commander = props => {
|
|||||||
|
|
||||||
const closeCommander = React.useCallback(() => {
|
const closeCommander = React.useCallback(() => {
|
||||||
setThingtime('settings.showCommander', false)
|
setThingtime('settings.showCommander', false)
|
||||||
|
setValue('')
|
||||||
setShowContext(false)
|
setShowContext(false)
|
||||||
setContextPath(undefined)
|
setContextPath(undefined)
|
||||||
}, [setThingtime, setShowContext])
|
}, [setThingtime, setShowContext])
|
||||||
@ -239,6 +240,7 @@ export const Commander = props => {
|
|||||||
toggleCommander()
|
toggleCommander()
|
||||||
}
|
}
|
||||||
// if key escape close all modals
|
// if key escape close all modals
|
||||||
|
console.log('commander key listener e?.code', e?.code)
|
||||||
if (e?.code === 'Escape') {
|
if (e?.code === 'Escape') {
|
||||||
closeCommander()
|
closeCommander()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user