1
0
mirror of https://shylinux.com/x/ContextOS synced 2025-04-25 16:58:06 +08:00
This commit is contained in:
shylinux 2019-09-18 10:45:51 +08:00
parent 4ad2b0e534
commit b0e77165e1
6 changed files with 18 additions and 9 deletions

View File

@ -4,5 +4,5 @@ var version = struct {
host string
self int
}{
"2019-09-17 20:58:54", "centos", 526,
"2019-09-18 07:48:00", "com", 527,
}

View File

@ -369,6 +369,7 @@ var Index = &ctx.Context{Name: "ssh", Help: "集群中心",
default:
m.Confm("componet", arg[0:], func(value map[string]interface{}) {
if kit.Format(value["type"]) == "private" && m.Option("userrole") != "root" {
m.Log("warn", "%v private", arg)
return
}

View File

@ -112,7 +112,7 @@ func (web *WEB) Login(msg *ctx.Message, w http.ResponseWriter, r *http.Request)
} else if msg.Options("relay") {
relay := msg.Cmd("aaa.relay", "check", msg.Option("relay"))
if relay.Appendi("count") < 1 {
if relay.Appendi("count") == 0 {
msg.Err("共享失效")
return false
}

View File

@ -1,4 +1,9 @@
fun meet "第一眼" public \
kit imports "导入" "" "" private "ssh.data" "import" \
text "love" name table \
text "" name file \
button "导入"
fun meets "第一眼" private \
text "love" name table imports plugin_table \
text "date" name when \
text "" name where \
@ -11,7 +16,7 @@ fun meet "第一眼" public \
copy ssh.data insert _ when _ where __
end
kit imports "导入" "" "" private "ssh.data" "import" \
text "love" name table \
text "" name file \
button "导入"
fun meet "第一眼" protected "ssh.data" show \
text "love" name table imports plugin_table \
button "查看" action auto

View File

@ -496,7 +496,10 @@ var page = Page({check: true,
page.steam.Pane.Show()
},
"共享": function(event) {
page.login.Pane.Run(["relay", "storm", "username", kit.prompt("分享给用户"), "url", ctx.Share({
var user = kit.prompt("分享给用户")
if (user == null) {return}
page.login.Pane.Run(["relay", "storm", "username", user, "url", ctx.Share({
"river": page.river.Pane.which.get(),
"storm": page.storm.Pane.which.get(),
"layout": page.action.Pane.Layout(),

View File

@ -564,7 +564,7 @@ function Pane(page, field) {
list.push(ui.last), field.scrollBy(0, field.scrollHeight+100)
key && key.length > 0 && (member[line[which]] = member[line[key[0]]] = {index:index, key:line[which]});
(type == "plugin" || type == "field") && pane.Plugin(page, pane, ui.field, function(event, cmds, cbs) {
line.name && (type == "plugin" || type == "field") && pane.Plugin(page, pane, ui.field, function(event, cmds, cbs) {
typeof cb == "function" && cb(line, index, event, cmds, cbs)
})
return ui