2025-12-20 09:30:16 +08:00
|
|
|
<script setup lang="ts">
|
2026-04-01 11:14:42 +08:00
|
|
|
import { onMounted } from 'vue'
|
2025-12-20 09:30:16 +08:00
|
|
|
import { RouterView } from 'vue-router'
|
|
|
|
|
import { Toaster } from '@/components/ui/sonner'
|
2026-06-25 20:06:38 +08:00
|
|
|
import { LogOut } from 'lucide-vue-next'
|
2026-06-28 21:01:17 +08:00
|
|
|
import { activeInterconnectNodeId, activeInterconnectNodeName, setActiveInterconnectNodeId } from '@/api'
|
2026-06-25 20:06:38 +08:00
|
|
|
|
|
|
|
|
function exitTravel() {
|
|
|
|
|
setActiveInterconnectNodeId('')
|
|
|
|
|
window.location.href = '/'
|
|
|
|
|
}
|
2026-04-01 11:14:42 +08:00
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// 全局应用设备差异化垂直抗锯齿
|
|
|
|
|
const isMac = /Mac|iPod|iPhone|iPad/.test(navigator.userAgent)
|
|
|
|
|
document.documentElement.classList.add(isMac ? 'antialiased' : 'subpixel-antialiased')
|
2026-04-21 11:17:20 +08:00
|
|
|
|
|
|
|
|
// Windows 平台检测,用于在 CSS 中调整字体优先级
|
|
|
|
|
const isWindows = /Win/.test(navigator.userAgent)
|
|
|
|
|
if (isWindows) {
|
|
|
|
|
document.documentElement.classList.add('is-windows')
|
|
|
|
|
}
|
2026-04-01 11:14:42 +08:00
|
|
|
})
|
2025-12-20 09:30:16 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<RouterView />
|
|
|
|
|
<Toaster position="bottom-right" :duration="2000" />
|
2026-06-25 20:06:38 +08:00
|
|
|
|
|
|
|
|
<!-- 穿越子节点时显示的悬浮“返回主节点”控制条 -->
|
|
|
|
|
<div v-if="activeInterconnectNodeId" class="fixed bottom-4 left-4 z-[9999] group">
|
|
|
|
|
<button
|
|
|
|
|
@click="exitTravel"
|
|
|
|
|
class="flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[10px] font-medium
|
|
|
|
|
bg-amber-500/85 hover:bg-amber-500 text-white shadow-md shadow-amber-500/10
|
|
|
|
|
transition-all duration-300 border border-amber-400/10 backdrop-blur-sm
|
|
|
|
|
hover:scale-105 active:scale-95 cursor-pointer"
|
|
|
|
|
>
|
|
|
|
|
<LogOut class="h-3 w-3 transition-transform group-hover:-translate-x-0.5" />
|
2026-06-28 21:01:17 +08:00
|
|
|
<span>返回主节点 <template v-if="activeInterconnectNodeName">当前:({{ activeInterconnectNodeName }})</template></span>
|
2026-06-25 20:06:38 +08:00
|
|
|
</button>
|
|
|
|
|
</div>
|
2025-12-20 09:30:16 +08:00
|
|
|
</template>
|