update
This commit is contained in:
parent
646cabda56
commit
146cd36467
@ -6,6 +6,7 @@ import (
|
|||||||
"go_dreamfactory/cmd/v2/service"
|
"go_dreamfactory/cmd/v2/service"
|
||||||
"go_dreamfactory/cmd/v2/service/observer"
|
"go_dreamfactory/cmd/v2/service/observer"
|
||||||
"go_dreamfactory/pb"
|
"go_dreamfactory/pb"
|
||||||
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"fyne.io/fyne/v2"
|
"fyne.io/fyne/v2"
|
||||||
@ -60,7 +61,7 @@ func NewMainWindow(ui *UIImpl) MainWindow {
|
|||||||
|
|
||||||
ui.obs.AddListener(observer.EVENT_PING, observer.Listener{
|
ui.obs.AddListener(observer.EVENT_PING, observer.Listener{
|
||||||
OnNotify: func(data interface{}, args ...interface{}) {
|
OnNotify: func(data interface{}, args ...interface{}) {
|
||||||
dialog.NewConfirm("链接中断", data.(error).Error(), func(
|
conf := dialog.NewConfirm("链接中断", data.(error).Error(), func(
|
||||||
b bool) {
|
b bool) {
|
||||||
if b {
|
if b {
|
||||||
globalWin.w.Close()
|
globalWin.w.Close()
|
||||||
@ -68,7 +69,10 @@ func NewMainWindow(ui *UIImpl) MainWindow {
|
|||||||
dialog.NewInformation("提示", "重启登录", globalWin.w)
|
dialog.NewInformation("提示", "重启登录", globalWin.w)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}, globalWin.w).Show()
|
}, globalWin.w)
|
||||||
|
conf.SetDismissText("取消")
|
||||||
|
conf.SetConfirmText("退出")
|
||||||
|
os.Exit(0)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
return mw
|
return mw
|
||||||
|
Loading…
Reference in New Issue
Block a user