Files
dashboard/frontend/src/layout/index.vue
T
yangy 1a6c96da8c Add OTA package upload functionality and UI enhancements
- Introduced a new endpoint for uploading OTA packages in backend/routes/ota.py.
- Implemented file handling and MD5 checksum calculation for OTA packages.
- Updated frontend API to support OTA package uploads with a new uploadOtaPackage function.
- Enhanced the OTA management UI to include file upload options and improved layout.
- Updated requirements.txt to include boto3 for S3 interactions.
- Made various UI adjustments for better user experience and consistency.
2026-05-15 17:34:54 +08:00

100 lines
2.8 KiB
Vue

<template>
<div class="lux-shell">
<div class="lux-shell-bg" aria-hidden="true">
<div class="lux-orb lux-orb-1" />
<div class="lux-orb lux-orb-2" />
<div class="lux-orb lux-orb-3" />
</div>
<el-container class="lux-shell-body">
<el-aside width="220px" class="sidebar-glass">
<div class="sidebar-logo">
<h2>Luxsin CMS</h2>
</div>
<el-menu
class="lux-menu"
:default-active="activeMenu"
background-color="transparent"
text-color="#cbd5e1"
active-text-color="#7dd3fc"
router
>
<el-sub-menu index="1">
<template #title>
<el-icon><Headset /></el-icon>
<span>耳机管理</span>
</template>
<el-menu-item index="/brand">
<el-icon><Collection /></el-icon>
<span>品牌管理</span>
</el-menu-item>
<el-menu-item index="/model">
<el-icon><List /></el-icon>
<span>型号管理</span>
</el-menu-item>
</el-sub-menu>
<el-sub-menu index="upgrade">
<template #title>
<el-icon><Upload /></el-icon>
<span>升级管理</span>
</template>
<el-menu-item index="/ota">
<el-icon><Document /></el-icon>
<span>OTA 管理</span>
</el-menu-item>
</el-sub-menu>
</el-menu>
</el-aside>
<el-container class="lux-right-col">
<el-header class="lux-header">
<el-button
circle
type="primary"
class="lux-header-power-btn"
title="退出登录"
aria-label="退出登录"
@click="handleLogout"
>
<el-icon :size="18"><SwitchButton /></el-icon>
</el-button>
</el-header>
<el-main class="lux-main">
<router-view />
</el-main>
<el-footer class="lux-footer" height="auto">
<span class="lux-footer-copy">&copy;Powered By EafonYang</span>
</el-footer>
</el-container>
</el-container>
</div>
</template>
<script setup>
import { computed } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import { Headset, Collection, List, Upload, Document, SwitchButton } from '@element-plus/icons-vue'
import { clearToken } from '@/utils/auth'
const route = useRoute()
const router = useRouter()
const activeMenu = computed(() => route.path)
const handleLogout = () => {
clearToken()
ElMessage.success('已退出登录')
router.push('/login')
}
</script>
<style scoped>
.lux-right-col {
flex: 1;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
}
</style>