From 66f2bf29bbe946492149f61430e7377e1945d366 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sat, 26 Oct 2024 21:35:17 +0200 Subject: [PATCH 1/2] feat: Add link to the Docs for Unauthorized connections Signed-off-by: Stefan Dej --- src/components/TheConnectingDialog.vue | 13 ++++++++++++- src/locales/en.json | 1 + 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/components/TheConnectingDialog.vue b/src/components/TheConnectingDialog.vue index 68bff8c66..0ee067331 100644 --- a/src/components/TheConnectingDialog.vue +++ b/src/components/TheConnectingDialog.vue @@ -18,6 +18,10 @@
+ + {{ mdiHelp }} + {{ $t('ConnectionDialog.Help') }} + {{ $t('ConnectionDialog.TryAgain') }}
@@ -35,7 +39,7 @@ import BaseMixin from '@/components/mixins/base' import ThemeMixin from '@/components/mixins/theme' import ConnectionStatus from '@/components/ui/ConnectionStatus.vue' -import { mdiConnection } from '@mdi/js' +import { mdiConnection, mdiHelp } from '@mdi/js' @Component({ components: { @@ -44,6 +48,7 @@ import { mdiConnection } from '@mdi/js' }) export default class TheConnectingDialog extends Mixins(BaseMixin, ThemeMixin) { mdiConnection = mdiConnection + mdiHelp = mdiHelp counter = 0 @@ -89,6 +94,12 @@ export default class TheConnectingDialog extends Mixins(BaseMixin, ThemeMixin) { return this.$store.state.socket.connectionFailedMessage ?? null } + get helpButtonUrl() { + if (!this.$store.state.socket.connectionFailedMessage) return null + + return `https://docs.mainsail.xyz/faq/mainsail_errors/connection-${this.connectionFailedMessage?.toLowerCase()}` + } + reconnect() { this.counter++ this.$store.dispatch('socket/setData', { connectingFailed: false }) diff --git a/src/locales/en.json b/src/locales/en.json index d12f4e76e..6b0505e25 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -156,6 +156,7 @@ "Connecting": "Connecting to {host}", "ErrorMessage": "Error message: {message}", "Failed": "Connection failed", + "Help": "Help", "Initializing": "Initializing", "TryAgain": "try again" }, From 9c0f83d9c1550a52a712de117c8fd5cf6550ebd9 Mon Sep 17 00:00:00 2001 From: Stefan Dej Date: Sat, 26 Oct 2024 21:52:35 +0200 Subject: [PATCH 2/2] locale(de): add german locale Signed-off-by: Stefan Dej --- src/locales/de.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/locales/de.json b/src/locales/de.json index bc4ac382c..6369e0dab 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -155,6 +155,7 @@ "CheckMoonrakerLog": "Wenn diese Meldung wiederholt erscheint, schaue bitte in die Logdatei unter:", "Connecting": "Verbinde zu {host}", "Failed": "Verbindung fehlgeschlagen", + "Help": "Hilfe", "Initializing": "Initialisieren", "TryAgain": "Erneut versuchen" },