Implement server commands through control stream
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
v-if="currentTab === 'general'"
|
||||
:config="config"
|
||||
:global-prep-cmd="global_prep_cmd"
|
||||
:server-cmd="server_cmd"
|
||||
:platform="platform">
|
||||
</general>
|
||||
|
||||
@@ -134,6 +135,7 @@
|
||||
currentTab: "general",
|
||||
vdisplayStatus: "1",
|
||||
global_prep_cmd: [],
|
||||
server_cmd: [],
|
||||
tabs: [ // TODO: Move the options to each Component instead, encapsulate.
|
||||
{
|
||||
id: "general",
|
||||
@@ -143,6 +145,7 @@
|
||||
"sunshine_name": "",
|
||||
"min_log_level": 2,
|
||||
"global_prep_cmd": "[]",
|
||||
"server_cmd": "[]",
|
||||
"notify_pre_releases": "disabled",
|
||||
},
|
||||
},
|
||||
@@ -328,7 +331,9 @@
|
||||
});
|
||||
|
||||
this.config.global_prep_cmd = this.config.global_prep_cmd || [];
|
||||
this.config.server_cmd = this.config.server_cmd || [];
|
||||
this.global_prep_cmd = JSON.parse(this.config.global_prep_cmd);
|
||||
this.server_cmd = JSON.parse(this.config.server_cmd);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
@@ -336,7 +341,8 @@
|
||||
this.$forceUpdate()
|
||||
},
|
||||
serialize() {
|
||||
this.config.global_prep_cmd = JSON.stringify(this.global_prep_cmd);
|
||||
this.config.global_prep_cmd = JSON.stringify(this.global_prep_cmd.filter(cmd => cmd.do || cmd.undo));
|
||||
this.config.server_cmd = JSON.stringify(this.server_cmd.filter(cmd => cmd.name && cmd.cmd));
|
||||
},
|
||||
save() {
|
||||
this.saved = false;
|
||||
|
||||
Reference in New Issue
Block a user