display user list insteal of user libraries
This commit is contained in:
parent
5b6cdb3515
commit
1feffad091
|
@ -1,20 +1,20 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Library } from '~/types'
|
import type { Library } from '~/types'
|
||||||
|
|
||||||
import { ref, reactive, onMounted, watch } from 'vue'
|
import { ref, reactive, onMounted, computed, watch } from 'vue'
|
||||||
import { useStore } from '~/store'
|
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import LibraryCard from '~/views/content/remote/Card.vue'
|
|
||||||
import Button from '~/components/ui/Button.vue'
|
import Button from '~/components/ui/Button.vue'
|
||||||
import Section from '~/components/ui/Section.vue'
|
import Section from '~/components/ui/Section.vue'
|
||||||
import Loader from '~/components/ui/Loader.vue'
|
import Loader from '~/components/ui/Loader.vue'
|
||||||
import Alert from '~/components/ui/Alert.vue'
|
import Alert from '~/components/ui/Alert.vue'
|
||||||
import Spacer from '~/components/ui/Spacer.vue'
|
import Spacer from '~/components/ui/Spacer.vue'
|
||||||
|
import ActorLink from '~/components/common/ActorLink.vue'
|
||||||
|
|
||||||
import useErrorHandler from '~/composables/useErrorHandler'
|
import useErrorHandler from '~/composables/useErrorHandler'
|
||||||
|
import Layout from '../ui/Layout.vue'
|
||||||
|
|
||||||
interface Events {
|
interface Events {
|
||||||
(e: 'loaded', libraries: Library[]): void
|
(e: 'loaded', libraries: Library[]): void
|
||||||
|
@ -26,7 +26,6 @@ interface Props {
|
||||||
}
|
}
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const store = useStore()
|
|
||||||
|
|
||||||
const emit = defineEmits<Events>()
|
const emit = defineEmits<Events>()
|
||||||
const props = defineProps<Props>()
|
const props = defineProps<Props>()
|
||||||
|
@ -67,7 +66,6 @@ watch(() => props.url, () => {
|
||||||
<Section
|
<Section
|
||||||
align-left
|
align-left
|
||||||
:h2="title"
|
:h2="title"
|
||||||
:columns-per-item="3"
|
|
||||||
>
|
>
|
||||||
<Loader
|
<Loader
|
||||||
v-if="isLoading"
|
v-if="isLoading"
|
||||||
|
@ -80,14 +78,21 @@ watch(() => props.url, () => {
|
||||||
>
|
>
|
||||||
{{ t('components.federation.LibraryWidget.empty.noMatch') }}
|
{{ t('components.federation.LibraryWidget.empty.noMatch') }}
|
||||||
</Alert>
|
</Alert>
|
||||||
<library-card
|
<Layout
|
||||||
v-for="library in libraries"
|
v-if="!isLoading && libraries.length > 0"
|
||||||
:key="library.uuid"
|
flex
|
||||||
:display-scan="false"
|
>
|
||||||
:display-follow="store.state.auth.authenticated && library.actor.full_username != store.state.auth.fullUsername"
|
{{ t('components.federation.LibraryWidget.main') }}
|
||||||
:initial-library="library"
|
<template
|
||||||
:display-copy-fid="true"
|
v-for="library in libraries"
|
||||||
/>
|
:key="library.uuid"
|
||||||
|
>
|
||||||
|
<ActorLink
|
||||||
|
:actor="library.actor"
|
||||||
|
discrete
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</Layout>
|
||||||
<template v-if="nextPage">
|
<template v-if="nextPage">
|
||||||
<Spacer />
|
<Spacer />
|
||||||
<Button
|
<Button
|
||||||
|
|
|
@ -1414,7 +1414,8 @@
|
||||||
},
|
},
|
||||||
"empty": {
|
"empty": {
|
||||||
"noMatch": "No matching library."
|
"noMatch": "No matching library."
|
||||||
}
|
},
|
||||||
|
"main": "This audio object is present in the audio collection of"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"forms": {
|
"forms": {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Actor } from '~/types'
|
import type { Actor } from '~/types'
|
||||||
|
|
||||||
import LibraryWidget from '~/components/federation/LibraryWidget.vue'
|
|
||||||
import ChannelsWidget from '~/components/audio/ChannelsWidget.vue'
|
import ChannelsWidget from '~/components/audio/ChannelsWidget.vue'
|
||||||
import ChannelForm from '~/components/audio/ChannelForm.vue'
|
import ChannelForm from '~/components/audio/ChannelForm.vue'
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
@ -59,14 +58,6 @@ const createForm = ref()
|
||||||
</div>
|
</div>
|
||||||
</h2>
|
</h2>
|
||||||
<channels-widget :filters="{scope: `actor:${object?.full_username}`}" />
|
<channels-widget :filters="{scope: `actor:${object?.full_username}`}" />
|
||||||
<h2 class="ui with-actions header">
|
|
||||||
{{ t('views.auth.ProfileOverview.header.libraries') }}
|
|
||||||
</h2>
|
|
||||||
<library-widget :url="`federation/actors/${object?.full_username}/libraries/`">
|
|
||||||
<template #title>
|
|
||||||
{{ t('views.auth.ProfileOverview.header.sharedLibraries') }}
|
|
||||||
</template>
|
|
||||||
</library-widget>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Modal
|
<Modal
|
||||||
|
|
Loading…
Reference in New Issue