/
AutomationDisconnected.vue
60 lines (54 loc) · 1.71 KB
/
AutomationDisconnected.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<template>
<AutInfo>
<Alert
:title="t('runner.automation.disconnected.title')"
status="warning"
:icon="ErrorOutlineIcon"
:dismissible="false"
class="w-full max-w-600px"
>
<div class="flex flex-col gap-16px">
<p>
{{ t('runner.automation.disconnected.description') }}
</p>
<Button
size="md"
:prefix-icon="RefreshIcon"
prefix-icon-class="icon-dark-white"
@click="relaunch"
>
{{ t('runner.automation.disconnected.reload') }}
</Button>
<ExternalLink
class="mt-16px text-indigo-500"
href="https://on.cypress.io/launching-browsers"
>
<i-cy-book_x16 class="ml-8px -top-2px relative inline-block icon-dark-indigo-500 icon-light-indigo-100" />
{{ t('runner.automation.shared.link') }}
</ExternalLink>
</div>
</Alert>
</AutInfo>
</template>
<script setup lang="ts">
import AutInfo from './AutInfo.vue'
import Button from '@cy/components/Button.vue'
import ExternalLink from '@cy/gql-components/ExternalLink.vue'
import RefreshIcon from '~icons/cy/refresh_x16'
import { gql } from '@urql/core'
import { useMutation } from '@urql/vue'
import { AutomationDisconnected_RelaunchBrowserDocument } from '../../generated/graphql'
import { useI18n } from '@cy/i18n'
import Alert from '@cy/components/Alert.vue'
import ErrorOutlineIcon from '~icons/cy/status-errored-outline_x16.svg'
const { t } = useI18n()
gql`
mutation AutomationDisconnected_RelaunchBrowser {
launchOpenProject {
id
}
}
`
const gqlRelaunch = useMutation(AutomationDisconnected_RelaunchBrowserDocument)
const relaunch = () => gqlRelaunch.executeMutation({})
</script>