diff --git a/qml/components/DocumentPreview.qml b/qml/components/DocumentPreview.qml index df5a6f1..fa1e7cf 100644 --- a/qml/components/DocumentPreview.qml +++ b/qml/components/DocumentPreview.qml @@ -41,9 +41,9 @@ Item { if (documentData) { if (documentData.document.local.is_downloading_completed) { downloadDocumentButton.visible = false; - openDocumentButton.visible = true; + openDocumentArea.visible = true; } else { - openDocumentButton.visible = false; + openDocumentArea.visible = false; downloadDocumentButton.visible = true; } } @@ -57,7 +57,7 @@ Item { downloadingProgressBar.visible = false; documentData.document = fileInformation; downloadDocumentButton.visible = false; - openDocumentButton.visible = true; + openDocumentArea.visible = true; if (documentPreviewItem.openRequested) { documentPreviewItem.openRequested = false; tdLibWrapper.openFileOnDevice(documentData.document.local.path); @@ -95,17 +95,40 @@ Item { anchors.centerIn: parent } - Button { - id: openDocumentButton - preferredWidth: Theme.buttonWidthMedium - anchors.centerIn: parent - text: qsTr("Open Document") + Column { + id: openDocumentArea visible: false - highlighted: documentPreviewItem.highlighted || down - onClicked: { - documentPreviewItem.openRequested = true; - tdLibWrapper.openFileOnDevice(documentData.document.local.path); + spacing: Theme.paddingMedium + width: parent.width + + onVisibleChanged: { + visible ? (documentPreviewItem.height = openDocumentArea.height) : (documentPreviewItem.height = Theme.itemSizeLarge); + } + + Button { + id: openDocumentButton + preferredWidth: Theme.buttonWidthMedium + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Open Document") + highlighted: documentPreviewItem.highlighted || down + onClicked: { + documentPreviewItem.openRequested = true; + tdLibWrapper.openFileOnDevice(documentData.document.local.path); + } + } + + Button { + id: copyDocumentButton + preferredWidth: Theme.buttonWidthMedium + anchors.horizontalCenter: parent.horizontalCenter + text: qsTr("Copy Document to Downloads") + highlighted: documentPreviewItem.highlighted || down + onClicked: { + tdLibWrapper.copyFileToDownloads(documentData.document.local.path); + } } } + + } diff --git a/translations/harbour-fernschreiber-de.ts b/translations/harbour-fernschreiber-de.ts index 242205e..ced219c 100644 --- a/translations/harbour-fernschreiber-de.ts +++ b/translations/harbour-fernschreiber-de.ts @@ -492,6 +492,10 @@ Open Document Dokument öffnen + + Copy Document to Downloads + Dokument zu Downloads kopieren + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber-en.ts b/translations/harbour-fernschreiber-en.ts index 92d3ed7..a4bdfce 100644 --- a/translations/harbour-fernschreiber-en.ts +++ b/translations/harbour-fernschreiber-en.ts @@ -492,6 +492,10 @@ Open Document Open Document + + Copy Document to Downloads + Copy Document to Downloads + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber-es.ts b/translations/harbour-fernschreiber-es.ts index f9c2938..7391c64 100644 --- a/translations/harbour-fernschreiber-es.ts +++ b/translations/harbour-fernschreiber-es.ts @@ -482,6 +482,10 @@ Open Document Abrir Documento + + Copy Document to Downloads + + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber-fi.ts b/translations/harbour-fernschreiber-fi.ts index e336b49..1be7379 100644 --- a/translations/harbour-fernschreiber-fi.ts +++ b/translations/harbour-fernschreiber-fi.ts @@ -493,6 +493,10 @@ Open Document Avaa dokumentti + + Copy Document to Downloads + + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber-hu.ts b/translations/harbour-fernschreiber-hu.ts index 04bc2c7..ea3bdcf 100644 --- a/translations/harbour-fernschreiber-hu.ts +++ b/translations/harbour-fernschreiber-hu.ts @@ -482,6 +482,10 @@ Open Document Dokumentum megyitása + + Copy Document to Downloads + + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber-it.ts b/translations/harbour-fernschreiber-it.ts index 7ef5901..4585d13 100644 --- a/translations/harbour-fernschreiber-it.ts +++ b/translations/harbour-fernschreiber-it.ts @@ -492,6 +492,10 @@ Open Document Apri documento + + Copy Document to Downloads + + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber-pl.ts b/translations/harbour-fernschreiber-pl.ts index 35ce4ee..17d3b8e 100644 --- a/translations/harbour-fernschreiber-pl.ts +++ b/translations/harbour-fernschreiber-pl.ts @@ -502,6 +502,10 @@ Open Document Otwórz dokument + + Copy Document to Downloads + + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber-ru.ts b/translations/harbour-fernschreiber-ru.ts index 715b035..2dd92ea 100644 --- a/translations/harbour-fernschreiber-ru.ts +++ b/translations/harbour-fernschreiber-ru.ts @@ -502,6 +502,10 @@ Open Document Открыть документ + + Copy Document to Downloads + + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber-sv.ts b/translations/harbour-fernschreiber-sv.ts index 72292c0..ad35d9e 100644 --- a/translations/harbour-fernschreiber-sv.ts +++ b/translations/harbour-fernschreiber-sv.ts @@ -492,6 +492,10 @@ Open Document Öppna dokument + + Copy Document to Downloads + + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber-zh_CN.ts b/translations/harbour-fernschreiber-zh_CN.ts index 8f1e00d..c74a8a5 100644 --- a/translations/harbour-fernschreiber-zh_CN.ts +++ b/translations/harbour-fernschreiber-zh_CN.ts @@ -483,6 +483,10 @@ Open Document 打开文档 + + Copy Document to Downloads + + EditGroupChatPermissionsColumn diff --git a/translations/harbour-fernschreiber.ts b/translations/harbour-fernschreiber.ts index a99ac10..acf72ba 100644 --- a/translations/harbour-fernschreiber.ts +++ b/translations/harbour-fernschreiber.ts @@ -492,6 +492,10 @@ Open Document Open Document + + Copy Document to Downloads + + EditGroupChatPermissionsColumn