custom kick message, fixes #56.
This commit is contained in:
parent
b9b80ed79a
commit
122fd8b957
@ -72,6 +72,7 @@ export const connection = {
|
||||
reconnecting: 'Reconnecting...',
|
||||
connected: 'Connected',
|
||||
disconnected: 'Disconnected',
|
||||
kicked: 'You have been removed from this room.',
|
||||
button_confirm: 'OK',
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
}
|
||||
|
||||
|
@ -105,10 +105,6 @@ export class NekoClient extends BaseClient implements EventEmitter<NekoEvents> {
|
||||
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<NekoEvents> {
|
||||
// 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,
|
||||
|
Reference in New Issue
Block a user