mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-10 22:20:14 +00:00
refactor(studio): simplify preview workspace layout
This commit is contained in:
@@ -6,6 +6,8 @@ export interface StoredPreviewZoomState {
|
||||
|
||||
export interface StudioUiPreferences {
|
||||
leftCollapsed?: boolean;
|
||||
leftWidth?: number;
|
||||
rightWidth?: number;
|
||||
timelineVisible?: boolean;
|
||||
timelineHeight?: number;
|
||||
playbackRate?: number;
|
||||
@@ -58,6 +60,12 @@ function readStorage(storage: Storage | null): StudioUiPreferences {
|
||||
if (typeof parsed.leftCollapsed === "boolean") {
|
||||
preferences.leftCollapsed = parsed.leftCollapsed;
|
||||
}
|
||||
if (typeof parsed.leftWidth === "number" && Number.isFinite(parsed.leftWidth)) {
|
||||
preferences.leftWidth = parsed.leftWidth;
|
||||
}
|
||||
if (typeof parsed.rightWidth === "number" && Number.isFinite(parsed.rightWidth)) {
|
||||
preferences.rightWidth = parsed.rightWidth;
|
||||
}
|
||||
if (typeof parsed.timelineVisible === "boolean") {
|
||||
preferences.timelineVisible = parsed.timelineVisible;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user