kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Fix actions computed
rodzic
9e1e2bfa18
commit
7121d514fb
|
@ -36,7 +36,7 @@ const orderingOptions: [OrderingField, keyof typeof sharedLabels.filters][] = [
|
|||
|
||||
const { $pgettext } = useGettext()
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'delete',
|
||||
label: $pgettext('*/*/*/Verb', 'Delete'),
|
||||
|
@ -45,7 +45,7 @@ const actions = [
|
|||
allowAll: false,
|
||||
confirmColor: 'danger'
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const isLoading = ref(false)
|
||||
const fetchData = async () => {
|
||||
|
|
|
@ -34,7 +34,7 @@ const orderingOptions: [OrderingField, keyof typeof sharedLabels.filters][] = [
|
|||
]
|
||||
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = () => [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'delete',
|
||||
label: $pgettext('*/*/*/Verb', 'Delete'),
|
||||
|
@ -43,7 +43,7 @@ const actions = () => [
|
|||
allowAll: false,
|
||||
confirmColor: 'danger'
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const isLoading = ref(false)
|
||||
const fetchData = async () => {
|
||||
|
|
|
@ -36,7 +36,7 @@ const orderingOptions: [OrderingField, keyof typeof sharedLabels.filters][] = [
|
|||
|
||||
const { $pgettext } = useGettext()
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'delete',
|
||||
label: $pgettext('*/*/*/Verb', 'Delete'),
|
||||
|
@ -45,7 +45,7 @@ const actions = [
|
|||
allowAll: false,
|
||||
confirmColor: 'danger'
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const isLoading = ref(false)
|
||||
const fetchData = async () => {
|
||||
|
|
|
@ -39,7 +39,7 @@ const orderingOptions: [OrderingField, keyof typeof sharedLabels.filters][] = [
|
|||
|
||||
const { $pgettext } = useGettext()
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'delete',
|
||||
label: $pgettext('*/*/*/Verb', 'Delete'),
|
||||
|
@ -48,7 +48,7 @@ const actions = [
|
|||
allowAll: false,
|
||||
confirmColor: 'danger'
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const isLoading = ref(false)
|
||||
const fetchData = async () => {
|
||||
|
|
|
@ -34,7 +34,7 @@ const orderingOptions: [OrderingField, keyof typeof sharedLabels.filters][] = [
|
|||
|
||||
const { $pgettext } = useGettext()
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'delete',
|
||||
label: $pgettext('*/*/*/Verb', 'Delete'),
|
||||
|
@ -43,7 +43,7 @@ const actions = [
|
|||
allowAll: false,
|
||||
confirmColor: 'danger'
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const isLoading = ref(false)
|
||||
const fetchData = async () => {
|
||||
|
|
|
@ -42,7 +42,7 @@ const orderingOptions: [OrderingField, keyof typeof sharedLabels.filters][] = [
|
|||
|
||||
const { $pgettext } = useGettext()
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'delete',
|
||||
label: $pgettext('*/*/*/Verb', 'Delete'),
|
||||
|
@ -51,7 +51,7 @@ const actions = [
|
|||
allowAll: false,
|
||||
confirmColor: 'danger'
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const isLoading = ref(false)
|
||||
const fetchData = async () => {
|
||||
|
|
|
@ -38,13 +38,13 @@ const orderingOptions: [OrderingField, keyof typeof sharedLabels.filters][] = [
|
|||
|
||||
const { $pgettext } = useGettext()
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'purge',
|
||||
label: $pgettext('*/*/*/Verb', 'Purge'),
|
||||
isDangerous: true
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const isLoading = ref(false)
|
||||
const fetchData = async () => {
|
||||
|
|
|
@ -37,7 +37,7 @@ const orderingOptions: [OrderingField, keyof typeof sharedLabels.filters][] = [
|
|||
const { $pgettext } = useGettext()
|
||||
const query = ref('')
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'purge',
|
||||
label: $pgettext('*/*/*/Verb', 'Purge'),
|
||||
|
@ -57,7 +57,7 @@ const actions = [
|
|||
return obj.allowed
|
||||
}
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const allowed = ref(null)
|
||||
const isLoading = ref(false)
|
||||
|
@ -70,7 +70,7 @@ const fetchData = async () => {
|
|||
ordering: orderingString.value,
|
||||
allowed: allowed.value,
|
||||
...props.filters
|
||||
}
|
||||
} as Record<string, unknown>
|
||||
|
||||
if (params.allowed === null) {
|
||||
delete params.allowed
|
||||
|
|
|
@ -35,7 +35,7 @@ const query = ref('')
|
|||
const isOpen = ref(false)
|
||||
const { $pgettext } = useGettext()
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'delete',
|
||||
label: $pgettext('*/*/*/Verb', 'Delete'),
|
||||
|
@ -43,7 +43,7 @@ const actions = [
|
|||
return obj.users.length === 0 && moment().isBefore(obj.expiration_date)
|
||||
}
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const isLoading = ref(false)
|
||||
const fetchData = async () => {
|
||||
|
|
|
@ -1,3 +1,22 @@
|
|||
<script setup lang="ts">
|
||||
import ArtistsTable from '~/components/manage/library/ArtistsTable.vue'
|
||||
import { useGettext } from 'vue3-gettext'
|
||||
import { computed } from 'vue'
|
||||
|
||||
interface Props {
|
||||
defaultQuery?: string
|
||||
}
|
||||
|
||||
withDefaults(defineProps<Props>(), {
|
||||
defaultQuery: ''
|
||||
})
|
||||
|
||||
const { $pgettext } = useGettext()
|
||||
const labels = computed(() => ({
|
||||
title: $pgettext('*/*/*/Noun', 'Artists')
|
||||
}))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main v-title="labels.title">
|
||||
<section class="ui vertical stripe segment">
|
||||
|
@ -5,30 +24,12 @@
|
|||
{{ labels.title }}
|
||||
</h2>
|
||||
<div class="ui hidden divider" />
|
||||
|
||||
<artists-table
|
||||
:update-url="true"
|
||||
:default-query="defaultQuery"
|
||||
:ordering-config-name="null"
|
||||
/>
|
||||
</section>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ArtistsTable from '~/components/manage/library/ArtistsTable.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ArtistsTable
|
||||
},
|
||||
props: {
|
||||
defaultQuery: { type: String, required: false, default: '' }
|
||||
},
|
||||
computed: {
|
||||
labels () {
|
||||
return {
|
||||
title: this.$pgettext('*/*/*/Noun', 'Artists')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -48,7 +48,7 @@ const orderingOptions: [OrderingField, keyof typeof sharedLabels.filters][] = [
|
|||
|
||||
const { $pgettext } = useGettext()
|
||||
const actionFilters = computed(() => ({ q: query.value, ...props.filters }))
|
||||
const actions = [
|
||||
const actions = computed(() => [
|
||||
{
|
||||
name: 'delete',
|
||||
label: $pgettext('*/*/*/Verb', 'Delete'),
|
||||
|
@ -66,7 +66,7 @@ const actions = [
|
|||
return filter.import_status !== 'finished'
|
||||
}
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
const emit = defineEmits(['fetch-start'])
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue