forked from x/icebergs
opt some
This commit is contained in:
parent
48de925bb3
commit
3ef13accf7
@ -53,9 +53,9 @@ func ToastProcess(m *ice.Message, arg ...ice.Any) func() {
|
||||
Toast(m, ice.PROCESS, arg...)
|
||||
return func() { Toast(m, ice.SUCCESS) }
|
||||
}
|
||||
func ToastRestart(m *ice.Message, arg ...ice.Any) { Toast(m, gdb.RESTART, arg...) }
|
||||
func ToastFailure(m *ice.Message, arg ...ice.Any) { Toast(m, ice.FAILURE, arg...) }
|
||||
func ToastSuccess(m *ice.Message, arg ...ice.Any) { Toast(m, ice.SUCCESS, arg...) }
|
||||
func ToastRestart(m *ice.Message, arg ...ice.Any) { Toast(m, gdb.RESTART, arg...) }
|
||||
func ToastFailure(m *ice.Message, arg ...ice.Any) { Toast(m, ice.FAILURE, arg...) }
|
||||
func ToastSuccess(m *ice.Message, arg ...ice.Any) { Toast(m, ice.SUCCESS, arg...) }
|
||||
func Toast(m *ice.Message, text string, arg ...ice.Any) { // [title [duration [progress]]]
|
||||
if len(arg) > 1 {
|
||||
switch val := arg[1].(type) {
|
||||
|
@ -156,11 +156,11 @@ func init() {
|
||||
func InnerPath(arg ...string) (dir, file string) {
|
||||
p := strings.TrimPrefix(path.Join(arg...), kit.Path("")+ice.PS)
|
||||
if list := strings.Split(p, ice.PS); strings.HasPrefix(p, "usr/") {
|
||||
return path.Join(list[:2]...)+ice.PS, path.Join(list[2:]...)
|
||||
return path.Join(list[:2]...) + ice.PS, path.Join(list[2:]...)
|
||||
} else if strings.HasPrefix(p, ".ish/pluged/") {
|
||||
return path.Join(list[:5]...)+ice.PS, path.Join(list[5:]...)
|
||||
return path.Join(list[:5]...) + ice.PS, path.Join(list[5:]...)
|
||||
} else {
|
||||
return list[0]+ice.PS, path.Join(list[1:]...)
|
||||
return list[0] + ice.PS, path.Join(list[1:]...)
|
||||
}
|
||||
}
|
||||
func PlugAction() ice.Actions {
|
||||
|
@ -18,8 +18,8 @@ type server struct {
|
||||
darwin string `data:"https://github.com/coder/code-server/releases/download/v4.4.0/code-server-4.4.0-macos-amd64.tar.gz"`
|
||||
source string `data:"https://github.com/coder/code-server/archive/refs/tags/v4.4.0.tar.gz"`
|
||||
password string `data:"1234"`
|
||||
start string `name:"start port host password" help:"启动"`
|
||||
list string `name:"list port path auto start install" help:"编辑器"`
|
||||
start string `name:"start port host password" help:"启动"`
|
||||
list string `name:"list port path auto start install" help:"编辑器"`
|
||||
}
|
||||
|
||||
func (s server) Search(m *ice.Message, arg ...string) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user