This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"embed"
|
||||
"log"
|
||||
"os"
|
||||
@@ -46,6 +47,12 @@ func main() {
|
||||
fileMenu.AddText("Về trang chính", keys.CmdOrCtrl("h"), func(_ *menu.CallbackData) {
|
||||
app.ReturnToDashboard()
|
||||
})
|
||||
fileMenu.AddText("Làm mới trang (F5)", keys.Key("f5"), func(_ *menu.CallbackData) {
|
||||
app.ReloadExamPage()
|
||||
})
|
||||
fileMenu.AddText("Xóa cache trình duyệt", keys.CmdOrCtrl("Delete"), func(_ *menu.CallbackData) {
|
||||
app.ClearExamBrowserCache()
|
||||
})
|
||||
|
||||
// Create application with options
|
||||
err := wails.Run(&options.App{
|
||||
@@ -58,6 +65,9 @@ func main() {
|
||||
},
|
||||
BackgroundColour: &options.RGBA{R: 27, G: 38, B: 54, A: 1},
|
||||
OnStartup: app.startup,
|
||||
OnBeforeClose: func(ctx context.Context) (prevent bool) {
|
||||
return app.HandleBeforeClose()
|
||||
},
|
||||
Windows: &windows.Options{
|
||||
WebviewUserDataPath: app.webviewDataPath,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user