Skip to content

Commit

Permalink
Merge pull request #42295 from nextcloud/backport/42132/stable28
Browse files Browse the repository at this point in the history
[stable28] enh(oauth2): allowed toggling of aria label
  • Loading branch information
emoral435 authored Dec 15, 2023
2 parents ad1e400 + c8f7970 commit 46f5ab8
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 46f5ab8

Please sign in to comment.