aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/components/Users/UserRowActions.vue
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2023-07-07 11:31:23 -0700
committerChristopher Ng <chrng8@gmail.com>2023-07-12 17:30:11 -0700
commitcbfe0c67e9072f18bb40b795032d47f1639decb9 (patch)
tree8090c18f58dd0f4794f0265907c5edc218af44df /apps/settings/src/components/Users/UserRowActions.vue
parent97a93c73cec09a72cf035e9f70a62d4396b09e82 (diff)
downloadnextcloud-server-cbfe0c67e9072f18bb40b795032d47f1639decb9.tar.gz
nextcloud-server-cbfe0c67e9072f18bb40b795032d47f1639decb9.zip
enh(a11y): Users table
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/settings/src/components/Users/UserRowActions.vue')
-rw-r--r--apps/settings/src/components/Users/UserRowActions.vue48
1 files changed, 41 insertions, 7 deletions
diff --git a/apps/settings/src/components/Users/UserRowActions.vue b/apps/settings/src/components/Users/UserRowActions.vue
index ad89528fda7..4da5fd402fc 100644
--- a/apps/settings/src/components/Users/UserRowActions.vue
+++ b/apps/settings/src/components/Users/UserRowActions.vue
@@ -1,18 +1,44 @@
+<!--
+ - @copyright 2023 Ferdinand Thiessen <opensource@fthiessen.de>
+ -
+ - @author Christopher Ng <chrng8@gmail.com>
+ - @author Ferdinand Thiessen <opensource@fthiessen.de>
+ -
+ - @license AGPL-3.0-or-later
+ -
+ - This program is free software: you can redistribute it and/or modify
+ - it under the terms of the GNU Affero General Public License as
+ - published by the Free Software Foundation, either version 3 of the
+ - License, or (at your option) any later version.
+ -
+ - This program is distributed in the hope that it will be useful,
+ - but WITHOUT ANY WARRANTY; without even the implied warranty of
+ - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ - GNU Affero General Public License for more details.
+ -
+ - You should have received a copy of the GNU Affero General Public License
+ - along with this program. If not, see <http://www.gnu.org/licenses/>.
+ -
+-->
+
<template>
<NcActions :aria-label="t('settings', 'Toggle user actions menu')"
+ :disabled="disabled"
:inline="1">
- <NcActionButton @click="toggleEdit">
+ <NcActionButton :disabled="disabled"
+ @click="toggleEdit">
{{ edit ? t('settings', 'Done') : t('settings', 'Edit') }}
<template #icon>
- <NcIconSvgWrapper :svg="editSvg" aria-hidden="true" />
+ <NcIconSvgWrapper :key="editSvg" :svg="editSvg" aria-hidden="true" />
</template>
</NcActionButton>
- <NcActionButton v-for="(action, index) in actions"
+ <NcActionButton v-for="({ action, icon, text }, index) in actions"
:key="index"
- :aria-label="action.text"
- :icon="action.icon"
- @click="action.action">
- {{ action.text }}
+ :disabled="disabled"
+ :aria-label="text"
+ :icon="icon"
+ @click="action">
+ {{ text }}
</NcActionButton>
</NcActions>
</template>
@@ -49,6 +75,14 @@ export default defineComponent({
},
/**
+ * The state whether the row is currently disabled
+ */
+ disabled: {
+ type: Boolean,
+ required: true,
+ },
+
+ /**
* The state whether the row is currently edited
*/
edit: {