From 040cabec23423a588f6a115f6e652d5a845120d8 Mon Sep 17 00:00:00 2001 From: Matt Cowley Date: Wed, 31 May 2023 21:04:41 +0100 Subject: [PATCH] Add warning for ssl off directive during Cerbox setup (#431) Co-authored-by: David Carlson Berg --- .../de/templates/setup_sections/certbot.js | 3 ++- .../en/templates/setup_sections/certbot.js | 3 ++- .../es/templates/setup_sections/certbot.js | 3 ++- .../fr/templates/setup_sections/certbot.js | 3 ++- .../ja/templates/setup_sections/certbot.js | 3 ++- .../pl/templates/setup_sections/certbot.js | 3 ++- .../pt-br/templates/setup_sections/certbot.js | 3 ++- .../ru/templates/setup_sections/certbot.js | 3 ++- .../zh-cn/templates/setup_sections/certbot.js | 3 ++- .../zh-tw/templates/setup_sections/certbot.js | 3 ++- src/nginxconfig/scss/_code.scss | 18 +++++++++++++++++- .../templates/domain_sections/presets.vue | 6 +++--- .../templates/global_sections/security.vue | 4 ++-- .../templates/setup_sections/certbot.vue | 9 ++++++++- 14 files changed, 50 insertions(+), 17 deletions(-) diff --git a/src/nginxconfig/i18n/de/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/de/templates/setup_sections/certbot.js index 15fbbc6..4d52e70 100644 --- a/src/nginxconfig/i18n/de/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/de/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `Kommentiere ${common.ssl}-relevante Direktiven in deiner Konfiguration aus:`, + sslOffDeprecationWarning: `This command will add a temporary ssl off directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate reloadYourNginxServer: `Führe einen reload deines ${common.nginx} Server aus:`, obtainSslCertificatesFromLetsEncrypt: `Erhalte ${common.ssl} Zertifikate von ${common.letsEncrypt} mittels ${certbot}:`, uncommentSslDirectivesInConfiguration: `Kommentiere ${common.ssl}-relevante Direktiven in deiner Konfiguration ein:`, diff --git a/src/nginxconfig/i18n/en/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/en/templates/setup_sections/certbot.js index bfbc168..68dd0f4 100644 --- a/src/nginxconfig/i18n/en/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/en/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `Comment out ${common.ssl} related directives in the configuration:`, + sslOffDeprecationWarning: `This command will add a temporary ssl off directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, reloadYourNginxServer: `Reload your ${common.nginx} server:`, obtainSslCertificatesFromLetsEncrypt: `Obtain ${common.ssl} certificates from ${common.letsEncrypt} using ${certbot}:`, uncommentSslDirectivesInConfiguration: `Uncomment ${common.ssl} related directives in the configuration:`, diff --git a/src/nginxconfig/i18n/es/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/es/templates/setup_sections/certbot.js index 9bee1b5..30579f9 100644 --- a/src/nginxconfig/i18n/es/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/es/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `Comente las directivas relacionadas con ${common.ssl} en la configuración:`, + sslOffDeprecationWarning: `This command will add a temporary ssl off directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate reloadYourNginxServer: `Recargar el ${common.nginx}:`, obtainSslCertificatesFromLetsEncrypt: `Obtenga los certificados ${common.ssl} de ${common.letsEncrypt} usando ${certbot}:`, uncommentSslDirectivesInConfiguration: `Comente las directivas relacionadas con ${common.ssl} en la configuración:`, diff --git a/src/nginxconfig/i18n/fr/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/fr/templates/setup_sections/certbot.js index dad4e8c..5161c56 100644 --- a/src/nginxconfig/i18n/fr/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/fr/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `Commentez les directives relatives à ${common.ssl}:`, + sslOffDeprecationWarning: `Cette commande ajoutera une directive temporaire ssl off pour s'assurer que les directives ${common.ssl} ne sont pas actives. Cela peut amener ${common.nginx} à émettre un avertissement, qui peut être ignoré en toute sécurité. La directive sera supprimée une fois que ${certbot} sera configuré.`, reloadYourNginxServer: `Relancez le serveur ${common.nginx}:`, obtainSslCertificatesFromLetsEncrypt: `Obtenez les certificats ${common.ssl} de ${common.letsEncrypt} à l'aide de ${certbot}:`, uncommentSslDirectivesInConfiguration: `Décommentez les directives relatives à ${common.ssl}:`, diff --git a/src/nginxconfig/i18n/ja/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/ja/templates/setup_sections/certbot.js index fdfa458..59a624e 100644 --- a/src/nginxconfig/i18n/ja/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/ja/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2022 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `設定中の ${common.ssl} 関連ディレクティブをコメントアウトします:`, + sslOffDeprecationWarning: `This command will add a temporary ssl off directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate reloadYourNginxServer: `${common.nginx} サーバをリロードします:`, obtainSslCertificatesFromLetsEncrypt: `${certbot} を利用して、 ${common.ssl} 証明書を ${common.letsEncrypt} から取得します:`, uncommentSslDirectivesInConfiguration: `設定中の ${common.ssl} 関連ディレクティブのコメントアウトを外します:`, diff --git a/src/nginxconfig/i18n/pl/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/pl/templates/setup_sections/certbot.js index c16e2e0..91c26b3 100644 --- a/src/nginxconfig/i18n/pl/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/pl/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `Zakomentuj dyrektywy związane z ${common.ssl} w pliku konfiguracyjnym:`, + sslOffDeprecationWarning: `This command will add a temporary ssl off directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate reloadYourNginxServer: `Przeładuj usługę ${common.nginx}:`, obtainSslCertificatesFromLetsEncrypt: `Uzysjak certyfikat ${common.ssl} od ${common.letsEncrypt} za pomocą ${certbot}:`, uncommentSslDirectivesInConfiguration: `Odkomentuj dyrektywy związane z ${common.ssl} w pliku konfiguracyjnym:`, diff --git a/src/nginxconfig/i18n/pt-br/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/pt-br/templates/setup_sections/certbot.js index 7fe37c1..c9d1c39 100644 --- a/src/nginxconfig/i18n/pt-br/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/pt-br/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `Comente as diretivas relacionadas ao ${common.ssl} na configuração:`, + sslOffDeprecationWarning: `This command will add a temporary ssl off directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate reloadYourNginxServer: `Recarregue seu servidor ${common.nginx}:`, obtainSslCertificatesFromLetsEncrypt: `Obtenha certificados ${common.ssl} de ${common.letsEncrypt} usando o ${certbot}:`, uncommentSslDirectivesInConfiguration: `Descomente as diretivas relacionadas ao ${common.ssl} na configuração:`, diff --git a/src/nginxconfig/i18n/ru/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/ru/templates/setup_sections/certbot.js index 7f478ce..4497c14 100644 --- a/src/nginxconfig/i18n/ru/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/ru/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2021 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `Закомментируйте директивы, связанные с ${common.ssl} в конфигурации:`, + sslOffDeprecationWarning: `This command will add a temporary ssl off directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate reloadYourNginxServer: `Перезагрузите свой ${common.nginx} сервер:`, obtainSslCertificatesFromLetsEncrypt: `Получите ${common.ssl} сертификат ${common.letsEncrypt} используя ${certbot}:`, uncommentSslDirectivesInConfiguration: `Раскомментируйте директивы, связанные с ${common.ssl} в конфигурации:`, diff --git a/src/nginxconfig/i18n/zh-cn/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/zh-cn/templates/setup_sections/certbot.js index cdd0841..f6d3392 100644 --- a/src/nginxconfig/i18n/zh-cn/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/zh-cn/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `注释掉配置中的${common.ssl}相关指令:`, + sslOffDeprecationWarning: `This command will add a temporary ssl off directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate reloadYourNginxServer: `重新加载你的${common.nginx}服务器:`, obtainSslCertificatesFromLetsEncrypt: `使用${certbot}从 ${common.letsEncrypt} 获得${common.ssl}证书:`, uncommentSslDirectivesInConfiguration: `在配置中取消注释${common.ssl}相关指令:`, diff --git a/src/nginxconfig/i18n/zh-tw/templates/setup_sections/certbot.js b/src/nginxconfig/i18n/zh-tw/templates/setup_sections/certbot.js index 8e62d32..f597d5d 100644 --- a/src/nginxconfig/i18n/zh-tw/templates/setup_sections/certbot.js +++ b/src/nginxconfig/i18n/zh-tw/templates/setup_sections/certbot.js @@ -1,5 +1,5 @@ /* -Copyright 2022 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -30,6 +30,7 @@ const certbot = 'Certbot'; export default { commentOutSslDirectivesInConfiguration: `註解掉設定中的 ${common.ssl} 相關指令:`, + sslOffDeprecationWarning: `This command will add a temporary ssl off directive to ensure that ${common.ssl} directives are not active. This may cause ${common.nginx} to emit a warning, which is safe to ignore. The directive will be removed once ${certbot} is configured.`, // TODO: translate reloadYourNginxServer: `重新載入您的 ${common.nginx} 伺服器:`, obtainSslCertificatesFromLetsEncrypt: `使用 ${certbot} 從 ${common.letsEncrypt} 取得 ${common.ssl} 憑證:`, uncommentSslDirectivesInConfiguration: `在設定中取消註解 ${common.ssl} 相關指令:`, diff --git a/src/nginxconfig/scss/_code.scss b/src/nginxconfig/scss/_code.scss index 03bb695..b738129 100644 --- a/src/nginxconfig/scss/_code.scss +++ b/src/nginxconfig/scss/_code.scss @@ -1,5 +1,5 @@ /* -Copyright 2020 DigitalOcean +Copyright 2023 DigitalOcean This code is licensed under the MIT License. You may obtain a copy of the License at @@ -63,6 +63,22 @@ pre { .code-toolbar { > .toolbar { right: calc(.2em + 16px); + + > .toolbar-item { + > button { + background: rgba($input, .9); + border: 1px solid $input-border; + color: rgba($input-border, .75); + cursor: pointer; + transition: color $transition, background $transition; + + &:hover, + &:focus { + background: $input; + color: $input-border; + } + } + } } } diff --git a/src/nginxconfig/templates/domain_sections/presets.vue b/src/nginxconfig/templates/domain_sections/presets.vue index 8acd126..1d6401f 100644 --- a/src/nginxconfig/templates/domain_sections/presets.vue +++ b/src/nginxconfig/templates/domain_sections/presets.vue @@ -1,5 +1,5 @@