aboutsummaryrefslogtreecommitdiff
path: root/static/pages/settings/index.js
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2025-11-19 18:58:54 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2025-11-19 18:58:54 +0100
commit25228df6d13b5e8541672c4cdd84e200ff56a4c4 (patch)
tree924cc6bdc00440c6bf592b04602261cdab17d60a /static/pages/settings/index.js
parent4c06eb64cbed3562e428ce59857d1763098638f3 (diff)
add profile settings to backend and add image loader
Diffstat (limited to 'static/pages/settings/index.js')
-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;