mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-05-22 22:00:18 +00:00
notify: shorten text to "reset" for built-in targets
While the difference between Reset and Remove is a bit more subtle this also leads to less jumping around of UI elements on the right to it (we normally avoid such size-changes that cause layout changes completely). Also, the confirmation message is quite telling, so this is not too bad. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
83bae06cae
commit
120b530a31
@ -8,13 +8,7 @@ Ext.define('Proxmox.panel.NotificationConfigViewModel', {
|
|||||||
let origin = get('selection')?.get('origin');
|
let origin = get('selection')?.get('origin');
|
||||||
return origin === 'modified-builtin' || origin === 'builtin';
|
return origin === 'modified-builtin' || origin === 'builtin';
|
||||||
},
|
},
|
||||||
removeButtonText: function(get) {
|
removeButtonText: get => get('builtinSelected') ? gettext('Reset') : gettext('Remove'),
|
||||||
if (get('builtinSelected')) {
|
|
||||||
return gettext('Reset to default');
|
|
||||||
} else {
|
|
||||||
return gettext('Remove');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
removeButtonConfirmMessage: function(get) {
|
removeButtonConfirmMessage: function(get) {
|
||||||
if (get('builtinSelected')) {
|
if (get('builtinSelected')) {
|
||||||
return gettext('Do you want to reset {0} to its default settings?');
|
return gettext('Do you want to reset {0} to its default settings?');
|
||||||
|
Loading…
Reference in New Issue
Block a user