mirror of
https://github.com/vitest-dev/vitest.git
synced 2025-12-08 18:26:03 +00:00
53 lines
1.1 KiB
Vue
53 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import {
|
|
client,
|
|
isConnected,
|
|
isConnecting,
|
|
browserState,
|
|
} from "~/composables/client";
|
|
</script>
|
|
|
|
<template>
|
|
<template v-if="!isConnected">
|
|
<div
|
|
fixed
|
|
inset-0
|
|
p2
|
|
z-10
|
|
select-none
|
|
text="center sm"
|
|
bg="overlay"
|
|
backdrop-blur-sm
|
|
backdrop-saturate-0
|
|
@click="client.reconnect"
|
|
>
|
|
<div
|
|
h-full
|
|
flex="~ col gap-2"
|
|
items-center
|
|
justify-center
|
|
:class="isConnecting ? 'animate-pulse' : ''"
|
|
>
|
|
<div
|
|
text="5xl"
|
|
:class="
|
|
isConnecting
|
|
? 'i-carbon:renew animate-spin animate-reverse'
|
|
: 'i-carbon-wifi-off'
|
|
"
|
|
/>
|
|
<div text-2xl>
|
|
{{ isConnecting ? "Connecting..." : "Disconnected" }}
|
|
</div>
|
|
<div text-lg op50>
|
|
Check your terminal or start a new server with `{{
|
|
browserState
|
|
? `vitest --browser=${browserState.config.browser.name}`
|
|
: "vitest --ui"
|
|
}}`
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|