From 8ad2fd8e3276fc132e1b294259fda83e4a9a75ff Mon Sep 17 00:00:00 2001 From: shy Date: Fri, 1 Sep 2023 15:57:06 +0800 Subject: [PATCH] add some --- base/web/html/html.go | 5 +++++ base/web/spide.go | 4 +++- core/chat/header.go | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/base/web/html/html.go b/base/web/html/html.go index e49fe980..0a14001a 100644 --- a/base/web/html/html.go +++ b/base/web/html/html.go @@ -6,6 +6,11 @@ const ( WHITE = "white" BLACK = "black" SILVER = "silver" + + PROJECT = "project" + CONTENT = "content" + PROFILE = "profile" + DISPLAY = "display" ) const ( diff --git a/base/web/spide.go b/base/web/spide.go index e6938ca8..0c35b8c9 100644 --- a/base/web/spide.go +++ b/base/web/spide.go @@ -96,7 +96,9 @@ func _spide_body(m *ice.Message, method string, arg ...string) (io.Reader, ice.M switch kit.If(len(arg) == 1, func() { arg = []string{SPIDE_DATA, arg[0]} }); arg[0] { case SPIDE_FORM: arg = kit.Simple(arg, func(v string) string { return url.QueryEscape(v) }) - head[ContentType], body = ContentFORM, bytes.NewBufferString(kit.JoinKV("=", "&", arg[1:]...)) + _data := kit.JoinKV("=", "&", arg[1:]...) + m.Debug("post %v %v", len(_data), _data) + head[ContentType], body = ContentFORM, bytes.NewBufferString(_data) case SPIDE_PART: head[ContentType], body = _spide_part(m, arg...) case SPIDE_FILE: diff --git a/core/chat/header.go b/core/chat/header.go index 4fc1882b..c2ac321d 100644 --- a/core/chat/header.go +++ b/core/chat/header.go @@ -91,7 +91,7 @@ func init() { return } m.Cmd(cli.SYSTEM, "osascript", "-e", `tell app "System Events" to tell appearance preferences to set dark mode to `+ - kit.Select(ice.FALSE, ice.TRUE, kit.IsIn(kit.Select(html.DARK, arg, 0), html.DARK, html.BLACK, html.SILVER))) + kit.Select(ice.TRUE, ice.FALSE, kit.IsIn(kit.Select(html.LIGHT, arg, 0), html.LIGHT, html.WHITE))) }}, }, ctx.ConfAction(SSO, "")), Hand: func(m *ice.Message, arg ...string) { m.Option("language.list", m.Cmd(nfs.DIR, path.Join(ice.SRC_TEMPLATE, m.PrefixKey(), aaa.LANGUAGE), nfs.FILE).Appendv(nfs.FILE))