Reinstate settings
This commit is contained in:
parent
7a9e3f927f
commit
57c2d021ba
5 changed files with 4 additions and 10 deletions
|
|
@ -10,6 +10,7 @@ import { Menu } from 'primereact/menu';
|
|||
import { Toast } from 'primereact/toast';
|
||||
import HelpMenu from './HelpMenu';
|
||||
import ExportButton from './ExportButton';
|
||||
import SettingsMenu from './SettingsMenu';
|
||||
|
||||
|
||||
export default function Footer({style}: {style?: CSSProperties}) {
|
||||
|
|
@ -76,6 +77,8 @@ export default function Footer({style}: {style?: CSSProperties}) {
|
|||
|
||||
<div style={{flex: 1}}></div>
|
||||
|
||||
<SettingsMenu />
|
||||
|
||||
<HelpMenu style={{
|
||||
position: 'absolute',
|
||||
right: 0,
|
||||
|
|
|
|||
|
|
@ -30,16 +30,10 @@ export default function SettingsMenu({className, style}: {className?: string, st
|
|||
},
|
||||
{
|
||||
label: state.view.showAxes ? 'Hide axes' : 'Show axes',
|
||||
icon: 'pi pi-box',
|
||||
icon: 'pi pi-asterisk',
|
||||
// disabled: true,
|
||||
command: () => model.mutate(s => s.view.showAxes = !s.view.showAxes)
|
||||
},
|
||||
{
|
||||
label: state.view.showShadows ? 'Hide shadows' : 'Add shadows',
|
||||
icon: 'pi pi-box',
|
||||
// disabled: true,
|
||||
command: () => model.mutate(s => s.view.showShadows = !s.view.showShadows)
|
||||
},
|
||||
{
|
||||
label: state.view.lineNumbers ? 'Hide line numbers' : 'Show line numbers',
|
||||
icon: 'pi pi-list',
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ export interface State {
|
|||
|
||||
color: string,
|
||||
showAxes?: boolean,
|
||||
showShadows?: boolean,
|
||||
lineNumbers?: boolean,
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,6 @@ export async function readStateFromFragment(): Promise<State | null> {
|
|||
collapsedCustomizerTabs: validateArray(view?.collapsedCustomizerTabs, validateString),
|
||||
color: validateString(view?.color, () => defaultModelColor),
|
||||
showAxes: validateBoolean(view?.layout?.showAxis, () => true),
|
||||
showShadows: validateBoolean(view?.layout?.showShadow, () => true),
|
||||
lineNumbers: validateBoolean(view?.layout?.lineNumbers, () => false)
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ export function createInitialState(state: State | null, content: string = defaul
|
|||
}
|
||||
|
||||
initialState.view.showAxes ??= true
|
||||
initialState.view.showShadows ??= true
|
||||
|
||||
// fs.writeFile(initialState.params.sourcePath, initialState.params.source);
|
||||
// if (initialState.params.sourcePath !== defaultSourcePath) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue