From 25228df6d13b5e8541672c4cdd84e200ff56a4c4 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Wed, 19 Nov 2025 18:58:54 +0100 Subject: add profile settings to backend and add image loader --- static/pages/settings/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'static/pages/settings/index.js') 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; -- cgit v1.2.3-70-g09d2