Skip to content

Commit

Permalink
enh(oauth2): allowed toggling of aria label
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Morales <emoral435@gmail.com>
  • Loading branch information
emoral435 authored and backportbot-nextcloud[bot] committed Dec 15, 2023
1 parent 405fef9 commit c8f7970
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
11 changes: 8 additions & 3 deletions apps/oauth2/src/components/OAuthItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,10 @@
<div class="action-secret">
<code>{{ renderedSecret }}</code>
<NcButton type="tertiary-no-background"
:aria-label="t('oauth2', 'Show client secret')"
:aria-label="toggleAriaLabel"
@click="toggleSecret">
<template #icon>
<EyeOutline :size="20"
:title="t('oauth2', 'Show client secret')" />
<EyeOutline :size="20"/>
</template>
</NcButton>
</div>
Expand Down Expand Up @@ -87,6 +86,12 @@ export default {
return '****'
}
},
toggleAriaLabel() {
if (!this.renderSecret) {
return t('oauth2', 'Show client secret')
}
return t('oauth2', 'Hide client secret')
}
},
methods: {
toggleSecret() {
Expand Down
Loading

0 comments on commit c8f7970

Please sign in to comment.