This commit is contained in:
syuilo
2021-11-18 23:36:04 +09:00
parent 73b5c12927
commit 318759cfa4
5 changed files with 13 additions and 15 deletions

View File

@ -26,7 +26,7 @@ import { router } from '@/router';
import { applyTheme } from '@/scripts/theme';
import { isDeviceDarkmode } from '@/scripts/is-device-darkmode';
import { i18n } from '@/i18n';
import { stream, dialog, post, popup } from '@/os';
import { stream, confirm, alert, post, popup } from '@/os';
import * as sound from '@/scripts/sound';
import { $i, refreshAccount, login, updateAccount, signout } from '@/account';
import { defaultStore, ColdDeviceStorage } from '@/store';
@ -53,7 +53,7 @@ if (_DEV_) {
window.addEventListener('error', event => {
console.error(event);
/*
dialog({
alert({
type: 'error',
title: 'DEV: Unhandled error',
text: event.message
@ -64,7 +64,7 @@ if (_DEV_) {
window.addEventListener('unhandledrejection', event => {
console.error(event);
/*
dialog({
alert({
type: 'error',
title: 'DEV: Unhandled promise rejection',
text: event.reason
@ -311,11 +311,10 @@ stream.on('_disconnected_', async () => {
} else if (defaultStore.state.serverDisconnectedBehavior === 'dialog') {
if (reloadDialogShowing) return;
reloadDialogShowing = true;
const { canceled } = await dialog({
const { canceled } = await confirm({
type: 'warning',
title: i18n.locale.disconnectedFromServer,
text: i18n.locale.reloadConfirm,
showCancelButton: true
});
reloadDialogShowing = false;
if (!canceled) {
@ -337,7 +336,7 @@ for (const plugin of ColdDeviceStorage.get('plugins').filter(p => p.active)) {
if ($i) {
if ($i.isDeleted) {
dialog({
alert({
type: 'warning',
text: i18n.locale.accountDeletionInProgress,
});