From 76fc9443f9bec5b566fa0afc597c70b4e083f17b Mon Sep 17 00:00:00 2001 From: shylinux Date: Sun, 22 Sep 2019 18:02:30 +0800 Subject: [PATCH] fix web.wss --- src/contexts/cli/cli.go | 2 +- src/contexts/cli/version.go | 2 +- src/plugin/love/index.shy | 6 +++--- usr/librarys/chat.js | 1 + usr/librarys/context.js | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/contexts/cli/cli.go b/src/contexts/cli/cli.go index 4aca1501..5c043f73 100644 --- a/src/contexts/cli/cli.go +++ b/src/contexts/cli/cli.go @@ -181,7 +181,7 @@ var Index = &ctx.Context{Name: "cli", Help: "管理中心", map[string]interface{}{"os": "darwin", "cpu": "amd64"}, }, "tmp": "var/tmp/go", "dep": []interface{}{ "github.com/nfs/termbox-go", - "github.com/gorilla/websocket" + "github.com/gorilla/websocket", "github.com/go-sql-driver/mysql", "github.com/redigo/redis", "github.com/gomarkdown/markdown", diff --git a/src/contexts/cli/version.go b/src/contexts/cli/version.go index e98a94b8..7aa1c4d6 100644 --- a/src/contexts/cli/version.go +++ b/src/contexts/cli/version.go @@ -4,5 +4,5 @@ var version = struct { host string self int }{ - "2019-09-22 15:44:02", "mac", 660, + "2019-09-22 16:06:14", "com", 628, } diff --git a/src/plugin/love/index.shy b/src/plugin/love/index.shy index 077e089c..53ac89bc 100644 --- a/src/plugin/love/index.shy +++ b/src/plugin/love/index.shy @@ -1,5 +1,5 @@ -fun meet "第一眼" private \ +fun meet "第一眼" protected \ text "love" name table imports plugin_table \ text "date" name when \ text "" name where \ @@ -15,14 +15,14 @@ end kit date "日历" "index.js" "index.css" protected "cli.date" _ nature _ \ \ space true format '%s' "s20060102" \ text "2019-07-08" name "起始时间" \ - text "date" name "截止时间" \ + text "date" name "date" \ text "love" name "table" imports plugin_table \ text "when" name "when" \ text "where" name "where" \ button "查看" action auto \ button "显示" click show -fun delay "以后告诉你" private \ +fun delay "以后告诉你" protected \ text "delay" name table imports plugin_table \ text "date" name when \ text "" name what view long \ diff --git a/usr/librarys/chat.js b/usr/librarys/chat.js index ba200f83..a0a4cd4a 100644 --- a/usr/librarys/chat.js +++ b/usr/librarys/chat.js @@ -295,6 +295,7 @@ var page = Page({check: true, engine.help("action") engine.help("storm") }, + reload: function() {kit.reload()}, help: function() { var args = kit.List(arguments), cb, target if (args.length > 0 && page.pane && page.pane.Pane[args[0]] && page.pane.Pane[args[0]].Plugin) { diff --git a/usr/librarys/context.js b/usr/librarys/context.js index c46d7eaf..1a312d28 100644 --- a/usr/librarys/context.js +++ b/usr/librarys/context.js @@ -205,7 +205,7 @@ ctx = context = { xhr.send(args.join("&")) }, WSS: function(cb) { - var s = new WebSocket(location.protocol.replace("http", "ws")+"://"+location.host+"/wss") + var s = new WebSocket(location.protocol.replace("http", "ws")+"//"+location.host+"/wss") s.onopen = function(event) { kit.Log(event) }