mirror of
https://shylinux.com/x/icebergs
synced 2025-06-26 02:17:30 +08:00
add some
This commit is contained in:
parent
9c48f02a0f
commit
c2c18610de
@ -85,6 +85,7 @@ const (
|
|||||||
CONTENT = "content"
|
CONTENT = "content"
|
||||||
PROFILE = "profile"
|
PROFILE = "profile"
|
||||||
DISPLAY = "display"
|
DISPLAY = "display"
|
||||||
|
PORTAL = "portal"
|
||||||
|
|
||||||
VIEW = "view"
|
VIEW = "view"
|
||||||
VALUE = "value"
|
VALUE = "value"
|
||||||
|
@ -84,9 +84,10 @@ func Render(m *ice.Message, cmd string, args ...ice.Any) bool {
|
|||||||
"$output", fieldset+">div.output",
|
"$output", fieldset+">div.output",
|
||||||
"$status", fieldset+">div.status",
|
"$status", fieldset+">div.status",
|
||||||
"$fieldset", fieldset,
|
"$fieldset", fieldset,
|
||||||
|
"$field", fieldset,
|
||||||
|
"$input", "body>div.input.float."+m.Option(ctx.INDEX),
|
||||||
"$body", "body.cmd."+m.Option(ctx.INDEX),
|
"$body", "body.cmd."+m.Option(ctx.INDEX),
|
||||||
"$index", m.Option(ctx.INDEX),
|
"$index", m.Option(ctx.INDEX),
|
||||||
"$input", "body>div.input.float."+m.Option(ctx.INDEX),
|
|
||||||
)))
|
)))
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
$project div.list { margin-left:25px; }
|
$project div.list { margin-left:25px; }
|
||||||
$project div.item span.exists { color:var(--notice-bg-color); padding:0 var(--input-padding); }
|
$project div.item span.exists { color:var(--notice-bg-color); padding:0 var(--input-padding); }
|
||||||
$content>div.item { box-shadow:var(--th-box-shadow); border:var(--plugin-border); border-radius:var(--plugin-radius); }
|
$content>div.item { border:var(--plugin-border); border-radius:var(--plugin-radius); }
|
||||||
$content>div.item:hover { box-shadow:var(--notice-box-shadow); }
|
$content>div.item:hover { box-shadow:var(--notice-box-shadow); }
|
||||||
$content>div.item div.title div.label { font-size:var(--status-font-size); font-weight:normal; margin-top:var(--input-margin); }
|
$content>div.item div.title div.label { font-size:var(--status-font-size); font-weight:normal; margin-top:var(--input-margin); }
|
||||||
$content>div.item div.title div.label span { padding:var(--input-padding); padding-right:var(--input-margin); }
|
$content>div.item div.title div.label span { padding:var(--input-padding); padding-right:var(--input-margin); }
|
||||||
|
@ -22,8 +22,8 @@ func init() {
|
|||||||
template := func(script string) string { return kit.Format(`<html><body><script>%s</script></body></html>`, script) }
|
template := func(script string) string { return kit.Format(`<html><body><script>%s</script></body></html>`, script) }
|
||||||
if m.Option("code") == "" && m.Option("state") == "" {
|
if m.Option("code") == "" && m.Option("state") == "" {
|
||||||
if msg := m.Cmd(web.SPACE, "20240724-community", "web.chat.wx.agent"); msg.Option("oauth") != "" {
|
if msg := m.Cmd(web.SPACE, "20240724-community", "web.chat.wx.agent"); msg.Option("oauth") != "" {
|
||||||
m.RenderResult(kit.Format(template(`document.cookie = "goback=%s;path=/"; location.href = "%s"`),
|
m.RenderResult(kit.Format(template(`document.cookie = "goback="+location.href+";path=/"; location.href = "%s"`),
|
||||||
m.R.URL.String(), msg.Option("oauth")))
|
msg.Option("oauth")))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -70,27 +70,27 @@ func _go_show(m *ice.Message, arg ...string) {
|
|||||||
ctx.ProcessField(m, nfs.PACK, kit.Simple())
|
ctx.ProcessField(m, nfs.PACK, kit.Simple())
|
||||||
} else if path.Base(arg[1]) == "model.go" {
|
} else if path.Base(arg[1]) == "model.go" {
|
||||||
ctx.ProcessField(m, "web.code.mysql.query", kit.Simple("mysql", kit.Split(arg[1], "/", "/")[0]))
|
ctx.ProcessField(m, "web.code.mysql.query", kit.Simple("mysql", kit.Split(arg[1], "/", "/")[0]))
|
||||||
} else if path.Base(arg[1]) == "common.go" {
|
|
||||||
// ctx.ProcessField(m, "web.code.xterm", kit.Simple())
|
|
||||||
ctx.ProcessField(m, "log.debug", kit.Simple("bench"))
|
|
||||||
} else if cmd := ctx.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
} else if cmd := ctx.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
||||||
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); path.Base(arg[1]) != "portal.go" &&
|
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); path.Base(arg[1]) != "portal.go" && nfs.Exists(m, p) {
|
||||||
!kit.IsIn(arg[1],
|
if _cmd := ctx.GetFileCmd(p); _cmd != "" {
|
||||||
"gonganxitong/user.go",
|
|
||||||
"gonganxitong/sess.go",
|
|
||||||
"gonganxitong/grant.go",
|
|
||||||
"gonganxitong/domain.go",
|
|
||||||
"gonganxitong/command.go",
|
|
||||||
"gonganxitong/quotalist.go",
|
|
||||||
) && nfs.Exists(m, p) && !kit.IsIn(path.Base(arg[1]), "studio.go") {
|
|
||||||
if cmd := ctx.GetFileCmd(p); cmd != "" {
|
|
||||||
if m.ActionKey() == mdb.RENDER {
|
if m.ActionKey() == mdb.RENDER {
|
||||||
ctx.ProcessField(m, cmd, kit.Simple())
|
if path.Base(arg[1]) == "common.go" {
|
||||||
|
ctx.ProcessField(m, strings.ReplaceAll(_cmd, ".portal", ".clean"), kit.Simple())
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if msg := m.Cmd(_cmd, "commandSelect", cmd); msg.Length() > 0 {
|
||||||
|
ctx.ProcessField(m, _cmd, kit.Simple())
|
||||||
|
return
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
ls := kit.Split(strings.TrimSuffix(arg[1], ".go"), "/")
|
ls := kit.Split(strings.TrimSuffix(arg[1], ".go"), "/")
|
||||||
ctx.ProcessField(m, "web.code.mysql.query", kit.Simple("mysql", ls[0], TableName(kit.Select("", ls, -1))))
|
if path.Base(arg[1]) == "common.go" {
|
||||||
|
ctx.ProcessField(m, "web.code.mysql.query", kit.Simple("mysql", ls[0]))
|
||||||
|
} else {
|
||||||
|
ctx.ProcessField(m, "web.code.mysql.query", kit.Simple("mysql", ls[0], TableName(kit.Select("", ls, -1))))
|
||||||
|
}
|
||||||
|
return
|
||||||
}
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx.ProcessField(m, cmd, kit.Simple())
|
ctx.ProcessField(m, cmd, kit.Simple())
|
||||||
|
@ -21,13 +21,13 @@ func _js_show(m *ice.Message, arg ...string) {
|
|||||||
} else if strings.HasPrefix(arg[1], "plugin/local/") {
|
} else if strings.HasPrefix(arg[1], "plugin/local/") {
|
||||||
ctx.ProcessField(m, kit.Select(ice.CAN_PLUGIN, "web."+strings.Replace(strings.TrimSuffix(strings.TrimPrefix(arg[1], "plugin/local/"), nfs.PT+JS), nfs.PS, nfs.PT, -1)), nil)
|
ctx.ProcessField(m, kit.Select(ice.CAN_PLUGIN, "web."+strings.Replace(strings.TrimSuffix(strings.TrimPrefix(arg[1], "plugin/local/"), nfs.PT+JS), nfs.PS, nfs.PT, -1)), nil)
|
||||||
}
|
}
|
||||||
} else {
|
} else if cmd := ctx.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
||||||
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); !kit.IsIn(arg[1],
|
if p := path.Join(arg[2], strings.Split(arg[1], "/")[0], "portal.go"); nfs.Exists(m, p) {
|
||||||
"operation/studio.js",
|
if _cmd := ctx.GetFileCmd(p); _cmd != "" {
|
||||||
) && nfs.Exists(m, p) {
|
if msg := m.Cmd(_cmd, "commandSelect", cmd); msg.Length() > 0 {
|
||||||
if cmd := ctx.GetFileCmd(p); cmd != "" {
|
ctx.ProcessField(m, _cmd, kit.Simple())
|
||||||
ctx.ProcessField(m, cmd, kit.Simple())
|
return
|
||||||
return
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctx.DisplayBase(m, require(arg[2], arg[1]))
|
ctx.DisplayBase(m, require(arg[2], arg[1]))
|
||||||
|
@ -1,74 +1,76 @@
|
|||||||
fieldset.web.wiki.portal { --portal-max-width:1200px; --portal-header-height:64px; --portal-main-padding:40px; --plugin-radius:10px; }
|
$fieldset { --portal-max-width:1200px; --portal-header-height:64px; --portal-main-padding:40px; --plugin-radius:10px; }
|
||||||
fieldset.web.wiki.portal.home { --portal-max-width:1500px; }
|
$fieldset.home { --portal-max-width:1500px; }
|
||||||
fieldset.web.wiki.portal>div.header { display:none; }
|
$fieldset>div.header { display:none; }
|
||||||
fieldset.web.wiki.portal>div.output { padding:0; }
|
$output { padding:0; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header { background-color:var(--panel-bg-color); height:var(--portal-header-height); --hover-bg-color:var(--plugin-bg-color); }
|
$output>div.header { background-color:var(--panel-bg-color); height:var(--portal-header-height); --hover-bg-color:var(--plugin-bg-color); }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.list { display:flex; }
|
$output>div.header div.list { display:flex; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] { --hover-fg-color:white; }
|
$output>div.header div.story[data-name=navmenu] { --hover-fg-color:white; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story div.item span { white-space:pre; overflow:hidden; }
|
$output>div.header div.story div.item span { white-space:pre; overflow:hidden; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] { display:flex; justify-content:center; }
|
$output>div.header div.story[data-name=navmenu] { display:flex; justify-content:center; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item { text-align:center; padding:var(--legend-padding); height:var(--portal-header-height); }
|
$output>div.header div.story[data-name=navmenu] div.item { text-align:center; padding:var(--legend-padding); height:var(--portal-header-height); }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item { display:flex; align-items:center; }
|
$output>div.header div.story[data-name=navmenu] div.item { display:flex; align-items:center; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:first-child { padding:var(--input-padding); }
|
$output>div.header div.story[data-name=navmenu] div.item:first-child { padding:var(--input-padding); }
|
||||||
body.mobile fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:first-child span { display:none; font-size:18px; max-width:160px; }
|
$output>div.header div.story[data-name=navmenu] div.item:first-child { line-height:calc(var(--portal-header-height) - 2 * var(--legend-padding)); font-size:24px; font-weight:bold; }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:first-child { line-height:calc(var(--portal-header-height) - 2 * var(--legend-padding)); font-size:24px; font-weight:bold; }
|
$output>div.header div.story[data-name=navmenu] div.item:first-child img { margin-right:var(--button-margin); }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:first-child img { margin-right:var(--button-margin); }
|
$output>div.header div.story[data-name=navmenu] div.item.select { background-color:var(--output-bg-color); }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item.select { background-color:var(--output-bg-color); }
|
$output>div.header div.story[data-name=navmenu] div.item:hover { background-color:var(--output-bg-color); }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:hover { background-color:var(--output-bg-color); }
|
// $output>div.header div.story[data-name=navmenu] div.item.space { padding:0px; margin:0 var(--portal-main-padding); }
|
||||||
fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item.space { padding:0px; margin:0 var(--portal-main-padding); }
|
$output>div.header div.story[data-name=navmenu] div.item.space { padding:0px; width:20px; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout { display:flex; justify-content:center; }
|
$output>div.layout { display:flex; justify-content:center; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout table.story.content { background-color:var(--output-bg-color); }
|
$output>div.layout table.story.content { background-color:var(--output-bg-color); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout table.story.content th { text-align:left; padding:var(--table-padding); }
|
$output>div.layout table.story.content th { text-align:left; padding:var(--table-padding); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.nav { border-right:var(--box-border); padding:var(--portal-main-padding); padding-right:var(--button-padding); min-width:var(--project-width); overflow:auto; }
|
$output>div.layout>div.nav { border-right:var(--box-border); padding:var(--portal-main-padding); padding-right:var(--button-padding); min-width:var(--project-width); overflow:auto; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.nav div.story[data-name=navmenu] div.item { padding:var(--input-padding); }
|
$output>div.layout>div.nav div.story[data-name=navmenu] div.item { padding:var(--input-padding); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.nav div.story[data-name=navmenu] div.item.select { border-right:var(--box-notice); }
|
$output>div.layout>div.nav div.story[data-name=navmenu] div.item.select { border-right:var(--box-notice); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.nav div.story[data-name=navmenu]>div.item { border-bottom:var(--box-border); margin-top:var(--button-margin); }
|
$output>div.layout>div.nav div.story[data-name=navmenu]>div.item { border-bottom:var(--box-border); margin-top:var(--button-margin); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.nav div.story[data-name=navmenu] div.list { padding-left:var(--legend-padding); }
|
$output>div.layout>div.nav div.story[data-name=navmenu] div.list { padding-left:var(--legend-padding); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.aside { padding:var(--portal-main-padding); padding-left:var(--button-padding); min-width:var(--project-width); overflow:auto; }
|
$output>div.layout>div.aside { padding:var(--portal-main-padding); padding-left:var(--button-padding); min-width:var(--project-width); overflow:auto; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.aside div.item { padding:var(--input-padding); }
|
$output>div.layout>div.aside div.item { padding:var(--input-padding); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.aside div.item.select { border-left:var(--box-notice); }
|
$output>div.layout>div.aside div.item.select { border-left:var(--box-notice); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.aside div.item.section { padding-left:var(--legend-padding); }
|
$output>div.layout>div.aside div.item.section { padding-left:var(--legend-padding); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main { padding:var(--portal-main-padding); height:600px; min-width:390px; max-width:var(--portal-max-width); overflow:auto; overflow-x:hidden; }
|
$output>div.layout>div.main { padding:var(--portal-main-padding); height:600px; min-width:390px; max-width:var(--portal-max-width); overflow:auto; overflow-x:hidden; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column { display:flex; flex-direction:column; justify-content:center; }
|
$output>div.layout>div.main div.story.column { display:flex; flex-direction:column; justify-content:center; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column fieldset.inner>div.output>div.layout>div.layout div.content div.tips { top:5px; right:10px; }
|
$output>div.layout>div.main div.story.column fieldset.inner>div.output>div.layout>div.layout div.content div.tips { top:5px; right:10px; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column h1 { font-size:24px; font-style:italic; margin-top:0; }
|
$output>div.layout>div.main div.story.column fieldset.inner { box-shadow:none; border:var(--box-border); border-radius:0; }
|
||||||
body.mobile fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column h2 { font-size:18px; }
|
$output>div.layout>div.main div.story.column h1 { font-size:24px; font-style:italic; margin-top:0; }
|
||||||
body:not(.mobile) fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column h1 { font-size:32px; }
|
$output>div.layout>div.main div.story.column h2 { margin:0 !important; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column h2 { margin:0 !important; }
|
$output>div.layout>div.main img[data-name="qrcode"] { margin-top:20px; width:240px !important; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main img[data-name="qrcode"] { margin-top:20px; width:240px !important; }
|
$output>div.layout>div.main div.story.column li { margin:10px 0; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column li { margin:10px 0; }
|
$output>div.layout>div.main div.story.column ul { margin:10px; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column ul { margin:10px; }
|
$output>div.layout>div.main div.story.column b { font-size:22px; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column b { font-size:22px; }
|
$output>div.layout>div.main div.story.column input[type=button] { box-shadow:var(--th-box-shadow); border:0; background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column input[type=button] { box-shadow:var(--th-box-shadow); border:0; background-color:var(--notice-bg-color); color:var(--notice-fg-color); }
|
$output>div.layout>div.main div.story.column input[type=button]:hover { box-shadow:var(--notice-box-shadow); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column input[type=button]:hover { box-shadow:var(--notice-box-shadow); }
|
$output>div.layout>div.main fieldset.desktop>legend { display:none; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main fieldset.desktop>legend { display:none; }
|
$output>div.layout>div.main fieldset.inner.output div.content { padding:var(--input-padding) 0; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main fieldset.inner.output div.content { padding:var(--input-padding) 0; }
|
$output>div.layout>div.main div.story[data-type=spark][data-name=shell] { border:var(--box-border); border-left:var(--box-notice3); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story[data-type=spark][data-name=shell] { border:var(--box-border); border-left:var(--box-notice3); }
|
$output>div.layout>div.main div.story[data-type=spark][data-name=shell]:hover { box-shadow:var(--notice-box-shadow); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story[data-type=spark][data-name=shell]:hover { box-shadow:var(--notice-box-shadow); }
|
$output>div.layout>div.main div.story[data-type=spark][data-name=shell] { padding:var(--button-padding); margin-top:var(--button-margin); }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main div.story[data-type=spark][data-name=shell] { padding:var(--button-padding); margin-top:var(--button-margin); }
|
$output>div.layout>div.main table.content div.story[data-type=spark][data-name=shell] { margin-top:unset; }
|
||||||
fieldset.web.wiki.portal>div.output>div.layout>div.main table.content div.story[data-type=spark][data-name=shell] { margin-top:unset; }
|
$fieldset.home>div.output>div.layout>div.main p { white-space:pre-wrap; }
|
||||||
fieldset.web.wiki.portal.home>div.output>div.layout>div.main p { white-space:pre-wrap; }
|
$fieldset.home>div.output>div.layout>div.main p:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
|
||||||
div.story[data-type=qrcode] { text-align:center; }
|
div.story[data-type=qrcode] { text-align:center; }
|
||||||
fieldset.web.wiki.portal.home>div.output>div.layout>div.main p:hover { background-color:var(--hover-bg-color); color:var(--hover-fg-color); }
|
body:not(.mobile) $output>div.layout>div.main div.story.column h1 { font-size:32px; }
|
||||||
body.dark fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item:hover { background-color:var(--output-bg-color); }
|
body.dark $output>div.header div.story[data-name=navmenu] div.item:hover { background-color:var(--output-bg-color); }
|
||||||
body.dark fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] div.item.select { background-color:var(--output-bg-color); }
|
body.dark $output>div.header div.story[data-name=navmenu] div.item.select { background-color:var(--output-bg-color); }
|
||||||
body.dark fieldset.web.wiki.portal>div.output>div.layout { background-color:var(--plugin-bg-color); --code-bg-color:var(--output-bg-color); }
|
body.dark $output>div.layout { background-color:var(--plugin-bg-color); --code-bg-color:var(--output-bg-color); }
|
||||||
body.dark fieldset.web.wiki.portal>div.output>div.layout>div.main fieldset:not(.macos) { border:var(--plugin-border); }
|
body.dark $output>div.layout>div.main fieldset:not(.macos) { border:var(--plugin-border); }
|
||||||
body.dark fieldset.web.wiki.portal>div.output>div.layout>div.main fieldset { border-radius:0; }
|
body.dark $output>div.layout>div.main fieldset { border-radius:0; }
|
||||||
body.dark fieldset.web.wiki.portal>div.output>div.layout>div.main div.story[data-type=spark][data-name=shell] { border-left:var(--box-notice3); }
|
body.dark $output>div.layout>div.main div.story[data-type=spark][data-name=shell] { border-left:var(--box-notice3); }
|
||||||
body.white fieldset.web.wiki.portal>div.output>div.header { color:silver; }
|
body.white $output>div.header { color:silver; }
|
||||||
body.light fieldset.web.wiki.portal>div.output>div.header { color:white; }
|
body.light $output>div.header { color:white; }
|
||||||
body.light fieldset.web.wiki.portal>div.output>div.header div.story[data-name=navmenu] { --hover-fg-color:black; }
|
body.light $output>div.header div.story[data-name=navmenu] { --hover-fg-color:black; }
|
||||||
body.mobile fieldset.web.wiki.portal { --portal-main-padding:5px; --legend-padding:10px; }
|
body.width1 $output>div.header div.story[data-name=navmenu] div.item:first-child span { display:none; font-size:18px; max-width:160px; }
|
||||||
body.mobile fieldset.web.wiki.portal>div.output>div.layout { display:block; }
|
body.width1 $output>div.layout { display:block; }
|
||||||
body.mobile fieldset.web.wiki.portal>div.output>div.layout>div.nav { height:400px; }
|
body.width1 $output>div.layout>div.nav { height:400px; }
|
||||||
body.mobile fieldset.web.wiki.portal>div.output>div.layout>div.main { height:unset; }
|
body.width1 $output>div.layout>div.main { height:unset; }
|
||||||
body.mobile fieldset.web.wiki.portal>div.output>div.layout>div.main div.story.column { padding:10px 0 !important; }
|
body.width1 $output>div.layout>div.main div.story.column { padding:10px 0 !important; }
|
||||||
body.mobile fieldset.web.wiki.portal>div.output>div.layout>div.main fieldset { width:fit-content; }
|
body.width1 $output>div.layout>div.main fieldset { width:fit-content; }
|
||||||
body.mobile fieldset.web.wiki.portal>div.output>div.layout>div.main fieldset>div.action { display:none; }
|
body.width1 $output>div.layout>div.main fieldset>div.action { display:none; }
|
||||||
body.mobile fieldset.web.wiki.portal.cmd>div.output>div.header div.story[data-name=navmenu] div.item { line-height:calc(var(--portal-header-height) - 2 * var(--legend-padding)); }
|
body.width1 $output>div.layout>div.main div.story.column h2 { font-size:18px; }
|
||||||
body.mobile fieldset.web.wiki.portal.home>div.output>div.layout>div.main p { white-space:normal; text-align:center; padding:var(--button-padding); }
|
body.width1 $fieldset { --portal-main-padding:5px; --legend-padding:10px; }
|
||||||
body.mobile fieldset.web.wiki.portal.home>div.output>div.layout>div.main h2 { margin-top:40px; margin-bottom:0; }
|
body.width1 $fieldset.cmd>div.output>div.header div.story[data-name=navmenu] div.item { line-height:calc(var(--portal-header-height) - 2 * var(--legend-padding)); }
|
||||||
body.mobile fieldset.web.wiki.portal>div.output>div.layout>div.main p { padding:var(--input-padding); margin:0; }
|
body.width1 $fieldset.home>div.output>div.layout>div.main p { white-space:normal; text-align:center; padding:var(--button-padding); }
|
||||||
body.width2 fieldset.web.wiki.portal>div.output>div.layout>div.main>div.flex { flex-direction:column; }
|
body.width1 $fieldset.home>div.output>div.layout>div.main h2 { margin-top:40px; margin-bottom:0; }
|
||||||
body.web.wiki.portal fieldset.Action.home>div.toast { display:none; }
|
body.width1 $fieldset>div.output>div.layout>div.main p { padding:var(--input-padding); margin:0; }
|
||||||
|
body.width2 $fieldset>div.output>div.layout>div.main>div.flex { flex-direction:column; }
|
||||||
|
$body fieldset.Action.home>div.toast { display:none; }
|
||||||
|
@ -38,7 +38,7 @@ func init() {
|
|||||||
if m.Push(HEADER, m.Cmdx(WORD, _portal_path(m, INDEX_SHY))); len(arg) > 0 {
|
if m.Push(HEADER, m.Cmdx(WORD, _portal_path(m, INDEX_SHY))); len(arg) > 0 {
|
||||||
m.Push(NAV, m.Cmdx(WORD, _portal_path(m, path.Join(arg...), INDEX_SHY)))
|
m.Push(NAV, m.Cmdx(WORD, _portal_path(m, path.Join(arg...), INDEX_SHY)))
|
||||||
}
|
}
|
||||||
m.Display("")
|
m.Display("").DisplayCSS("")
|
||||||
}},
|
}},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
sub.onimport.size(sub, can.base.Min(html.FLOAT_HEIGHT, can.ConfHeight()/2, can.ConfHeight()), (can.ConfWidth()-2*padding), true)
|
sub.onimport.size(sub, can.base.Min(html.FLOAT_HEIGHT, can.ConfHeight()/2, can.ConfHeight()), (can.ConfWidth()-2*padding), true)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
}, [""])
|
})
|
||||||
Volcanos(chat.ONACTION, {
|
Volcanos(chat.ONACTION, {
|
||||||
route: function(event, can, route, internal) {
|
route: function(event, can, route, internal) {
|
||||||
var link = can.base.trimPrefix(route||"", nfs.USR_LEARNING_PORTAL, nfs.SRC_DOCUMENT); if (!link || link == can.db.current) { return }
|
var link = can.base.trimPrefix(route||"", nfs.USR_LEARNING_PORTAL, nfs.SRC_DOCUMENT); if (!link || link == can.db.current) { return }
|
||||||
|
4
info.go
4
info.go
@ -329,7 +329,9 @@ func (m *Message) FileURI(dir string) string {
|
|||||||
dir = strings.TrimPrefix(dir, ISH_PLUGED)
|
dir = strings.TrimPrefix(dir, ISH_PLUGED)
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(dir, PS) {
|
if strings.HasPrefix(dir, PS) {
|
||||||
|
if !strings.Contains(dir, "pod=") {
|
||||||
|
dir = kit.MergeURL(dir, POD, m.Option(MSG_USERPOD))
|
||||||
|
}
|
||||||
} else if strings.HasPrefix(dir, USR_VOLCANOS) {
|
} else if strings.HasPrefix(dir, USR_VOLCANOS) {
|
||||||
dir = strings.TrimPrefix(dir, USR)
|
dir = strings.TrimPrefix(dir, USR)
|
||||||
} else {
|
} else {
|
||||||
|
@ -159,7 +159,7 @@ func spideToken(m *ice.Message, api string, token, expire string, arg ...string)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
m.Info("res: %v", res.FormatMeta())
|
m.Info("res: %v", res.FormatMeta())
|
||||||
mdb.HashModify(m, m.OptionSimple(ACCESS), expire, m.Time(kit.Format("%vs", res.Append(oauth.EXPIRES_IN))), token, res.Append(kit.Select(oauth.ACCESS_TOKEN, TICKET, api == TICKET_GETTICKET)))
|
mdb.HashModify(m, m.OptionSimple(ACCESS), expire, m.Time(kit.Format("%vs", kit.Int(res.Append(oauth.EXPIRES_IN))-1000)), token, res.Append(kit.Select(oauth.ACCESS_TOKEN, TICKET, api == TICKET_GETTICKET)))
|
||||||
msg = mdb.HashSelect(m.Spawn(), m.Option(ACCESS))
|
msg = mdb.HashSelect(m.Spawn(), m.Option(ACCESS))
|
||||||
}
|
}
|
||||||
m.Echo(msg.Append(token)).Status(msg.AppendSimple(expire))
|
m.Echo(msg.Append(token)).Status(msg.AppendSimple(expire))
|
||||||
|
@ -28,13 +28,20 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
can.base.isFunc(cb) && cb(can.base.ParseJSON(res.resultStr))
|
can.base.isFunc(cb) && cb(can.base.ParseJSON(res.resultStr))
|
||||||
} }) },
|
} }) },
|
||||||
}, function(key, value) { return can.user.agent[key] = value, key }).concat([
|
}, function(key, value) { return can.user.agent[key] = value, key }).concat([
|
||||||
"updateAppMessageShareData", "updateTimelineShareData",
|
"updateAppMessageShareData",
|
||||||
]), openTagList: ["wx-open-subscribe"],
|
], can.user.isMobile? ["updateTimelineShareData"]: []), openTagList: ["wx-open-subscribe"],
|
||||||
|
})
|
||||||
|
wx.error(function (res) {
|
||||||
|
can.user.toastFailure(can, JSON.stringify(res))
|
||||||
})
|
})
|
||||||
wx.ready(function () {
|
wx.ready(function () {
|
||||||
function share(title, icons, content, link) {
|
function share(title, icons, content, link) {
|
||||||
wx.updateAppMessageShareData({title: title, desc: content||can.user.info.titles, link: link||location.href, imgUrl: icons})
|
wx.updateAppMessageShareData({title: title, desc: content||can.user.info.titles, link: link||location.href, imgUrl: icons, fail: function(res) {
|
||||||
wx.updateTimelineShareData({title: title, link: link||location.href, imgUrl: icons})
|
can.user.toastFailure(can, JSON.stringify(res))
|
||||||
|
}})
|
||||||
|
can.user.isMobile && wx.updateTimelineShareData({title: title, link: link||location.href, imgUrl: icons, fail: function(res) {
|
||||||
|
can.user.toastFailure(can, JSON.stringify(res))
|
||||||
|
}})
|
||||||
}
|
}
|
||||||
var p = can.misc.Resource(can, can.user.info.favicon); can.base.beginWith(p, "/") && (p = location.origin + p)
|
var p = can.misc.Resource(can, can.user.info.favicon); can.base.beginWith(p, "/") && (p = location.origin + p)
|
||||||
can.user.agent.init = function(can, content, icons, link) { if (!can) { return }
|
can.user.agent.init = function(can, content, icons, link) { if (!can) { return }
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package wx
|
package wx
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/ctx"
|
"shylinux.com/x/icebergs/base/ctx"
|
||||||
"shylinux.com/x/icebergs/base/mdb"
|
"shylinux.com/x/icebergs/base/mdb"
|
||||||
@ -39,22 +41,23 @@ func init() {
|
|||||||
value[mdb.TEXT] = web.C(value[ctx.INDEX])
|
value[mdb.TEXT] = web.C(value[ctx.INDEX])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
value[mdb.TEXT] = m.MergeLink(value[mdb.TEXT])
|
value[mdb.TEXT] = m.MergeLink(value[mdb.TEXT] + value[ctx.ARGS])
|
||||||
})
|
})
|
||||||
kit.Value(list, key, kit.Dict(mdb.TYPE, value[mdb.TYPE], mdb.NAME, value[mdb.NAME], mdb.KEY, value[mdb.HASH], web.URL, value[mdb.TEXT]))
|
kit.Value(list, key, kit.Dict(mdb.TYPE, value[mdb.TYPE], mdb.NAME, value[mdb.NAME], mdb.KEY, value[mdb.HASH], web.URL, value[mdb.TEXT]))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
m.Echo(kit.Formats(SpidePost(m, MENU_CREATE, web.SPIDE_DATA, kit.Formats(list))))
|
m.Echo(kit.Formats(SpidePost(m, MENU_CREATE, web.SPIDE_DATA, strings.ReplaceAll(kit.Format(list), "\\u0026", "&"))))
|
||||||
m.ProcessHold()
|
m.ProcessHold()
|
||||||
}},
|
}},
|
||||||
|
web.PREVIEW: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
|
m.ProcessOpen(m.MergeLink(kit.Select(web.S(m.Option(web.SPACE))+web.C(m.Option(ctx.INDEX)), m.Option(mdb.TEXT)) + m.Option(ctx.ARGS)))
|
||||||
|
}},
|
||||||
}, mdb.ExportHashAction(mdb.SHORT, "scene,river,storm", mdb.FIELD, "time,hash,scene,river,storm,type,name,text,icons,space,index,args")), Hand: func(m *ice.Message, arg ...string) {
|
}, mdb.ExportHashAction(mdb.SHORT, "scene,river,storm", mdb.FIELD, "time,hash,scene,river,storm,type,name,text,icons,space,index,args")), Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Option("cache.limit", "-1")
|
|
||||||
if len(arg) == 0 {
|
if len(arg) == 0 {
|
||||||
m.Cmdy(ACCESS).PushAction("").Option(ice.MSG_ACTION, "")
|
m.Cmdy(ACCESS).PushAction("").Action()
|
||||||
if m.Length() == 0 {
|
kit.If(m.Length() == 0, func() { m.SetResult() })
|
||||||
m.SetResult()
|
} else if mdb.HashSelect(m.Options("cache.limit", "-1"), arg[1:]...).Sort(mdb.Config(m, mdb.SHORT), ice.STR, ice.INT, ice.INT); len(arg) == 1 {
|
||||||
}
|
m.PushAction(web.PREVIEW, mdb.REMOVE)
|
||||||
} else if mdb.HashSelect(m, arg[1:]...).Sort(mdb.Config(m, mdb.SHORT), ice.STR, ice.INT, ice.INT); len(arg) == 1 {
|
|
||||||
m.Action(mdb.CREATE, mdb.UPDATE)
|
m.Action(mdb.CREATE, mdb.UPDATE)
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
|
@ -14,9 +14,7 @@ func init() {
|
|||||||
m.Cmdy(ACCESS)
|
m.Cmdy(ACCESS)
|
||||||
} else if m.Option(ACCESS, arg[0]); len(arg) == 1 {
|
} else if m.Option(ACCESS, arg[0]); len(arg) == 1 {
|
||||||
res := SpideGet(m, "template/get_all_private_template")
|
res := SpideGet(m, "template/get_all_private_template")
|
||||||
kit.For(kit.Value(res, "template_list"), func(value ice.Map) {
|
kit.For(kit.Value(res, "template_list"), func(value ice.Map) { m.Push("", value) })
|
||||||
m.Push("", value)
|
|
||||||
})
|
|
||||||
m.Cut("template_id,title,content,example")
|
m.Cut("template_id,title,content,example")
|
||||||
} else if len(arg) > 4 {
|
} else if len(arg) > 4 {
|
||||||
args := []ice.Any{"template_id", arg[1], "touser", arg[2], "url", arg[3]}
|
args := []ice.Any{"template_id", arg[1], "touser", arg[2], "url", arg[3]}
|
||||||
|
@ -12,3 +12,4 @@ field web.chat.wx.menu
|
|||||||
field web.chat.wx.scan
|
field web.chat.wx.scan
|
||||||
field web.chat.wx.tags
|
field web.chat.wx.tags
|
||||||
field web.chat.wx.users
|
field web.chat.wx.users
|
||||||
|
field web.chat.wx.template
|
||||||
|
Loading…
x
Reference in New Issue
Block a user