-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathproblems.lua
54 lines (41 loc) · 1.03 KB
/
problems.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
local cmd = require("leetcode.command")
local Title = require("leetcode-ui.lines.title")
local Button = require("leetcode-ui.lines.button.menu")
local BackButton = require("leetcode-ui.lines.button.menu.back")
local Buttons = require("leetcode-ui.group.buttons.menu")
local Page = require("leetcode-ui.group.page")
local footer = require("leetcode-ui.lines.footer")
local header = require("leetcode-ui.lines.menu-header")
local page = Page()
page:insert(header)
page:insert(Title({ "Menu" }, "Problems"))
local list = Button("List", {
icon = "",
sc = "p",
on_press = cmd.problems,
})
local recent = Button("Recent", {
icon = "",
sc = "i",
on_press = cmd.recent,
})
local random = Button("Random", {
icon = "",
sc = "r",
on_press = cmd.random_question,
})
local daily = Button("Daily", {
icon = "",
sc = "d",
on_press = cmd.qot,
})
local back = BackButton("menu")
page:insert(Buttons({
list,
recent,
random,
daily,
back,
}))
page:insert(footer)
return page