Switch VRC status to notification

This commit is contained in:
Natsumi
2025-10-04 20:07:47 +13:00
parent 042606b591
commit 4bd589e8f0
4 changed files with 56 additions and 50 deletions

View File

@@ -1,39 +0,0 @@
<template>
<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 { 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>