Some improvements

This commit is contained in:
Louis Lam
2022-03-29 17:38:48 +08:00
parent 12237dec6e
commit 0da6e6b1fb
8 changed files with 188 additions and 71 deletions

View File

@@ -131,10 +131,18 @@ export default {
});
},
saveSettings() {
this.$root.getSocket().emit("setSettings", this.settings, (res) => {
/**
* Save Settings
* @param currentPassword (Optional) Only need for disableAuth to true
*/
saveSettings(callback, currentPassword) {
this.$root.getSocket().emit("setSettings", this.settings, currentPassword, (res) => {
this.$root.toastRes(res);
this.loadSettings();
if (callback) {
callback();
}
});
},
}