Skip to content

Commit dd66ee4

Browse files
committed
Save file view mode in local storage
1 parent 3b965a0 commit dd66ee4

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

ui/frontend/local_storage.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
DemangleAssemblySchema,
1212
Editor,
1313
EditorSchema,
14+
FileViewSchema,
1415
OrientationSchema,
1516
PairCharactersSchema,
1617
ProcessAssemblySchema,
@@ -32,6 +33,7 @@ const V2Configuration = z
3233
.partial(),
3334
configuration: z
3435
.object({
36+
fileView: FileViewSchema,
3537
editor: EditorSchema,
3638
ace: z
3739
.object({
@@ -92,6 +94,7 @@ export function serialize(state: State): string {
9294
visitedAt: state.client.visitedAt,
9395
},
9496
configuration: {
97+
fileView: state.configuration.fileView,
9598
editor: state.configuration.editor,
9699
ace: {
97100
keybinding: state.configuration.ace.keybinding,

ui/frontend/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export const FileView = {
6868
Multiple: 'multiple',
6969
} as const;
7070
export type FileView = ValuesOf<typeof FileView>;
71+
export const FileViewSchema = z.enum(Object.values(FileView));
7172

7273
export const Editor = {
7374
Simple: 'simple',

0 commit comments

Comments
 (0)