forked from Support/sp-hydra-veil-gui
Force sync option in settings
This commit is contained in:
parent
5996a117b3
commit
a50c9dc709
1 changed files with 11 additions and 1 deletions
|
|
@ -56,7 +56,7 @@ from gui.v2.ui.widgets.terminal_widget import TerminalWidget
|
|||
from gui.v2.workers.page_data_worker import PageDataWorker
|
||||
from gui.v2.workers.ticketing_worker_thread import TicketingWorkerThread
|
||||
from gui.v2.workers.worker_thread import WorkerThread
|
||||
from gui.v2.actions.menu_coordinator import delete_profile_action
|
||||
from gui.v2.actions.menu_coordinator import delete_profile_action, sync_now
|
||||
|
||||
class Settings(Page):
|
||||
def __init__(self, page_stack, main_window, parent=None, prepared=None):
|
||||
|
|
@ -583,11 +583,21 @@ class Settings(Page):
|
|||
|
||||
self.update_debug_profile_list()
|
||||
|
||||
# force sync:
|
||||
self.force_sync_button = QPushButton()
|
||||
self.force_sync_button.setText("Force Sync All Models")
|
||||
self.force_sync_button.setSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed)
|
||||
self.force_sync_button.clicked.connect(lambda: sync_now(ui_caller=self.after_force_sync, force_all=True))
|
||||
scroll_layout.addWidget(self.force_sync_button)
|
||||
|
||||
scroll_area.setWidget(scroll_content)
|
||||
layout.addWidget(scroll_area)
|
||||
|
||||
return page
|
||||
|
||||
def after_force_sync(self, result: Result):
|
||||
print(result)
|
||||
|
||||
def copy_cli_command(self):
|
||||
clipboard = QApplication.clipboard()
|
||||
clipboard.setText(self.cli_command.text())
|
||||
|
|
|
|||
Loading…
Reference in a new issue