mirror of
https://github.com/onionshare/onionshare.git
synced 2024-10-01 01:35:40 -04:00
Add "download started" date/time to download history progress bars
This commit is contained in:
parent
5616a6a965
commit
56e5c8b908
@ -50,11 +50,13 @@ class DownloadHistoryItem(HistoryItem):
|
||||
self.common = common
|
||||
|
||||
self.id = id
|
||||
self.started = time.time()
|
||||
self.total_bytes = total_bytes
|
||||
self.downloaded_bytes = 0
|
||||
self.started = time.time()
|
||||
self.started_dt = datetime.fromtimestamp(self.started)
|
||||
|
||||
self.setStyleSheet('QWidget { border: 1px solid red; }')
|
||||
# Label
|
||||
self.label = QtWidgets.QLabel(strings._('gui_download_in_progress').format(self.started_dt.strftime("%b %d, %I:%M%p")))
|
||||
|
||||
# Progress bar
|
||||
self.progress_bar = QtWidgets.QProgressBar()
|
||||
@ -69,6 +71,7 @@ class DownloadHistoryItem(HistoryItem):
|
||||
|
||||
# Layout
|
||||
layout = QtWidgets.QVBoxLayout()
|
||||
layout.addWidget(self.label)
|
||||
layout.addWidget(self.progress_bar)
|
||||
self.setLayout(layout)
|
||||
|
||||
|
@ -180,5 +180,6 @@
|
||||
"gui_upload_in_progress": "Upload Started {}",
|
||||
"gui_upload_finished_range": "Uploaded {} to {}",
|
||||
"gui_upload_finished": "Uploaded {}",
|
||||
"gui_download_in_progress": "Download Started {}",
|
||||
"gui_open_folder_error_nautilus": "Cannot open folder because nautilus is not available. The file is here: {}"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user