You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OneAuth/new/ui/layout/default.html

125 lines
2.4 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Auth Layout</title>
<style>
.layout-container {
display: flex;
flex-direction: column;
height: 100vh;
width: 100%;
}
.header {
user-select: none;
height: 60px;
background: #409EFF;
color: white;
display: flex;
align-items: center;
padding: 0 20px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.header-title {
font-size: 18px;
font-weight: bold;
}
.main-container {
display: flex;
flex: 1;
overflow: hidden;
}
.menu {
width: 200px;
background: #f5f5f5;
border-right: 1px solid #ddd;
padding: 20px 0;
}
.menu-item {
padding: 10px 20px;
cursor: pointer;
transition: background 0.3s;
}
.menu-item:hover {
background: #e0e0e0;
}
.menu-item a {
display: block;
color: inherit;
text-decoration: none;
}
.content {
flex: 1;
overflow-y: auto;
width: 100%;
height: 100%;
}
.footer {
height: 40px;
background: #f5f5f5;
border-top: 1px solid #ddd;
display: flex;
align-items: center;
justify-content: center;
font-size: 12px;
color: #666;
}
</style>
</head>
<body style="height: 100%;width: 100%;margin: 0;">
<div class="layout-container">
<header class="header">
<div class="header-title">
<a href="@/">首页</a>
</div>
<a class="ml-auto" href="/">应用权限管理</a>
<!-- 新增跳转到/home的链接 -->
<div refu='ico' class="ml-auto" style="margin-left: auto;"></div>
</header>
<div class="main-container">
<vslot v='user' class="menu" name='menu'>
<div class="menu-item">
<a href="/app">应用管理</a>
</div>
<div class="menu-item">
<a href="/profile">个人中心</a>
</div>
<div class="menu-item">
<a href="/settings">系统设置</a>
</div>
</vslot>
<vslot class="content">
</vslot>
</div>
<footer class="footer">
Copyright © 2025 veypi. All Rights Reserved..
</footer>
</div>
</body>
<script setup>
import token from '/token.js'
await token.refreshToken($env.root)
if (token.isExpired()) {
token.logout()
}
user = token.body()
api.wrapFetch(token.fetch())
$env.Guser = user
</script>
</html>