MCPcopy Index your code
hub / github.com/flet-dev/flet / open_system_actions

Function open_system_actions

sdk/python/examples/community/mind_queue/main.py:127–159  ·  view source on GitHub ↗
(system_name: str)

Source from the content-addressed store, hash-verified

125 show_system(system_name)
126
127 def open_system_actions(system_name: str):
128 def do_open(e):
129 close_current_dialog()
130 show_system(system_name)
131
132 async def do_clone(e):
133 close_current_dialog()
134 clone_system(system_name)
135 await asyncio.sleep(0)
136 show_dashboard()
137
138 dlg = ft.AlertDialog(
139 modal=True,
140 title=ft.Text(system_name),
141 actions=[
142 # ft.TextButton("Open", on_click=do_open),
143 ft.TextButton(
144 "Clone",
145 icon=ft.Icons.CONTENT_COPY,
146 on_click=do_clone,
147 ),
148 ft.TextButton(
149 "Delete",
150 icon=ft.Icons.DELETE_OUTLINE,
151 icon_color=ft.Colors.RED,
152 disabled=len(data) == 1,
153 on_click=lambda e: confirm_delete_system(system_name),
154 ),
155 ft.TextButton("Cancel", on_click=lambda e: close_current_dialog()),
156 ],
157 actions_alignment=ft.MainAxisAlignment.END,
158 )
159 open_dialog(dlg)
160
161 for system_name in data:
162 gesture = ft.GestureDetector(

Callers 1

show_dashboardFunction · 0.85

Calls 3

confirm_delete_systemFunction · 0.85
close_current_dialogFunction · 0.85
open_dialogFunction · 0.70

Tested by

no test coverage detected