Add label field
This commit is contained in:
parent
241e795ff7
commit
1e4fbd08d6
1 changed files with 15 additions and 6 deletions
|
|
@ -9,16 +9,24 @@ export const releaseType = defineType({
|
|||
defineField({ name: 'name', type: 'string' }),
|
||||
defineField({ name: 'albumArtist', type: 'string' }),
|
||||
defineField({ name: 'albumCover', type: 'image' }),
|
||||
defineField({ name: 'label', title: 'Label', type: 'string',
|
||||
options: {
|
||||
list: [
|
||||
{title: 'TRPTK', value: 'trptk'},
|
||||
{title: 'Other', value: 'other'},
|
||||
],
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
orderings: [
|
||||
{
|
||||
title: 'Catalog No (A → Z)',
|
||||
title: 'Cat. No. (Asc.)',
|
||||
name: 'catalogNoAsc',
|
||||
by: [{field: 'catalogNo', direction: 'asc'}],
|
||||
},
|
||||
{
|
||||
title: 'Catalog No (Z → A)',
|
||||
title: 'Cat. No. (Desc.)',
|
||||
name: 'catalogNoDesc',
|
||||
by: [{field: 'catalogNo', direction: 'desc'}],
|
||||
},
|
||||
|
|
@ -27,13 +35,14 @@ export const releaseType = defineType({
|
|||
preview: {
|
||||
select: {
|
||||
title: 'name',
|
||||
subtitle: 'catalogNo',
|
||||
artist: 'albumArtist',
|
||||
catNo: 'catalogNo',
|
||||
media: 'albumCover',
|
||||
},
|
||||
prepare({title, subtitle, media}) {
|
||||
prepare({title, artist, catNo, media}) {
|
||||
return {
|
||||
title: title || '(Untitled release)',
|
||||
subtitle: subtitle ? `Catalog: ${subtitle}` : '',
|
||||
title: `${title} • ${catNo}` || '(Untitled release)',
|
||||
subtitle: artist ? artist : '',
|
||||
media,
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue