1
0
forked from x/icebergs
This commit is contained in:
IT 老营长 @云轩领航-创始人 2023-10-12 17:24:56 +08:00
parent 57b2aed386
commit 84109ec520
4 changed files with 9 additions and 6 deletions

View File

@ -114,8 +114,6 @@ func Command(m *ice.Message, arg ...string) {
func FileURI(dir string) string {
if dir == "" {
return ""
} else if kit.HasPrefix(dir, nfs.PS, ice.HTTP) {
return dir
} else if strings.Contains(dir, "/pkg/mod/") {
dir = strings.Split(dir, "/pkg/mod/")[1]
} else if ice.Info.Make.Path != "" && strings.HasPrefix(dir, ice.Info.Make.Path) {
@ -124,6 +122,8 @@ func FileURI(dir string) string {
dir = strings.TrimPrefix(dir, kit.Path("")+nfs.PS)
} else if strings.HasPrefix(dir, ice.ISH_PLUGED) {
dir = strings.TrimPrefix(dir, ice.ISH_PLUGED)
} else if kit.HasPrefix(dir, nfs.PS, ice.HTTP) {
return dir
}
if strings.HasPrefix(dir, ice.USR_VOLCANOS) {
return strings.TrimPrefix(dir, ice.USR)

View File

@ -2,6 +2,7 @@ package macos
import (
"path"
"strings"
ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/cli"
@ -26,7 +27,9 @@ func init() {
if !kit.HasPrefix(cmd.Icon, nfs.PS, web.HTTP) {
kit.If(!nfs.Exists(m, cmd.Icon), func() { nfs.Exists(m, ice.USR_ICONS+cmd.Icon, func(p string) { cmd.Icon = p }) })
kit.If(!nfs.Exists(m, cmd.Icon), func() {
nfs.Exists(m, ctx.GetCmdFile(m, m.PrefixKey()), func(p string) { cmd.Icon = path.Join(path.Dir(p), cmd.Icon) })
nfs.Exists(m, ctx.GetCmdFile(m, m.PrefixKey()), func(p string) {
cmd.Icon = path.Join(path.Dir(strings.TrimPrefix(p, kit.Path(""))), cmd.Icon)
})
})
}
AppInstall(m, cmd.Icon, m.PrefixKey())

View File

@ -4,8 +4,8 @@ websocket
webview
qrcode
xterm
git
ssh
git
vim
bash
@ -15,8 +15,8 @@ input
yac
lex
java
node
java
coder
chrome
github

View File

@ -73,7 +73,7 @@ func init() {
m.ProcessRefresh()
}},
code.XTERM: {},
}, mdb.PageZoneAction(mdb.SHORT, mdb.UNIQ, mdb.FIELD, "time,hash,count,status,connect", mdb.FIELDS, "time,id,type,text")), Hand: func(m *ice.Message, arg ...string) {
}, mdb.PageZoneAction(mdb.SHORT, mdb.UNIQ, mdb.FIELD, "time,hash,count,status,connect", mdb.FIELDS, "time,id,type,text"), mdb.ClearOnExitHashAction()), Hand: func(m *ice.Message, arg ...string) {
if mdb.PageZoneSelect(m, arg...); len(arg) == 0 {
m.Table(func(value ice.Maps) {
m.PushButton(kit.Select("", ctx.COMMAND, value[mdb.STATUS] == tcp.OPEN), mdb.REMOVE)