feat(settings): add logs path input field and update settings model

This commit is contained in:
2026-05-22 17:36:21 +08:00
parent 49a57b1af1
commit e952a64f35
2 changed files with 10 additions and 2 deletions
+9 -1
View File
@@ -11,7 +11,7 @@
<div class="card-body"> <div class="card-body">
<div class="form-group"> <div class="form-group">
<label>Listen Address</label> <label>Listen Address</label>
<input type="text" v-model="settings.listenAddr" placeholder="0.0.0.0"> <input type="text" v-model="settings.lstenAddr" placeholder="0.0.0.0">
</div> </div>
<div class="form-group"> <div class="form-group">
<label>Listen Port</label> <label>Listen Port</label>
@@ -27,6 +27,11 @@
<input type="text" v-model="settings.instancePath" placeholder="/etc/frpc"> <input type="text" v-model="settings.instancePath" placeholder="/etc/frpc">
<p v-pre class="field-hint">You have to fill it with absolute path but not relative path</p> <p v-pre class="field-hint">You have to fill it with absolute path but not relative path</p>
</div> </div>
<div class="form-group">
<label>Logs Path</label>
<input type="text" v-model="settings.logsPath" placeholder="/var/log/super-frpc">
<p v-pre class="field-hint">You have to fill it with absolute path but not relative path</p>
</div>
</div> </div>
</div> </div>
@@ -148,6 +153,7 @@ export default {
listenPort: '', listenPort: '',
frpcPath: '', frpcPath: '',
instancePath: '', instancePath: '',
logsPath: '',
notificationEnabled: false, notificationEnabled: false,
notificationMethod: 'webhook', notificationMethod: 'webhook',
watchdogEnabled: false, watchdogEnabled: false,
@@ -170,6 +176,7 @@ export default {
settings.listenPort = data.ListenPort || ''; settings.listenPort = data.ListenPort || '';
settings.frpcPath = data.FrpcPath || ''; settings.frpcPath = data.FrpcPath || '';
settings.instancePath = data.InstancePath || ''; settings.instancePath = data.InstancePath || '';
settings.logsPath = data.LogsPath || '';
settings.notificationEnabled = data['Notification.Enabled'] || false; settings.notificationEnabled = data['Notification.Enabled'] || false;
settings.notificationMethod = data['Notification.Method'] || 'webhook'; settings.notificationMethod = data['Notification.Method'] || 'webhook';
settings.watchdogEnabled = data['Watchdog.Enabled'] || false; settings.watchdogEnabled = data['Watchdog.Enabled'] || false;
@@ -192,6 +199,7 @@ export default {
ListenPort: settings.listenPort, ListenPort: settings.listenPort,
FrpcPath: settings.frpcPath, FrpcPath: settings.frpcPath,
InstancePath: settings.instancePath, InstancePath: settings.instancePath,
LogsPath: settings.logsPath,
'Notification.Enabled': settings.notificationEnabled, 'Notification.Enabled': settings.notificationEnabled,
'Notification.Method': settings.notificationMethod, 'Notification.Method': settings.notificationMethod,
'Watchdog.Enabled': settings.watchdogEnabled, 'Watchdog.Enabled': settings.watchdogEnabled,
+1 -1
View File
@@ -1,7 +1,7 @@
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
const APP_TARGET = '192.168.20.4:19090' const APP_TARGET = '192.168.1.4:7000'
export default defineConfig({ export default defineConfig({
define: { define: {