Browse Source

Merge pull request #42132 from nextcloud/fix/client-secret-aria

enh(oauth2): allowed toggling of aria label
pull/42298/head
Eduardo Morales 2 years ago
committed by GitHub
parent
commit
29763f0c16
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      apps/oauth2/src/components/OAuthItem.vue
  2. 4
      dist/oauth2-oauth2.js
  3. 2
      dist/oauth2-oauth2.js.map

11
apps/oauth2/src/components/OAuthItem.vue

@ -28,11 +28,10 @@
<div class="action-secret"> <div class="action-secret">
<code>{{ renderedSecret }}</code> <code>{{ renderedSecret }}</code>
<NcButton type="tertiary-no-background" <NcButton type="tertiary-no-background"
:aria-label="t('oauth2', 'Show client secret')"
:aria-label="toggleAriaLabel"
@click="toggleSecret"> @click="toggleSecret">
<template #icon> <template #icon>
<EyeOutline :size="20"
:title="t('oauth2', 'Show client secret')" />
<EyeOutline :size="20"/>
</template> </template>
</NcButton> </NcButton>
</div> </div>
@ -87,6 +86,12 @@ export default {
return '****' return '****'
} }
}, },
toggleAriaLabel() {
if (!this.renderSecret) {
return t('oauth2', 'Show client secret')
}
return t('oauth2', 'Hide client secret')
}
}, },
methods: { methods: {
toggleSecret() { toggleSecret() {

4
dist/oauth2-oauth2.js
File diff suppressed because it is too large
View File

2
dist/oauth2-oauth2.js.map
File diff suppressed because it is too large
View File

Loading…
Cancel
Save