mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 23:56:56 +00:00
Import encrypted messages as is
This commit is contained in:
@ -355,6 +355,25 @@ Dialog {
|
||||
InlineLabelSelect {
|
||||
id: globalLabels
|
||||
}
|
||||
|
||||
Row {
|
||||
spacing: Style.dialog.spacing
|
||||
CheckBoxLabel {
|
||||
id: importEncrypted
|
||||
text: qsTr("Import encrypted emails as they are")
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
bottomMargin: Style.dialog.fontSize/1.8
|
||||
}
|
||||
}
|
||||
|
||||
InfoToolTip {
|
||||
anchors {
|
||||
verticalCenter: importEncrypted.verticalCenter
|
||||
}
|
||||
info: qsTr("When this option is enabled, encrypted emails will be imported as ciphertext. Otherwise, such messages will be skipped.", "todo")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Buttons
|
||||
@ -1018,7 +1037,7 @@ Dialog {
|
||||
)
|
||||
break
|
||||
case DialogImport.Page.Progress:
|
||||
go.startImport(root.address)
|
||||
go.startImport(root.address, importEncrypted.checked)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@ -73,7 +73,7 @@ func (f *FrontendQt) loadStructuresForImport() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *FrontendQt) StartImport(email string) { // TODO email not needed
|
||||
func (f *FrontendQt) StartImport(email string, importEncrypted bool) { // TODO email not needed
|
||||
log.Trace("Starting import")
|
||||
|
||||
f.Qml.SetProgressDescription("init") // TODO use const
|
||||
@ -84,6 +84,7 @@ func (f *FrontendQt) StartImport(email string) { // TODO email not needed
|
||||
f.Qml.SetTotal(1)
|
||||
f.Qml.SetImportLogFileName("")
|
||||
|
||||
f.transfer.SetSkipEncryptedMessages(!importEncrypted)
|
||||
progress := f.transfer.Start()
|
||||
|
||||
f.Qml.SetImportLogFileName(progress.FileReport())
|
||||
|
||||
@ -95,7 +95,7 @@ type GoQMLInterface struct {
|
||||
_ func() string `slot:"leastUsedColor"`
|
||||
_ func(username string, name string, color string, isLabel bool, sourceID string) bool `slot:"createLabelOrFolder"`
|
||||
_ func(fpath, address, fileType string, attachEncryptedBody bool) `slot:"startExport"`
|
||||
_ func(email string) `slot:"startImport"`
|
||||
_ func(email string, importEncrypted bool) `slot:"startImport"`
|
||||
_ func() `slot:"resetSource"`
|
||||
|
||||
_ func(isFromIMAP bool, sourcePath, sourceEmail, sourcePassword, sourceServe, sourcePort, targetAddress string) `slot:"setupAndLoadForImport"`
|
||||
|
||||
Reference in New Issue
Block a user