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 @@
Dokument öffnen
+
+
+ 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
+
+
+ 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 @@
Abrir Documento
+
+
+
+
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 @@
Avaa dokumentti
+
+
+
+
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 @@
Dokumentum megyitása
+
+
+
+
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 @@
Apri documento
+
+
+
+
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 @@
Otwórz dokument
+
+
+
+
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 @@
Открыть документ
+
+
+
+
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 @@
Öppna dokument
+
+
+
+
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 @@
打开文档
+
+
+
+
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
+
+
+
+
EditGroupChatPermissionsColumn