Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit bc4b558

Browse files
committed
up
1 parent 7de7f67 commit bc4b558

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+651
-263
lines changed

go.mod

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ go 1.13
55
require (
66
github.com/Microsoft/go-winio v0.4.12 // indirect
77
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 // indirect
8-
github.com/TeaWeb/agent v0.0.0-20190918104615-3f0b8c2dabca
8+
github.com/TeaWeb/agent v0.0.0-20191129072344-6274ce47207a
99
github.com/TeaWeb/agentinstaller v0.0.0-20190530050440-5fefd21025a9
10-
github.com/TeaWeb/code v0.1.73-0.20191019035203-454d624aadf3
10+
github.com/TeaWeb/code v0.1.73-0.20191202094046-09e497227d16
1111
github.com/TeaWeb/plugin v0.0.0-20190202040243-6fb957e0eb4a
1212
github.com/TeaWeb/uaparser v0.0.0-20190526084055-a1c9449348d8 // indirect
1313
github.com/aliyun/alibaba-cloud-sdk-go v0.0.0-20190430075129-62f3cb8727f4 // indirect
@@ -19,11 +19,13 @@ require (
1919
github.com/go-redis/redis v6.15.2+incompatible // indirect
2020
github.com/go-sql-driver/mysql v1.4.1 // indirect
2121
github.com/go-stack/stack v1.8.0 // indirect
22+
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible // indirect
2223
github.com/go-yaml/yaml v2.1.0+incompatible // indirect
2324
github.com/google/go-cmp v0.3.0 // indirect
2425
github.com/gorilla/websocket v1.4.0 // indirect
2526
github.com/iwind/TeaGo v0.0.0-20191007090339-daba0bb6607e
2627
github.com/iwind/gofcgi v0.0.0-20181229122301-daea2786cb0d // indirect
28+
github.com/jlaffaye/ftp v0.0.0-20191025175106-a59fe673c9b2 // indirect
2729
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af // indirect
2830
github.com/json-iterator/go v1.1.6 // indirect
2931
github.com/kr/fs v0.1.0 // indirect
@@ -42,9 +44,9 @@ require (
4244
github.com/shirou/gopsutil v2.18.12+incompatible // indirect
4345
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
4446
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a // indirect
45-
github.com/stretchr/testify v1.3.0 // indirect
4647
github.com/syndtr/goleveldb v1.0.0 // indirect
4748
github.com/tatsushid/go-fastping v0.0.0-20160109021039-d7bb493dee3e // indirect
49+
github.com/technoweenie/multipartstreamer v1.0.1 // indirect
4850
github.com/tidwall/pretty v0.0.0-20190325153808-1166b9ac2b65 // indirect
4951
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
5052
github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c // indirect

go.sum

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ github.com/Microsoft/go-winio v0.4.12 h1:xAfWHN1IrQ0NJ9TBC0KBZoqLjzDTr1ML+4MywiU
22
github.com/Microsoft/go-winio v0.4.12/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA=
33
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 h1:UUppSQnhf4Yc6xGxSkoQpPhb7RVzuv5Nb1mwJ5VId9s=
44
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg=
5-
github.com/TeaWeb/agent v0.0.0-20190918104615-3f0b8c2dabca h1:J2BRPd2HwIewDod+Xxdp5JOUKU/o8tjZOJ7tv0TlVG8=
6-
github.com/TeaWeb/agent v0.0.0-20190918104615-3f0b8c2dabca/go.mod h1:sKq3cDTMkEgazeYI4TKo03Xz9PTPwMZ2yiQnPg+qXLs=
5+
github.com/TeaWeb/agent v0.0.0-20191129072344-6274ce47207a h1:mnPY948EeM107HWiX38/pK/vQpLBEpp+WinOb3lA11U=
6+
github.com/TeaWeb/agent v0.0.0-20191129072344-6274ce47207a/go.mod h1:sKq3cDTMkEgazeYI4TKo03Xz9PTPwMZ2yiQnPg+qXLs=
77
github.com/TeaWeb/agentinstaller v0.0.0-20190530050440-5fefd21025a9 h1:uFHM1AU8+iHtv3Dscb5G4FG8MqDiT79RyTE5+SSLmgk=
88
github.com/TeaWeb/agentinstaller v0.0.0-20190530050440-5fefd21025a9/go.mod h1:RvsddRGxwRrdDxcVZAaOgn1md7ZNzFhqM/v9UxKpdV8=
9-
github.com/TeaWeb/code v0.1.73-0.20191019035203-454d624aadf3 h1:qsg3OEmP1TANeil1CRHHRjw5vGBtFupv0QcqFNo8NR4=
10-
github.com/TeaWeb/code v0.1.73-0.20191019035203-454d624aadf3/go.mod h1:adA5myW2JZ7qj/53ar6HUFNftRCbXadWJQhVj7iIulM=
9+
github.com/TeaWeb/code v0.1.73-0.20191202094046-09e497227d16 h1:giJrytMjMbNgDTpgf2bv1RvEVjPvm73toP4IBnVQMJ0=
10+
github.com/TeaWeb/code v0.1.73-0.20191202094046-09e497227d16/go.mod h1:adA5myW2JZ7qj/53ar6HUFNftRCbXadWJQhVj7iIulM=
1111
github.com/TeaWeb/plugin v0.0.0-20190202040243-6fb957e0eb4a h1:eBirFjqMtroy4c/kqy+wh1JHuDMNMzPSf4IupEYxt1A=
1212
github.com/TeaWeb/plugin v0.0.0-20190202040243-6fb957e0eb4a/go.mod h1:HZS9S9Dr7LiAMPAJtQn0A60wU6zFi/wZ49uK+g058R8=
1313
github.com/TeaWeb/uaparser v0.0.0-20190526084055-a1c9449348d8 h1:RB/ViZWtFrBoOBCl1G/BoK+vwN5fn1T6Nu0ZRAX+pzM=
@@ -32,6 +32,8 @@ github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZp
3232
github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
3333
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
3434
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
35+
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible h1:2cauKuaELYAEARXRkq2LrJ0yDDv1rW7+wrTEdVL3uaU=
36+
github.com/go-telegram-bot-api/telegram-bot-api v4.6.4+incompatible/go.mod h1:qf9acutJ8cwBUhm1bqgz6Bei9/C/c93FPDljKWwsOgM=
3537
github.com/go-yaml/yaml v2.1.0+incompatible h1:RYi2hDdss1u4YE7GwixGzWwVo47T8UQwnTLB6vQiq+o=
3638
github.com/go-yaml/yaml v2.1.0+incompatible/go.mod h1:w2MrLa16VYP0jy6N7M5kHaCkaLENm+P+Tv+MfurjSw0=
3739
github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM=
@@ -50,6 +52,8 @@ github.com/iwind/TeaGo v0.0.0-20191007090339-daba0bb6607e h1:bxD34HpyJWx6bnGdahZ
5052
github.com/iwind/TeaGo v0.0.0-20191007090339-daba0bb6607e/go.mod h1:taNzU+Tt7Axz5t1v8pEV7xRuioNJxbMeMAbDVQpxq20=
5153
github.com/iwind/gofcgi v0.0.0-20181229122301-daea2786cb0d h1:nxDdqzn7XmgGZCrUx2qyl6W5qHp2ioR8aXB9YgQ9qMA=
5254
github.com/iwind/gofcgi v0.0.0-20181229122301-daea2786cb0d/go.mod h1:Z/PdoqueJP653H+hs+zp93mwMI2MS+xJDYf9WCuZNL8=
55+
github.com/jlaffaye/ftp v0.0.0-20191025175106-a59fe673c9b2 h1:WY3P4euRv9s8F2rpZUK1jnk4ZMiV3O2ltdnoZK/GTUU=
56+
github.com/jlaffaye/ftp v0.0.0-20191025175106-a59fe673c9b2/go.mod h1:PwUeyujmhaGohgOf0kJKxPfk3HcRv8QD/wAUN44go4k=
5357
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM=
5458
github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
5559
github.com/json-iterator/go v1.1.6 h1:MrUvLMLTMxbqFJ9kzlvat/rYZqZnW3u4wkLzWTaFwKs=
@@ -98,12 +102,14 @@ github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1
98102
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a h1:pa8hGb/2YqsZKovtsgrwcDH1RZhVbTKCjLp47XpqCDs=
99103
github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
100104
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
101-
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
102-
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
105+
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
106+
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
103107
github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE=
104108
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
105109
github.com/tatsushid/go-fastping v0.0.0-20160109021039-d7bb493dee3e h1:nt2877sKfojlHCTOBXbpWjBkuWKritFaGIfgQwbQUls=
106110
github.com/tatsushid/go-fastping v0.0.0-20160109021039-d7bb493dee3e/go.mod h1:B4+Kq1u5FlULTjFSM707Q6e/cOHFv0z/6QRoxubDIQ8=
111+
github.com/technoweenie/multipartstreamer v1.0.1 h1:XRztA5MXiR1TIRHxH2uNxXxaIkKQDeX7m2XsSOlQEnM=
112+
github.com/technoweenie/multipartstreamer v1.0.1/go.mod h1:jNVxdtShOxzAsukZwTSw6MDx5eUJoiEBsSvzDU9uzog=
107113
github.com/tidwall/pretty v0.0.0-20190325153808-1166b9ac2b65 h1:rQ229MBgvW68s1/g6f1/63TgYwYxfF4E+bi/KC19P8g=
108114
github.com/tidwall/pretty v0.0.0-20190325153808-1166b9ac2b65/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk=
109115
github.com/tossp/teaweb-lego v0.0.0-20190606070638-5d2242ad2167 h1:sN8vU24N69dNZqNyoW7iAEZ+WHnPiRL6ETPyVzhYEVc=
@@ -151,3 +157,5 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
151157
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
152158
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
153159
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
160+
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
161+
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

web/libs/http.js

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,33 @@ http.Server = function (options) {
3636
}
3737
}
3838
}
39+
40+
this.findBackend = function (backendId) {
41+
for (var i = 0; i < this.backends.length; i++) {
42+
if (this.backends[i].id == backendId) {
43+
return this.backends[i];
44+
}
45+
}
46+
47+
// location
48+
for (var i = 0; i < this.locations.length; i++) {
49+
var backend = this.locations[i].findBackend(backendId);
50+
if (backend != null) {
51+
return backend;
52+
}
53+
}
54+
55+
return null;
56+
};
57+
58+
this.findLocation = function (locationId) {
59+
for (var i = 0; i < this.locations.length; i++) {
60+
if (this.locations[i].id == locationId) {
61+
return this.locations[i];
62+
}
63+
}
64+
return null;
65+
};
3966
};
4067

