1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
harveyshao 2022-02-19 19:52:31 +08:00
parent 1a577a7826
commit 256c60b57c
12 changed files with 92 additions and 9 deletions

2
go.mod
View File

@ -2,7 +2,7 @@ module shylinux.com/x/contexts
go 1.11
require shylinux.com/x/ice v0.7.0
require shylinux.com/x/ice v0.6.8
require (
shylinux.com/x/golang-story v0.3.4

0
src/hi/base.js Normal file
View File

5
src/hi/base.sh Normal file
View File

@ -0,0 +1,5 @@
#! /bin/sh
show() {
echo "base sh"
}

34
src/hi/he.js Normal file
View File

@ -0,0 +1,34 @@
Volcanos("onimport", {help: "导入数据", list: [
{type: "button", name: "list"},
{type: "button", name: "back"},
{type: "button", name: "show"},
], _init: function(can, msg, cb, target) {
can.page.Modify(can, can._legend, "示例")
msg.Push("hi", "hello")
msg.Push("he", "world")
msg.Echo("hello world")
can.onmotion.clear(can)
can.onappend.table(can, msg)
can.onappend.board(can, msg)
can.base.isFunc(cb) && cb(msg)
}})
Volcanos("onaction", {help: "操作数据", list: ["show", "some"],
_trans: {show: "展示", some: "其它"},
show: function(event, can) { var msg = can.request(event)
msg.Push("value", 200)
msg.Push("value", 300)
msg.Push("value", 300)
msg.Push("value", 300)
msg.Push("value", 400)
msg.Option("height", 400)
can.onappend._output(can.sup, msg, "/plugin/story/pie.js")
},
some: function(event, can) { var msg = can.request(event)
msg.Push("hi", "hello")
msg.Push("hi", "hello")
msg.Push("hi", "hello")
msg.Push("hi", "hello")
msg.Push("hi", "hello")
can.onappend.table(can, msg)
},
})

18
src/hi/hi.go Normal file
View File

@ -0,0 +1,18 @@
package hi
import (
"shylinux.com/x/ice"
)
type hi struct {
ice.Zone
list string `name:"list zone id auto insert" help:"hi"`
}
func (h hi) List(m *ice.Message, arg ...string) {
h.Zone.List(m, arg...)
}
func init() { ice.Cmd("web.code.hi.hi", hi{}) }

10
src/hi/hi.js Normal file
View File

@ -0,0 +1,10 @@
Volcanos("onimport", {help: "导入数据", list: [], _init: function(can, msg, cb, target) {
msg.Push("hi", "hello")
msg.Push("he", "hello")
msg.Echo("hello world!\n")
msg.Echo("hello world!\n")
msg.Echo("hello world!\n")
can.onmotion.clear(can), can.onappend.table(can, msg), can.onappend.board(can, msg)
can.base.isFunc(cb) && cb(msg)
}})

1
src/hi/hi.py Normal file
View File

@ -0,0 +1 @@
print "hello world"

10
src/hi/hi.sh Normal file
View File

@ -0,0 +1,10 @@
#! /bin/sh
source hi/base.sh
date
uptime
uname
echo "hello world"
echo "hello world"
echo "hello world"
env

9
src/hi/hi.shy Normal file
View File

@ -0,0 +1,9 @@
chapter "hi"
field "hi" web.code.hi.hi
field "hi" web.code.hi.hi
field "hi" web.code.hi.hi
field "hi" web.code.hi.hi
field "hi" web.code.hi.hi
field "hi" web.code.hi.hi
field "hi" web.code.hi.hi

View File

@ -1,6 +1,8 @@
package main
import (
_ "shylinux.com/x/contexts/src/hi"
"shylinux.com/x/ice"
_ "shylinux.com/x/icebergs/misc/alpha"
@ -36,4 +38,4 @@ import (
_ "shylinux.com/x/linux-story/src/qemu"
)
func main() { println(ice.Run()) }
func main() { println(ice.Run()) }

View File

@ -40,3 +40,4 @@ find . -name "*.css" -exec sed -i 's/: /:/g' {} +
`
source hi/hi.shy
source hi/hi.shy

View File

@ -3,14 +3,7 @@ hi
nfs.dir
cli.qrcode
cli.runtime
cli.runtime
cli.runtime
cli.runtime
cli.runtime
web.code.hi.hi
he
cli.runtime
web.code.hi.hi