feat: 增加升级说明页,退出弹窗默认选退出系统
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { NButton } from "naive-ui";
|
||||
|
||||
const toolUrl = "https://euniv.asio.asia";
|
||||
const copied = ref(false);
|
||||
let copiedTimer = 0;
|
||||
|
||||
async function copyUrl() {
|
||||
try {
|
||||
await navigator.clipboard.writeText(toolUrl);
|
||||
} catch {
|
||||
const box = document.createElement("textarea");
|
||||
box.value = toolUrl;
|
||||
box.setAttribute("readonly", "");
|
||||
box.style.position = "fixed";
|
||||
box.style.left = "-9999px";
|
||||
document.body.appendChild(box);
|
||||
box.select();
|
||||
document.execCommand("copy");
|
||||
box.remove();
|
||||
}
|
||||
copied.value = true;
|
||||
window.clearTimeout(copiedTimer);
|
||||
copiedTimer = window.setTimeout(() => {
|
||||
copied.value = false;
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
function openTool() {
|
||||
const opened = window.open(toolUrl, "_blank", "noopener");
|
||||
if (!opened) window.location.assign(toolUrl);
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main class="notice-page">
|
||||
<section class="notice-card">
|
||||
<h1>旧版工具已失效</h1>
|
||||
<p>因目标平台升级,旧版工具已失效,无法登录使用。</p>
|
||||
<p>新版工具已上线,请访问:</p>
|
||||
<p class="notice-url">{{ toolUrl }}</p>
|
||||
<div class="notice-actions">
|
||||
<n-button type="primary" @click="openTool">打开新版工具</n-button>
|
||||
<n-button @click="copyUrl">{{ copied ? "已复制" : "复制地址" }}</n-button>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</template>
|
||||
Reference in New Issue
Block a user