feat: 移除所有访客模式提示和入口,保持界面极简

- 删除登录页访客模式进入按钮
- 删除 MachineList 访客提示样式
- 访客界面无任何说明文字,只展示机器列表
- 登录页仅提供管理员登录入口
This commit is contained in:
shirainbown
2026-06-19 01:28:57 +08:00
parent 9eae8986e3
commit c39ac81b69
2 changed files with 2 additions and 42 deletions

View File

@@ -26,9 +26,6 @@
</div>
</el-form-item>
<el-button type="primary" size="large" class="login-btn" :loading="loading" :icon="Connection" @click="login">登录</el-button>
<div class="login-guest">
<el-button text size="small" :icon="View" @click="guestLogin">访客模式进入</el-button>
</div>
</el-form>
</div>
<div class="login-footer">
@@ -40,8 +37,8 @@
<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { User, Lock, Connection, View } from '@element-plus/icons-vue'
import { login as apiLogin, guestLogin as apiGuest } from '@/api'
import { User, Lock, Connection } from '@element-plus/icons-vue'
import { login as apiLogin } from '@/api'
import { setAuth } from '@/router'
import { ElMessage } from 'element-plus'
@@ -63,17 +60,6 @@ async function login() {
} catch (e) {}
loading.value = false
}
async function guestLogin() {
loading.value = true
try {
const res = await apiGuest()
setAuth(res.data)
ElMessage.success('已进入访客模式')
router.push('/')
} catch (e) {}
loading.value = false
}
</script>
<style scoped>
@@ -173,16 +159,6 @@ async function guestLogin() {
letter-spacing: 0.5px;
margin-top: 6px;
}
.login-guest {
text-align: center;
margin-top: 14px;
}
.login-guest :deep(.el-button) {
color: var(--text-muted);
}
.login-guest :deep(.el-button:hover) {
color: var(--text-secondary);
}
.login-footer {
margin-top: 24px;

View File

@@ -427,22 +427,6 @@ function formatTime(t) {
</script>
<style scoped>
.guest-page-notice {
padding: 10px 16px;
background: rgba(242, 201, 76, 0.12);
border: 1px solid rgba(242, 201, 76, 0.3);
border-radius: 8px;
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
color: #d29922;
}
.guest-page-notice .el-icon {
font-size: 16px;
}
.toolbar {
display: flex;
align-items: center;