fix(front): minor type and format fixes
This commit is contained in:
parent
8b23d02978
commit
45d18dc493
|
@ -1,7 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
import { type operations } from '~/generated/types.ts'
|
import type { components, operations } from '~/generated/types.ts'
|
||||||
|
|
||||||
import PlayButton from '~/components/audio/PlayButton.vue'
|
import PlayButton from '~/components/audio/PlayButton.vue'
|
||||||
import Card from '~/components/ui/Card.vue'
|
import Card from '~/components/ui/Card.vue'
|
||||||
|
@ -13,7 +13,7 @@ const albums = ref([] as Album[])
|
||||||
const tracks = ref([] as Track[])
|
const tracks = ref([] as Track[])
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
artist: Artist;
|
artist: Artist | components['schemas']['ArtistWithAlbums'];
|
||||||
}
|
}
|
||||||
|
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
|
@ -56,10 +56,10 @@ const { artist } = props
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span v-if="artist.content_category === 'music'">
|
<span v-if="artist.content_category === 'music' && 'tracks_count' in artist">
|
||||||
{{ t('components.audio.artist.Card.meta.tracks', artist.tracks_count) }}
|
{{ t('components.audio.artist.Card.meta.tracks', artist.tracks_count) }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else-if="'tracks_count' in artist">
|
||||||
{{ t('components.audio.artist.Card.meta.episodes', artist.tracks_count) }}
|
{{ t('components.audio.artist.Card.meta.episodes', artist.tracks_count) }}
|
||||||
</span>
|
</span>
|
||||||
<Spacer style="flex-grow: 1" />
|
<Spacer style="flex-grow: 1" />
|
||||||
|
|
|
@ -68,9 +68,8 @@ export type Cover = components['schemas']['CoverField']
|
||||||
export type RateLimitStatus = components['schemas']['RateLimit']['scopes'][number]
|
export type RateLimitStatus = components['schemas']['RateLimit']['scopes'][number]
|
||||||
export type PaginatedAlbumList = components['schemas']['PaginatedAlbumList']
|
export type PaginatedAlbumList = components['schemas']['PaginatedAlbumList']
|
||||||
export type PaginatedChannelList = components['schemas']['PaginatedChannelList']
|
export type PaginatedChannelList = components['schemas']['PaginatedChannelList']
|
||||||
export type SimpleArtist = components['schemas']['SimpleArtist']
|
|
||||||
|
|
||||||
export type Artist = components['schemas']['SimpleArtist']
|
export type Artist = components['schemas']['Artist']
|
||||||
|
|
||||||
export type PrivacyLevel = components['schemas']['LibraryPrivacyLevelEnum']
|
export type PrivacyLevel = components['schemas']['LibraryPrivacyLevelEnum']
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ const channelUpload = ref()
|
||||||
<template>
|
<template>
|
||||||
<Modal
|
<Modal
|
||||||
v-model="isOpen"
|
v-model="isOpen"
|
||||||
:cancel="t('components.channels.UploadModal.button.cancel')"
|
:cancel="t('components.channels.UploadModal.button.close')"
|
||||||
:title="modalTitle"
|
:title="modalTitle"
|
||||||
>
|
>
|
||||||
<!-- Page content -->
|
<!-- Page content -->
|
||||||
|
@ -181,6 +181,7 @@ const channelUpload = ref()
|
||||||
v-if="channelUpload"
|
v-if="channelUpload"
|
||||||
:on-click="() => channelUpload.publish()"
|
:on-click="() => channelUpload.publish()"
|
||||||
>
|
>
|
||||||
|
<!-- Set update import_metadata from 'draft' to 'public' -->
|
||||||
{{ t('components.channels.UploadModal.button.publish') }}
|
{{ t('components.channels.UploadModal.button.publish') }}
|
||||||
</Button>
|
</Button>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -167,7 +167,7 @@ const updatePolicy = (newPolicy: InstancePolicy) => {
|
||||||
<Layout flex>
|
<Layout flex>
|
||||||
<h2 class="ui header">
|
<h2 class="ui header">
|
||||||
<i class="bi-person-circle" />
|
<i class="bi-person-circle" />
|
||||||
{{ object.full_username }}
|
{{ object.full_username }}
|
||||||
<div class="sub header">
|
<div class="sub header">
|
||||||
<template v-if="object.user">
|
<template v-if="object.user">
|
||||||
<span class="ui tiny accent label">
|
<span class="ui tiny accent label">
|
||||||
|
|
|
@ -31,7 +31,7 @@ fetchNodeInfo()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- TODO: Replace with Tabs component -->
|
<!-- TODO: Replace with Tabs component -->
|
||||||
<Layout
|
<Layout
|
||||||
v-title="labels.moderation"
|
v-title="labels.moderation"
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in New Issue