diff --git a/client/src/locale/en-us.ts b/client/src/locale/en-us.ts index f730b1f2..9eca4a89 100644 --- a/client/src/locale/en-us.ts +++ b/client/src/locale/en-us.ts @@ -72,6 +72,7 @@ export const connection = { reconnecting: 'Reconnecting...', connected: 'Connected', disconnected: 'Disconnected', + kicked: 'You have been removed from this room.', button_confirm: 'OK', } diff --git a/client/src/locale/es-sp.ts b/client/src/locale/es-sp.ts index caac021c..674e7bac 100644 --- a/client/src/locale/es-sp.ts +++ b/client/src/locale/es-sp.ts @@ -73,6 +73,8 @@ export const connection = { //reconnecting: 'Reconnecting', connected: 'Connectado correctamente', disconnected: 'Has sido desconectado', + // TODO + //kicked: 'You have been removed from this room.', button_confirm: 'De acuerdo', } diff --git a/client/src/locale/fr-fr.ts b/client/src/locale/fr-fr.ts index 4acd46e1..ede15e39 100644 --- a/client/src/locale/fr-fr.ts +++ b/client/src/locale/fr-fr.ts @@ -73,6 +73,8 @@ export const connection = { //reconnecting: 'Reconnecting', connected: 'Connecté', disconnected: 'Déconnecté', + // TODO + //kicked: 'You have been removed from this room.', button_confirm: 'OK', } diff --git a/client/src/locale/nb-no.ts b/client/src/locale/nb-no.ts index f7d47bc5..89ef2529 100644 --- a/client/src/locale/nb-no.ts +++ b/client/src/locale/nb-no.ts @@ -73,6 +73,8 @@ export const connection = { //reconnecting: 'Reconnecting', connected: 'Tilkoblet', disconnected: 'Frakoblet', + // TODO + //kicked: 'You have been removed from this room.', button_confirm: 'OK', } diff --git a/client/src/locale/sk-sk.ts b/client/src/locale/sk-sk.ts index 7cd559e3..39dbae38 100644 --- a/client/src/locale/sk-sk.ts +++ b/client/src/locale/sk-sk.ts @@ -72,6 +72,7 @@ export const connection = { reconnecting: 'Obnova spojenia...', connected: 'Úspešne pripojený/á', disconnected: 'Boli ste odpojený/á', + kicked: 'Boli ste odstránený/á z tejto miestnosti.', button_confirm: 'Ok', } diff --git a/client/src/locale/sv-se.ts b/client/src/locale/sv-se.ts index 0c08a154..722e0749 100644 --- a/client/src/locale/sv-se.ts +++ b/client/src/locale/sv-se.ts @@ -73,6 +73,8 @@ export const connection = { //reconnecting: 'Reconnecting', connected: 'Du har loggats in', disconnected: 'Du har blivit frånkopplad', + // TODO + //kicked: 'You have been removed from this room.', button_confirm: 'Ok', } diff --git a/client/src/neko/index.ts b/client/src/neko/index.ts index 545d4fe3..c99a4b15 100644 --- a/client/src/neko/index.ts +++ b/client/src/neko/index.ts @@ -105,10 +105,6 @@ export class NekoClient extends BaseClient implements EventEmitter { protected [EVENT.DISCONNECTED](reason?: Error) { this.cleanup() - if (reason && reason.message == 'kicked') { - this.$accessor.logout() - } - this.$vue.$notify({ group: 'neko', type: 'error', @@ -135,7 +131,13 @@ export class NekoClient extends BaseClient implements EventEmitter { // System Events ///////////////////////////// protected [EVENT.SYSTEM.DISCONNECT]({ message }: DisconnectPayload) { + if (message == 'kicked') { + this.$accessor.logout() + message = this.$vue.$t('connection.kicked') as string + } + this.onDisconnected(new Error(message)) + this.$vue.$swal({ title: this.$vue.$t('connection.disconnected'), text: message,