diff options
author | Christopher Ng <chrng8@gmail.com> | 2024-06-05 14:43:04 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2024-06-06 17:25:50 -0700 |
commit | d32f7d1ff6924451100af0ef541e92f5af61c694 (patch) | |
tree | e2d4718d872e8ef73559476716554abfb05e2cf5 | |
parent | 0310df5d3b7c43352f35a2eef0aa906f1d7d8d93 (diff) | |
download | nextcloud-server-d32f7d1ff6924451100af0ef541e92f5af61c694.tar.gz nextcloud-server-d32f7d1ff6924451100af0ef541e92f5af61c694.zip |
feat(settings): Support svg user row action icons
Signed-off-by: Christopher Ng <chrng8@gmail.com>
-rw-r--r-- | apps/settings/src/components/Users/UserRowActions.vue | 6 | ||||
-rw-r--r-- | package-lock.json | 1 | ||||
-rw-r--r-- | package.json | 1 |
3 files changed, 8 insertions, 0 deletions
diff --git a/apps/settings/src/components/Users/UserRowActions.vue b/apps/settings/src/components/Users/UserRowActions.vue index c3c6b239a0c..1bacd79e8a1 100644 --- a/apps/settings/src/components/Users/UserRowActions.vue +++ b/apps/settings/src/components/Users/UserRowActions.vue @@ -23,6 +23,9 @@ close-after-click @click="(event) => action(event, { ...user })"> {{ text }} + <template v-if="isSvg(icon)" #icon> + <NcIconSvgWrapper :svg="icon" aria-hidden="true" /> + </template> </NcActionButton> </NcActions> </template> @@ -30,6 +33,7 @@ <script lang="ts"> import type { PropType } from 'vue' import { defineComponent } from 'vue' +import isSvg from 'is-svg' import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js' import NcActions from '@nextcloud/vue/dist/Components/NcActions.js' @@ -102,6 +106,8 @@ export default defineComponent({ }, methods: { + isSvg, + /** * Toggle edit mode by emitting the update event */ diff --git a/package-lock.json b/package-lock.json index 80082d670d3..661d4039c42 100644 --- a/package-lock.json +++ b/package-lock.json @@ -49,6 +49,7 @@ "escape-html": "^1.0.3", "focus-trap": "^7.5.4", "handlebars": "^4.7.7", + "is-svg": "^5.0.1", "jquery": "~3.7", "jquery-ui": "^1.13.2", "jquery-ui-dist": "^1.13.2", diff --git a/package.json b/package.json index 504f1ac3244..12fba966911 100644 --- a/package.json +++ b/package.json @@ -76,6 +76,7 @@ "escape-html": "^1.0.3", "focus-trap": "^7.5.4", "handlebars": "^4.7.7", + "is-svg": "^5.0.1", "jquery": "~3.7", "jquery-ui": "^1.13.2", "jquery-ui-dist": "^1.13.2", |