Files
P42_UI/app/views/common/profile/dialogs/ProfilePreferencesResetDialog.js
T
2026-02-21 22:08:59 +00:00

42 lines
987 B
JavaScript

/**
* _ ___ Another
* / |/ (_)______ __ _____
* / / / __(_-</ // (_-<
* /_/|_/_/\__/___/\_, /___/
* /___/
* production !
*
* Licensed under the MIT License:
* This code is free to use and modify,
* as long as the copyright notice and license are kept.
*/
class ProfilePreferencesResetDialog extends WindozDialogContent {
actions = [
{
label: 'Cancel',
onclick: this.cancel.bind(this),
severity: 'secondary',
role: 'cancel'
},
{
label: 'Reset',
onclick: this.reset.bind(this),
severity: 'danger',
role: 'reset'
}
]
cancel() {
this.commit(false);
}
reset() {
app.User.preferences = {};
app.User.savePreferences();
this.commit(true);
}
}
app.registerClass('ProfilePreferencesResetDialog',ProfilePreferencesResetDialog);