mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-25 15:06:26 -08:00
oops forgot to add
This commit is contained in:
parent
cc881c8995
commit
98aaa02a18
1
assets/icons/file.svg
Normal file
1
assets/icons/file.svg
Normal file
|
@ -0,0 +1 @@
|
||||||
|
<svg width="24" height="24" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M12 2v6a2 2 0 0 0 2 2h6v10a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h6Z" fill="#DDDDDD"/><path d="M13.5 2.5V8a.5.5 0 0 0 .5.5h5.5l-6-6Z" fill="#DDDDDD"/></svg>
|
After Width: | Height: | Size: 267 B |
33
src/svelte/elem/prompts/account.js
Normal file
33
src/svelte/elem/prompts/account.js
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
import { fetchAccountData } from "../stores.mjs"
|
||||||
|
|
||||||
|
export function pwdChng(optPicker) {
|
||||||
|
optPicker.picker("Change password",[
|
||||||
|
{
|
||||||
|
name: "New password",
|
||||||
|
icon: "/static/assets/icons/change_password.svg",
|
||||||
|
id: "password",
|
||||||
|
inputSettings: {
|
||||||
|
password: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "OK",
|
||||||
|
icon: "/static/assets/icons/update.svg",
|
||||||
|
description: "This will log you out of all sessions",
|
||||||
|
id: true
|
||||||
|
}
|
||||||
|
]).then((exp) => {
|
||||||
|
if (exp && exp.selected) {
|
||||||
|
fetch(`/auth/change_password`,{method:"POST", body:JSON.stringify({
|
||||||
|
password:exp.password
|
||||||
|
})}).then((response) => {
|
||||||
|
|
||||||
|
if (response.status != 200) {
|
||||||
|
optPicker.picker(`${response.status} ${response.statusText}`,[])
|
||||||
|
}
|
||||||
|
|
||||||
|
fetchAccountData()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
Loading…
Reference in a new issue