forked from x/icebergs
add some
This commit is contained in:
parent
aea7a148bc
commit
4f817911cc
@ -27,9 +27,6 @@ func _role_black(m *ice.Message, role, key string) { _role_set(m, role, BLACK, k
|
|||||||
func _role_check(value ice.Map, key []string, ok bool) bool {
|
func _role_check(value ice.Map, key []string, ok bool) bool {
|
||||||
white, black := value[WHITE].(ice.Map), value[BLACK].(ice.Map)
|
white, black := value[WHITE].(ice.Map), value[BLACK].(ice.Map)
|
||||||
for i := 0; i < len(key); i++ {
|
for i := 0; i < len(key); i++ {
|
||||||
ice.Pulse.Info("debug what %v", kit.Join(key[:i+1], ice.PT))
|
|
||||||
ice.Pulse.Info("debug what %v", white[kit.Join(key[:i+1], ice.PT)])
|
|
||||||
ice.Pulse.Info("debug what %v", black[kit.Join(key[:i+1], ice.PT)])
|
|
||||||
kit.If(white[kit.Join(key[:i+1], ice.PT)], func() { ok = true })
|
kit.If(white[kit.Join(key[:i+1], ice.PT)], func() { ok = true })
|
||||||
kit.If(black[kit.Join(key[:i+1], ice.PT)], func() { ok = false })
|
kit.If(black[kit.Join(key[:i+1], ice.PT)], func() { ok = false })
|
||||||
}
|
}
|
||||||
|
@ -44,6 +44,7 @@ fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.icon { ma
|
|||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.list.icons { margin:var(--button-margin) 0; }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.list.icons { margin:var(--button-margin) 0; }
|
||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.back.icons { margin:var(--button-margin) 0; }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.back.icons { margin:var(--button-margin) 0; }
|
||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.item:last-child { margin-right:100px; }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.item:last-child { margin-right:100px; }
|
||||||
|
body.width2 fieldset.macos.desktop>div.output>div.desktop>fieldset>form.option>div.item:last-child { margin-right:0; }
|
||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>div.item:last-child { margin-right:100px; }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>div.item:last-child { margin-right:100px; }
|
||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>* { margin:var(--button-margin) var(--input-margin); }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>* { margin:var(--button-margin) var(--input-margin); }
|
||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>div.tabs { display:none; }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset>div.action>div.tabs { display:none; }
|
||||||
@ -60,6 +61,7 @@ fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.location>div.act
|
|||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.location>div.action>div.item.style select { width:80px; }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.location>div.action>div.item.style select { width:80px; }
|
||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.location>div.action>div.item.feature select { width:60px; }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.location>div.action>div.item.feature select { width:60px; }
|
||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.iframe>form.option>div.item.hash>input { width:var(--river-width); }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.iframe>form.option>div.item.hash>input { width:var(--river-width); }
|
||||||
|
body.width2 fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.iframe>form.option>div.item.hash>input { width:var(--input-width); }
|
||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.macos.finder>div.status { display:none; }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.macos.finder>div.status { display:none; }
|
||||||
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.macos.finder>div.output div.item.disable { display:none; }
|
fieldset.macos.desktop>div.output>div.desktop>fieldset.web.chat.macos.finder>div.output div.item.disable { display:none; }
|
||||||
fieldset.macos.desktop>div.output>fieldset.web.chat.macos.dock>div.output div.item.disable { display:none; }
|
fieldset.macos.desktop>div.output>fieldset.web.chat.macos.dock>div.output div.item.disable { display:none; }
|
||||||
|
@ -32,8 +32,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
sub.onexport.record = function(sub, value, key, item) { can.onimport._window(can, item) }
|
sub.onexport.record = function(sub, value, key, item) { can.onimport._window(can, item) }
|
||||||
}) },
|
}) },
|
||||||
_searchs: function(can) { can.onappend.plugin(can, {index: "web.chat.macos.searchs"}, function(sub) { can.ui.searchs = sub, can.onmotion.hidden(can, sub._target)
|
_searchs: function(can) { can.onappend.plugin(can, {index: "web.chat.macos.searchs"}, function(sub) { can.ui.searchs = sub, can.onmotion.hidden(can, sub._target)
|
||||||
can.page.style(can, sub._target, html.LEFT, can.ConfWidth()/4, html.TOP, can.ConfHeight()/4), sub.onimport.size(sub, can.ConfHeight()/2, can.ConfWidth()/2, true)
|
can.page.style(can, sub._target, html.LEFT, can.ConfWidth()/4, html.TOP, can.ConfHeight()/4), sub.onimport.size(sub, can.ConfHeight()/2, can.ConfWidth()/2, true);
|
||||||
can.user.isMobile && can.page.style(can, sub._target, html.LEFT, 0, html.TOP, 0), can.user.isMobile && sub.onimport.size(sub, can.ConfHeight(), can.ConfWidth(), true)
|
|
||||||
sub.onaction._close = function() { can.onmotion.hidden(can, sub._target) }, can.onmotion.hidden(can, sub._target)
|
sub.onaction._close = function() { can.onmotion.hidden(can, sub._target) }, can.onmotion.hidden(can, sub._target)
|
||||||
sub.onexport.record = function(sub, value, key, item, event) { switch (item.type) {
|
sub.onexport.record = function(sub, value, key, item, event) { switch (item.type) {
|
||||||
case ice.CMD: can.onimport._window(can, {index: item.name, args: can.base.Obj(item.text) }); break
|
case ice.CMD: can.onimport._window(can, {index: item.name, args: can.base.Obj(item.text) }); break
|
||||||
@ -70,6 +69,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
_window: function(can, item, cb) { if (!item.index) { return }
|
_window: function(can, item, cb) { if (!item.index) { return }
|
||||||
item.height = can.ConfHeight()-125, item.width = can.ConfWidth()-200, item.left = (can.ConfWidth()-item.width)/2, item.top = 25
|
item.height = can.ConfHeight()-125, item.width = can.ConfWidth()-200, item.left = (can.ConfWidth()-item.width)/2, item.top = 25
|
||||||
if (can.ConfWidth() > 1400) { item.width = can.base.Min(can.ConfWidth()-600, 640, 1400), item.left = (can.ConfWidth()-item.width)/2 }
|
if (can.ConfWidth() > 1400) { item.width = can.base.Min(can.ConfWidth()-600, 640, 1400), item.left = (can.ConfWidth()-item.width)/2 }
|
||||||
|
if (can.ConfWidth() < 800) { item.width = can.ConfWidth(), item.left = 0 }
|
||||||
if (can.ConfHeight() > 800) { item.height = can.base.Min(can.ConfHeight()-200, 320, 800), item.top = 50 }
|
if (can.ConfHeight() > 800) { item.height = can.base.Min(can.ConfHeight()-200, 320, 800), item.top = 50 }
|
||||||
if (can.user.isMobile) { item.height = can.ConfHeight()-125, item.top = 25, item.width = can.ConfWidth(), item.left = 0 }
|
if (can.user.isMobile) { item.height = can.ConfHeight()-125, item.top = 25, item.width = can.ConfWidth(), item.left = 0 }
|
||||||
item.height = can.base.Max(html.DESKTOP_HEIGHT, item.height), item.width = can.base.Max(html.DESKTOP_WIDTH, item.width)
|
item.height = can.base.Max(html.DESKTOP_HEIGHT, item.height), item.width = can.base.Max(html.DESKTOP_WIDTH, item.width)
|
||||||
@ -120,9 +120,13 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
}, [""])
|
}, [""])
|
||||||
Volcanos(chat.ONACTION, {
|
Volcanos(chat.ONACTION, {
|
||||||
_search: function(can) { var sub = can.ui.searchs; if (can.onmotion.toggle(can, sub._target)) {
|
_search: function(can) { var sub = can.ui.searchs; if (can.onmotion.toggle(can, sub._target)) {
|
||||||
sub.onimport.size(sub, can.ConfHeight()/2, can.ConfWidth()/2, true)
|
if (can.user.isMobile || can.ConfWidth() < 800) {
|
||||||
sub.onimport.size(sub, can.ConfHeight()/2, can.base.Min(sub._target.offsetWidth, can.ConfWidth()/2, can.ConfWidth()), true)
|
can.page.style(can, sub._target, html.LEFT, 0, html.TOP, 25)
|
||||||
can.page.style(can, sub._target, html.LEFT, (can.ConfWidth()-sub._target.offsetWidth)/2, html.TOP, can.ConfHeight()/4)
|
sub.onimport.size(sub, can.ConfHeight()-115, can.ConfWidth(), true)
|
||||||
|
} else {
|
||||||
|
can.page.style(can, sub._target, html.LEFT, (can.ConfWidth()-sub._target.offsetWidth)/2, html.TOP, can.ConfHeight()/4)
|
||||||
|
sub.onimport.size(sub, can.ConfHeight()/2, can.base.Min(sub._target.offsetWidth, can.ConfWidth()/2, can.ConfWidth()), true)
|
||||||
|
}
|
||||||
can.page.Select(can, sub._option, "input[name=keyword]", function(target) { can.onmotion.focus(can, target) })
|
can.page.Select(can, sub._option, "input[name=keyword]", function(target) { can.onmotion.focus(can, target) })
|
||||||
} },
|
} },
|
||||||
create: function(event, can) { can.onimport._desktop(can) },
|
create: function(event, can) { can.onimport._desktop(can) },
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"shylinux.com/x/icebergs/base/ctx"
|
"shylinux.com/x/icebergs/base/ctx"
|
||||||
"shylinux.com/x/icebergs/base/mdb"
|
"shylinux.com/x/icebergs/base/mdb"
|
||||||
"shylinux.com/x/icebergs/base/nfs"
|
"shylinux.com/x/icebergs/base/nfs"
|
||||||
|
"shylinux.com/x/icebergs/base/web"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,6 +18,10 @@ func _css_stat(m *ice.Message, zone string, stats map[string]int) {
|
|||||||
m.Copy(msg.SortIntR(mdb.VALUE))
|
m.Copy(msg.SortIntR(mdb.VALUE))
|
||||||
}
|
}
|
||||||
func _css_show(m *ice.Message, arg ...string) {
|
func _css_show(m *ice.Message, arg ...string) {
|
||||||
|
if arg[1] == "main.css" {
|
||||||
|
m.EchoIFrame(m.MergePodCmd("", web.ADMIN))
|
||||||
|
return
|
||||||
|
}
|
||||||
zone, stats_key, stats_value := "", map[string]int{}, map[string]int{}
|
zone, stats_key, stats_value := "", map[string]int{}, map[string]int{}
|
||||||
m.Cmd(nfs.CAT, path.Join(arg[2], arg[1]), func(line string) {
|
m.Cmd(nfs.CAT, path.Join(arg[2], arg[1]), func(line string) {
|
||||||
if line = strings.TrimSpace(line); line == "" || strings.HasPrefix(line, "//") || strings.HasPrefix(line, "/*") {
|
if line = strings.TrimSpace(line); line == "" || strings.HasPrefix(line, "//") || strings.HasPrefix(line, "/*") {
|
||||||
|
@ -64,6 +64,10 @@ func _go_navigate(m *ice.Message, arg ...string) {
|
|||||||
func _go_show(m *ice.Message, arg ...string) {
|
func _go_show(m *ice.Message, arg ...string) {
|
||||||
if arg[1] == MAIN_GO {
|
if arg[1] == MAIN_GO {
|
||||||
ProcessXterm(m, kit.JoinWord("ish", arg[1]), "", "")
|
ProcessXterm(m, kit.JoinWord("ish", arg[1]), "", "")
|
||||||
|
} else if arg[1] == "version.go" {
|
||||||
|
ctx.ProcessField(m, cli.RUNTIME, kit.Simple())
|
||||||
|
} else if arg[1] == "binpack.go" {
|
||||||
|
ctx.ProcessField(m, nfs.PACK, kit.Simple())
|
||||||
} else if cmd := ctx.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
} else if cmd := ctx.GetFileCmd(path.Join(arg[2], arg[1])); cmd != "" {
|
||||||
ctx.ProcessField(m, cmd, kit.Simple())
|
ctx.ProcessField(m, cmd, kit.Simple())
|
||||||
} else if msg := m.Cmd(yac.STACK, path.Join(arg[2], arg[1])); msg.Option("__index") != "" {
|
} else if msg := m.Cmd(yac.STACK, path.Join(arg[2], arg[1])); msg.Option("__index") != "" {
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
ice "shylinux.com/x/icebergs"
|
ice "shylinux.com/x/icebergs"
|
||||||
"shylinux.com/x/icebergs/base/mdb"
|
"shylinux.com/x/icebergs/base/mdb"
|
||||||
"shylinux.com/x/icebergs/base/nfs"
|
"shylinux.com/x/icebergs/base/nfs"
|
||||||
|
"shylinux.com/x/icebergs/base/web"
|
||||||
kit "shylinux.com/x/toolkits"
|
kit "shylinux.com/x/toolkits"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -17,7 +18,11 @@ func init() {
|
|||||||
Index.MergeCommands(ice.Commands{
|
Index.MergeCommands(ice.Commands{
|
||||||
HTML: {Actions: ice.MergeActions(ice.Actions{
|
HTML: {Actions: ice.MergeActions(ice.Actions{
|
||||||
mdb.RENDER: {Hand: func(m *ice.Message, arg ...string) {
|
mdb.RENDER: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.EchoIFrame(m.MergeLink(require(arg[2], arg[1]), "_v", kit.Hashs(mdb.UNIQ)))
|
if arg[1] == "main.html" {
|
||||||
|
m.EchoIFrame(m.MergePodCmd("", web.ADMIN))
|
||||||
|
} else {
|
||||||
|
m.EchoIFrame(m.MergeLink(require(arg[2], arg[1]), "_v", kit.Hashs(mdb.UNIQ)))
|
||||||
|
}
|
||||||
}},
|
}},
|
||||||
mdb.ENGINE: {Hand: func(m *ice.Message, arg ...string) {
|
mdb.ENGINE: {Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.EchoIFrame(m.MergeLink(require(arg[2], arg[1]), "_v", kit.Hashs(mdb.UNIQ)))
|
m.EchoIFrame(m.MergeLink(require(arg[2], arg[1]), "_v", kit.Hashs(mdb.UNIQ)))
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
|
|
||||||
func _js_show(m *ice.Message, arg ...string) {
|
func _js_show(m *ice.Message, arg ...string) {
|
||||||
if arg[1] == MAIN_JS {
|
if arg[1] == MAIN_JS {
|
||||||
ctx.ProcessField(m, web.CHAT_IFRAME, kit.Simple(web.UserHost(m)))
|
ctx.ProcessField(m, web.CHAT_IFRAME, kit.Simple(m.MergePodCmd("", web.ADMIN)))
|
||||||
} else if arg[2] == ice.USR_VOLCANOS {
|
} else if arg[2] == ice.USR_VOLCANOS {
|
||||||
if strings.HasPrefix(arg[1], "publish/client/mp/") {
|
if strings.HasPrefix(arg[1], "publish/client/mp/") {
|
||||||
ctx.ProcessField(m, "web.chat.wx.ide", nil)
|
ctx.ProcessField(m, "web.chat.wx.ide", nil)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user