diff --git a/Makefile b/Makefile index a19b7392..68b13476 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ all: def go build -v -o ${binarys} src/main.go ${version} ${binpack} && ./${binarys} forever restart &>/dev/null app: def - CGO_ENABLED=1 go build -v -o ${publish}/Contexts.app/Contents/MacOS/contexts src/webview.go ${version} ${binpack} && ./${binarys} forever restart &>/dev/null + CGO_ENABLED=1 go build -v -o ${publish}/Contexts.app/Contents/MacOS/Contexts src/webview.go ${version} ${binpack} && ./${binarys} forever restart &>/dev/null # hdiutil create ${publish}/tmp.dmg -ov -volname "ContextsInstall" -fs HFS+ -srcfolder "${publish}/Contexts.app" # rm -f ${publish}/ContextsInstall.dmg # hdiutil convert ${publish}/tmp.dmg -format UDZO -o ${publish}/ContextsInstall.dmg diff --git a/etc/init.shy b/etc/init.shy index 21352a19..156f97dd 100644 --- a/etc/init.shy +++ b/etc/init.shy @@ -1,23 +1,24 @@ ~web spide create name "com" link "http://2021.shylinux.com:9020" - -~web.code.input - # wubi load file usr/wubi-dict/wubi86 - # wubi load file usr/wubi-dict/person zone person + # config serve meta.main "/chat/cmd/desktop" + config space meta.main "desktop" ~web.code webpack insert xterm webpack insert xterm-addon-fit webpack insert xterm-addon-web-links webpack insert xterm/css/xterm.css + binpack insert usr/node_modules/xterm/lib/xterm.js + binpack insert usr/node_modules/xterm-addon-fit/lib/xterm-addon-fit.js + binpack insert usr/node_modules/xterm-addon-web-links/lib/xterm-addon-web-links.js + binpack insert usr/node_modules/xterm/css/xterm.css binpack insert usr/icons/ ~web.chat.macos applications install "go" web.code.compile icon "usr/icons/go.png" applications install "git" web.code.git.repos icon "usr/icons/git.jpg" - applications install "Docker" web.code.docker.client icon "usr/icons/Docker.png" - applications install "QuickTime" web.chat.macos.opens args "QuickTime Player" icon "usr/icons/QuickTime Player.png" applications install "Preferences" web.chat.macos.opens args "System Preferences" icon "usr/icons/System Preferences.png" + applications install "QuickTime" web.chat.macos.opens args "QuickTime Player" icon "usr/icons/QuickTime Player.png" applications install "Activity" web.chat.macos.opens args "Activity Monitor" icon "usr/icons/Activity Monitor.png" applications install "Preview" web.chat.macos.opens args "Preview" @@ -26,7 +27,6 @@ role white void web.code.git.spide ~gdb - # config timer meta.enable true event listen event serve.start cmd web.serve event listen event serve.start cmd web.broad event listen event dream.create cmd web.code.xterm diff --git a/go.mod b/go.mod index 0efac2af..e52df1fb 100644 --- a/go.mod +++ b/go.mod @@ -32,4 +32,5 @@ require ( shylinux.com/x/ice v1.3.2 shylinux.com/x/icebergs v1.5.6 shylinux.com/x/toolkits v0.7.5 + shylinux.com/x/webview v0.0.2 // indirect ) diff --git a/src/main.go b/src/main.go index c73bef9c..c172c4a2 100644 --- a/src/main.go +++ b/src/main.go @@ -2,34 +2,7 @@ package main import ( "shylinux.com/x/ice" - _ "shylinux.com/x/icebergs/misc/alpha" - _ "shylinux.com/x/icebergs/misc/input" - _ "shylinux.com/x/icebergs/misc/lark" - _ "shylinux.com/x/icebergs/misc/mp" - _ "shylinux.com/x/icebergs/misc/wx" - - _ "shylinux.com/x/icebergs/misc/chrome" - _ "shylinux.com/x/icebergs/misc/coder" - _ "shylinux.com/x/icebergs/misc/java" _ "shylinux.com/x/icebergs/misc/node" - - _ "shylinux.com/x/linux-story/iso/alpine" - _ "shylinux.com/x/linux-story/src/busybox" - _ "shylinux.com/x/linux-story/src/ctags" - _ "shylinux.com/x/nginx-story/src/client" - _ "shylinux.com/x/nginx-story/src/server" - _ "shylinux.com/x/redis-story/src/client" - _ "shylinux.com/x/redis-story/src/server" - - _ "shylinux.com/x/golang-story/src/compile" - _ "shylinux.com/x/golang-story/src/project" - _ "shylinux.com/x/golang-story/src/runtime" - - _ "shylinux.com/x/golang-story/src/docker" - _ "shylinux.com/x/golang-story/src/gotags" - _ "shylinux.com/x/golang-story/src/grafana" - _ "shylinux.com/x/golang-story/src/kubernetes" - _ "shylinux.com/x/golang-story/src/prometheus" ) func main() { print(ice.Run()) } diff --git a/src/main.js b/src/main.js index 08e0895b..4307555d 100644 --- a/src/main.js +++ b/src/main.js @@ -1,29 +1,6 @@ Volcanos({river: { - service: {name: "运营群", storm: { - wx: {name: "公众号 wx", list: [ - {name: "context", help: "微信公众号", index: "web.wiki.word", args: ["usr/icebergs/misc/wx/wx.shy"]}, - ]}, - mp: {name: "小程序 mp", list: [ - {name: "context", help: "微信小程序", index: "web.wiki.word", args: ["usr/icebergs/misc/mp/mp.shy"]}, - ]}, - lark: {name: "机器人 lark", list: [ - {name: "context", help: "飞书机器人", index: "web.wiki.word", args: ["usr/icebergs/misc/lark/lark.shy"]}, - ]}, - }}, product: {name: "产品群", storm: { - office: {name: "办公 office", list: [ - {name: "feel", help: "影音媒体", index: "web.wiki.feel"}, - {name: "draw", help: "思维导图", index: "web.wiki.draw"}, - {name: "data", help: "数据表格", index: "web.wiki.data"}, - {name: "location", help: "地图导航", index: "web.chat.location"}, - {name: "context", help: "编程", index: "web.wiki.word", args: ["src/main.shy"]}, - ]}, - website: {name: "定制 website", index: [ - "web.chat.website", - "web.chat.div", - "web.code.vimer", - "web.dream", - ]}, + office: {name: "办公 office", index: ["web.chat.macos.desktop", "web.wiki.feel", "web.wiki.draw", "web.wiki.data"]}, }}, project: {name: "研发群", storm: { studio: {name: "研发 studio", list: [ @@ -33,50 +10,10 @@ Volcanos({river: { {name: "plan", help: "任务表", index: "web.team.plan"}, {name: "ctx", help: "上下文", index: "web.wiki.word"}, ]}, - linux: {name:"系统 linux", list: [ - {name: "ctx", help: "平台", index: "web.wiki.word", args:["usr/linux-story/idc/idc.shy"]}, - {name: "ctx", help: "镜像", index: "web.wiki.word", args:["usr/linux-story/iso/iso.shy"]}, - {name: "ctx", help: "系统", index: "web.wiki.word", args:["usr/linux-story/src/main.shy"]}, - ]}, - nginx: {name: "网关 nginx", list: [ - {name: "ctx", help: "代理", index: "web.wiki.word", args:["usr/nginx-story/src/main.shy"]}, - ]}, - context: {name: "编程 context", list: [ - {name: "ctx", help: "编程", index: "web.wiki.word", args:["usr/golang-story/src/main.shy"]}, - ]}, - redis: {name: "缓存 redis", list: [ - {name: "ctx", help: "数据缓存", index: "web.wiki.word", args:["usr/redis-story/src/main.shy"]}, - {name: "ctx", help: "消息队列", index: "web.wiki.word", args:["usr/redis-story/src/kafka/kafka.shy"]}, - {name: "ctx", help: "消息队列", index: "web.wiki.word", args:["usr/redis-story/src/pulsar/pulsar.shy"]}, - ]}, }}, profile: {name: "测试群", storm: { - release: {name: "发布 release", index: [ - "web.code.compile", - "web.code.publish", - "web.code.docker.client", - "web.code.tmux.session", - "web.code.xterm", - "web.dream", "web.space", - "web.code.git.service", "web.code.git.status", - ]}, - toolkit: {name: "工具 toolkit", index: [ - "web.code.favor", - "web.code.xterm", - "web.code.inner", - "web.code.vimer", - "web.code.bench", - "web.code.pprof", - "web.code.oauth", - ]}, - language: {name: "语言 language", index: [ - "web.code.c", - "web.code.sh", - "web.code.py", - "web.code.shy", - "web.code.js", - "web.code.go", - ]}, + release: {name: "发布 release", index: ["web.code.compile", "web.code.publish", "web.dream", "web.space", "web.code.git.service", "web.code.git.status"]}, + toolkit: {name: "工具 toolkit", index: ["web.code.xterm", "web.code.vimer", "web.code.bench", "web.code.pprof"]}, }}, operate: {name: "运维群", storm: { web: {name: "应用 web", index: ["broad", "serve", "space", "dream", "cache", "spide", "share"]}, diff --git a/src/template/web.chat.header/light.css b/src/template/web.chat.header/light.css index 3c822a46..6df945d4 100644 --- a/src/template/web.chat.header/light.css +++ b/src/template/web.chat.header/light.css @@ -1,3 +1,5 @@ +body.light { background-color:#4a566e; } +body.light.cmd { background-color:white; } body.light legend { background-color:lightsteelblue; border-radius:5px; } body.light select { border-radius:5px; } body.light input { background-color:white; border-radius:5px; } diff --git a/src/template/web.chat.header/white.css b/src/template/web.chat.header/white.css index c6e936bb..d73a0e10 100644 --- a/src/template/web.chat.header/white.css +++ b/src/template/web.chat.header/white.css @@ -1,4 +1,4 @@ -body.white { color:black; } +body.white { background-color:white; color:black; } body.white legend { background-color:#ffffffc2; } body.white input { background-color:#ffffff7d; color:black; } body.white textarea { background-color:white; color:black; } diff --git a/src/template/web.space/main.html b/src/template/web.space/main.html new file mode 100644 index 00000000..090a9b6d --- /dev/null +++ b/src/template/web.space/main.html @@ -0,0 +1,14 @@ + +
+ +