feat(settings): Support svg user row action icons

Signed-off-by: Christopher Ng <chrng8@gmail.com>
pull/45684/head
Christopher Ng 2024-06-05 14:43:04 +07:00
parent 0310df5d3b
commit d32f7d1ff6
3 changed files with 8 additions and 0 deletions

@ -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
*/

1
package-lock.json generated

@ -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",

@ -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",