From 7121d514fb6c15730f4c28d8bd2cd24292f620e4 Mon Sep 17 00:00:00 2001 From: wvffle Date: Thu, 30 Jun 2022 01:00:03 +0000 Subject: [PATCH] Fix actions computed --- .../components/manage/library/AlbumsTable.vue | 4 +- .../manage/library/ArtistsTable.vue | 4 +- .../manage/library/LibrariesTable.vue | 4 +- .../components/manage/library/TagsTable.vue | 4 +- .../components/manage/library/TracksTable.vue | 4 +- .../manage/library/UploadsTable.vue | 4 +- .../manage/moderation/AccountsTable.vue | 4 +- .../manage/moderation/DomainsTable.vue | 6 +-- .../manage/users/InvitationsTable.vue | 4 +- front/src/views/admin/library/ArtistsList.vue | 41 ++++++++++--------- .../views/content/libraries/FilesTable.vue | 4 +- 11 files changed, 42 insertions(+), 41 deletions(-) diff --git a/front/src/components/manage/library/AlbumsTable.vue b/front/src/components/manage/library/AlbumsTable.vue index 73735f494..a74a3d80f 100644 --- a/front/src/components/manage/library/AlbumsTable.vue +++ b/front/src/components/manage/library/AlbumsTable.vue @@ -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 () => { diff --git a/front/src/components/manage/library/ArtistsTable.vue b/front/src/components/manage/library/ArtistsTable.vue index d1c0edf8a..fd328a3b3 100644 --- a/front/src/components/manage/library/ArtistsTable.vue +++ b/front/src/components/manage/library/ArtistsTable.vue @@ -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 () => { diff --git a/front/src/components/manage/library/LibrariesTable.vue b/front/src/components/manage/library/LibrariesTable.vue index bc5666a1c..1434833fa 100644 --- a/front/src/components/manage/library/LibrariesTable.vue +++ b/front/src/components/manage/library/LibrariesTable.vue @@ -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 () => { diff --git a/front/src/components/manage/library/TagsTable.vue b/front/src/components/manage/library/TagsTable.vue index c3684686a..ad70dee23 100644 --- a/front/src/components/manage/library/TagsTable.vue +++ b/front/src/components/manage/library/TagsTable.vue @@ -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 () => { diff --git a/front/src/components/manage/library/TracksTable.vue b/front/src/components/manage/library/TracksTable.vue index c90a9cac4..1ad7d54af 100644 --- a/front/src/components/manage/library/TracksTable.vue +++ b/front/src/components/manage/library/TracksTable.vue @@ -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 () => { diff --git a/front/src/components/manage/library/UploadsTable.vue b/front/src/components/manage/library/UploadsTable.vue index 0965d23d5..8bf5b8e6f 100644 --- a/front/src/components/manage/library/UploadsTable.vue +++ b/front/src/components/manage/library/UploadsTable.vue @@ -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 () => { diff --git a/front/src/components/manage/moderation/AccountsTable.vue b/front/src/components/manage/moderation/AccountsTable.vue index ba4cb39d9..01a9e94de 100644 --- a/front/src/components/manage/moderation/AccountsTable.vue +++ b/front/src/components/manage/moderation/AccountsTable.vue @@ -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 () => { diff --git a/front/src/components/manage/moderation/DomainsTable.vue b/front/src/components/manage/moderation/DomainsTable.vue index a18521c26..524ab23cd 100644 --- a/front/src/components/manage/moderation/DomainsTable.vue +++ b/front/src/components/manage/moderation/DomainsTable.vue @@ -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 if (params.allowed === null) { delete params.allowed diff --git a/front/src/components/manage/users/InvitationsTable.vue b/front/src/components/manage/users/InvitationsTable.vue index f850b539d..a793dda05 100644 --- a/front/src/components/manage/users/InvitationsTable.vue +++ b/front/src/components/manage/users/InvitationsTable.vue @@ -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 () => { diff --git a/front/src/views/admin/library/ArtistsList.vue b/front/src/views/admin/library/ArtistsList.vue index b78a5a663..dc9682e6d 100644 --- a/front/src/views/admin/library/ArtistsList.vue +++ b/front/src/views/admin/library/ArtistsList.vue @@ -1,3 +1,22 @@ + + - - diff --git a/front/src/views/content/libraries/FilesTable.vue b/front/src/views/content/libraries/FilesTable.vue index 23dbe86d9..c81fc2064 100644 --- a/front/src/views/content/libraries/FilesTable.vue +++ b/front/src/views/content/libraries/FilesTable.vue @@ -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'])