From 3d2ae20ecf2664e1e49c376610d929a59e30b880 Mon Sep 17 00:00:00 2001 From: MattIPv4 Date: Fri, 1 May 2020 18:54:01 +0100 Subject: [PATCH] global security tab --- package-lock.json | 5 + package.json | 1 + src/nginxconfig/scss/style.scss | 73 ++++++++- .../templates/global_sections/index.js | 1 + .../templates/global_sections/security.vue | 138 ++++++++++++++++++ 5 files changed, 215 insertions(+), 3 deletions(-) create mode 100644 src/nginxconfig/templates/global_sections/security.vue diff --git a/package-lock.json b/package-lock.json index 0612de5..41cadc5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8291,6 +8291,11 @@ "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==" }, + "vue-select": { + "version": "3.10.3", + "resolved": "https://registry.npmjs.org/vue-select/-/vue-select-3.10.3.tgz", + "integrity": "sha512-SgLmiSwnJwT2erxjq42AA1iTzu1uqhA5MPuF4UDtGot5YSgJLKy71H0LO0hHaBpIjb7d/nJHiufYKcrSakaupw==" + }, "vue-template-compiler": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.11.tgz", diff --git a/package.json b/package.json index f255318..08ce233 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "pretty-checkbox-vue": "^1.1.9", "vue": "^2.6.11", "vue-hot-reload-api": "^2.3.3", + "vue-select": "^3.10.3", "vuex": "^3.3.0" }, "devDependencies": { diff --git a/src/nginxconfig/scss/style.scss b/src/nginxconfig/scss/style.scss index 8e82709..87b057a 100644 --- a/src/nginxconfig/scss/style.scss +++ b/src/nginxconfig/scss/style.scss @@ -22,6 +22,8 @@ $highlight: #f2c94c; $pretty--color-dark: $primary; $pretty--color-default: $primary; @import "~pretty-checkbox/src/pretty-checkbox"; + $vs-state-active-bg: $primary; + @import "~vue-select/src/scss/vue-select"; .tabs { ul { @@ -141,9 +143,11 @@ $highlight: #f2c94c; .is-changed { input { - &, - &:focus { - background: rgba($highlight, .35); + &:not(.vs__search) { + &, + &:focus { + background: rgba($highlight, .35); + } } } @@ -158,6 +162,12 @@ $highlight: #f2c94c; padding: .25rem .5rem; } } + + .v-select { + .vs__dropdown-toggle { + background: rgba($highlight, .35); + } + } } label { @@ -228,4 +238,61 @@ $highlight: #f2c94c; } } } + + .v-select { + &.vs--open { + > ul { + opacity: 1; + } + + .vs__dropdown-toggle { + border-color: $primary; + box-shadow: 0 0 2px rgba($success, .5); + + .vs__selected { + top: .75em; + } + } + } + + > ul { + display: block !important; + margin: 0; + opacity: 0; + transition: opacity $transition; + } + + .vs__dropdown-toggle { + border: 1px solid $border; + box-shadow: none; + padding: 0 16px; + transition: border $transition, box-shadow $transition; + + .vs__selected-options { + padding: 0; + + .vs__selected { + margin: 0; + padding: 0; + transition: opacity $transition; + } + + .vs__search { + &, + &:focus { + background: none; + border: 0; + box-shadow: none; + margin: 0; + padding: 0; + width: 0; + } + } + } + + .vs__actions { + padding: 0; + } + } + } } diff --git a/src/nginxconfig/templates/global_sections/index.js b/src/nginxconfig/templates/global_sections/index.js index 96c4b33..9f99235 100644 --- a/src/nginxconfig/templates/global_sections/index.js +++ b/src/nginxconfig/templates/global_sections/index.js @@ -1 +1,2 @@ export { default as HTTPS } from './https'; +export { default as Security } from './security'; diff --git a/src/nginxconfig/templates/global_sections/security.vue b/src/nginxconfig/templates/global_sections/security.vue new file mode 100644 index 0000000..4326ec4 --- /dev/null +++ b/src/nginxconfig/templates/global_sections/security.vue @@ -0,0 +1,138 @@ + + +