aboutsummaryrefslogtreecommitdiff
path: root/static/pages/settings
diff options
context:
space:
mode:
Diffstat (limited to 'static/pages/settings')
-rw-r--r--static/pages/settings/index.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/static/pages/settings/index.js b/static/pages/settings/index.js
index f316e8e..cc985a5 100644
--- a/static/pages/settings/index.js
+++ b/static/pages/settings/index.js
@@ -54,12 +54,14 @@ export default class SettingsView extends sfw.element.Container {
}),
this.#name = Editable.new({
title: 'Name',
- value: ''
+ value: '',
+ onupdate: () => this.#update(),
}),
this.#birthday = Editable.new({
title: 'Birthday',
type: 'date',
value: '',
+ onupdate: () => this.#update(),
}),
Div.new({
id: 'logout',
@@ -78,6 +80,10 @@ export default class SettingsView extends sfw.element.Container {
)
}
+ #update() {
+ api.profile.set(this.#name.value, this.#birthday.value);
+ }
+
set profile(profile) {
this.#profile = profile;