Browse Source

Rename on entity classes: Link -> Links

Alex Siman 5 years ago
parent
commit
eafb135839

+ 2 - 2
packages/joy-media/src/schemas/general/FeaturedContent.ts

@@ -69,7 +69,7 @@ export const FeaturedContentClass: FeaturedContentClassType = {
     "name": "Featured Videos",
     "description": "Videos featured in the Video tab.",
     "type": "InternalVec",
-    "maxItems": 6,
+    "maxItems": 12,
     "classId": "Video"
   },
   featuredAlbums: {
@@ -77,7 +77,7 @@ export const FeaturedContentClass: FeaturedContentClassType = {
     "name": "Featured Albums",
     "description": "Music albums featured in the Music tab.",
     "type": "InternalVec",
-    "maxItems": 6,
+    "maxItems": 12,
     "classId": "Music Album"
   }
 };

+ 9 - 9
packages/joy-media/src/schemas/music/MusicAlbum.ts

@@ -51,7 +51,7 @@ export type MusicAlbumFormValues = {
   theme: number
   tracks: number[]
   language: number
-  link: string[]
+  links: string[]
   lyrics: string
   composerOrSongwriter: string
   reviews: string[]
@@ -77,7 +77,7 @@ export type MusicAlbumType = {
   theme?: MusicThemeType
   tracks?: MusicTrackType[]
   language?: LanguageType
-  link?: string[]
+  links?: string[]
   lyrics?: string
   composerOrSongwriter?: string
   reviews?: string[]
@@ -104,7 +104,7 @@ export function MusicAlbumToFormValues(entity?: MusicAlbumType): MusicAlbumFormV
     theme: entity && entity.theme?.id || 0,
     tracks: entity && entity.tracks?.map(x => x.id) || [],
     language: entity && entity.language?.id || 0,
-    link: entity && entity.link || [],
+    links: entity && entity.links || [],
     lyrics: entity && entity.lyrics || '',
     composerOrSongwriter: entity && entity.composerOrSongwriter || '',
     reviews: entity && entity.reviews || [],
@@ -128,7 +128,7 @@ export type MusicAlbumPropId =
   'theme' |
   'tracks' |
   'language' |
-  'link' |
+  'links' |
   'lyrics' |
   'composerOrSongwriter' |
   'reviews' |
@@ -232,10 +232,10 @@ export const MusicAlbumClass: MusicAlbumClassType = {
     "type": "Internal",
     "classId": "Language"
   },
-  link: {
-    "id": "link",
-    "name": "Link",
-    "description": "Links to the artist or album site or social media pages.",
+  links: {
+    "id": "links",
+    "name": "Links",
+    "description": "Links to the artist or album site, or social media pages.",
     "type": "TextVec",
     "maxItems": 5,
     "maxTextLength": 255
@@ -302,7 +302,7 @@ export const MusicAlbumClass: MusicAlbumClassType = {
   channelId: {
     "id": "channelId",
     "name": "Channel Id",
-    "description": "Id of the channel this music album is published to.",
+    "description": "Id of the channel this album is published under.",
     "type": "Uint64"
   }
 };

+ 9 - 9
packages/joy-media/src/schemas/music/MusicTrack.ts

@@ -49,7 +49,7 @@ export type MusicTrackFormValues = {
   genre: number
   mood: number
   theme: number
-  link: string[]
+  links: string[]
   composerOrSongwriter: string
   lyrics: string
   object: number
@@ -74,7 +74,7 @@ export type MusicTrackType = {
   genre?: MusicGenreType
   mood?: MusicMoodType
   theme?: MusicThemeType
-  link?: string[]
+  links?: string[]
   composerOrSongwriter?: string
   lyrics?: string
   object?: MediaObjectType
@@ -100,7 +100,7 @@ export function MusicTrackToFormValues(entity?: MusicTrackType): MusicTrackFormV
     genre: entity && entity.genre?.id || 0,
     mood: entity && entity.mood?.id || 0,
     theme: entity && entity.theme?.id || 0,
-    link: entity && entity.link || [],
+    links: entity && entity.links || [],
     composerOrSongwriter: entity && entity.composerOrSongwriter || '',
     lyrics: entity && entity.lyrics || '',
     object: entity && entity.object?.id || 0,
@@ -123,7 +123,7 @@ export type MusicTrackPropId =
   'genre' |
   'mood' |
   'theme' |
-  'link' |
+  'links' |
   'composerOrSongwriter' |
   'lyrics' |
   'object' |
@@ -217,10 +217,10 @@ export const MusicTrackClass: MusicTrackClassType = {
     "type": "Internal",
     "classId": "Music Theme"
   },
-  link: {
-    "id": "link",
-    "name": "Link",
-    "description": "A link to the artist page.",
+  links: {
+    "id": "links",
+    "name": "Links",
+    "description": "Links to the artist site or social media pages.",
     "type": "TextVec",
     "maxItems": 5,
     "maxTextLength": 255
@@ -286,7 +286,7 @@ export const MusicTrackClass: MusicTrackClassType = {
   channelId: {
     "id": "channelId",
     "name": "Channel Id",
-    "description": "Id of the channel this music track is published to.",
+    "description": "Id of the channel this track is published under.",
     "type": "Uint64"
   }
 };

+ 9 - 9
packages/joy-media/src/schemas/video/Video.ts

@@ -38,7 +38,7 @@ export type VideoFormValues = {
   language: number
   firstReleased: string
   category: number
-  link: string[]
+  links: string[]
   object: number
   publicationStatus: number
   curationStatus: number
@@ -58,7 +58,7 @@ export type VideoType = {
   language: LanguageType
   firstReleased: number
   category?: VideoCategoryType
-  link?: string[]
+  links?: string[]
   object?: MediaObjectType
   publicationStatus: PublicationStatusType
   curationStatus?: CurationStatusType
@@ -79,7 +79,7 @@ export function VideoToFormValues(entity?: VideoType): VideoFormValues {
     language: entity && entity.language?.id || 0,
     firstReleased: entity && moment(entity.firstReleased * 1000).format('YYYY-MM-DD') || '',
     category: entity && entity.category?.id || 0,
-    link: entity && entity.link || [],
+    links: entity && entity.links || [],
     object: entity && entity.object?.id || 0,
     publicationStatus: entity && entity.publicationStatus?.id || 0,
     curationStatus: entity && entity.curationStatus?.id || 0,
@@ -97,7 +97,7 @@ export type VideoPropId =
   'language' |
   'firstReleased' |
   'category' |
-  'link' |
+  'links' |
   'object' |
   'publicationStatus' |
   'curationStatus' |
@@ -169,10 +169,10 @@ export const VideoClass: VideoClassType = {
     "type": "Internal",
     "classId": "Video Category"
   },
-  link: {
-    "id": "link",
-    "name": "Link",
-    "description": "A link to the creators page.",
+  links: {
+    "id": "links",
+    "name": "Links",
+    "description": "Links to the creators pages.",
     "type": "TextVec",
     "maxItems": 5,
     "maxTextLength": 255
@@ -224,7 +224,7 @@ export const VideoClass: VideoClassType = {
   channelId: {
     "id": "channelId",
     "name": "Channel Id",
-    "description": "Id of the channel this video is published to.",
+    "description": "Id of the channel this video is published under.",
     "type": "Uint64"
   }
 };

+ 2 - 2
packages/joy-media/src/upload/UploadVideo.tsx

@@ -336,7 +336,7 @@ const InnerForm = (props: MediaFormProps<OuterProps, FormValues>) => {
 
   const additionalTab = () => <Tab.Pane as='div'>
     <MediaDropdown field={Fields.category} options={opts.videoCategoryOptions} {...props} />
-    <MediaText field={Fields.link} {...props} />
+    <MediaText field={Fields.links} {...props} />
     <MediaText field={Fields.attribution} {...props} />
   </Tab.Pane>
 
@@ -360,7 +360,7 @@ const InnerForm = (props: MediaFormProps<OuterProps, FormValues>) => {
       render: additionalTab,
       fields: [
         Fields.category,
-        Fields.link,
+        Fields.links,
         Fields.attribution,
       ]
     }

+ 1 - 1
packages/joy-media/src/video/PlayVideo.tsx

@@ -71,7 +71,7 @@ export function PlayVideo (props: PlayVideoProps) {
         {metaField(Fields.category, video.category?.value)}
         {metaField(Fields.license, video.license?.value)}
         {metaField(Fields.attribution, video.attribution)}
-        {metaField(Fields.link, printLinks(video.link))}
+        {metaField(Fields.links, printLinks(video.links))}
         {metaField(Fields.curationStatus, video.curationStatus?.value)}
       </Table.Body>
     </Table>