Skip to content

Commit 7079aba

Browse files
committed
help menu
1 parent c88bba3 commit 7079aba

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

app/layout.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from copy import deepcopy
2+
import webbrowser
23

34
import flet
45
from flet import (
@@ -14,6 +15,8 @@
1415
Text,
1516
Card,
1617
Divider,
18+
PopupMenuButton,
19+
PopupMenuItem,
1720
)
1821
from flet import colors, icons
1922

@@ -128,8 +131,24 @@ def create_appbar(self) -> AppBar:
128131
appbar.actions = [
129132
Row(
130133
[
131-
IconButton(
134+
PopupMenuButton(
132135
icon=icons.HELP,
136+
items=[
137+
PopupMenuItem(
138+
icon=icons.CONTACT_SUPPORT,
139+
text="Ask a question",
140+
on_click=lambda _: webbrowser.open(
141+
"https://github.com/tuttle-dev/tuttle/discussions"
142+
),
143+
),
144+
PopupMenuItem(
145+
icon=icons.BUG_REPORT,
146+
text="Report a bug",
147+
on_click=lambda _: webbrowser.open(
148+
"https://github.com/tuttle-dev/tuttle/issues"
149+
),
150+
),
151+
],
133152
)
134153
]
135154
)

0 commit comments

Comments
 (0)