mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-22 05:46:26 -08:00
upd
This commit is contained in:
parent
aa715fa868
commit
5ff88d917e
|
@ -65,7 +65,7 @@ export function userChange(optPicker) {
|
||||||
inputSettings: {}
|
inputSettings: {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "OK",
|
name: "Update username",
|
||||||
icon: "/static/assets/icons/update.svg",
|
icon: "/static/assets/icons/update.svg",
|
||||||
description: "",
|
description: "",
|
||||||
id: true
|
id: true
|
||||||
|
@ -97,7 +97,7 @@ export function pwdChng(optPicker) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "OK",
|
name: "Update password",
|
||||||
icon: "/static/assets/icons/update.svg",
|
icon: "/static/assets/icons/update.svg",
|
||||||
description: "This will log you out of all sessions",
|
description: "This will log you out of all sessions",
|
||||||
id: true
|
id: true
|
||||||
|
|
|
@ -36,3 +36,30 @@ export function dfv(optPicker) {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function update_all_files(optPicker) {
|
||||||
|
optPicker.picker("You sure?",[
|
||||||
|
{
|
||||||
|
name: "Yeah",
|
||||||
|
icon: "/static/assets/icons/update.svg",
|
||||||
|
description: `This will make all of your files ${get(account).defaultFileVisibility || "public"}`,
|
||||||
|
id: true
|
||||||
|
}
|
||||||
|
]).then((exp) => {
|
||||||
|
if (exp && exp.selected) {
|
||||||
|
fetch(`/files/action`,{method:"POST", body:JSON.stringify({
|
||||||
|
target:get(account).files,
|
||||||
|
action: {
|
||||||
|
visibility: get(account).defaultFileVisibility
|
||||||
|
}
|
||||||
|
})}).then((response) => {
|
||||||
|
|
||||||
|
if (response.status != 200) {
|
||||||
|
optPicker.picker(`${response.status} ${response.statusText}`,[])
|
||||||
|
}
|
||||||
|
|
||||||
|
fetchAccountData()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
|
@ -146,7 +146,7 @@
|
||||||
<p>Default file visibility<span><br />Uploads will be <strong>{$account.defaultFileVisibility || "public"}</strong> by default</span></p>
|
<p>Default file visibility<span><br />Uploads will be <strong>{$account.defaultFileVisibility || "public"}</strong> by default</span></p>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button>
|
<button on:click={() => uplOpts.update_all_files(optPicker)}>
|
||||||
<img src="/static/assets/icons/update.svg" alt="update">
|
<img src="/static/assets/icons/update.svg" alt="update">
|
||||||
<p>Make all of my files {$account.defaultFileVisibility || "public"}<span><br />Matches your default file visibility</p>
|
<p>Make all of my files {$account.defaultFileVisibility || "public"}<span><br />Matches your default file visibility</p>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Reference in a new issue