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> <style scoped>
.home-container { .home-container {
min-height: 100vh; height: 100vh;
background: var(--bg-color); background: var(--bg-color);
transition: background-color 0.3s; transition: background-color 0.3s;
overflow: hidden;
display: flex;
flex-direction: column;
} }
.main-content { .main-content {
margin-left: 240px; margin-left: 240px;
margin-top: 64px; margin-top: 64px;
padding: 24px; padding: 24px;
min-height: calc(100vh - 64px); flex: 1;
overflow-y: auto;
} }
</style> </style>

View File

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

View File

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