refactor(views): improve layout and scroll behavior

- Update Home.vue to use flex layout and proper scrolling
- Enhance Logs.vue scrollbar styling and remove redundant padding
- Set Vite server to listen on all network interfaces
This commit is contained in:
2026-03-17 22:21:42 +08:00
parent ce8376458e
commit fb074e203d
3 changed files with 26 additions and 7 deletions

View File

@@ -36,15 +36,19 @@ export default {
<style scoped>
.home-container {
min-height: 100vh;
height: 100vh;
background: var(--bg-color);
transition: background-color 0.3s;
overflow: hidden;
display: flex;
flex-direction: column;
}
.main-content {
margin-left: 240px;
margin-top: 64px;
padding: 24px;
min-height: calc(100vh - 64px);
flex: 1;
overflow-y: auto;
}
</style>

View File

@@ -124,10 +124,6 @@ export default {
<style scoped>
@import '../styles/common.css';
.logs-page {
padding: 24px;
}
.page-header {
display: flex;
justify-content: space-between;
@@ -136,7 +132,7 @@ export default {
.logs-container {
background: var(--card-bg);
border-radius: 8px;
border-radius: 8px 0 0 8px;
padding: 20px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
max-height: calc(100vh - 200px);
@@ -144,6 +140,24 @@ export default {
transition: background-color 0.3s;
}
.logs-container::-webkit-scrollbar {
width: 8px;
}
.logs-container::-webkit-scrollbar-track {
background: var(--bg-color);
border-radius: 0 8px 8px 0;
}
.logs-container::-webkit-scrollbar-thumb {
background: var(--primary-color);
border-radius: 4px;
}
.logs-container::-webkit-scrollbar-thumb:hover {
background: var(--sidebar-active-bg);
}
.log-list {
display: flex;
flex-direction: column;

View File

@@ -4,6 +4,7 @@ import vue from '@vitejs/plugin-vue'
export default defineConfig({
plugins: [vue()],
server: {
host: '0.0.0.0',
port: 3000,
proxy: {
'/api': {