Inlined the confirm.
This commit is contained in:
parent
3481f3fefc
commit
ffb2ec60ed
1 changed files with 14 additions and 4 deletions
|
|
@ -50,10 +50,20 @@ export async function mainBoot() {
|
||||||
if (defaultStore.state.serverDisconnectedBehavior === 'dialog') {
|
if (defaultStore.state.serverDisconnectedBehavior === 'dialog') {
|
||||||
if (reloadDialogShowing) return;
|
if (reloadDialogShowing) return;
|
||||||
reloadDialogShowing = true;
|
reloadDialogShowing = true;
|
||||||
const { canceled } = await confirm({
|
const { canceled } = await new Promise(resolve => {
|
||||||
type: 'warning',
|
const {dispose} = popup(MkDialog, {
|
||||||
title: i18n.ts.disconnectedFromServer,
|
...({
|
||||||
text: i18n.ts.reloadConfirm,
|
type: 'warning',
|
||||||
|
title: i18n.ts.disconnectedFromServer,
|
||||||
|
text: i18n.ts.reloadConfirm,
|
||||||
|
}),
|
||||||
|
showCancelButton: true,
|
||||||
|
}, {
|
||||||
|
done: result => {
|
||||||
|
resolve(result ? result : {canceled: true});
|
||||||
|
},
|
||||||
|
closed: () => dispose(),
|
||||||
|
});
|
||||||
});
|
});
|
||||||
reloadDialogShowing = false;
|
reloadDialogShowing = false;
|
||||||
if (!canceled) {
|
if (!canceled) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue