diff --git a/src/nginxconfig/i18n/en/templates/domain_sections/https.js b/src/nginxconfig/i18n/en/templates/domain_sections/https.js index d7635c7..9aefe26 100644 --- a/src/nginxconfig/i18n/en/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/en/templates/domain_sections/https.js @@ -42,9 +42,9 @@ export default { certificationType: 'Certification type', customCertificate: 'Custom certificate', letsEncryptEmail: `${common.letsEncrypt} email`, - http3Warning1: 'HTTP/3 isn\'t a standard NGINX module, check the ', - http3Warning2: 'NGINX QUIC readme ', - http3Warning3: ' or the ', - http3Warning4: 'Cloudflare quiche project ', - http3Warning5: ' for how to build NGINX with HTTP/3!', + http3IsANonStandardModule: 'HTTP/3 isn\'t a standard NGINX module, check the ', + http3NginxQuicReadme: 'NGINX QUIC readme', + http3OrThe: ' or the ', + http3CloudflareQuicheProject: 'Cloudflare quiche project', + http3ForBuildingNginxWithHttp3: ' for how to build NGINX with HTTP/3!', }; diff --git a/src/nginxconfig/i18n/en/templates/global_sections/performance.js b/src/nginxconfig/i18n/en/templates/global_sections/performance.js index 27023f4..5e2e3a4 100644 --- a/src/nginxconfig/i18n/en/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/en/templates/global_sections/performance.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2021 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -31,6 +31,9 @@ export default { enableGzipCompression: `${common.enable} gzip compression`, brotliCompression: 'Brotli compression', enableBrotliCompression: `${common.enable} brotli compression`, + brotliIsANonStandardModule: 'Brotli isn\'t a standard NGINX module, check the ', + brotliGoogleNgxBrotliProject: 'Google ngx_brotli project', + brotliForBuildingNginxWithBrotli: ' for how to build NGINX with Brotli!', expirationForAssets: 'Expiration for assets', expirationForMedia: 'Expiration for media', expirationForSvgs: 'Expiration for SVGs', diff --git a/src/nginxconfig/i18n/fr/templates/domain_sections/https.js b/src/nginxconfig/i18n/fr/templates/domain_sections/https.js index c39f9d3..1db8572 100644 --- a/src/nginxconfig/i18n/fr/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/fr/templates/domain_sections/https.js @@ -42,9 +42,9 @@ export default { certificationType: 'Type de certification', customCertificate: 'Certificat personnalisé', letsEncryptEmail: `E-mail ${common.letsEncrypt}`, - http3Warning1: 'HTTP/3 isn\'t a standard NGINX module, check the ', // TODO: translate - http3Warning2: 'NGINX QUIC readme ', // TODO: translate - http3Warning3: ' or the ', // TODO: translate - http3Warning4: 'Cloudflare quiche project ', // TODO: translate - http3Warning5: ' for how to build NGINX with HTTP/3!', // TODO: translate + http3IsANonStandardModule: 'HTTP/3 isn\'t a standard NGINX module, check the ', // TODO: translate + http3NginxQuicReadme: 'NGINX QUIC readme', // TODO: translate + http3OrThe: ' or the ', // TODO: translate + http3CloudflareQuicheProject: 'Cloudflare quiche project', // TODO: translate + http3ForBuildingNginxWithHttp3: ' for how to build NGINX with HTTP/3!', // TODO: translate }; diff --git a/src/nginxconfig/i18n/fr/templates/global_sections/performance.js b/src/nginxconfig/i18n/fr/templates/global_sections/performance.js index 98f344a..aeb51ec 100644 --- a/src/nginxconfig/i18n/fr/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/fr/templates/global_sections/performance.js @@ -31,6 +31,9 @@ export default { enableGzipCompression: `${common.enable} la compression gzip`, brotliCompression: 'Compression Brotli', enableBrotliCompression: `${common.enable} la compression brotli`, + brotliIsANonStandardModule: 'Brotli isn\'t a standard NGINX module, check the ', // TODO: translate + brotliGoogleNgxBrotliProject: 'Google ngx_brotli project', // TODO: translate + brotliForBuildingNginxWithBrotli: ' for how to build NGINX with Brotli!', // TODO: translate expirationForAssets: 'Expiration des assets', expirationForMedia: 'Expiration des medias', expirationForSvgs: 'Expiration des SVGs', diff --git a/src/nginxconfig/i18n/pt-br/templates/domain_sections/https.js b/src/nginxconfig/i18n/pt-br/templates/domain_sections/https.js index 46cfa8d..6c52840 100644 --- a/src/nginxconfig/i18n/pt-br/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/pt-br/templates/domain_sections/https.js @@ -42,9 +42,9 @@ export default { certificationType: 'Tipo de certificação', customCertificate: 'Certificado personalizado', letsEncryptEmail: `E-mail do ${common.letsEncrypt}`, - http3Warning1: 'HTTP/3 isn\'t a standard NGINX module, check the ', // TODO: translate - http3Warning2: 'NGINX QUIC readme ', // TODO: translate - http3Warning3: ' or the ', // TODO: translate - http3Warning4: 'Cloudflare quiche project ', // TODO: translate - http3Warning5: ' for how to build NGINX with HTTP/3!', // TODO: translate + http3IsANonStandardModule: 'HTTP/3 isn\'t a standard NGINX module, check the ', // TODO: translate + http3NginxQuicReadme: 'NGINX QUIC readme', // TODO: translate + http3OrThe: ' or the ', // TODO: translate + http3CloudflareQuicheProject: 'Cloudflare quiche project', // TODO: translate + http3ForBuildingNginxWithHttp3: ' for how to build NGINX with HTTP/3!', // TODO: translate }; diff --git a/src/nginxconfig/i18n/pt-br/templates/global_sections/performance.js b/src/nginxconfig/i18n/pt-br/templates/global_sections/performance.js index 1edac3c..4edd124 100644 --- a/src/nginxconfig/i18n/pt-br/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/pt-br/templates/global_sections/performance.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2021 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -31,6 +31,9 @@ export default { enableGzipCompression: `${common.enable} compressão gzip`, brotliCompression: 'Compressão Brotli', enableBrotliCompression: `${common.enable} compressão brotli`, + brotliIsANonStandardModule: 'Brotli isn\'t a standard NGINX module, check the ', // TODO: translate + brotliGoogleNgxBrotliProject: 'Google ngx_brotli project', // TODO: translate + brotliForBuildingNginxWithBrotli: ' for how to build NGINX with Brotli!', // TODO: translate expirationForAssets: 'Expiração de ativos', expirationForMedia: 'Expiração de mídia', expirationForSvgs: 'Expiração de SVGs', diff --git a/src/nginxconfig/i18n/ru/templates/domain_sections/https.js b/src/nginxconfig/i18n/ru/templates/domain_sections/https.js index fa1a00d..97e24a9 100644 --- a/src/nginxconfig/i18n/ru/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/ru/templates/domain_sections/https.js @@ -42,9 +42,9 @@ export default { certificationType: 'Тип сертификации', customCertificate: 'Другой сертификат', letsEncryptEmail: `${common.letsEncrypt} email`, - http3Warning1: 'HTTP/3 isn\'t a standard NGINX module, check the ', // TODO: translate - http3Warning2: 'NGINX QUIC readme ', // TODO: translate - http3Warning3: ' or the ', // TODO: translate - http3Warning4: 'Cloudflare quiche project ', // TODO: translate - http3Warning5: ' for how to build NGINX with HTTP/3!', // TODO: translate + http3IsANonStandardModule: 'HTTP/3 isn\'t a standard NGINX module, check the ', // TODO: translate + http3NginxQuicReadme: 'NGINX QUIC readme', // TODO: translate + http3OrThe: ' or the ', // TODO: translate + http3CloudflareQuicheProject: 'Cloudflare quiche project', // TODO: translate + http3ForBuildingNginxWithHttp3: ' for how to build NGINX with HTTP/3!', // TODO: translate }; diff --git a/src/nginxconfig/i18n/ru/templates/global_sections/performance.js b/src/nginxconfig/i18n/ru/templates/global_sections/performance.js index 82b396e..65e09cb 100644 --- a/src/nginxconfig/i18n/ru/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/ru/templates/global_sections/performance.js @@ -31,6 +31,9 @@ export default { enableGzipCompression: `${common.enable} gzip сжатие`, brotliCompression: 'Brotli сжатие', enableBrotliCompression: `${common.enable} brotli сжатие`, + brotliIsANonStandardModule: 'Brotli isn\'t a standard NGINX module, check the ', // TODO: translate + brotliGoogleNgxBrotliProject: 'Google ngx_brotli project', // TODO: translate + brotliForBuildingNginxWithBrotli: ' for how to build NGINX with Brotli!', // TODO: translate expirationForAssets: 'Истечение срока для ассетов', expirationForMedia: 'Истечение срока для медиа файлов', expirationForSvgs: 'Истечение срока для SVG файлов', diff --git a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/https.js b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/https.js index 813fa21..0c9987f 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/zh-cn/templates/domain_sections/https.js @@ -42,9 +42,9 @@ export default { certificationType: '证书类型', customCertificate: '本地证书', letsEncryptEmail: `${common.letsEncrypt} 邮箱`, - http3Warning1: 'HTTP/3 并不是一个标准的 NGINX 模块, 请查看 ', - http3Warning2: 'NGINX QUIC 使用文档', - http3Warning3: ' 或者 ', - http3Warning4: 'Cloudflare quiche 项目', - http3Warning5: ' 以构建支持 HTTP/3 的 NGINX!', + http3IsANonStandardModule: 'HTTP/3 并不是一个标准的 NGINX 模块, 请查看 ', + http3NginxQuicReadme: 'NGINX QUIC 使用文档', + http3OrThe: ' 或者 ', + http3CloudflareQuicheProject: 'Cloudflare quiche 项目', + http3ForBuildingNginxWithHttp3: ' 以构建支持 HTTP/3 的 NGINX!', }; diff --git a/src/nginxconfig/i18n/zh-cn/templates/global_sections/performance.js b/src/nginxconfig/i18n/zh-cn/templates/global_sections/performance.js index a605d2b..52d21cb 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/zh-cn/templates/global_sections/performance.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2021 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -31,6 +31,9 @@ export default { enableGzipCompression: `${common.enable}Gzip压缩`, brotliCompression: 'Brotli 压缩', enableBrotliCompression: `${common.enable}brotli压缩`, + brotliIsANonStandardModule: 'Brotli isn\'t a standard NGINX module, check the ', // TODO: translate + brotliGoogleNgxBrotliProject: 'Google ngx_brotli project', // TODO: translate + brotliForBuildingNginxWithBrotli: ' for how to build NGINX with Brotli!', // TODO: translate expirationForAssets: '资源有效期', expirationForMedia: '媒体资源有效期', expirationForSvgs: 'SVGs有效期', diff --git a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/https.js b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/https.js index 28e96d2..4c949f6 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/domain_sections/https.js +++ b/src/nginxconfig/i18n/zh-tw/templates/domain_sections/https.js @@ -42,9 +42,9 @@ export default { certificationType: '證書類型', customCertificate: '本地證書', letsEncryptEmail: `${common.letsEncrypt} 郵箱`, - http3Warning1: 'HTTP/3 isn\'t a standard NGINX module, check the ', // TODO: translate - http3Warning2: 'NGINX QUIC readme ', // TODO: translate - http3Warning3: ' or the ', // TODO: translate - http3Warning4: 'Cloudflare quiche project ', // TODO: translate - http3Warning5: ' for how to build NGINX with HTTP/3!', // TODO: translate + http3IsANonStandardModule: 'HTTP/3 isn\'t a standard NGINX module, check the ', // TODO: translate + http3NginxQuicReadme: 'NGINX QUIC readme', // TODO: translate + http3OrThe: ' or the ', // TODO: translate + http3CloudflareQuicheProject: 'Cloudflare quiche project', // TODO: translate + http3ForBuildingNginxWithHttp3: ' for how to build NGINX with HTTP/3!', // TODO: translate }; diff --git a/src/nginxconfig/i18n/zh-tw/templates/global_sections/performance.js b/src/nginxconfig/i18n/zh-tw/templates/global_sections/performance.js index ca7918f..94e38d7 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/global_sections/performance.js +++ b/src/nginxconfig/i18n/zh-tw/templates/global_sections/performance.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2021 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -31,6 +31,9 @@ export default { enableGzipCompression: `${common.enable}Gzip壓縮`, brotliCompression: 'Brotli 壓縮', enableBrotliCompression: `${common.enable}brotli壓縮`, + brotliIsANonStandardModule: 'Brotli isn\'t a standard NGINX module, check the ', // TODO: translate + brotliGoogleNgxBrotliProject: 'Google ngx_brotli project', // TODO: translate + brotliForBuildingNginxWithBrotli: ' for how to build NGINX with Brotli!', // TODO: translate expirationForAssets: '資源有效期', expirationForMedia: '媒體資源有效期', expirationForSvgs: 'SVGs有效期', diff --git a/src/nginxconfig/scss/_fields.scss b/src/nginxconfig/scss/_fields.scss index 9e278d2..e5c0695 100644 --- a/src/nginxconfig/scss/_fields.scss +++ b/src/nginxconfig/scss/_fields.scss @@ -53,6 +53,10 @@ THE SOFTWARE. &.has-margin-top { margin-top: .75rem; } + + &.has-small-margin-top { + margin-top: .25rem; + } } > p { diff --git a/src/nginxconfig/scss/_tabs.scss b/src/nginxconfig/scss/_tabs.scss index e2fb264..207d897 100644 --- a/src/nginxconfig/scss/_tabs.scss +++ b/src/nginxconfig/scss/_tabs.scss @@ -97,17 +97,24 @@ THE SOFTWARE. } i { + font-size: .75em; margin: 0; } } - // Handle having the remove icon as well as the add icon i { - font-size: .75em; - + // Add domain button &.fa-plus { + font-size: .75em; margin: 0 .35rem 0 0; } + + // Warning icon + &.fa-exclamation-triangle { + color: $warning-hover; + font-size: .9em; + margin: 0 0 .1rem .35rem; + } } } } diff --git a/src/nginxconfig/templates/app.vue b/src/nginxconfig/templates/app.vue index 4cecc52..561dcb2 100644 --- a/src/nginxconfig/templates/app.vue +++ b/src/nginxconfig/templates/app.vue @@ -66,6 +66,7 @@ THE SOFTWARE.
  • {{ data[0].server.domain.computed }}{{ changes(data[1]) }} + @@ -79,6 +80,7 @@ THE SOFTWARE. @@ -320,7 +319,15 @@ THE SOFTWARE. props: { data: Object, // Data delegated back to us from parent }, - computed: computedFromDefaults(defaults, 'https'), // Getters & setters for the delegated data + computed: { + ...computedFromDefaults(defaults, 'https'), // Getters & setters for the delegated data + showHttp3Warning() { + return this.$props.data.http3.computed; + }, + hasWarnings() { + return this.showHttp3Warning; + }, + }, watch: { // Disable everything if https is disabled '$props.data.https': { diff --git a/src/nginxconfig/templates/domain_sections/onion.vue b/src/nginxconfig/templates/domain_sections/onion.vue index 1058c9d..def2210 100644 --- a/src/nginxconfig/templates/domain_sections/onion.vue +++ b/src/nginxconfig/templates/domain_sections/onion.vue @@ -98,6 +98,9 @@ THE SOFTWARE. incorrectEnding() { return this.onionLocationChanged && !this.$props.data.onionLocation.computed.endsWith('.onion'); }, + hasWarnings() { + return this.incorrectEnding; + }, }, watch: { '$props.data.onionLocation': { diff --git a/src/nginxconfig/templates/domain_sections/server.vue b/src/nginxconfig/templates/domain_sections/server.vue index b9762e2..2e3ddb5 100644 --- a/src/nginxconfig/templates/domain_sections/server.vue +++ b/src/nginxconfig/templates/domain_sections/server.vue @@ -49,16 +49,17 @@ THE SOFTWARE. - +
    -
    -
    +
    +
    @@ -58,6 +58,19 @@ THE SOFTWARE.
    + +
    + +
    @@ -134,6 +147,7 @@ THE SOFTWARE. diff --git a/src/nginxconfig/templates/global_sections/security.vue b/src/nginxconfig/templates/global_sections/security.vue index def89f5..f3f73e3 100644 --- a/src/nginxconfig/templates/global_sections/security.vue +++ b/src/nginxconfig/templates/global_sections/security.vue @@ -55,14 +55,13 @@ THE SOFTWARE. :placeholder="$props.data.contentSecurityPolicy.default" /> - +
    + +
    @@ -203,6 +202,9 @@ THE SOFTWARE. hasUnsafeEval() { return this.$props.data.contentSecurityPolicy.computed.includes('\'unsafe-eval\''); }, + hasWarnings() { + return this.hasWordPress && !this.hasUnsafeEval; + }, }, watch: { // Check referrer policy selection is valid