mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-09-30 03:13:48 +08:00
Big UI: Alerts
This commit is contained in:
@@ -270,7 +270,7 @@ class SystemSettingsManagerView(PanelManagerView):
|
||||
"title": tr("Disable Uploads"),
|
||||
"subtitle": "",
|
||||
"get_state": lambda: self._controller._params.get_bool("NoUploads"),
|
||||
"set_state": lambda v: self._controller._params.put_bool("NoUploads", v),
|
||||
"set_state": self._controller._on_no_uploads_toggle,
|
||||
},
|
||||
{
|
||||
"title": tr("Disable Onroad Uploads"),
|
||||
@@ -284,7 +284,7 @@ class SystemSettingsManagerView(PanelManagerView):
|
||||
"title": tr("Disable Logging"),
|
||||
"subtitle": "",
|
||||
"get_state": lambda: self._controller._params.get_bool("NoLogging"),
|
||||
"set_state": lambda v: self._controller._params.put_bool("NoLogging", v),
|
||||
"set_state": self._controller._on_no_logging_toggle,
|
||||
},
|
||||
{
|
||||
"title": tr("High Bitrate Recording"),
|
||||
@@ -1015,6 +1015,24 @@ class StarPilotSystemLayout(_SettingsPage):
|
||||
)
|
||||
)
|
||||
|
||||
def _on_no_uploads_toggle(self, state):
|
||||
if state:
|
||||
gui_app.push_widget(ConfirmDialog(
|
||||
tr("This will prevent your drives from being uploaded to comma connect which may impact receiving support. Are you sure?"),
|
||||
lambda res: self._params.put_bool("NoUploads", True) if res == DialogResult.CONFIRM else None
|
||||
))
|
||||
else:
|
||||
self._params.put_bool("NoUploads", False)
|
||||
|
||||
def _on_no_logging_toggle(self, state):
|
||||
if state:
|
||||
gui_app.push_widget(ConfirmDialog(
|
||||
tr("This will prevent your drives from being logged. Are you sure?"),
|
||||
lambda res: self._params.put_bool("NoLogging", True) if res == DialogResult.CONFIRM else None
|
||||
))
|
||||
else:
|
||||
self._params.put_bool("NoLogging", False)
|
||||
|
||||
def _on_higher_bitrate_toggle(self, state):
|
||||
self._params.put_bool("HigherBitrate", state)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user