From 043f89eac0b33006c233d6a27e244264fb04e7ce Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Tue, 28 Apr 2020 13:09:58 +0100 Subject: [PATCH] Add all the logic for presets working --- src/nginxconfig/templates/domain.vue | 6 ++ .../templates/domain_sections/presets.vue | 77 ++++++++++++++++++- .../templates/domain_sections/routing.vue | 9 ++- 3 files changed, 88 insertions(+), 4 deletions(-) diff --git a/src/nginxconfig/templates/domain.vue b/src/nginxconfig/templates/domain.vue index 4e002ab..a326584 100644 --- a/src/nginxconfig/templates/domain.vue +++ b/src/nginxconfig/templates/domain.vue @@ -61,6 +61,12 @@ limitations under the License. if (changes) return ` (${changes.toLocaleString()})`; return ''; }, + setValue(tab, key, val) { + Object.assign(this.$props.data[tab][key], { value: val, computed: val }); + }, + resetValue(tab, key) { + this.setValue(tab, key, this.$props.data[tab][key].default); + }, }, }; diff --git a/src/nginxconfig/templates/domain_sections/presets.vue b/src/nginxconfig/templates/domain_sections/presets.vue index 0057a03..10ae159 100644 --- a/src/nginxconfig/templates/domain_sections/presets.vue +++ b/src/nginxconfig/templates/domain_sections/presets.vue @@ -1,5 +1,12 @@ diff --git a/src/nginxconfig/templates/domain_sections/routing.vue b/src/nginxconfig/templates/domain_sections/routing.vue index 581da8f..3ef21a4 100644 --- a/src/nginxconfig/templates/domain_sections/routing.vue +++ b/src/nginxconfig/templates/domain_sections/routing.vue @@ -17,9 +17,12 @@ options: ['index.html', 'index.php'], enabled: true, }, - fallbackRouting: { - default: ['index.php'], - options: ['index.html', 'index.php'], + fallbackHtml: { + default: false, + enabled: true, + }, + fallbackPhp: { + default: true, enabled: true, }, legacyPhpRouting: {