From 09d5d1077da7e37b39433a7eafa1d57105ac2a09 Mon Sep 17 00:00:00 2001 From: Carlos Alcaide Date: Thu, 24 Jun 2021 13:54:42 -0700 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Add=20hidden=20secret=20?= =?UTF-8?q?component?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add hidden secret component adhoc to desktop client. This is the first iteration of the component, expect changes in the near future. --- addons/core/translations/resources/en-us.yaml | 1 + .../app/components/hidden-secret/index.hbs | 11 ++++++++++ ui/desktop/app/styles/app.scss | 12 +++++++++++ .../components/hidden-secret-test.js | 21 +++++++++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 ui/desktop/app/components/hidden-secret/index.hbs create mode 100644 ui/desktop/tests/integration/components/hidden-secret-test.js diff --git a/addons/core/translations/resources/en-us.yaml b/addons/core/translations/resources/en-us.yaml index 888cb980b..dc2560369 100644 --- a/addons/core/translations/resources/en-us.yaml +++ b/addons/core/translations/resources/en-us.yaml @@ -256,3 +256,4 @@ target: add: title: Add Host Sets description: Select host sets to assign to this target. + secret_label: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ diff --git a/ui/desktop/app/components/hidden-secret/index.hbs b/ui/desktop/app/components/hidden-secret/index.hbs new file mode 100644 index 000000000..29cf60afe --- /dev/null +++ b/ui/desktop/app/components/hidden-secret/index.hbs @@ -0,0 +1,11 @@ +
+ {{! TODO: The span wrap within a div because later we will add the toggle secret icon/button}} +
+ {{t 'resources.target.host-set.secret_label'}} +
+ +
\ No newline at end of file diff --git a/ui/desktop/app/styles/app.scss b/ui/desktop/app/styles/app.scss index 00313f9ea..3106e73f4 100644 --- a/ui/desktop/app/styles/app.scss +++ b/ui/desktop/app/styles/app.scss @@ -446,3 +446,15 @@ $chevron-down: url("data:image/svg+xml;utf-8, + `); + + assert.ok(find('.hidden-secret')); + assert.equal( + find('.hidden-secret > div > span').textContent.trim(), + '■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■' + ); + }); +});