1
0
forked from x/icebergs
This commit is contained in:
harveyshao 2022-12-03 13:46:12 +08:00
parent 261ef042b9
commit 583b820e65
11 changed files with 18 additions and 15 deletions

View File

@ -136,7 +136,7 @@ func init() {
Index.MergeCommands(ice.Commands{ Index.MergeCommands(ice.Commands{
CAT: {Name: "cat path auto", Help: "文件", Actions: ice.MergeActions(ice.Actions{ CAT: {Name: "cat path auto", Help: "文件", Actions: ice.MergeActions(ice.Actions{
ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { aaa.White(m, ice.SRC_MAIN_JS, ice.SRC_MAIN_GO, ice.SRC_MAIN_SHY) }}, ice.CTX_INIT: {Hand: func(m *ice.Message, arg ...string) { aaa.White(m, ice.SRC_MAIN_JS, ice.SRC_MAIN_GO, ice.SRC_MAIN_SHY) }},
}, ctx.ConfAction(SOURCE, kit.DictList( }, mdb.AutoConfig(SOURCE, kit.DictList(
HTML, CSS, JS, GO, SH, SHY, CSV, JSON, HTML, CSS, JS, GO, SH, SHY, CSV, JSON,
PY, MD, TXT, XML, YML, ZML, IML, PY, MD, TXT, XML, YML, ZML, IML,
"license", "makefile", "configure", "conf", "license", "makefile", "configure", "conf",

View File

@ -206,7 +206,7 @@ func init() {
PP(ice.REQUIRE): {Name: "/require/shylinux.com/x/volcanos/proto.js", Help: "代码库", Hand: func(m *ice.Message, arg ...string) { PP(ice.REQUIRE): {Name: "/require/shylinux.com/x/volcanos/proto.js", Help: "代码库", Hand: func(m *ice.Message, arg ...string) {
p := path.Join(ice.ISH_PLUGED, path.Join(arg...)) p := path.Join(ice.ISH_PLUGED, path.Join(arg...))
if !nfs.ExistsFile(m, p) { if !nfs.ExistsFile(m, p) {
m.Cmd(cli.SYSTEM, "git", "clone", "https://"+path.Join(arg[:3]...), path.Join(ice.ISH_PLUGED, path.Join(arg[:3]))) m.Cmd(cli.SYSTEM, "git", "clone", "https://"+path.Join(arg[:3]...), path.Join(ice.ISH_PLUGED, path.Join(arg[:3]...)))
} }
m.RenderDownload(p) m.RenderDownload(p)
}}, }},

View File

@ -1,8 +1,8 @@
package chat package chat
import ( import (
"sync"
"net/http" "net/http"
"sync"
ice "shylinux.com/x/icebergs" ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/aaa" "shylinux.com/x/icebergs/base/aaa"

View File

@ -1,8 +1,8 @@
package oauth package oauth
import ( import (
"path"
"net/http" "net/http"
"path"
"strings" "strings"
"time" "time"

View File

@ -1,8 +1,8 @@
package code package code
import ( import (
"strings"
"path" "path"
"strings"
ice "shylinux.com/x/icebergs" ice "shylinux.com/x/icebergs"
"shylinux.com/x/icebergs/base/ctx" "shylinux.com/x/icebergs/base/ctx"
@ -57,7 +57,7 @@ func _css_show(m *ice.Message, arg ...string) {
} }
func _css_exec(m *ice.Message, arg ...string) { func _css_exec(m *ice.Message, arg ...string) {
if arg[2] == "usr/volcanos/" && strings.HasPrefix(arg[1], "plugin/local/") { if arg[2] == "usr/volcanos/" && strings.HasPrefix(arg[1], "plugin/local/") {
key := "web."+strings.ReplaceAll(strings.TrimSuffix(strings.TrimPrefix(arg[1], "plugin/local/"), ".css"), ice.PS, ice.PT) key := "web." + strings.ReplaceAll(strings.TrimSuffix(strings.TrimPrefix(arg[1], "plugin/local/"), ".css"), ice.PS, ice.PT)
ctx.ProcessCommand(m, kit.Select("can.plugin", key), kit.Simple()) ctx.ProcessCommand(m, kit.Select("can.plugin", key), kit.Simple())
return return
} }

View File

@ -19,7 +19,9 @@ func init() {
mdb.MODIFY: {Name: "modify zone type name text price count image=4@img audio video"}, mdb.MODIFY: {Name: "modify zone type name text price count image=4@img audio video"},
mdb.CREATE: {Name: "modify zone type name text price count image=4@img audio video"}, mdb.CREATE: {Name: "modify zone type name text price count image=4@img audio video"},
web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) { web.Upload(m) }}, web.UPLOAD: {Hand: func(m *ice.Message, arg ...string) { web.Upload(m) }},
"copy": {Hand: func(m *ice.Message, arg ...string) { m.Cmd("", mdb.CREATE, m.OptionSimple("zone,type,name,text,price,count,image")) }}, "copy": {Hand: func(m *ice.Message, arg ...string) {
m.Cmd("", mdb.CREATE, m.OptionSimple("zone,type,name,text,price,count,image"))
}},
}, mdb.HashAction(mdb.FIELD, "time,hash,zone,type,name,text,price,count,image,audio,video")), Hand: func(m *ice.Message, arg ...string) { }, mdb.HashAction(mdb.FIELD, "time,hash,zone,type,name,text,price,count,image,audio,video")), Hand: func(m *ice.Message, arg ...string) {
if mdb.HashSelect(m, arg...); len(arg) == 0 || arg[0] == "" { if mdb.HashSelect(m, arg...); len(arg) == 0 || arg[0] == "" {
m.Action(mdb.CREATE, mdb.EXPORT, mdb.IMPORT) m.Action(mdb.CREATE, mdb.EXPORT, mdb.IMPORT)

View File

@ -58,6 +58,7 @@ func transArgKey(arg []string) []string {
} }
return arg return arg
} }
const TABLE = "table" const TABLE = "table"
func init() { func init() {

View File

@ -1,8 +1,8 @@
package chrome package chrome
import ( import (
"path"
"net/http" "net/http"
"path"
"shylinux.com/x/ice" "shylinux.com/x/ice"
"shylinux.com/x/icebergs/base/mdb" "shylinux.com/x/icebergs/base/mdb"

View File

@ -1,8 +1,8 @@
package mp package mp
import ( import (
"net/http"
"encoding/base64" "encoding/base64"
"net/http"
"time" "time"
ice "shylinux.com/x/icebergs" ice "shylinux.com/x/icebergs"

View File

@ -1,8 +1,8 @@
package wx package wx
import ( import (
"net/http"
"crypto/sha1" "crypto/sha1"
"net/http"
"strings" "strings"
"time" "time"