mirror of
https://github.com/HeyPuter/puter.git
synced 2026-05-03 16:10:31 +00:00
Remove def(UIAlert, 'ui.window.UIAlert')
This commit is contained in:
+15
-17
@@ -58,21 +58,21 @@ function UIAlert (options) {
|
||||
// Define buttons if not provided
|
||||
if ( !options.buttons || options.buttons.length === 0 ) {
|
||||
switch ( options.type ) {
|
||||
case 'confirm':
|
||||
options.buttons = [
|
||||
{ label: i18n('alert_yes'), value: true, type: 'primary' },
|
||||
{ label: i18n('alert_no'), value: false, type: 'secondary' },
|
||||
];
|
||||
break;
|
||||
case 'error':
|
||||
options.buttons = [
|
||||
{ label: i18n('alert_retry'), value: 'retry', type: 'danger' },
|
||||
{ label: i18n('alert_cancel'), value: 'cancel', type: 'secondary' },
|
||||
];
|
||||
break;
|
||||
default:
|
||||
options.buttons = [{ label: i18n('ok'), value: true, type: 'primary' }];
|
||||
break;
|
||||
case 'confirm':
|
||||
options.buttons = [
|
||||
{ label: i18n('alert_yes'), value: true, type: 'primary' },
|
||||
{ label: i18n('alert_no'), value: false, type: 'secondary' },
|
||||
];
|
||||
break;
|
||||
case 'error':
|
||||
options.buttons = [
|
||||
{ label: i18n('alert_retry'), value: 'retry', type: 'danger' },
|
||||
{ label: i18n('alert_cancel'), value: 'cancel', type: 'secondary' },
|
||||
];
|
||||
break;
|
||||
default:
|
||||
options.buttons = [{ label: i18n('ok'), value: true, type: 'primary' }];
|
||||
break;
|
||||
}
|
||||
}
|
||||
// callback support with correct resolve handling
|
||||
@@ -169,6 +169,4 @@ function UIAlert (options) {
|
||||
});
|
||||
}
|
||||
|
||||
def(UIAlert, 'ui.window.UIAlert');
|
||||
|
||||
export default UIAlert;
|
||||
|
||||
Reference in New Issue
Block a user