feat(settings): add frpc path and instance config path fields
Add new input fields for frpc client path and instance config storage path in settings view to allow users to customize these paths.
This commit is contained in:
@@ -17,6 +17,14 @@
|
||||
<label>Listen Port</label>
|
||||
<input type="number" v-model="settings.listenPort" placeholder="8080">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Frp Client Path</label>
|
||||
<input type="text" v-model="settings.frpcPath" placeholder="/usr/local/bin/frpc">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Instance Config Storage Path</label>
|
||||
<input type="text" v-model="settings.instancePath" placeholder="/etc/frpc">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -128,6 +136,8 @@ export default {
|
||||
const settings = reactive({
|
||||
listenAddr: '',
|
||||
listenPort: '',
|
||||
frpcPath: '',
|
||||
instancePath: '',
|
||||
notificationEnabled: false,
|
||||
notificationMethod: 'webhook',
|
||||
watchdogEnabled: false,
|
||||
@@ -148,6 +158,8 @@ export default {
|
||||
const data = result.data;
|
||||
settings.listenAddr = data.ListenAddr || '';
|
||||
settings.listenPort = data.ListenPort || '';
|
||||
settings.frpcPath = data.FrpcPath || '';
|
||||
settings.instancePath = data.InstancePath || '';
|
||||
settings.notificationEnabled = data['Notification.Enabled'] || false;
|
||||
settings.notificationMethod = data['Notification.Method'] || 'webhook';
|
||||
settings.watchdogEnabled = data['Watchdog.Enabled'] || false;
|
||||
@@ -168,6 +180,8 @@ export default {
|
||||
const payload = {
|
||||
ListenAddr: settings.listenAddr,
|
||||
ListenPort: settings.listenPort,
|
||||
FrpcPath: settings.frpcPath,
|
||||
InstancePath: settings.instancePath,
|
||||
'Notification.Enabled': settings.notificationEnabled,
|
||||
'Notification.Method': settings.notificationMethod,
|
||||
'Watchdog.Enabled': settings.watchdogEnabled,
|
||||
|
||||
Reference in New Issue
Block a user