kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
fix(front):use privacylevel instead of libraryprivacylevel
rodzic
97becfa65b
commit
33a5dca519
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { BackendError, Application, PrivacyLevel } from '~/types'
|
||||
import type { BackendError, Application, PrivacyLevelEnum } from '~/types'
|
||||
import type { $ElementType } from 'utility-types'
|
||||
|
||||
import axios from 'axios'
|
||||
|
@ -30,7 +30,7 @@ import Section from '~/components/ui/Section.vue'
|
|||
const SETTINGS_ORDER: FieldId[] = ['summary', 'privacy_level']
|
||||
|
||||
type Field = { id: 'summary', type: 'content', value: { text: string, content_type: 'text/markdown' } }
|
||||
| { id: 'privacy_level', type: 'dropdown', choices: PrivacyLevel[], value: string }
|
||||
| { id: 'privacy_level', type: 'dropdown', choices: PrivacyLevelEnum[], value: string }
|
||||
type FieldId = $ElementType<Field, 'id'>
|
||||
|
||||
interface Settings {
|
||||
|
@ -59,7 +59,7 @@ const settings = reactive({
|
|||
id: 'privacy_level',
|
||||
type: 'dropdown',
|
||||
value: store.state.auth.profile?.privacy_level,
|
||||
choices: ['me', 'instance', 'everyone']
|
||||
choices: ['me', 'instance', 'followers', 'everyone']
|
||||
}
|
||||
}
|
||||
} as Settings)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { BackendError, FileSystem, Library, PrivacyLevel } from '~/types'
|
||||
import type { BackendError, FileSystem, Library, LibraryPrivacyLevelEnum } from '~/types'
|
||||
import type { VueUploadItem } from 'vue-upload-component'
|
||||
import type { paths } from '~/generated/types'
|
||||
|
||||
|
@ -79,9 +79,9 @@ const options = {
|
|||
me: sharedLabels.fields.privacy_level.choices.me,
|
||||
instance: sharedLabels.fields.privacy_level.choices.instance,
|
||||
everyone: sharedLabels.fields.privacy_level.choices.everyone
|
||||
} as const satisfies Record<PrivacyLevel, string>
|
||||
} as const satisfies Record<LibraryPrivacyLevelEnum, string>
|
||||
|
||||
const privacyLevel = defineModel<PrivacyLevel | undefined>({ required: true })
|
||||
const privacyLevel = defineModel<LibraryPrivacyLevelEnum | undefined>({ required: true })
|
||||
|
||||
const library = ref<Library>()
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ import type { SmartSearchProps } from '~/composables/navigation/useSmartSearch'
|
|||
import type { OrderingProps } from '~/composables/navigation/useOrdering'
|
||||
import type { RouteRecordName } from 'vue-router'
|
||||
import type { OrderingField } from '~/store/ui'
|
||||
import type { PrivacyLevel } from '~/types'
|
||||
import type { LibraryPrivacyLevelEnum } from '~/types'
|
||||
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
@ -102,7 +102,7 @@ const labels = computed(() => ({
|
|||
searchPlaceholder: t('components.manage.library.LibrariesTable.placeholder.search')
|
||||
}))
|
||||
|
||||
const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
|
||||
const getPrivacyLevelChoice = (privacyLevel: LibraryPrivacyLevelEnum) => {
|
||||
return sharedLabels.fields.privacy_level.shortChoices[privacyLevel]
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup lang="ts">
|
||||
import type { ImportStatus, PrivacyLevel, Upload, BackendResponse } from '~/types'
|
||||
import type { ImportStatus, LibraryPrivacyLevelEnum, Upload, BackendResponse } from '~/types'
|
||||
import type { SmartSearchProps } from '~/composables/navigation/useSmartSearch'
|
||||
import type { OrderingProps } from '~/composables/navigation/useOrdering'
|
||||
import type { RouteRecordName } from 'vue-router'
|
||||
|
@ -120,7 +120,7 @@ const getImportStatusChoice = (importStatus: ImportStatus) => {
|
|||
return sharedLabels.fields.import_status.choices[importStatus]
|
||||
}
|
||||
|
||||
const getPrivacyLevelChoice = (privacyLevel: PrivacyLevel) => {
|
||||
const getPrivacyLevelChoice = (privacyLevel: LibraryPrivacyLevelEnum) => {
|
||||
return sharedLabels.fields.privacy_level.shortChoices[privacyLevel]
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -57,6 +57,7 @@ export type Listening = components['schemas']['Listening']
|
|||
export type Playlist = components['schemas']['Playlist']
|
||||
export type PlaylistTrack = components['schemas']['PlaylistTrack']
|
||||
export type PrivacyLevelEnum = components['schemas']['PrivacyLevelEnum']
|
||||
export type LibraryPrivacyLevelEnum = components['schemas']['LibraryPrivacyLevelEnum']
|
||||
export type Radio = components['schemas']['Radio']
|
||||
export type SearchResult = components['schemas']['SearchResult']
|
||||
export type Tag = components['schemas']['Tag']
|
||||
|
@ -72,7 +73,6 @@ export type UserTrackFavorite = components['schemas']['UserTrackFavorite']
|
|||
|
||||
export type Artist = components['schemas']['Artist']
|
||||
|
||||
export type PrivacyLevel = components['schemas']['LibraryPrivacyLevelEnum']
|
||||
|
||||
export type ImportStatus = components['schemas']['ImportStatusEnum']
|
||||
|
||||
|
@ -187,7 +187,7 @@ export interface User {
|
|||
instance_support_message_display_date: string
|
||||
funkwhale_support_message_display_date: string
|
||||
is_superuser: boolean
|
||||
privacy_level: PrivacyLevel
|
||||
privacy_level: PrivacyLevelEnum
|
||||
}
|
||||
|
||||
// Settings stuff
|
||||
|
|
Ładowanie…
Reference in New Issue