mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
feat(settings): Support svg user row action icons
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
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
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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue