更新userexpand
This commit is contained in:
parent
303edd3b30
commit
7f438f8cb5
@ -97,23 +97,6 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
||||
tmpDir.Text = gt.TmpDir
|
||||
}
|
||||
|
||||
// 打开目录
|
||||
openFolder := func(entry *widget.Entry) {
|
||||
dConf := dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||
if lu == nil {
|
||||
return
|
||||
}
|
||||
entry.Text = lu.Path()
|
||||
entry.Refresh()
|
||||
}, toolWin.w)
|
||||
luri, _ := storage.ListerForURI(storage.NewFileURI("."))
|
||||
dConf.SetLocation(luri)
|
||||
dConf.SetConfirmText("打开")
|
||||
dConf.SetDismissText("取消")
|
||||
dConf.Resize(fyne.NewSize(750, 500))
|
||||
dConf.Show()
|
||||
}
|
||||
|
||||
form := widget.NewForm(
|
||||
widget.NewFormItem("服务地址", serverAddr),
|
||||
widget.NewFormItem("项目目录", container.NewBorder(nil, nil, nil, widget.NewButtonWithIcon("", theme.FolderIcon(), func() {
|
||||
@ -392,6 +375,23 @@ func (this *appGen) LazyInit(obs observer.Observer) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 打开目录
|
||||
func openFolder(entry *widget.Entry) {
|
||||
dConf := dialog.NewFolderOpen(func(lu fyne.ListableURI, err error) {
|
||||
if lu == nil {
|
||||
return
|
||||
}
|
||||
entry.Text = lu.Path()
|
||||
entry.Refresh()
|
||||
}, toolWin.w)
|
||||
luri, _ := storage.ListerForURI(storage.NewFileURI("."))
|
||||
dConf.SetLocation(luri)
|
||||
dConf.SetConfirmText("打开")
|
||||
dConf.SetDismissText("取消")
|
||||
dConf.Resize(fyne.NewSize(750, 500))
|
||||
dConf.Show()
|
||||
}
|
||||
|
||||
type fileList struct {
|
||||
selItemIds []string //选择的ID
|
||||
fileTotal int //文件总数
|
||||
|
@ -44,8 +44,12 @@ func (this *appTerm) LazyInit(obs observer.Observer) error {
|
||||
remoteDir.PlaceHolder = `远程目录`
|
||||
|
||||
dirForm := widget.NewForm(
|
||||
&widget.FormItem{Text: "本地目录:", Widget: localDir},
|
||||
&widget.FormItem{Text: "远程目录:", Widget: remoteDir},
|
||||
widget.NewFormItem("本地目录", container.NewBorder(nil, nil, nil, widget.NewButtonWithIcon("", theme.FolderIcon(), func() {
|
||||
openFolder(localDir)
|
||||
}), localDir)),
|
||||
widget.NewFormItem("远程目录", container.NewBorder(nil, nil, nil, widget.NewButtonWithIcon("", theme.FolderIcon(), func() {
|
||||
openFolder(remoteDir)
|
||||
}), remoteDir)),
|
||||
)
|
||||
|
||||
// output panel
|
||||
|
@ -3,7 +3,6 @@ package task
|
||||
import (
|
||||
"go_dreamfactory/comm"
|
||||
"go_dreamfactory/pb"
|
||||
"go_dreamfactory/utils"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
)
|
||||
@ -68,14 +67,15 @@ func (this *apiComp) Receive(session comm.IUserSession, req *pb.TaskReceiveReq)
|
||||
return
|
||||
}
|
||||
update := make(map[string]interface{})
|
||||
if ue.Uid != "" {
|
||||
if ue != nil {
|
||||
if comm.TaskTag(req.TaskTag) == comm.TASK_DAILY {
|
||||
ue.Activeday = ue.Activeday + conf.Active
|
||||
update["activeday"] = ue.Activeday
|
||||
}
|
||||
if comm.TaskTag(req.TaskTag) == comm.TASK_WEEKLY {
|
||||
ue.Activeweek = ue.Activeweek + conf.Active
|
||||
update["activeweek"] = ue.Activeweek
|
||||
}
|
||||
update = utils.StructToMap(ue)
|
||||
}
|
||||
|
||||
if len(update) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user