File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
apps/oauth2/src/components Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 2828 <div class =" action-secret" >
2929 <code >{{ renderedSecret }}</code >
3030 <NcButton type =" tertiary-no-background"
31- :aria-label =" t('oauth2', 'Show client secret') "
31+ :aria-label =" toggleAriaLabel "
3232 @click =" toggleSecret" >
3333 <template #icon >
3434 <EyeOutline :size =" 20"
@@ -87,6 +87,18 @@ export default {
8787 return ' ****'
8888 }
8989 },
90+
91+ /**
92+ * toggles the aria-label for button to show the secret key for OAuth 2.0 Clients
93+ */
94+ toggleAriaLabel () {
95+ // if the secret key is not rendered (for examples, !this.rendered == '*******'), then suggest to show the secret key
96+ if (! this .renderSecret ) {
97+ return t (' oauth2' , ' Show client secret' )
98+ } else {
99+ return t (' oauth2' , ' Hide client secret' )
100+ }
101+ }
90102 },
91103 methods: {
92104 toggleSecret () {
You can’t perform that action at this time.
0 commit comments