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: 'name', type: 'string' }),
|
||||||
defineField({ name: 'albumArtist', type: 'string' }),
|
defineField({ name: 'albumArtist', type: 'string' }),
|
||||||
defineField({ name: 'albumCover', type: 'image' }),
|
defineField({ name: 'albumCover', type: 'image' }),
|
||||||
|
defineField({ name: 'label', title: 'Label', type: 'string',
|
||||||
|
options: {
|
||||||
|
list: [
|
||||||
|
{title: 'TRPTK', value: 'trptk'},
|
||||||
|
{title: 'Other', value: 'other'},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
|
|
||||||
orderings: [
|
orderings: [
|
||||||
{
|
{
|
||||||
title: 'Catalog No (A → Z)',
|
title: 'Cat. No. (Asc.)',
|
||||||
name: 'catalogNoAsc',
|
name: 'catalogNoAsc',
|
||||||
by: [{field: 'catalogNo', direction: 'asc'}],
|
by: [{field: 'catalogNo', direction: 'asc'}],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: 'Catalog No (Z → A)',
|
title: 'Cat. No. (Desc.)',
|
||||||
name: 'catalogNoDesc',
|
name: 'catalogNoDesc',
|
||||||
by: [{field: 'catalogNo', direction: 'desc'}],
|
by: [{field: 'catalogNo', direction: 'desc'}],
|
||||||
},
|
},
|
||||||
|
|
@ -27,13 +35,14 @@ export const releaseType = defineType({
|
||||||
preview: {
|
preview: {
|
||||||
select: {
|
select: {
|
||||||
title: 'name',
|
title: 'name',
|
||||||
subtitle: 'catalogNo',
|
artist: 'albumArtist',
|
||||||
|
catNo: 'catalogNo',
|
||||||
media: 'albumCover',
|
media: 'albumCover',
|
||||||
},
|
},
|
||||||
prepare({title, subtitle, media}) {
|
prepare({title, artist, catNo, media}) {
|
||||||
return {
|
return {
|
||||||
title: title || '(Untitled release)',
|
title: `${title} • ${catNo}` || '(Untitled release)',
|
||||||
subtitle: subtitle ? `Catalog: ${subtitle}` : '',
|
subtitle: artist ? artist : '',
|
||||||
media,
|
media,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue