ui: add editor setting (#622)

This commit is contained in:
undefined authored and GitHub committed 2023-07-26 03:39:12 +08:00
1 parent 3615d13ce2
commit 2dabe3194e
4 files changed
+100 -1

No files matched your search

@@ -1,4 +1,5 @@
import ProblemIcon from '@vscode/codicons/src/icons/file.svg?react';
import SettingsIcon from '@vscode/codicons/src/icons/settings-gear.svg?react';
import { Allotment } from 'allotment';
import $ from 'jquery';
import _ from 'lodash';
@@ -10,6 +11,7 @@ import { Context, ctx, Service } from 'vj/context';
import ScratchpadEditor from './ScratchpadEditorContainer';
import ScratchpadPretest from './ScratchpadPretestContainer';
import ScratchpadRecords from './ScratchpadRecordsContainer';
import ScratchpadSettings from './ScratchpadSettings';
import ScratchpadToolbar from './ScratchpadToolbarContainer';
const pages = {
@@ -17,6 +19,10 @@ const pages = {
icon: () => <ProblemIcon />,
component: () => <Dom childDom={$('.problem-content').get(0)} />,
},
settings: {
icon: () => <SettingsIcon />,
component: () => <ScratchpadSettings />,
},
};
let rerenderCallback = null;