diff options
author | Maxim Devaev <[email protected]> | 2024-05-12 03:43:57 +0300 |
---|---|---|
committer | Maxim Devaev <[email protected]> | 2024-05-12 03:43:57 +0300 |
commit | b9d425e7dc07e25b1c2c4e5aaba11404ed832ba9 (patch) | |
tree | c813ba5f2a34c7f55fb6b86eae7b6778bd6e9238 /kvmd/apps | |
parent | 5f44ac9f6331d747bbb992e35dca9ea92dcdfda9 (diff) |
pikvm/pikvm#1312: Option to close GPIO menu after click
Diffstat (limited to 'kvmd/apps')
-rw-r--r-- | kvmd/apps/kvmd/ugpio.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kvmd/apps/kvmd/ugpio.py b/kvmd/apps/kvmd/ugpio.py index 74ed204f..872d5f6c 100644 --- a/kvmd/apps/kvmd/ugpio.py +++ b/kvmd/apps/kvmd/ugpio.py @@ -383,15 +383,19 @@ class UserGpio: def __make_item_output(self, parts: list[str]) -> dict: assert len(parts) >= 1 confirm = False + hide = False text = "Click" if len(parts) == 2: text = parts[1] elif len(parts) == 3: - confirm = (parts[1] == "confirm") + opts = parts[1].split(",") + confirm = ("confirm" in opts) + hide = ("hide" in opts) text = parts[2] return { "type": UserGpioModes.OUTPUT, "channel": parts[0], "confirm": confirm, + "hide": hide, "text": text, } |