Remove old import dialog cruft

This commit is contained in:
miruka 2019-11-30 05:16:43 -04:00
parent 580f92e0be
commit a09e811e56
2 changed files with 1 additions and 62 deletions

View File

@ -2,7 +2,7 @@ import re
from dataclasses import dataclass, field from dataclasses import dataclass, field
from datetime import datetime from datetime import datetime
from pathlib import Path from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple, Type from typing import Any, Dict, List, Optional, Type
from uuid import uuid4 from uuid import uuid4
import lxml # nosec import lxml # nosec
@ -22,10 +22,6 @@ class Account(ModelItem):
first_sync_done: bool = False first_sync_done: bool = False
profile_updated: Optional[datetime] = None profile_updated: Optional[datetime] = None
importing_key: int = 0
total_keys_to_import: int = 0
import_error: Tuple[str, str, str] = ("", "", "") # path,pw,err
def __lt__(self, other: "Account") -> bool: def __lt__(self, other: "Account") -> bool:
name = self.display_name or self.user_id[1:] name = self.display_name or self.user_id[1:]
other_name = other.display_name or other.user_id[1:] other_name = other.display_name or other.user_id[1:]

View File

@ -1,57 +0,0 @@
import QtQuick 2.12
import QtQuick.Layouts 1.12
import "../../Base"
HColumnLayout {
readonly property int progress: accountInfo.importing_key
onProgressChanged: iconAnimation.restart()
HRowLayout {
HIcon {
id: icon
svgName: "import-keys"
Layout.margins: currentSpacing
SequentialAnimation {
id: iconAnimation
HNumberAnimation { target: icon; property: "opacity"; to: 0.6 }
HNumberAnimation { target: icon; property: "opacity"; to: 1 }
}
}
HLabel {
text: qsTr("Importing decryption keys...")
elide: Text.ElideRight
Layout.fillWidth: true
Layout.margins: currentSpacing
Layout.leftMargin: 0
Layout.rightMargin: 0
}
HLabel {
text: progressBar.indeterminate ?
qsTr("Preparing...") :
qsTr("%1/%2")
.arg(Math.ceil(progressBar.value)).arg(progressBar.to)
Layout.margins: currentSpacing
}
}
HProgressBar {
id: progressBar
from: 0
value: progress
to: accountInfo.total_keys_to_import
indeterminate: accountInfo.total_keys_to_import < 0
Behavior on value { HNumberAnimation { factor: 5 } }
Layout.fillWidth: true
}
}