fix: 🐛 Fix style and accessibility issues for hidden secret

Fix style and accessibility issues for hidden secret component
This commit is contained in:
Carlos Alcaide committed 2021-07-20 13:28:39 -07:00
1 parent 7f5a792af4
commit 699d5063d9
3 files changed
+19 -13

No files matched your search

@@ -267,6 +267,8 @@ target:
add:
title: Add Host Sets
description: Select host sets to assign to this target.
secret:
toggle: Toggle secret visibility.
credential-store:
title: Credential Store
title_plural: Credential Stores
@@ -1,9 +1,11 @@
<div class='hidden-secret'>
<Rose::Icon
@name={{if this.isHidden 'visibility-show' 'visibility-hide'}}
@size='medium'
<Rose::Button
@style='ghost'
@iconOnly={{if this.isHidden 'visibility-show' 'visibility-hide'}}
{{on 'click' this.toggleSecretVisibility}}
/>
>
{{t 'resources.target.secret.toggle'}}
</Rose::Button>
<Copyable
@text={{@secret}}
@buttonText={{t 'actions.copy-to-clipboard'}}
@@ -12,7 +14,7 @@
{{#if this.isHidden}}
{{@secret}}
{{else}}
{{this.textMask}}
<span class='secret-mask'>{{this.textMask}}</span>
{{/if}}
</Copyable>
</div>
+10 -8
View File
@@ -478,20 +478,22 @@ $chevron-down: url("data:image/svg+xml;utf-8,<svg viewBox='0 0 24 24' fill='%231
.hidden-secret {
display: flex;
align-items: center;
color: var(--ui-gray-subtler-2);
.rose-icon {
margin-top: sizing.rems(xxxs);
margin-right: sizing.rems(s);
}
.copyable {
display: flex;
width: 100%;
justify-content: space-between;
.secret-mask {
color: var(--ui-gray-subtler-2);
}
.rose-button-ghost { // Copyable button icon.
color: var(--ui-gray-subtler-1);
}
}
.rose-button-ghost {
color: var(--ui-gray-subtler-1);
.rose-button-ghost { // Hide/Show secret button icon.
color: var(--ui-gray);
}
}