Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1337 Change FileList item title from text to string #1338

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion next/services/graphql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4290,6 +4290,8 @@ export type BlogPostBySlugQuery = {
}
| {
__typename: 'ComponentSectionsFileList'
title?: string | null
text?: string | null
hasBackground?: boolean | null
variantFileList?: Enum_Componentsectionsfilelist_Variant | null
fileList?: Array<{
Expand Down Expand Up @@ -4660,6 +4662,8 @@ export type LatestPostsByTagsQuery = {
}
| {
__typename: 'ComponentSectionsFileList'
title?: string | null
text?: string | null
hasBackground?: boolean | null
variantFileList?: Enum_Componentsectionsfilelist_Variant | null
fileList?: Array<{
Expand Down Expand Up @@ -5231,6 +5235,8 @@ export type BlogPostEntityFragment = {
}
| {
__typename: 'ComponentSectionsFileList'
title?: string | null
text?: string | null
hasBackground?: boolean | null
variantFileList?: Enum_Componentsectionsfilelist_Variant | null
fileList?: Array<{
Expand Down Expand Up @@ -8530,6 +8536,8 @@ export type PageBySlugQuery = {
}
| {
__typename: 'ComponentSectionsFileList'
title?: string | null
text?: string | null
hasBackground?: boolean | null
variantFileList?: Enum_Componentsectionsfilelist_Variant | null
fileList?: Array<{
Expand Down Expand Up @@ -9592,6 +9600,8 @@ export type PageEntityFragment = {
}
| {
__typename: 'ComponentSectionsFileList'
title?: string | null
text?: string | null
hasBackground?: boolean | null
variantFileList?: Enum_Componentsectionsfilelist_Variant | null
fileList?: Array<{
Expand Down Expand Up @@ -11337,6 +11347,8 @@ export type FileBlockFragment = {

export type FileListSectionFragment = {
__typename?: 'ComponentSectionsFileList'
title?: string | null
text?: string | null
hasBackground?: boolean | null
variantFileList?: Enum_Componentsectionsfilelist_Variant | null
fileList?: Array<{
Expand Down Expand Up @@ -12488,6 +12500,8 @@ type Sections_ComponentSectionsFeaturedBlogPosts_Fragment = {

type Sections_ComponentSectionsFileList_Fragment = {
__typename: 'ComponentSectionsFileList'
title?: string | null
text?: string | null
hasBackground?: boolean | null
variantFileList?: Enum_Componentsectionsfilelist_Variant | null
fileList?: Array<{
Expand Down Expand Up @@ -13266,9 +13280,11 @@ export const FileBlockFragmentDoc = gql`
`
export const FileListSectionFragmentDoc = gql`
fragment FileListSection on ComponentSectionsFileList {
title
text
hasBackground
variantFileList: variant
fileList(pagination: { limit: 500 }) {
fileList(pagination: { limit: -1 }) {
...FileBlock
}
}
Expand Down
6 changes: 4 additions & 2 deletions next/services/graphql/queries/Sections.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,12 @@ fragment FileBlock on ComponentBlocksFile {
}

fragment FileListSection on ComponentSectionsFileList {
title # TODO not used yet
text # TODO not used yet
# files # TODO not used yet
hasBackground
variantFileList: variant
# TODO consider limit -1
fileList(pagination: { limit: 500 }) {
fileList(pagination: { limit: -1 }) {
...FileBlock
}
}
Expand Down
15 changes: 11 additions & 4 deletions strapi/src/components/blocks/file.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,27 @@
"collectionName": "components_blocks_files",
"info": {
"displayName": "file",
"icon": "archive"
"icon": "archive",
"description": ""
},
"options": {},
"attributes": {
"title": {
"type": "text"
"type": "string"
},
"category": {
"type": "string"
},
"media": {
"allowedTypes": ["images", "files", "videos", "audios"],
"type": "media",
"multiple": false
"multiple": false,
"required": false,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
]
}
}
}
Loading