diff --git a/models/attachment/src/index.ts b/models/attachment/src/index.ts index 163ce99ac9..87ed96ec97 100644 --- a/models/attachment/src/index.ts +++ b/models/attachment/src/index.ts @@ -241,6 +241,10 @@ export function createModel (builder: Builder): void { { _class: 1 } ] }) + + builder.mixin(attachment.class.Drawing, core.class.Class, view.mixin.ObjectPresenter, { + presenter: attachment.component.DrawingPresenter + }) } export default attachment diff --git a/packages/presentation/lang/cs.json b/packages/presentation/lang/cs.json index bfdee2bce8..9c8abdbdd9 100644 --- a/packages/presentation/lang/cs.json +++ b/packages/presentation/lang/cs.json @@ -34,7 +34,8 @@ "FailedToPreview": "Náhled se nezdařil", "ContentType": "Typ obsahu", "ContentTypeNotSupported": "Náhled není dostupný pro tento typ obsahu", - "StartDrawing": "Načmárejte" + "StartDrawing": "Načmárejte", + "DrawingHistory": "Čmárání historie" }, "status": { "FileTooLarge": "Soubor je příliš velký" diff --git a/packages/presentation/lang/en.json b/packages/presentation/lang/en.json index 3bf9c961cd..0d31fff8f0 100644 --- a/packages/presentation/lang/en.json +++ b/packages/presentation/lang/en.json @@ -34,7 +34,8 @@ "FailedToPreview": "Failed to preview", "ContentType": "Content type", "ContentTypeNotSupported": "Preview is not available for this content type", - "StartDrawing": "Scribble over" + "StartDrawing": "Scribble over", + "DrawingHistory": "Scribble history" }, "status": { "FileTooLarge": "File too large" diff --git a/packages/presentation/lang/es.json b/packages/presentation/lang/es.json index 3f22269188..14d938443e 100644 --- a/packages/presentation/lang/es.json +++ b/packages/presentation/lang/es.json @@ -34,7 +34,8 @@ "FailedToPreview": "Error al previsualizar", "ContentType": "Tipo de contenido", "ContentTypeNotSupported": "La vista previa no está disponible para este tipo de contenido", - "StartDrawing": "Garabatear encima" + "StartDrawing": "Garabatear encima", + "DrawingHistory": "Historia de garabatos" }, "status": { "FileTooLarge": "Archivo demasiado grande" diff --git a/packages/presentation/lang/fr.json b/packages/presentation/lang/fr.json index 0d450533f9..c8ddbc4c9c 100644 --- a/packages/presentation/lang/fr.json +++ b/packages/presentation/lang/fr.json @@ -34,7 +34,8 @@ "FailedToPreview": "Échec de l'aperçu", "ContentType": "Type de contenu", "ContentTypeNotSupported": "L'aperçu n'est pas disponible pour ce type de contenu", - "StartDrawing": "Gribouiller dessus" + "StartDrawing": "Gribouiller dessus", + "DrawingHistory": "Histoire de gribouillage" }, "status": { "FileTooLarge": "Fichier trop volumineux" diff --git a/packages/presentation/lang/it.json b/packages/presentation/lang/it.json index 9c761f9d0b..213bff86bb 100644 --- a/packages/presentation/lang/it.json +++ b/packages/presentation/lang/it.json @@ -34,7 +34,8 @@ "FailedToPreview": "Impossibile mostrare l'anteprima", "ContentType": "Tipo di contenuto", "ContentTypeNotSupported": "Anteprima non disponibile per questo tipo di contenuto", - "StartDrawing": "Scarabocchiare sopra" + "StartDrawing": "Scarabocchiare sopra", + "DrawingHistory": "Scarabocchiare la storia" }, "status": { "FileTooLarge": "File troppo grande" diff --git a/packages/presentation/lang/pt.json b/packages/presentation/lang/pt.json index be2daa978f..8b8fe39dd2 100644 --- a/packages/presentation/lang/pt.json +++ b/packages/presentation/lang/pt.json @@ -34,7 +34,8 @@ "FailedToPreview": "Falha ao pré-visualizar", "ContentType": "Tipo de conteúdo", "ContentTypeNotSupported": "A visualização não está disponível para este tipo de conteúdo", - "StartDrawing": "Scarabocchiare sopra" + "StartDrawing": "Scarabocchiare sopra", + "DrawingHistory": "História de rabiscos" }, "status": { "FileTooLarge": "Ficheiro demasiado grande" diff --git a/packages/presentation/lang/ru.json b/packages/presentation/lang/ru.json index d34ca683a2..5d58cfa38d 100644 --- a/packages/presentation/lang/ru.json +++ b/packages/presentation/lang/ru.json @@ -34,7 +34,8 @@ "FailedToPreview": "Ошибка предпросмотра", "ContentType": "Тип контента", "ContentTypeNotSupported": "Предварительный просмотр недоступен для этого типа контента", - "StartDrawing": "Сделать набросок" + "StartDrawing": "Сделать набросок", + "DrawingHistory": "История набросков" }, "status": { "FileTooLarge": "Файл слишком большой" diff --git a/packages/presentation/lang/zh.json b/packages/presentation/lang/zh.json index 37e2d021f2..e1dd4686ce 100644 --- a/packages/presentation/lang/zh.json +++ b/packages/presentation/lang/zh.json @@ -34,7 +34,8 @@ "FailedToPreview": "预览失败", "ContentType": "内容类型", "ContentTypeNotSupported": "此內容類型無法預覽", - "StartDrawing": "随意涂鸦" + "StartDrawing": "随意涂鸦", + "DrawingHistory": "涂鸦的历史" }, "status": { "FileTooLarge": "文件太大" diff --git a/packages/presentation/src/components/DocPopup.svelte b/packages/presentation/src/components/DocPopup.svelte index e5799c6bef..44e47e1d8a 100644 --- a/packages/presentation/src/components/DocPopup.svelte +++ b/packages/presentation/src/components/DocPopup.svelte @@ -14,8 +14,9 @@ --> @@ -164,6 +184,7 @@ class:full-width={width === 'full'} class:plainContainer={!shadows} class:width-40={width === 'large'} + class:auto={width === 'auto'} class:embedded on:keydown={onKeydown} use:resizeObserver={() => { @@ -229,6 +250,10 @@ + {:else if type === 'presenter'} + {#if presenter !== undefined} + + {/if} {:else} {/if} diff --git a/packages/presentation/src/components/DrawingBoard.svelte b/packages/presentation/src/components/DrawingBoard.svelte index 73692de942..046e5585b0 100644 --- a/packages/presentation/src/components/DrawingBoard.svelte +++ b/packages/presentation/src/components/DrawingBoard.svelte @@ -14,25 +14,30 @@ --> -{#if active} +{#if active && drawingData !== undefined}
{ + modified = true + if (drawingData !== undefined) { + drawingData.content = content + } + } }} > {#if !readonly} @@ -68,6 +116,7 @@ kind="icon" on:click={() => { drawingData = {} + modified = true }} />
diff --git a/packages/presentation/src/components/FilePreviewPopup.svelte b/packages/presentation/src/components/FilePreviewPopup.svelte index 5dfb00a309..29015db6c7 100644 --- a/packages/presentation/src/components/FilePreviewPopup.svelte +++ b/packages/presentation/src/components/FilePreviewPopup.svelte @@ -13,9 +13,9 @@ // limitations under the License. --> @@ -91,13 +138,24 @@ {#if props.drawingAvailable === true} + {#if props.drawings !== undefined && props.drawings.length > 0} +