Merge branch 'notification-read-api' into swn

This commit is contained in:
tamaina
2021-11-19 20:43:41 +09:00
353 changed files with 3496 additions and 2064 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
@@ -310,11 +310,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) {
@@ -336,7 +335,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,
});