Settings menu now warns when a setting is unsaved. (#65)

* Settings menu now warns when a setting is unsaved. Additionally, font-weight increments properly now.

* Remove font weight fix - another PR already open for fix.
This commit is contained in:
Jas Singh
2024-08-02 20:00:28 -07:00
committed by GitHub
parent 1f7c5a70ca
commit 6166fdbe0f
18 changed files with 110 additions and 34 deletions

View File

@@ -8,7 +8,10 @@ type Option = {
subtitle: string,
}
export const Option = <T>(props: RowProps<T>, className: string = '') => {
const isUnsaved = Variable(false);
return Widget.Box({
class_name: "option-item",
hexpand: true,
@@ -19,7 +22,7 @@ export const Option = <T>(props: RowProps<T>, className: string = '') => {
hexpand: true,
child: Label(props.title, props.subtitle || ""),
}),
Inputter(props, className),
Inputter(props, className, isUnsaved),
Widget.Button({
vpack: "center",
class_name: "reset-options",