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>
|
<label>Listen Port</label>
|
||||||
<input type="number" v-model="settings.listenPort" placeholder="8080">
|
<input type="number" v-model="settings.listenPort" placeholder="8080">
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -128,6 +136,8 @@ export default {
|
|||||||
const settings = reactive({
|
const settings = reactive({
|
||||||
listenAddr: '',
|
listenAddr: '',
|
||||||
listenPort: '',
|
listenPort: '',
|
||||||
|
frpcPath: '',
|
||||||
|
instancePath: '',
|
||||||
notificationEnabled: false,
|
notificationEnabled: false,
|
||||||
notificationMethod: 'webhook',
|
notificationMethod: 'webhook',
|
||||||
watchdogEnabled: false,
|
watchdogEnabled: false,
|
||||||
@@ -148,6 +158,8 @@ export default {
|
|||||||
const data = result.data;
|
const data = result.data;
|
||||||
settings.listenAddr = data.ListenAddr || '';
|
settings.listenAddr = data.ListenAddr || '';
|
||||||
settings.listenPort = data.ListenPort || '';
|
settings.listenPort = data.ListenPort || '';
|
||||||
|
settings.frpcPath = data.FrpcPath || '';
|
||||||
|
settings.instancePath = data.InstancePath || '';
|
||||||
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;
|
||||||
@@ -168,6 +180,8 @@ export default {
|
|||||||
const payload = {
|
const payload = {
|
||||||
ListenAddr: settings.listenAddr,
|
ListenAddr: settings.listenAddr,
|
||||||
ListenPort: settings.listenPort,
|
ListenPort: settings.listenPort,
|
||||||
|
FrpcPath: settings.frpcPath,
|
||||||
|
InstancePath: settings.instancePath,
|
||||||
'Notification.Enabled': settings.notificationEnabled,
|
'Notification.Enabled': settings.notificationEnabled,
|
||||||
'Notification.Method': settings.notificationMethod,
|
'Notification.Method': settings.notificationMethod,
|
||||||
'Watchdog.Enabled': settings.watchdogEnabled,
|
'Watchdog.Enabled': settings.watchdogEnabled,
|
||||||
|
|||||||
Reference in New Issue
Block a user