feat: main Added hideable keys to objects

This commit is contained in:
Nikolaj Frey 2023-07-02 00:22:04 +10:00
parent 4cac573bb6
commit 9b9171be21
3 changed files with 18 additions and 5 deletions

View File

@ -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 => {

View File

@ -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 (
<Flex maxW='100%' pl={pl} wordBreak={'break-all'} fontSize='12px'>
{props?.path?.human}

View File

@ -16,8 +16,8 @@ export default function Index () {
justifyContent='center'
>
<Splash></Splash>
<ThingtimeDemo></ThingtimeDemo>
<Thingtime mb={200} thing={thingtime['Bottom Content']}></Thingtime>
<ThingtimeDemo></ThingtimeDemo>
<ProfileDrawer></ProfileDrawer>
</Flex>
)