change: split file into viewer and download
This commit is contained in:
parent
8e4a52adb7
commit
75025e81da
7 changed files with 203 additions and 12 deletions
|
@ -24,6 +24,7 @@
|
|||
"dynamic-zone.spacer",
|
||||
"dynamic-zone.section",
|
||||
"dynamic-zone.embedding",
|
||||
"dynamic-zone.file-viewer",
|
||||
"dynamic-zone.file-download",
|
||||
"dynamic-zone.gallery",
|
||||
"dynamic-zone.full-text",
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
"dynamic-zone.spacer",
|
||||
"dynamic-zone.section",
|
||||
"dynamic-zone.embedding",
|
||||
"dynamic-zone.file-viewer",
|
||||
"dynamic-zone.file-download",
|
||||
"dynamic-zone.gallery",
|
||||
"dynamic-zone.full-text",
|
||||
|
|
|
@ -6,16 +6,11 @@
|
|||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"enable_download": {
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"required": true
|
||||
},
|
||||
"file": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": true,
|
||||
"allowedTypes": ["files", "images"]
|
||||
"allowedTypes": ["images", "videos", "audios", "files"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
16
src/components/dynamic-zone/file-viewer.json
Normal file
16
src/components/dynamic-zone/file-viewer.json
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"collectionName": "components_dynamic_zone_file_viewer",
|
||||
"info": {
|
||||
"displayName": "Datei-Anzeige",
|
||||
"description": ""
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"file": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": true,
|
||||
"allowedTypes": ["images", "videos", "audios", "files"]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@
|
|||
"name": "Apache 2.0",
|
||||
"url": "https://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
},
|
||||
"x-generation-date": "2025-02-14T12:28:13.905Z"
|
||||
"x-generation-date": "2025-02-19T12:30:17.145Z"
|
||||
},
|
||||
"x-strapi-config": {
|
||||
"plugins": [
|
||||
|
@ -9538,6 +9538,149 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"DynamicZoneFileViewerComponent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"__component": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"dynamic-zone.file-viewer"
|
||||
]
|
||||
},
|
||||
"file": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"alternativeText": {
|
||||
"type": "string"
|
||||
},
|
||||
"caption": {
|
||||
"type": "string"
|
||||
},
|
||||
"width": {
|
||||
"type": "integer"
|
||||
},
|
||||
"height": {
|
||||
"type": "integer"
|
||||
},
|
||||
"formats": {},
|
||||
"hash": {
|
||||
"type": "string"
|
||||
},
|
||||
"ext": {
|
||||
"type": "string"
|
||||
},
|
||||
"mime": {
|
||||
"type": "string"
|
||||
},
|
||||
"size": {
|
||||
"type": "number",
|
||||
"format": "float"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
},
|
||||
"previewUrl": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"type": "string"
|
||||
},
|
||||
"provider_metadata": {},
|
||||
"related": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"folder": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"folderPath": {
|
||||
"type": "string"
|
||||
},
|
||||
"createdAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updatedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"publishedAt": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"createdBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"updatedBy": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"locale": {
|
||||
"type": "string"
|
||||
},
|
||||
"localizations": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "number"
|
||||
},
|
||||
"documentId": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"DynamicZoneFileDownloadComponent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -9550,9 +9693,6 @@
|
|||
"dynamic-zone.file-download"
|
||||
]
|
||||
},
|
||||
"enable_download": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"file": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -10240,6 +10380,9 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneEmbeddingComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileViewerComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileDownloadComponent"
|
||||
},
|
||||
|
@ -10272,6 +10415,7 @@
|
|||
"dynamic-zone.spacer": "#/components/schemas/DynamicZoneSpacerComponent",
|
||||
"dynamic-zone.section": "#/components/schemas/DynamicZoneSectionComponent",
|
||||
"dynamic-zone.embedding": "#/components/schemas/DynamicZoneEmbeddingComponent",
|
||||
"dynamic-zone.file-viewer": "#/components/schemas/DynamicZoneFileViewerComponent",
|
||||
"dynamic-zone.file-download": "#/components/schemas/DynamicZoneFileDownloadComponent",
|
||||
"dynamic-zone.gallery": "#/components/schemas/DynamicZoneGalleryComponent",
|
||||
"dynamic-zone.full-text": "#/components/schemas/DynamicZoneFullTextComponent",
|
||||
|
@ -10959,6 +11103,9 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneEmbeddingComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileViewerComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileDownloadComponent"
|
||||
},
|
||||
|
@ -10991,6 +11138,7 @@
|
|||
"dynamic-zone.spacer": "#/components/schemas/DynamicZoneSpacerComponent",
|
||||
"dynamic-zone.section": "#/components/schemas/DynamicZoneSectionComponent",
|
||||
"dynamic-zone.embedding": "#/components/schemas/DynamicZoneEmbeddingComponent",
|
||||
"dynamic-zone.file-viewer": "#/components/schemas/DynamicZoneFileViewerComponent",
|
||||
"dynamic-zone.file-download": "#/components/schemas/DynamicZoneFileDownloadComponent",
|
||||
"dynamic-zone.gallery": "#/components/schemas/DynamicZoneGalleryComponent",
|
||||
"dynamic-zone.full-text": "#/components/schemas/DynamicZoneFullTextComponent",
|
||||
|
@ -11192,6 +11340,9 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneEmbeddingComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileViewerComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileDownloadComponent"
|
||||
},
|
||||
|
@ -11224,6 +11375,7 @@
|
|||
"dynamic-zone.spacer": "#/components/schemas/DynamicZoneSpacerComponent",
|
||||
"dynamic-zone.section": "#/components/schemas/DynamicZoneSectionComponent",
|
||||
"dynamic-zone.embedding": "#/components/schemas/DynamicZoneEmbeddingComponent",
|
||||
"dynamic-zone.file-viewer": "#/components/schemas/DynamicZoneFileViewerComponent",
|
||||
"dynamic-zone.file-download": "#/components/schemas/DynamicZoneFileDownloadComponent",
|
||||
"dynamic-zone.gallery": "#/components/schemas/DynamicZoneGalleryComponent",
|
||||
"dynamic-zone.full-text": "#/components/schemas/DynamicZoneFullTextComponent",
|
||||
|
@ -12597,6 +12749,9 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneEmbeddingComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileViewerComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileDownloadComponent"
|
||||
},
|
||||
|
@ -12629,6 +12784,7 @@
|
|||
"dynamic-zone.spacer": "#/components/schemas/DynamicZoneSpacerComponent",
|
||||
"dynamic-zone.section": "#/components/schemas/DynamicZoneSectionComponent",
|
||||
"dynamic-zone.embedding": "#/components/schemas/DynamicZoneEmbeddingComponent",
|
||||
"dynamic-zone.file-viewer": "#/components/schemas/DynamicZoneFileViewerComponent",
|
||||
"dynamic-zone.file-download": "#/components/schemas/DynamicZoneFileDownloadComponent",
|
||||
"dynamic-zone.gallery": "#/components/schemas/DynamicZoneGalleryComponent",
|
||||
"dynamic-zone.full-text": "#/components/schemas/DynamicZoneFullTextComponent",
|
||||
|
@ -12732,6 +12888,9 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneEmbeddingComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileViewerComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileDownloadComponent"
|
||||
},
|
||||
|
@ -12764,6 +12923,7 @@
|
|||
"dynamic-zone.spacer": "#/components/schemas/DynamicZoneSpacerComponent",
|
||||
"dynamic-zone.section": "#/components/schemas/DynamicZoneSectionComponent",
|
||||
"dynamic-zone.embedding": "#/components/schemas/DynamicZoneEmbeddingComponent",
|
||||
"dynamic-zone.file-viewer": "#/components/schemas/DynamicZoneFileViewerComponent",
|
||||
"dynamic-zone.file-download": "#/components/schemas/DynamicZoneFileDownloadComponent",
|
||||
"dynamic-zone.gallery": "#/components/schemas/DynamicZoneGalleryComponent",
|
||||
"dynamic-zone.full-text": "#/components/schemas/DynamicZoneFullTextComponent",
|
||||
|
@ -12845,6 +13005,9 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneEmbeddingComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileViewerComponent"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/DynamicZoneFileDownloadComponent"
|
||||
},
|
||||
|
@ -12877,6 +13040,7 @@
|
|||
"dynamic-zone.spacer": "#/components/schemas/DynamicZoneSpacerComponent",
|
||||
"dynamic-zone.section": "#/components/schemas/DynamicZoneSectionComponent",
|
||||
"dynamic-zone.embedding": "#/components/schemas/DynamicZoneEmbeddingComponent",
|
||||
"dynamic-zone.file-viewer": "#/components/schemas/DynamicZoneFileViewerComponent",
|
||||
"dynamic-zone.file-download": "#/components/schemas/DynamicZoneFileDownloadComponent",
|
||||
"dynamic-zone.gallery": "#/components/schemas/DynamicZoneGalleryComponent",
|
||||
"dynamic-zone.full-text": "#/components/schemas/DynamicZoneFullTextComponent",
|
||||
|
|
15
types/generated/components.d.ts
vendored
15
types/generated/components.d.ts
vendored
|
@ -43,8 +43,18 @@ export interface DynamicZoneFileDownload extends Struct.ComponentSchema {
|
|||
displayName: "Datei-Download";
|
||||
};
|
||||
attributes: {
|
||||
enable_download: Schema.Attribute.Boolean & Schema.Attribute.Required & Schema.Attribute.DefaultTo<true>;
|
||||
file: Schema.Attribute.Media<"files" | "images"> & Schema.Attribute.Required;
|
||||
file: Schema.Attribute.Media<"images" | "videos" | "audios" | "files"> & Schema.Attribute.Required;
|
||||
};
|
||||
}
|
||||
|
||||
export interface DynamicZoneFileViewer extends Struct.ComponentSchema {
|
||||
collectionName: "components_dynamic_zone_file_viewer";
|
||||
info: {
|
||||
description: "";
|
||||
displayName: "Datei-Anzeige";
|
||||
};
|
||||
attributes: {
|
||||
file: Schema.Attribute.Media<"images" | "videos" | "audios" | "files"> & Schema.Attribute.Required;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -243,6 +253,7 @@ declare module "@strapi/strapi" {
|
|||
"dynamic-zone.dual-column-text": DynamicZoneDualColumnText;
|
||||
"dynamic-zone.embedding": DynamicZoneEmbedding;
|
||||
"dynamic-zone.file-download": DynamicZoneFileDownload;
|
||||
"dynamic-zone.file-viewer": DynamicZoneFileViewer;
|
||||
"dynamic-zone.full-image": DynamicZoneFullImage;
|
||||
"dynamic-zone.full-text": DynamicZoneFullText;
|
||||
"dynamic-zone.gallery": DynamicZoneGallery;
|
||||
|
|
3
types/generated/contentTypes.d.ts
vendored
3
types/generated/contentTypes.d.ts
vendored
|
@ -465,6 +465,7 @@ export interface ApiHomepageHomepage extends Struct.SingleTypeSchema {
|
|||
"dynamic-zone.spacer",
|
||||
"dynamic-zone.section",
|
||||
"dynamic-zone.embedding",
|
||||
"dynamic-zone.file-viewer",
|
||||
"dynamic-zone.file-download",
|
||||
"dynamic-zone.gallery",
|
||||
"dynamic-zone.full-text",
|
||||
|
@ -531,6 +532,7 @@ export interface ApiPagePage extends Struct.CollectionTypeSchema {
|
|||
"dynamic-zone.spacer",
|
||||
"dynamic-zone.section",
|
||||
"dynamic-zone.embedding",
|
||||
"dynamic-zone.file-viewer",
|
||||
"dynamic-zone.file-download",
|
||||
"dynamic-zone.gallery",
|
||||
"dynamic-zone.full-text",
|
||||
|
@ -548,6 +550,7 @@ export interface ApiPagePage extends Struct.CollectionTypeSchema {
|
|||
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||
localizations: Schema.Attribute.Relation<"oneToMany", "api::page.page"> & Schema.Attribute.Private;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
ref_only_access: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo<false>;
|
||||
slug: Schema.Attribute.UID<"identifier"> & Schema.Attribute.Required;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<"oneToOne", "admin::user"> & Schema.Attribute.Private;
|
||||
|
|
Loading…
Add table
Reference in a new issue