diff --git a/src/api/index.js b/src/api/index.js index c316860..2c16e6e 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -34,7 +34,14 @@ api.interceptors.response.use( export const systemApi = { getStatus: () => api.get('/system/getStatus'), - getSoftwareInfo: () => api.get('/system/getSoftwareInfo') + getSoftwareInfo: () => api.get('/system/getSoftwareInfo'), + getSystemInfo: () => api.get('/system/info'), + getSettings: (key) => { + const url = key ? `/system/settings/get?key=${key}` : '/system/settings/get'; + return api.get(url); + }, + setSettings: (settings) => + api.post('/system/settings/set', settings) }; export const authApi = { @@ -109,10 +116,6 @@ export const monitorApi = { getSystemStats: () => api.get('/monitor/stats') }; -export const systemInfoApi = { - getSystemInfo: () => api.get('/system/info') -}; - export default api; export const TODO_API_NOTES = { diff --git a/src/components/SideBar.vue b/src/components/SideBar.vue index f40e1a7..896d5c1 100644 --- a/src/components/SideBar.vue +++ b/src/components/SideBar.vue @@ -54,7 +54,8 @@ export default { { path: '/sessions', title: 'Session Management', icon: 'fas fa-key', permission: ['superuser', 'admin'] }, { path: '/logs', title: 'System Logs', icon: 'fas fa-file-alt', permission: ['superuser', 'admin'] }, { path: '/monitor', title: 'System Monitoring', icon: 'fas fa-chart-bar', permission: ['superuser', 'admin', 'visitor'] }, - { path: '/system-info', title: 'System Information', icon: 'fas fa-info-circle', permission: ['superuser', 'admin', 'visitor'] } + { path: '/system-info', title: 'System Information', icon: 'fas fa-info-circle', permission: ['superuser', 'admin', 'visitor'] }, + { path: '/settings', title: 'Settings', icon: 'fas fa-cog', permission: ['superuser', 'admin'] } ]; const menuItems = computed(() => { diff --git a/src/router/index.js b/src/router/index.js index dc78f28..0f03127 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -54,6 +54,12 @@ const routes = [ name: 'SystemInfo', component: () => import('../views/SystemInfo.vue'), meta: { requiresAuth: true } + }, + { + path: 'settings', + name: 'Settings', + component: () => import('../views/Settings.vue'), + meta: { requiresAuth: true, permission: ['superuser', 'admin'] } } ] } diff --git a/src/styles/common.css b/src/styles/common.css index 8c751d9..15e76e2 100644 --- a/src/styles/common.css +++ b/src/styles/common.css @@ -445,6 +445,7 @@ font-family: 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif; padding: 8px 15px; background: var(--surface-light); + color: var(--text-color); border: none; border-radius: 8px; cursor: pointer; diff --git a/src/views/Settings.vue b/src/views/Settings.vue new file mode 100644 index 0000000..56a2cc9 --- /dev/null +++ b/src/views/Settings.vue @@ -0,0 +1,331 @@ + + + + + diff --git a/vite.config.js b/vite.config.js index 76c9f6f..16dd29b 100644 --- a/vite.config.js +++ b/vite.config.js @@ -1,7 +1,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' -const APP_TARGET = '10.0.64.19:8080' +const APP_TARGET = '192.168.20.4:19090' export default defineConfig({ define: {