enhance(server): Use job queue for account delete (#7668)

* enhance(server): Use job queue for account delete

Fix #5336

* ジョブをひとつに

* remove done call

* clean up

* add User.isDeleted

* コミット忘れ

* Update 1629512953000-user-is-deleted.ts

* show dialog

* lint

* Update 1629512953000-user-is-deleted.ts
This commit is contained in:
syuilo
2021-08-21 12:41:56 +09:00
committed by GitHub
parent 8ab9068d8e
commit fd1ef4a62d
11 changed files with 135 additions and 3 deletions

View File

@ -11,6 +11,7 @@ type Account = {
token: string;
isModerator: boolean;
isAdmin: boolean;
isDeleted: boolean;
};
const data = localStorage.getItem('account');

View File

@ -310,6 +310,13 @@ for (const plugin of ColdDeviceStorage.get('plugins').filter(p => p.active)) {
}
if ($i) {
if ($i.isDeleted) {
dialog({
type: 'warning',
text: i18n.locale.accountDeletionInProgress,
});
}
if ('Notification' in window) {
// 許可を得ていなかったらリクエスト
if (Notification.permission === 'default') {