mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
use session storage instead of local storage
This will allow use of multiple tabs/windows
This commit is contained in:
committed by
David Lechner
parent
b6be163ccb
commit
67f9202fb6
@@ -49,7 +49,7 @@ class Editor extends React.Component<EditorProps> {
|
||||
height="100%"
|
||||
focus={true}
|
||||
placeholder={i18n.translate(EditorStringId.Placeholder)}
|
||||
defaultValue={localStorage.getItem('program') || undefined}
|
||||
defaultValue={sessionStorage.getItem('program') || undefined}
|
||||
editorProps={{ $blockScrolling: true }}
|
||||
setOptions={{
|
||||
enableBasicAutocompletion: true,
|
||||
@@ -70,7 +70,7 @@ class Editor extends React.Component<EditorProps> {
|
||||
onSessionChanged(e?.session);
|
||||
}}
|
||||
onChange={(v): void => {
|
||||
localStorage.setItem('program', v);
|
||||
sessionStorage.setItem('program', v);
|
||||
}}
|
||||
commands={[
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user