mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Show confirmation dialog when trying to close window when the app manager is #busy?
This commit is contained in:
@@ -38,7 +38,19 @@ class W3DHub
|
|||||||
def close
|
def close
|
||||||
Store.settings.save_settings
|
Store.settings.save_settings
|
||||||
|
|
||||||
super if Store.application_manager.idle?
|
current_state_options = current_state&.instance_variable_get(:@options)
|
||||||
|
|
||||||
|
if Store.application_manager.idle? || current_state_options&.dig(:tag_as) == :closer
|
||||||
|
super
|
||||||
|
else
|
||||||
|
push_state(
|
||||||
|
States::ConfirmDialog,
|
||||||
|
tag_as: :closer,
|
||||||
|
title: I18n.t(:app_name),
|
||||||
|
message: "An application management task is currently running, are you sure you want to exit?",
|
||||||
|
accept_callback: method(:close!)
|
||||||
|
)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def manage_update_interval
|
def manage_update_interval
|
||||||
|
|||||||
Reference in New Issue
Block a user