Skip to content

Commit 0302094

Browse files
authored
feat: Add link to the Docs for Unauthorized connections (#2035)
1 parent 3604c67 commit 0302094

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

src/components/TheConnectingDialog.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
<v-divider class="mt-4 mb-5" />
1919
</template>
2020
<div class="text-center mt-3">
21+
<v-btn v-if="helpButtonUrl" class="text--disabled mr-3" :href="helpButtonUrl" target="_blank">
22+
<v-icon left>{{ mdiHelp }}</v-icon>
23+
{{ $t('ConnectionDialog.Help') }}
24+
</v-btn>
2125
<v-btn class="primary--text" @click="reconnect">{{ $t('ConnectionDialog.TryAgain') }}</v-btn>
2226
</div>
2327
</v-card-text>
@@ -35,7 +39,7 @@ import BaseMixin from '@/components/mixins/base'
3539
3640
import ThemeMixin from '@/components/mixins/theme'
3741
import ConnectionStatus from '@/components/ui/ConnectionStatus.vue'
38-
import { mdiConnection } from '@mdi/js'
42+
import { mdiConnection, mdiHelp } from '@mdi/js'
3943
4044
@Component({
4145
components: {
@@ -44,6 +48,7 @@ import { mdiConnection } from '@mdi/js'
4448
})
4549
export default class TheConnectingDialog extends Mixins(BaseMixin, ThemeMixin) {
4650
mdiConnection = mdiConnection
51+
mdiHelp = mdiHelp
4752
4853
counter = 0
4954
@@ -89,6 +94,12 @@ export default class TheConnectingDialog extends Mixins(BaseMixin, ThemeMixin) {
8994
return this.$store.state.socket.connectionFailedMessage ?? null
9095
}
9196
97+
get helpButtonUrl() {
98+
if (!this.$store.state.socket.connectionFailedMessage) return null
99+
100+
return `https://docs.mainsail.xyz/faq/mainsail_errors/connection-${this.connectionFailedMessage?.toLowerCase()}`
101+
}
102+
92103
reconnect() {
93104
this.counter++
94105
this.$store.dispatch('socket/setData', { connectingFailed: false })

src/locales/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
"CheckMoonrakerLog": "Wenn diese Meldung wiederholt erscheint, schaue bitte in die Logdatei unter:",
156156
"Connecting": "Verbinde zu {host}",
157157
"Failed": "Verbindung fehlgeschlagen",
158+
"Help": "Hilfe",
158159
"Initializing": "Initialisieren",
159160
"TryAgain": "Erneut versuchen"
160161
},

src/locales/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
"Connecting": "Connecting to {host}",
157157
"ErrorMessage": "Error message: {message}",
158158
"Failed": "Connection failed",
159+
"Help": "Help",
159160
"Initializing": "Initializing",
160161
"TryAgain": "try again"
161162
},

0 commit comments

Comments
 (0)