Add button to copy document to Downloads folder
This commit is contained in:
parent
d4935a4968
commit
be2f08553b
12 changed files with 79 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -492,6 +492,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Dokument öffnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation>Dokument zu Downloads kopieren</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -492,6 +492,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Open Document</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation>Copy Document to Downloads</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -482,6 +482,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Abrir Documento</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -493,6 +493,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Avaa dokumentti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -482,6 +482,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Dokumentum megyitása</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -492,6 +492,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Apri documento</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -502,6 +502,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Otwórz dokument</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -502,6 +502,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Открыть документ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -492,6 +492,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Öppna dokument</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -483,6 +483,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>打开文档</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
|
@ -492,6 +492,10 @@
|
|||
<source>Open Document</source>
|
||||
<translation>Open Document</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Copy Document to Downloads</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>EditGroupChatPermissionsColumn</name>
|
||||
|
|
Loading…
Reference in a new issue