1
0
mirror of https://shylinux.com/x/icebergs synced 2025-06-28 19:17:23 +08:00
This commit is contained in:
IT 老营长 @云轩领航-创始人 2025-06-27 17:35:28 +08:00
parent 941e97f98b
commit e87bdc0a82
5 changed files with 14 additions and 8 deletions

View File

@ -54,9 +54,7 @@ func init() {
), Actions: ice.MergeActions(ice.Actions{
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) {
ice.AddRender(ice.RENDER_QRCODE, func(m *ice.Message, args ...ice.Any) string {
if m.IsMobileUA() {
m.Option(SIZE, "280")
}
kit.If(m.IsMobileUA(), func() { m.Option(SIZE, "280") })
return m.Cmd(Prefix(QRCODE), kit.Simple(args...)).Result()
})
}},
@ -66,6 +64,13 @@ func init() {
m.Push(arg[0], kit.SortedKey(_color_map))
}
}},
"view": {Name: "view text icon link", Hand: func(m *ice.Message, arg ...string) {
m.Echo("<div class='code qrcode'>")
defer m.Echo("</div>")
m.Cmdy("", arg[2])
m.Echo("<img class='avatar' src='%s'></img>", arg[1])
m.Echo(arg[0])
}},
}), Hand: func(m *ice.Message, arg ...string) {
if m.IsCliUA() {
m.OptionDefault(FG, BLACK, BG, WHITE)

View File

@ -141,7 +141,7 @@ func init() {
m.Echo(m.Option(ice.MSG_SESSID))
}
}},
}, web.ApiAction(), mdb.ImportantHashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,type,name,help,icons,order,link,space,index,args")), Hand: func(m *ice.Message, arg ...string) {
}, web.ApiAction(), mdb.ImportantHashAction(mdb.SHORT, mdb.NAME, mdb.FIELD, "time,type,name,help,prompt,icons,order,link,space,index,args")), Hand: func(m *ice.Message, arg ...string) {
if kit.Contains(m.Option(ice.MSG_USERUA), "MicroMessenger") {
if m.Option(ice.MSG_USERNAME) == "" && m.Option("code") == "" && mdb.Config(m, "oauth") != "" {
m.ProcessOpen(mdb.Config(m, "oauth"))

View File

@ -2,7 +2,7 @@ $fieldset { --portal-max-width:1200px; --portal-header-height:64px; --portal-mai
$fieldset.home { --portal-max-width:1500px; }
$fieldset>div.header { display:none; }
$output { padding:0; }
$output>div.header { background-color:var(--panel-bg-color); height:var(--portal-header-height); --hover-bg-color:var(--plugin-bg-color); }
$output>div.header { box-shadow:var(--box-shadow); background-color:var(--panel-bg-color); height:var(--portal-header-height); --hover-bg-color:var(--plugin-bg-color); }
$output>div.header div.list { display:flex; }
$output>div.header div.story[data-name=navmenu] { --hover-fg-color:white; }
$output>div.header div.story div.item span { white-space:pre; overflow:hidden; }
@ -13,7 +13,7 @@ $output>div.header div.story[data-name=navmenu] div.item:first-child { padding:v
$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); }
$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); }
$output>div.header div.story[data-name=navmenu] div.item:not(.space):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); }
$output>div.header div.story[data-name=navmenu] div.item.space { padding:0px; width:20px; }
$output>div.layout { display:flex; justify-content:center; }

View File

@ -99,6 +99,8 @@ func init() {
}},
PROJECT: {Hand: func(m *ice.Message, arg ...string) { _spark_project(m, arg...) }},
PRODUCT: {Hand: func(m *ice.Message, arg ...string) { _spark_product(m, arg...) }},
"raw": {Hand: func(m *ice.Message, arg ...string) { m.Echo(arg[0], kit.TransArgs(arg[1:])...) }},
"html": {Hand: func(m *ice.Message, arg ...string) { m.Echo(arg[0], kit.TransArgs(arg[1:])...) }},
}), Hand: func(m *ice.Message, arg ...string) {
m.Option(mdb.META, "")
if kit.Ext(arg[0]) == "md" {

View File

@ -8,7 +8,6 @@ Volcanos(chat.ONIMPORT, {
debug = false, can.onmotion.hidden(can, can._fields)
wx.config({debug: debug, signature: msg.Option("signature"), timestamp: msg.Option("timestamp"), nonceStr: msg.Option("noncestr"), appId: msg.Option("appid"),
jsApiList: can.core.Item({
/*
getLocation: function(can, cb) { wx.getLocation({type: "gcj02", success: function (res) {
can.base.isFunc(cb) && cb({type: "gcj02", name: "当前位置", text: "当前位置", latitude: parseInt(res.latitude*100000), longitude: parseInt(res.longitude*100000) })
} }) },
@ -28,7 +27,6 @@ Volcanos(chat.ONIMPORT, {
scanQRCode: function(can, cb) { wx.scanQRCode({needResult: cb? 1: 0, scanType: ["qrCode", "barCode"], success: function (res) {
can.base.isFunc(cb) && cb(can.base.ParseJSON(res.resultStr))
} }) },
*/
}, function(key, value) { return can.user.agent[key] = value, key }).concat([
"updateAppMessageShareData",
], can.user.isMobile? ["updateTimelineShareData"]: []), openTagList: ["wx-open-subscribe"],
@ -50,6 +48,7 @@ Volcanos(chat.ONIMPORT, {
p = can.misc.Resource(can, icons||can.Conf(mdb.ICONS))||p; can.base.beginWith(p, "/") && (p = location.origin + p)
share(document.title, p, content, link)
}, can.user.agent.init(can.user.agent.cmd, can.user.agent._init_content, can.user.agent._init_icons)
location.pathname == "/" && can.onmotion.delay(can, function() { share(document.title, can.misc.Resource(can, can.user.info.favicon)) }, 300)
})
})
},