Settings props and settings form for colors.

This commit is contained in:
punkfairie 2023-05-13 20:14:26 -07:00
parent 8f90bc3211
commit f749cb76f7
2 changed files with 35 additions and 2 deletions

View file

@ -27,7 +27,7 @@
<form id="settingsForm">
<div class="container-fluid">
<div class="row ms-1 me-1">
<label for="minValue" class="col col-form-label system charted">
<label class="col col-form-label system charted">
Minimum value:
</label>
<div class="col-2 system charted p-0">
@ -36,13 +36,43 @@
</div>
<div class="row ms-1 me-1">
<label for="maxDistance" class="col col-form-label system charted">
<label class="col col-form-label system charted">
Maximum distance:
</label>
<div class="col-2 system charted p-0">
<input type="text" class="form-control" id="maxDistance" name="maxDistance">
</div>
</div>
<div class="row ms-1 me-1">
<label class="col col-form-label system charted">
Main color in RGB:
</label>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color1R" name="color1R">
</div>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color1G" name="color1G">
</div>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color1B" name="color1B">
</div>
</div>
<div class="row ms-1 me-1">
<label class="col col-form-label system charted">
Accent color in RGB:
</label>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color2R" name="color2R">
</div>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color2G" name="color2G">
</div>
<div class="col-1 system charted p-0">
<input type="text" class="form-control" id="color2B" name="color2B">
</div>
</div>
</div>
</form>

View file

@ -19,6 +19,9 @@ export class Settings {
minValue: number;
maxDistance: number;
color1?: {red: number, green: number, blue: number};
color2?: {red: number, green: number, blue: number};
private constructor(isPackaged: boolean) {
if (!isPackaged && os.platform() === 'linux') {
this.#file = '/mnt/c/Users/marle/ed-safari-settings.json';