mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 10:54:16 +02:00
[feature] new 'restore' custom action
This commit is contained in:
@@ -874,7 +874,7 @@ class CustomAction(AsyncAction):
|
||||
if self.custom_action.backup:
|
||||
app_config = read_config()
|
||||
if not self.request_backup(app_config, None, self.i18n, self.root_pwd):
|
||||
self.notify_finished({'success': False, 'pkg': self.pkg})
|
||||
self.notify_finished({'success': False, 'pkg': self.pkg, 'action': self.custom_action})
|
||||
self.pkg = None
|
||||
self.custom_action = None
|
||||
self.root_pwd = None
|
||||
@@ -889,7 +889,7 @@ class CustomAction(AsyncAction):
|
||||
success = False
|
||||
self.signal_output.emit(self.i18n['internet.required'])
|
||||
|
||||
self.notify_finished({'success': success, 'pkg': self.pkg})
|
||||
self.notify_finished({'success': success, 'pkg': self.pkg, 'action': self.custom_action})
|
||||
self.pkg = None
|
||||
self.custom_action = None
|
||||
self.root_pwd = None
|
||||
|
||||
@@ -1226,7 +1226,8 @@ class ManageWindow(QWidget):
|
||||
def _finish_custom_action(self, res: dict):
|
||||
self.finish_action()
|
||||
if res['success']:
|
||||
self.refresh_packages(pkg_types={res['pkg'].model.__class__} if res['pkg'] else None)
|
||||
if res['action'].refresh:
|
||||
self.refresh_packages(pkg_types={res['pkg'].model.__class__} if res['pkg'] else None)
|
||||
else:
|
||||
self.checkbox_console.setChecked(True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user