From e38a59c33b02f2822ee7f1fda25ea6bbeae488db Mon Sep 17 00:00:00 2001 From: Jan-Gerrit Goebel Date: Thu, 11 Jan 2024 14:10:31 +0100 Subject: [PATCH 1/2] Save divider position to user settings --- src/app/app.component.html | 20 ++++++++++++++++ src/app/app.component.ts | 7 ++++++ src/app/scenario/step.component.html | 7 +++++- src/app/scenario/step.component.ts | 36 ++++++++++++++++++++++++++++ src/app/services/settings.service.ts | 2 ++ 5 files changed, 71 insertions(+), 1 deletion(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 4203b3a9..52feac3f 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -284,6 +284,26 @@ /> + + + + Divider Position required. + Divider Position minimum is 0. + Divider Position maximum is 100. + diff --git a/src/app/app.component.ts b/src/app/app.component.ts index d9100083..558c703d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -137,6 +137,11 @@ export class AppComponent implements OnInit { Validators.required, ]), ctr_enabled: new FormControl(false), + divider_position: new FormControl(null, [ + Validators.required, + Validators.max(100), + Validators.min(0), + ]), theme: new FormControl<'light' | 'dark' | 'system' | null>(null, [ Validators.required, ]), @@ -273,12 +278,14 @@ export class AppComponent implements OnInit { terminal_fontSize = 16, ctr_enabled = true, theme = 'light', + divider_position = 40, }) => { this.settingsForm.setValue({ terminal_theme, terminal_fontSize, ctr_enabled, theme, + divider_position, }); this.fetchingSettings = false; }, diff --git a/src/app/scenario/step.component.html b/src/app/scenario/step.component.html index d4d5c72e..aa283144 100644 --- a/src/app/scenario/step.component.html +++ b/src/app/scenario/step.component.html @@ -1,5 +1,10 @@
- +