4168
http.Backend = function (options) {
@@ -46,6 +73,7 @@ http.Backend = function (options) {
4673
this.isDown = false;
4774
this.isBackup = false;
4875
this.name = [];
76+
this.code = "";
4977

5078
if (options != null && typeof (options) == "object") {
5179
for (var key in options) {
@@ -67,6 +95,7 @@ http.Location = function (options) {
6795
this.root = "";
6896
this.rewrite = [];
6997
this.websocket = {};
98+
this.backends = [];
7099

71100
if (options != null && typeof (options) == "object") {
72101
for (var key in options) {
@@ -84,11 +113,30 @@ http.Location = function (options) {
84113
var rewrite = new http.Rewrite(value[i]);
85114
this.rewrite.push(rewrite);
86115
}
87-
} else if (typeof (key) == "string" && typeof (this[key]) == typeof (value)) {
116+
}
117+
// backends
118+
else if (key == "backends") {
119+
for (var i = 0; i < value.length; i++) {
120+
var backend = new http.Backend(value[i]);
121+
this.backends.push(backend);
122+
}
123+
}
124+
// others
125+
else if (typeof (key) == "string" && typeof (this[key]) == typeof (value)) {
88126
this[key] = value;
89127
}
90128
}
91129
}
130+
131+
this.findBackend = function (backendId) {
132+
for (var i = 0; i < this.backends.length; i++) {
133+
if (this.backends[i].id == backendId) {
134+
return this.backends[i];
135+
}
136+
}
137+
138+
return null;
139+
};
92140
};
93141

94142
http.Fastcgi = function (options) {

web/pages/403.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Error</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6+
</head>
7+
<body>
8+
9+
<h3>403 Forbidden</h3>
10+
<p>Sorry, your access to the page has been denied. Please try again later.</p>
11+
12+
<footer>Powered by TeaWeb.</footer>
13+
14+
</body>
15+
</html>

web/public/js/vue.components.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 自动补全
33
*/
44
Vue.component("auto-complete-box", {
5-
props: ["name", "placeholder", "options", "value", "maxlength"],
5+
props: ["name", "placeholder", "options", "value", "maxlength", "autocomplete"],
66
data: function () {
77
return {
88
newValue: this.value,
@@ -23,6 +23,9 @@ Vue.component("auto-complete-box", {
2323
},
2424
methods: {
2525
search: function () {
26+
if (this.autocomplete === false) {
27+
return;
28+
}
2629
this.index = -1;
2730
this.visible = (this.options.length > 0 && this.newValue.length > 0);
2831
this.$emit("change", this.newValue);
@@ -102,7 +105,7 @@ Vue.component("auto-complete-box", {
102105
* 路径自动补全
103106
*/
104107
Vue.component("auto-complete-path-box", {
105-
props: ["name", "placeholder", "value", "maxlength"],
108+
props: ["name", "placeholder", "value", "maxlength", "autocomplete"],
106109
data: function () {
107110
return {
108111
"options": []
@@ -133,6 +136,7 @@ Vue.component("auto-complete-path-box", {
133136
:placeholder="this.placeholder" \
134137
:options="options" \
135138
:maxlength="maxlength" \
139+
:autocomplete="autocomplete" \
136140
@change="change($event)"> \
137141
</auto-complete-box>'
138142
});
@@ -493,7 +497,7 @@ Vue.component("http-header-box", {
493497
});
494498

495499
/**
496-
* Agent Group密钥管理
500+
* HTTP参数
497501
*/
498502
Vue.component("http-params", {
499503
props: ["params", "comment", "prefix"],
@@ -961,6 +965,9 @@ Vue.component("request-cond-box", {
961965
},
962966
isArrayOperator: function (operator) {
963967
return ["in", "not in", "file ext", "mime type"].$contains(operator);
968+
},
969+
hasValue: function (operator) {
970+
return !["file exist", "file not exist"].$contains(operator);
964971
}
965972
},
966973
template: '<div> \
@@ -1001,7 +1008,7 @@ Vue.component("request-cond-box", {
10011008
<p class="comment">{{vOperatorDescription}}</p> \
10021009
</td> \
10031010
</tr> \
1004-
<tr v-show="!isArrayOperator(vOperator)"> \
1011+
<tr v-show="!isArrayOperator(vOperator) && hasValue(vOperator)"> \
10051012
<td>对比值</td> \
10061013
<td> \
10071014
<textarea type="text" v-model="vValue" rows="2" placeholder="对比值"/> \
@@ -1072,6 +1079,7 @@ Vue.component("server-page-box", {
10721079
vPrefix: (this.prefix == null) ? "" : this.prefix,
10731080
isAdding: false,
10741081
typicalPages: [
1082+
{"name": "403页面", "url": "web/pages/403.html"},
10751083
{"name": "404页面", "url": "web/pages/404.html"},
10761084
{"name": "50x页面", "url": "web/pages/50x.html"},
10771085
{"name": "暂时关闭英文页面", "url": "web/pages/shutdown_en.html"},

web/views/@default/@layout.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,10 @@ body.expanded .main {
288288
vertical-align: middle;
289289
}
290290

291+
.main table td[colspan="2"] a {
292+
font-weight: normal;
293+
}
294+
291295
.main table td em {
292296
font-weight: normal;
293297
font-style: normal;

web/views/@default/login/index.html

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -7,57 +7,59 @@
77
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0">
88
{$TEA.VUE}
99
{$TEA.SEMANTIC}
10+
<script type="text/javascript" src="/js/md5.min.js"></script>
1011
</head>
1112
<body>
1213

1314
<div>
14-
<div class="ui menu borderless inverted blue">
15-
<a href="http://teaos.cn" class="item" target="_blank"><i class="icon leaf"></i>TeaWeb官网</a>
16-
<a href="http://teaos.cn/download" class="item" target="_blank">下载</a>
17-
<a href="http://teaos.cn/doc" class="item" target="_blank">文档</a>
18-
<a href="http://teaos.cn/community" class="item" target="_blank">社区</a>
19-
</div>
15+
<div class="ui menu borderless inverted blue">
16+
<a href="http://teaos.cn" class="item" target="_blank"><i class="icon leaf"></i>TeaWeb官网</a>
17+
<a href="http://teaos.cn/download" class="item" target="_blank">下载</a>
18+
<a href="http://teaos.cn/doc" class="item" target="_blank">文档</a>
19+
<a href="http://teaos.cn/community" class="item" target="_blank">社区</a>
20+
</div>
2021

21-
<div class="form-box">
22-
<form class="ui form" data-tea-action="$" data-tea-before="beforeSubmit" data-tea-done="doneSubmit" autocomplete="off">
23-
<div class="ui segment stacked">
24-
<div class="ui header">
25-
登录TeaWeb
26-
<p>可视化智能Web服务</p>
27-
</div>
28-
<div class="ui field">
29-
<div class="ui left icon input">
30-
<i class="ui user icon"></i>
31-
<input type="text" name="username" v-model="username" :readonly="teaDemoEnabled" placeholder="请输入用户名" maxlength="200"/>
32-
</div>
33-
</div>
34-
<div class="ui field">
35-
<div class="ui left icon input">
36-
<i class="ui lock icon"></i>
37-
<input type="password" name="password" v-model="password" :readonly="teaDemoEnabled" placeholder="请输入密码" maxlength="200"/>
38-
</div>
39-
</div>
40-
<div class="ui field">
41-
<a href="" @click.prevent="showMoreOptions()">更多选项 <i class="icon angle" :class="{down:!moreOptionsVisible, up:moreOptionsVisible}"></i> </a>
42-
</div>
43-
<div class="ui field" v-show="moreOptionsVisible">
44-
<div class="ui checkbox">
45-
<input type="checkbox" name="remember" value="1" checked="checked"/>
46-
<label>在这个电脑上记住登录(14天)</label>
22+
<div class="form-box">
23+
<form class="ui form" data-tea-action="$" data-tea-before="beforeSubmit" data-tea-fail="failSubmit" data-tea-done="doneSubmit" autocomplete="off">
24+
<input type="hidden" name="password" v-model="passwordMd5"/>
25+
<input type="hidden" name="token" v-model="token"/>
26+
<div class="ui segment stacked">
27+
<div class="ui header">
28+
登录TeaWeb
29+
<p>可视化智能Web服务</p>
30+
</div>
31+
<div class="ui field">
32+
<div class="ui left icon input">
33+
<i class="ui user icon"></i>
34+
<input type="text" name="username" v-model="username" :readonly="teaDemoEnabled" placeholder="请输入用户名" maxlength="200" ref="usernameRef"/>
35+
</div>
36+
</div>
37+
<div class="ui field">
38+
<div class="ui left icon input">
39+
<i class="ui lock icon"></i>
40+
<input type="password" v-model="password" :readonly="teaDemoEnabled" placeholder="请输入密码" maxlength="200" @input="changePassword()" ref="passwordRef"/>
41+
</div>
42+
</div>
43+
<div class="ui field">
44+
<a href="" @click.prevent="showMoreOptions()">更多选项 <i class="icon angle" :class="{down:!moreOptionsVisible, up:moreOptionsVisible}"></i> </a>
45+
</div>
46+
<div class="ui field" v-show="moreOptionsVisible">
47+
<div class="ui checkbox">
48+
<input type="checkbox" name="remember" value="1" checked="checked"/>
49+
<label>在这个电脑上记住登录(14天)</label>
50+
</div>
4751
</div>
48-
</div>
49-
50-
<button class="ui button primary fluid" type="submit" v-if="!isSubmitting">登录</button>
51-
<button class="ui button primary fluid disabled" type="submit" v-if="isSubmitting">登录中...</button>
52-
<p class="comment">注意:为了安全起见,登录错误3次后,系统会被锁定,使用命令 <em>bin/teaweb reset</em> 重置后才可以登录。</p>
53-
</div>
54-
</form>
55-
</div>
5652

57-
<!--
58-
<footer>Background Image: Hawaiian Print From macOS</footer>
59-
-->
53+
<button class="ui button primary fluid" type="submit" v-if="!isSubmitting">登录</button>
54+
<button class="ui button primary fluid disabled" type="submit" v-if="isSubmitting">登录中...</button>
55+
<p class="comment">注意:为了安全起见,登录错误3次后,系统会被锁定,使用命令 <em>bin/teaweb reset</em> 重置后才可以登录。</p>
56+
</div>
57+
</form>
58+
</div>
6059

60+
<!--
61+
<footer>Background Image: Hawaiian Print From macOS</footer>
62+
-->
6163
</div>
6264

6365
</body>

0 commit comments

Comments
 (0)