diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-24 15:55:20 +0100 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2025-11-24 15:55:20 +0100 |
| commit | 4b6e37397d3a9a80db0c20484b712175c7b9c9c7 (patch) | |
| tree | a741d76d250b7e7a53f3ab6715106463db32215e /static/pages/settings | |
| parent | a72a9c6fa8aacbd9e945fdce64bdaf7895425e95 (diff) | |
add password-dialog
Diffstat (limited to 'static/pages/settings')
| -rw-r--r-- | static/pages/settings/index.css | 13 | ||||
| -rw-r--r-- | static/pages/settings/index.js | 10 |
2 files changed, 23 insertions, 0 deletions
diff --git a/static/pages/settings/index.css b/static/pages/settings/index.css index 0d6b234..dcd952f 100644 --- a/static/pages/settings/index.css +++ b/static/pages/settings/index.css @@ -78,6 +78,18 @@ font-family: 'Pacifico'; } +#change-password { + background: var(--primary); + padding: 10px; + border-radius: var(--border-radius); + color: var(--fg-primary); + box-shadow: var(--shadow); + font-weight: bold; + text-align: center; + cursor: pointer; + user-select: none; +} + #logout { padding: 10px; width: 100%; @@ -88,4 +100,5 @@ font-weight: bold; border-radius: var(--border-radius); cursor: pointer; + user-select: none; } diff --git a/static/pages/settings/index.js b/static/pages/settings/index.js index 36c1d09..4924f8b 100644 --- a/static/pages/settings/index.js +++ b/static/pages/settings/index.js @@ -4,6 +4,7 @@ const { Div, Img } = sfw.element.native; import * as api from '../../api/index.js'; import Editable from '../../widgets/editable/index.js'; +import PasswordDialog from '../../widgets/password-dialog/index.js'; import icons from '../../icons/index.js'; @@ -15,6 +16,7 @@ export default class SettingsView extends sfw.element.Container { #birthday #profile + #change_password constructor() { super({ css }); @@ -64,6 +66,14 @@ export default class SettingsView extends sfw.element.Container { onupdate: () => this.#update(), }), Div.new({ + id: 'change-password', + innerText: 'Change Password', + onclick: (e) => { + e.stopPropagation(); + this.body.append(PasswordDialog.new()); + } + }), + Div.new({ id: 'logout', innerText: 'Logout', onclick: () => this.onlogout(), |