Workaround vuejs/core/pull/4512
This commit is contained in:
parent
77594351ae
commit
8d5464c28e
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import RadioButton from '~/components/radios/Button.vue'
|
import RadioButton from '~/components/radios/Button.vue'
|
||||||
|
@ -17,6 +18,9 @@ import { OrderingField } from '~/store/ui'
|
||||||
|
|
||||||
interface Props extends OrderingProps {
|
interface Props extends OrderingProps {
|
||||||
defaultPage?: number
|
defaultPage?: number
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import qs from 'qs'
|
import qs from 'qs'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
|
@ -20,6 +21,9 @@ interface Props extends OrderingProps {
|
||||||
defaultQuery?: string
|
defaultQuery?: string
|
||||||
defaultTags?: string[]
|
defaultTags?: string[]
|
||||||
scope?: string
|
scope?: string
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import qs from 'qs'
|
import qs from 'qs'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
|
@ -20,6 +21,9 @@ interface Props extends OrderingProps {
|
||||||
defaultQuery?: string
|
defaultQuery?: string
|
||||||
defaultTags?: string[]
|
defaultTags?: string[]
|
||||||
scope?: string
|
scope?: string
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import qs from 'qs'
|
import qs from 'qs'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
|
@ -23,6 +24,9 @@ interface Props extends OrderingProps {
|
||||||
defaultQuery?: string
|
defaultQuery?: string
|
||||||
defaultTags?: string[]
|
defaultTags?: string[]
|
||||||
scope?: string
|
scope?: string
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
|
|
||||||
|
@ -18,6 +19,9 @@ interface Props extends OrderingProps {
|
||||||
|
|
||||||
defaultQuery?: string
|
defaultQuery?: string
|
||||||
scope?: string
|
scope?: string
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -12,6 +13,11 @@ import useOrdering, { OrderingProps } from '~/composables/useOrdering'
|
||||||
interface Props extends SmartSearchProps, OrderingProps {
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -13,6 +14,11 @@ interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): Remove from EVERY SINGLE component that does not use it at all
|
// TODO (wvffle): Remove from EVERY SINGLE component that does not use it at all
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -21,6 +27,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
filters: () => ({})
|
filters: () => ({})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
type ResponseType = { count: number, results: any[] }
|
type ResponseType = { count: number, results: any[] }
|
||||||
|
@ -91,7 +99,7 @@ const labels = computed(() => ({
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui six wide field">
|
<div class="ui six wide field">
|
||||||
<label for="albums-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="albums-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="albums-search"
|
id="albums-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -12,6 +13,11 @@ import { OrderingField } from '~/store/ui'
|
||||||
interface Props extends SmartSearchProps, OrderingProps {
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -20,6 +26,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
filters: () => ({})
|
filters: () => ({})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
type ResponseType = { count: number, results: any[] }
|
type ResponseType = { count: number, results: any[] }
|
||||||
|
@ -94,7 +102,7 @@ const getUrl = (artist: { channel?: number; id: number }) => {
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui six wide field">
|
<div class="ui six wide field">
|
||||||
<label for="artists-serarch"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="artists-serarch"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="artists-search"
|
id="artists-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import { uniq } from 'lodash-es'
|
import { uniq } from 'lodash-es'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
|
@ -14,6 +15,11 @@ import { useGettext } from 'vue3-gettext'
|
||||||
interface Props extends SmartSearchProps, OrderingProps {
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -23,6 +29,7 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
})
|
})
|
||||||
|
|
||||||
const configs = useEditConfigs()
|
const configs = useEditConfigs()
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
|
@ -148,7 +155,7 @@ const getCurrentState = (target?: StateTarget): object => {
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui field">
|
<div class="ui field">
|
||||||
<label for="search-edits"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="search-edits"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="search-edits"
|
id="search-edits"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
@ -233,7 +240,7 @@ const getCurrentState = (target?: StateTarget): object => {
|
||||||
>
|
>
|
||||||
<div class="ui loader" />
|
<div class="ui loader" />
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="result?.count > 0">
|
<div v-else-if="(result?.count ?? 0) > 0">
|
||||||
<edit-card
|
<edit-card
|
||||||
v-for="obj in result?.results ?? []"
|
v-for="obj in result?.results ?? []"
|
||||||
:key="obj.uuid"
|
:key="obj.uuid"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { PrivacyLevel } from '~/types'
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -12,6 +14,11 @@ import { useGettext } from 'vue3-gettext'
|
||||||
interface Props extends SmartSearchProps, OrderingProps {
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -20,6 +27,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
filters: () => ({})
|
filters: () => ({})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
type ResponseType = { count: number, results: any[] }
|
type ResponseType = { count: number, results: any[] }
|
||||||
|
@ -81,6 +90,10 @@ const sharedLabels = useSharedLabels()
|
||||||
const labels = computed(() => ({
|
const labels = computed(() => ({
|
||||||
searchPlaceholder: $pgettext('Content/Search/Input.Placeholder', 'Search by domain, actor, name, description…')
|
searchPlaceholder: $pgettext('Content/Search/Input.Placeholder', 'Search by domain, actor, name, description…')
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
|
||||||
|
return sharedLabels.fields.privacy_level.shortChoices[privacyLevel]
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -89,7 +102,7 @@ const labels = computed(() => ({
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui six wide field">
|
<div class="ui six wide field">
|
||||||
<label for="libraries-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="libraries-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="libraries-search"
|
id="libraries-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
@ -213,9 +226,7 @@ const labels = computed(() => ({
|
||||||
</translate>
|
</translate>
|
||||||
</th>
|
</th>
|
||||||
</template>
|
</template>
|
||||||
<template
|
<template #row-cells="scope">
|
||||||
#row-cells="scope"
|
|
||||||
>
|
|
||||||
<td>
|
<td>
|
||||||
<router-link :to="{name: 'manage.library.libraries.detail', params: {id: scope.obj.uuid }}">
|
<router-link :to="{name: 'manage.library.libraries.detail', params: {id: scope.obj.uuid }}">
|
||||||
{{ scope.obj.name }}
|
{{ scope.obj.name }}
|
||||||
|
@ -258,10 +269,10 @@ const labels = computed(() => ({
|
||||||
<a
|
<a
|
||||||
href=""
|
href=""
|
||||||
class="discrete link"
|
class="discrete link"
|
||||||
:title="sharedLabels.fields.privacy_level.shortChoices[scope.obj.privacy_level]"
|
:title="getPrivacyLevelChoice(scope.obj.privacy_level)"
|
||||||
@click.prevent="addSearchToken('privacy_level', scope.obj.privacy_level)"
|
@click.prevent="addSearchToken('privacy_level', scope.obj.privacy_level)"
|
||||||
>
|
>
|
||||||
{{ sharedLabels.fields.privacy_level.shortChoices[scope.obj.privacy_level] }}
|
{{ getPrivacyLevelChoice(scope.obj.privacy_level) }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -14,6 +15,11 @@ import { useGettext } from 'vue3-gettext'
|
||||||
interface Props extends SmartSearchProps, OrderingProps {
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -22,6 +28,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
filters: () => ({})
|
filters: () => ({})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
type ResponseType = { count: number, results: any[] }
|
type ResponseType = { count: number, results: any[] }
|
||||||
|
@ -96,7 +104,7 @@ const showUploadDetailModal = ref(false)
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui six wide field">
|
<div class="ui six wide field">
|
||||||
<label for="tags-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="tags-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="tags-search"
|
id="tags-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -12,6 +13,11 @@ import { OrderingField } from '~/store/ui'
|
||||||
interface Props extends SmartSearchProps, OrderingProps {
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -20,6 +26,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
filters: () => ({})
|
filters: () => ({})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
type ResponseType = { count: number, results: any[] }
|
type ResponseType = { count: number, results: any[] }
|
||||||
|
@ -87,7 +95,7 @@ const labels = computed(() => ({
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui six wide field">
|
<div class="ui six wide field">
|
||||||
<label for="tracks-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="tracks-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="tracks-search"
|
id="tracks-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ImportStatus, PrivacyLevel } from '~/types'
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -15,6 +17,11 @@ import { Upload } from '~/types'
|
||||||
interface Props extends SmartSearchProps, OrderingProps {
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -23,6 +30,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
filters: () => ({})
|
filters: () => ({})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
type ResponseType = { count: number, results: any[] }
|
type ResponseType = { count: number, results: any[] }
|
||||||
|
@ -94,6 +103,14 @@ const displayName = (upload: Upload): string => {
|
||||||
|
|
||||||
const detailedUpload = ref({})
|
const detailedUpload = ref({})
|
||||||
const showUploadDetailModal = ref(false)
|
const showUploadDetailModal = ref(false)
|
||||||
|
|
||||||
|
const getImportStatusChoice = (importStatus: ImportStatus) => {
|
||||||
|
return sharedLabels.fields.import_status.choices[importStatus]
|
||||||
|
}
|
||||||
|
|
||||||
|
const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
|
||||||
|
return sharedLabels.fields.privacy_level.shortChoices[privacyLevel]
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -102,7 +119,7 @@ const showUploadDetailModal = ref(false)
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui six wide field">
|
<div class="ui six wide field">
|
||||||
<label for="uploads-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="uploads-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="uploads-search"
|
id="uploads-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
@ -332,20 +349,20 @@ const showUploadDetailModal = ref(false)
|
||||||
<a
|
<a
|
||||||
href=""
|
href=""
|
||||||
class="discrete link"
|
class="discrete link"
|
||||||
:title="sharedLabels.fields.privacy_level.shortChoices[scope.obj.library.privacy_level]"
|
:title="getPrivacyLevelChoice(scope.obj.library.privacy_level)"
|
||||||
@click.prevent="addSearchToken('privacy_level', scope.obj.library.privacy_level)"
|
@click.prevent="addSearchToken('privacy_level', scope.obj.library.privacy_level)"
|
||||||
>
|
>
|
||||||
{{ sharedLabels.fields.privacy_level.shortChoices[scope.obj.library.privacy_level] }}
|
{{ getPrivacyLevelChoice(scope.obj.library.privacy_level) }}
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a
|
<a
|
||||||
href=""
|
href=""
|
||||||
class="discrete link"
|
class="discrete link"
|
||||||
:title="sharedLabels.fields.import_status.choices[scope.obj.import_status].help"
|
:title="getImportStatusChoice(scope.obj.import_status).help"
|
||||||
@click.prevent="addSearchToken('status', scope.obj.import_status)"
|
@click.prevent="addSearchToken('status', scope.obj.import_status)"
|
||||||
>
|
>
|
||||||
{{ sharedLabels.fields.import_status.choices[scope.obj.import_status].label }}
|
{{ getImportStatusChoice(scope.obj.import_status).label }}
|
||||||
</a>
|
</a>
|
||||||
<button
|
<button
|
||||||
class="ui tiny basic icon button"
|
class="ui tiny basic icon button"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -12,6 +13,11 @@ import { OrderingField } from '~/store/ui'
|
||||||
interface Props extends SmartSearchProps, OrderingProps {
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -20,6 +26,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
filters: () => ({})
|
filters: () => ({})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
type ResponseType = { count: number, results: any[] }
|
type ResponseType = { count: number, results: any[] }
|
||||||
|
@ -88,7 +96,7 @@ const labels = computed(() => ({
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui six wide field">
|
<div class="ui six wide field">
|
||||||
<label for="accounts-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="accounts-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="accounts-search"
|
id="accounts-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -13,6 +14,9 @@ interface Props extends OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
allowListEnabled?: boolean
|
allowListEnabled?: boolean
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
|
@ -13,6 +14,9 @@ import { OrderingField } from '~/store/ui'
|
||||||
interface Props extends OrderingProps {
|
interface Props extends OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ActionTable from '~/components/common/ActionTable.vue'
|
import ActionTable from '~/components/common/ActionTable.vue'
|
||||||
|
@ -12,6 +13,9 @@ import { useGettext } from 'vue3-gettext'
|
||||||
interface Props extends OrderingProps {
|
interface Props extends OrderingProps {
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
filters?: object
|
filters?: object
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { gettext } from '~/init/locale'
|
import { gettext } from '~/init/locale'
|
||||||
|
import { PrivacyLevel, ImportStatus } from '~/types'
|
||||||
|
|
||||||
const { $pgettext } = gettext
|
const { $pgettext } = gettext
|
||||||
|
|
||||||
|
@ -11,12 +12,12 @@ export default () => ({
|
||||||
me: $pgettext('Content/Settings/Dropdown', 'Nobody except me'),
|
me: $pgettext('Content/Settings/Dropdown', 'Nobody except me'),
|
||||||
instance: $pgettext('Content/Settings/Dropdown', 'Everyone on this instance'),
|
instance: $pgettext('Content/Settings/Dropdown', 'Everyone on this instance'),
|
||||||
everyone: $pgettext('Content/Settings/Dropdown', 'Everyone, across all instances')
|
everyone: $pgettext('Content/Settings/Dropdown', 'Everyone, across all instances')
|
||||||
},
|
} as Record<PrivacyLevel, string>,
|
||||||
shortChoices: {
|
shortChoices: {
|
||||||
me: $pgettext('Content/Settings/Dropdown/Short', 'Private'),
|
me: $pgettext('Content/Settings/Dropdown/Short', 'Private'),
|
||||||
instance: $pgettext('Content/Settings/Dropdown/Short', 'Instance'),
|
instance: $pgettext('Content/Settings/Dropdown/Short', 'Instance'),
|
||||||
everyone: $pgettext('Content/Settings/Dropdown/Short', 'Everyone')
|
everyone: $pgettext('Content/Settings/Dropdown/Short', 'Everyone')
|
||||||
}
|
} as Record<PrivacyLevel, string>
|
||||||
},
|
},
|
||||||
import_status: {
|
import_status: {
|
||||||
detailTitle: $pgettext('Content/Library/Link.Title', 'Click to display more information about the import process for this upload'),
|
detailTitle: $pgettext('Content/Library/Link.Title', 'Click to display more information about the import process for this upload'),
|
||||||
|
@ -41,7 +42,7 @@ export default () => ({
|
||||||
label: $pgettext('Content/Library/*', 'Finished'),
|
label: $pgettext('Content/Library/*', 'Finished'),
|
||||||
help: $pgettext('Content/Library/Help text', 'Imported')
|
help: $pgettext('Content/Library/Help text', 'Imported')
|
||||||
}
|
}
|
||||||
}
|
} as Record<ImportStatus, { label: string, help: string }>
|
||||||
},
|
},
|
||||||
report_type: {
|
report_type: {
|
||||||
label: $pgettext('*/*/*', 'Category'),
|
label: $pgettext('*/*/*', 'Category'),
|
||||||
|
|
|
@ -108,6 +108,8 @@ export interface Channel {
|
||||||
downloads_count: number
|
downloads_count: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type PrivacyLevel = 'everyone' | 'instance' | 'me'
|
||||||
|
|
||||||
export interface Library {
|
export interface Library {
|
||||||
id: string
|
id: string
|
||||||
uuid: string
|
uuid: string
|
||||||
|
@ -117,16 +119,17 @@ export interface Library {
|
||||||
uploads_count: number
|
uploads_count: number
|
||||||
size: number
|
size: number
|
||||||
description: string
|
description: string
|
||||||
privacy_level: 'everyone' | 'instance' | 'me'
|
privacy_level: PrivacyLevel
|
||||||
creation_date: string
|
creation_date: string
|
||||||
follow?: LibraryFollow
|
follow?: LibraryFollow
|
||||||
latest_scan: LibraryScan
|
latest_scan: LibraryScan
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ImportStatus = 'scanning' | 'pending' | 'finished' | 'errored' | 'draft' | 'skipped'
|
||||||
export interface LibraryScan {
|
export interface LibraryScan {
|
||||||
processed_files: number
|
processed_files: number
|
||||||
total_files: number
|
total_files: number
|
||||||
status: 'scanning' | 'pending' | 'finished' | 'errored'
|
status: ImportStatus
|
||||||
errored_files: number
|
errored_files: number
|
||||||
modification_date: string
|
modification_date: string
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import ReportCard from '~/components/manage/moderation/ReportCard.vue'
|
import ReportCard from '~/components/manage/moderation/ReportCard.vue'
|
||||||
|
@ -14,6 +15,11 @@ import { OrderingField } from '~/store/ui'
|
||||||
interface Props extends SmartSearchProps, OrderingProps {
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
// TODO (wvffle): find more types
|
// TODO (wvffle): find more types
|
||||||
mode?: 'card'
|
mode?: 'card'
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -22,6 +28,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
mode: 'card'
|
mode: 'card'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
type ResponseType = { count: number, results: any[] }
|
type ResponseType = { count: number, results: any[] }
|
||||||
|
@ -93,7 +101,7 @@ const labels = computed(() => ({
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui field">
|
<div class="ui field">
|
||||||
<label for="reports-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="reports-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="reports-search"
|
id="reports-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
import UserRequestCard from '~/components/manage/moderation/UserRequestCard.vue'
|
import UserRequestCard from '~/components/manage/moderation/UserRequestCard.vue'
|
||||||
|
@ -10,13 +11,20 @@ import { OrderingField } from '~/store/ui'
|
||||||
import { useGettext } from 'vue3-gettext'
|
import { useGettext } from 'vue3-gettext'
|
||||||
import { useStore } from '~/store'
|
import { useStore } from '~/store'
|
||||||
|
|
||||||
interface Props extends SmartSearchProps, OrderingProps {}
|
interface Props extends SmartSearchProps, OrderingProps {
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
defaultQuery: '',
|
defaultQuery: '',
|
||||||
updateUrl: false
|
updateUrl: false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
// TODO (wvffle): Make sure everything is it's own type
|
// TODO (wvffle): Make sure everything is it's own type
|
||||||
const page = ref(1)
|
const page = ref(1)
|
||||||
type ResponseType = { count: number, results: any[] }
|
type ResponseType = { count: number, results: any[] }
|
||||||
|
@ -88,7 +96,7 @@ const labels = computed(() => ({
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
<div class="ui field">
|
<div class="ui field">
|
||||||
<label for="requests-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
<label for="requests-search"><translate translate-context="Content/Search/Input.Label/Noun">Search</translate></label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="requests-search"
|
id="requests-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { ImportStatus } from '~/types'
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import time from '~/utils/time'
|
import time from '~/utils/time'
|
||||||
import Pagination from '~/components/vui/Pagination.vue'
|
import Pagination from '~/components/vui/Pagination.vue'
|
||||||
|
@ -18,8 +20,15 @@ interface Props extends SmartSearchProps, OrderingProps {
|
||||||
needsRefresh?: boolean
|
needsRefresh?: boolean
|
||||||
// TODO (wvffle): find object type
|
// TODO (wvffle): find object type
|
||||||
customObjects?: any[]
|
customObjects?: any[]
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
|
defaultQuery?: string
|
||||||
|
updateUrl?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const search = ref()
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
defaultQuery: '',
|
defaultQuery: '',
|
||||||
updateUrl: false,
|
updateUrl: false,
|
||||||
|
@ -110,6 +119,10 @@ const labels = computed(() => ({
|
||||||
|
|
||||||
const detailedUpload = ref({})
|
const detailedUpload = ref({})
|
||||||
const showUploadDetailModal = ref(false)
|
const showUploadDetailModal = ref(false)
|
||||||
|
|
||||||
|
const getImportStatusChoice = (importStatus: ImportStatus) => {
|
||||||
|
return sharedLabels.fields.import_status.choices[importStatus]
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
@ -120,7 +133,7 @@ const showUploadDetailModal = ref(false)
|
||||||
<label for="files-search">
|
<label for="files-search">
|
||||||
<translate translate-context="Content/Search/Input.Label/Noun">Search</translate>
|
<translate translate-context="Content/Search/Input.Label/Noun">Search</translate>
|
||||||
</label>
|
</label>
|
||||||
<form @submit.prevent="query = $refs.search.value">
|
<form @submit.prevent="query = search.value">
|
||||||
<input
|
<input
|
||||||
id="files-search"
|
id="files-search"
|
||||||
ref="search"
|
ref="search"
|
||||||
|
@ -327,9 +340,9 @@ const showUploadDetailModal = ref(false)
|
||||||
<a
|
<a
|
||||||
href=""
|
href=""
|
||||||
class="discrete link"
|
class="discrete link"
|
||||||
:title="sharedLabels.fields.import_status.choices[scope.obj.import_status].help"
|
:title="getImportStatusChoice(scope.obj.import_status).help"
|
||||||
@click.prevent="addSearchToken('status', scope.obj.import_status)"
|
@click.prevent="addSearchToken('status', scope.obj.import_status)"
|
||||||
>{{ sharedLabels.fields.import_status.choices[scope.obj.import_status].label }}</a>
|
>{{ getImportStatusChoice(scope.obj.import_status).label }}</a>
|
||||||
<button
|
<button
|
||||||
class="ui tiny basic icon button"
|
class="ui tiny basic icon button"
|
||||||
:title="sharedLabels.fields.import_status.detailTitle"
|
:title="sharedLabels.fields.import_status.detailTitle"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { RouteWithPreferences } from '~/store/ui'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import $ from 'jquery'
|
import $ from 'jquery'
|
||||||
import { computed, ref, watch, onMounted } from 'vue'
|
import { computed, ref, watch, onMounted } from 'vue'
|
||||||
|
@ -16,6 +17,9 @@ interface Props extends OrderingProps {
|
||||||
defaultPage?: number
|
defaultPage?: number
|
||||||
defaultQuery?: string
|
defaultQuery?: string
|
||||||
scope?: string
|
scope?: string
|
||||||
|
|
||||||
|
// TODO(wvffle): Remove after https://github.com/vuejs/core/pull/4512 is merged
|
||||||
|
orderingConfigName: RouteWithPreferences | null
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
@ -198,7 +202,7 @@ const labels = computed(() => ({
|
||||||
:playlists="result.results"
|
:playlists="result.results"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-else-if="result && !result.results.length > 0"
|
v-else-if="result && result.results.length === 0"
|
||||||
class="ui placeholder segment sixteen wide column"
|
class="ui placeholder segment sixteen wide column"
|
||||||
style="text-align: center; display: flex; align-items: center"
|
style="text-align: center; display: flex; align-items: center"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue