feat: 🎸 Add hidden secret component
Add hidden secret component adhoc to desktop client. This is the first iteration of the component, expect changes in the near future.
This commit is contained in:
1 parent
28963a75cc
commit
09d5d1077d
4 files changed
+45
No files matched your search
@@ -256,3 +256,4 @@ target:
|
||||
add:
|
||||
title: Add Host Sets
|
||||
description: Select host sets to assign to this target.
|
||||
secret_label: ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■
|
||||
@@ -0,0 +1,11 @@
|
||||
<div class='hidden-secret'>
|
||||
{{! TODO: The span wrap within a div because later we will add the toggle secret icon/button}}
|
||||
<div>
|
||||
<span>{{t 'resources.target.host-set.secret_label'}}</span>
|
||||
</div>
|
||||
<Copyable
|
||||
@text={{@secret}}
|
||||
@buttonText={{t 'actions.copy-to-clipboard'}}
|
||||
@acknowledgeText={{t 'states.copied'}}
|
||||
/>
|
||||
</div>
|
||||
@@ -446,3 +446,15 @@ $chevron-down: url("data:image/svg+xml;utf-8,<svg viewBox='0 0 24 24' fill='%231
|
||||
padding: sizing.rems(s);
|
||||
}
|
||||
}
|
||||
|
||||
// Hidden secret component (app/components/hidden-secret)
|
||||
.hidden-secret {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
color: var(--ui-gray-subtler-2);
|
||||
|
||||
.rose-button-ghost {
|
||||
color: var(--ui-gray-subtler-1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import { hbs } from 'ember-cli-htmlbars';
|
||||
|
||||
module('Integration | Component | hidden-secret', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders with a secret', async function (assert) {
|
||||
assert.expect(2);
|
||||
await render(hbs`
|
||||
<HiddenSecret @secret='AAaaBBccDDeeOTXzSMT1234BB_Z8JzG7JkSVxI' />
|
||||
`);
|
||||
|
||||
assert.ok(find('.hidden-secret'));
|
||||
assert.equal(
|
||||
find('.hidden-secret > div > span').textContent.trim(),
|
||||
'■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■ ■'
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user