52 lines
1.9 KiB
Vue
52 lines
1.9 KiB
Vue
<script setup>
|
||
/**
|
||
* 公共认证布局:登录、注册、找回及第三方绑定共享站点标识和主题入口。认证页链接保留处理后的 redirect,发布版 data-v 作用域用于继续匹配已有共享样式。
|
||
*/
|
||
import "~/assets/styles/blank.DOa3C9wi.css";
|
||
import { onMounted } from "vue";
|
||
import { useRoute } from "#app";
|
||
import { NuxtLink } from "#components";
|
||
import { t as useSiteConfig } from "~/lib/useSiteConfig.js";
|
||
import { t as useTheme } from "~/lib/useTheme.js";
|
||
import { t as authLink } from "~/lib/auth-redirect.js";
|
||
import { logoUrl } from "~/utils/brand.js";
|
||
|
||
const route = useRoute();
|
||
const siteConfig = useSiteConfig();
|
||
const theme = useTheme();
|
||
|
||
onMounted(() => siteConfig.load().catch(() => {}));
|
||
</script>
|
||
|
||
<template>
|
||
<!-- 共享认证样式迁移前保留发布版作用域;主题入口遵循全站浅色/深色/跟随系统三态。 -->
|
||
<div class="blank-layout" data-v-69ca9392>
|
||
<header class="auth-topbar" data-v-69ca9392>
|
||
<NuxtLink to="/" class="auth-logo" data-v-69ca9392>
|
||
<img :src="logoUrl" alt="破碎工坊云" data-v-69ca9392 />
|
||
</NuxtLink>
|
||
<div class="auth-top-actions" data-v-69ca9392>
|
||
<button
|
||
class="auth-theme"
|
||
type="button"
|
||
:aria-label="`切换主题,当前${theme.label.value}`"
|
||
:title="`主题:${theme.label.value}(点击切换)`"
|
||
data-v-69ca9392
|
||
@click="theme.cycle"
|
||
>
|
||
<i :class="theme.icon.value" data-v-69ca9392 />
|
||
</button>
|
||
<NuxtLink
|
||
v-if="route.path !== '/login'"
|
||
:to="authLink('/login', route.query.redirect)"
|
||
class="auth-login"
|
||
data-v-69ca9392
|
||
>
|
||
<i class="pi pi-user" data-v-69ca9392 /> 登录
|
||
</NuxtLink>
|
||
</div>
|
||
</header>
|
||
<main class="auth-main" data-v-69ca9392><slot /></main>
|
||
</div>
|
||
</template>
|