mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-18 22:33:50 +02:00
More VRC status checking
This commit is contained in:
@@ -1,20 +1,39 @@
|
||||
<template>
|
||||
<el-alert
|
||||
v-if="lastStatus"
|
||||
:title="lastStatus"
|
||||
type="warning"
|
||||
show-icon
|
||||
center
|
||||
:closable="true"
|
||||
@close="onAlertClose"></el-alert>
|
||||
<el-alert v-if="statusText" type="warning" show-icon center :closable="true" @close="onAlertClose">
|
||||
<template #title>
|
||||
<span @click="openStatusPage" class="status-text">
|
||||
{{ statusText }}
|
||||
</span>
|
||||
</template>
|
||||
</el-alert>
|
||||
</template>
|
||||
<script setup>
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { useVrcStatusStore } from '../stores';
|
||||
import { openExternalLink } from '../shared/utils';
|
||||
|
||||
const { lastStatus, isAlertClosed } = storeToRefs(useVrcStatusStore());
|
||||
const { statusText, isAlertClosed } = storeToRefs(useVrcStatusStore());
|
||||
|
||||
isAlertClosed.value = false;
|
||||
|
||||
function onAlertClose() {
|
||||
isAlertClosed.value = true;
|
||||
}
|
||||
|
||||
function openStatusPage() {
|
||||
if (isAlertClosed.value) {
|
||||
return;
|
||||
}
|
||||
openExternalLink('https://status.vrchat.com');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.status-text {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.status-text:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user