forked from x/icebergs
add some
This commit is contained in:
parent
564d320c7e
commit
5fce84de25
@ -101,10 +101,8 @@ func init() {
|
|||||||
),
|
),
|
||||||
), Actions: ice.MergeActions(ice.Actions{
|
), Actions: ice.MergeActions(ice.Actions{
|
||||||
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(DREAM, mdb.INPUTS, arg) }},
|
mdb.INPUTS: {Hand: func(m *ice.Message, arg ...string) { m.Cmdy(DREAM, mdb.INPUTS, arg) }},
|
||||||
mdb.CREATE: {Name: "create name*=hi icons origin*", Hand: func(m *ice.Message, arg ...string) {
|
mdb.CREATE: {Name: "create name*=hi icons repos binary template", Hand: func(m *ice.Message, arg ...string) {
|
||||||
m.Cmd(SPIDE, mdb.CREATE, arg, mdb.TYPE, nfs.REPOS)
|
m.Cmd(DREAM, mdb.CREATE, arg)
|
||||||
m.Options(m.Cmd(SPIDE, m.Option(mdb.NAME)).AppendSimple())
|
|
||||||
m.Cmdy(SPIDE, mdb.DEV_REQUEST)
|
|
||||||
}},
|
}},
|
||||||
mdb.REMOVE: {Hand: func(m *ice.Message, arg ...string) { _matrix_dream(m, nfs.TRASH); _matrix_dream(m, "") }},
|
mdb.REMOVE: {Hand: func(m *ice.Message, arg ...string) { _matrix_dream(m, nfs.TRASH); _matrix_dream(m, "") }},
|
||||||
cli.START: {Hand: func(m *ice.Message, arg ...string) { _matrix_dream(m, "") }},
|
cli.START: {Hand: func(m *ice.Message, arg ...string) { _matrix_dream(m, "") }},
|
||||||
|
@ -28,7 +28,7 @@ Volcanos(chat.ONIMPORT, {
|
|||||||
function cb(action) { return function(event) { can.Update(can.request(event, item), [ctx.ACTION, action]) } }
|
function cb(action) { return function(event) { can.Update(can.request(event, item), [ctx.ACTION, action]) } }
|
||||||
return {view: [[html.ITEM, item.type, item.status, can.onimport.style(can, item, list)]], list: [
|
return {view: [[html.ITEM, item.type, item.status, can.onimport.style(can, item, list)]], list: [
|
||||||
{img: can.misc.Resource(can, item.icons, can.core.Keys(item.domain, item.name)), onclick: cb(web.DESKTOP)}, {view: wiki.TITLE, list: [
|
{img: can.misc.Resource(can, item.icons, can.core.Keys(item.domain, item.name)), onclick: cb(web.DESKTOP)}, {view: wiki.TITLE, list: [
|
||||||
{text: item.name||item.domain||location.host, onclick: cb(web.OPEN)},
|
{text: item.name||item.domain||"中华人民共和国中央人民政府"||location.host, onclick: cb(web.OPEN)},
|
||||||
item.status != cli.STOP && can.onappend.label(can, item, {version: icon.version, time: icon.compile, access: "bi bi-file-lock"}),
|
item.status != cli.STOP && can.onappend.label(can, item, {version: icon.version, time: icon.compile, access: "bi bi-file-lock"}),
|
||||||
{text: [item.text, "", mdb.STATUS]},
|
{text: [item.text, "", mdb.STATUS]},
|
||||||
can.onappend.buttons(can, item),
|
can.onappend.buttons(can, item),
|
||||||
|
@ -99,12 +99,20 @@ func _autogen_git(m *ice.Message, arg ...string) ice.Map {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
func _autogen_mod(m *ice.Message, file string) (mod string) {
|
func _autogen_mod(m *ice.Message, file string) (mod string) {
|
||||||
host := kit.ParseURL(kit.Select(m.Option(ice.MSG_USERHOST), ice.Info.Make.Remote, m.Cmdx(REPOS, REMOTE_URL))).Hostname()
|
host := m.Cmdx(REPOS, REMOTE_URL)
|
||||||
|
if host != "" {
|
||||||
|
host = strings.Split(host, "://")[1]
|
||||||
|
if strings.Contains(host, ":") {
|
||||||
|
host = path.Base(host)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
host = kit.ParseURL(kit.Select(m.Option(ice.MSG_USERHOST), ice.Info.Make.Remote)).Hostname()
|
||||||
if host == "" {
|
if host == "" {
|
||||||
host = path.Base(kit.Path(""))
|
host = path.Base(kit.Path(""))
|
||||||
} else {
|
} else {
|
||||||
host = path.Join(host, "x", path.Base(kit.Path("")))
|
host = path.Join(host, "x", path.Base(kit.Path("")))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
m.Cmd(nfs.DEFS, file, kit.Format(nfs.Template(m, ice.GO_MOD), host))
|
m.Cmd(nfs.DEFS, file, kit.Format(nfs.Template(m, ice.GO_MOD), host))
|
||||||
// ReposAddFile(m, "", ice.GO_MOD)
|
// ReposAddFile(m, "", ice.GO_MOD)
|
||||||
m.Cmd(nfs.CAT, file, func(line string) {
|
m.Cmd(nfs.CAT, file, func(line string) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user