From 8401948dc0a7dcc4b4931ef8f91f27e279451ea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E9=BB=84=E6=9E=97?= Date: Thu, 7 Sep 2023 11:03:20 +0800 Subject: [PATCH] reset color; add title bar; --- assets/lang/en.json | 1 + assets/lang/zh.json | 1 + assets/static/css/index.css | 145 +++++++++++++++++++++++++++- assets/templates/index.html | 64 ++++++------ pkg/server/controller/controller.go | 1 + screenshots/dark mode.png | Bin 150432 -> 143519 bytes screenshots/i18n.png | Bin 132376 -> 122916 bytes screenshots/new user.png | Bin 338594 -> 241584 bytes screenshots/user list.png | Bin 146162 -> 137400 bytes 9 files changed, 179 insertions(+), 33 deletions(-) diff --git a/assets/lang/en.json b/assets/lang/en.json index eb0e20c..4982f48 100644 --- a/assets/lang/en.json +++ b/assets/lang/en.json @@ -1,5 +1,6 @@ { "User Manage": "User Manage", + "frps multiuser": "frps multiuser", "User": "User", "Token": "Token", "Notes": "Notes", diff --git a/assets/lang/zh.json b/assets/lang/zh.json index 6d40bca..80eb6a9 100644 --- a/assets/lang/zh.json +++ b/assets/lang/zh.json @@ -1,5 +1,6 @@ { "User Manage": "用户管理", + "frps multiuser": "frps用户管理", "User": "用户名(user)", "Token": "凭证(meta_token)", "Notes": "备注", diff --git a/assets/static/css/index.css b/assets/static/css/index.css index 369ebc1..a749426 100644 --- a/assets/static/css/index.css +++ b/assets/static/css/index.css @@ -1,8 +1,23 @@ -body { - padding: 15px; +html, body { + padding: 0; word-break: break-all; } +header { + background-color: #58b7ff; + color: #fff; +} + +header .title { + padding: 10px 15px; + line-height: 40px; + font-size: 25px; +} + +section { + padding: 15px 15px 0 15px; +} + #searchForm input { height: 30px; line-height: 28px; @@ -44,10 +59,132 @@ body { line-height: 20px; } -.layui-btn-container{ +.layui-btn-container { height: 30px; } -.layui-layer-btn > a[class^=layui-layer-btn]{ +.layui-layer-btn > a[class^=layui-layer-btn] { line-height: 28px; } + +.layui-table-page { + margin-bottom: 0; +} + +/*以下重置用到的layui组件的颜色*/ + +.layui-btn { + background-color: #409eff; +} + +.layui-layer-btn .layui-layer-btn0 { + background-color: #409eff; +} + +.layui-btn-primary { + background-color: transparent; +} + +.layui-btn-primary:hover { + border-color: #79bbff; +} + +.layui-input:focus, +.layui-textarea:focus { + border-color: #79bbff !important; + box-shadow: none; +} + +.layui-form-danger + .layui-form-select .layui-input, +.layui-form-danger:focus { + border-color: #ff5722 !important; +} + +.layui-laypage .layui-laypage-curr .layui-laypage-em { + background-color: #409eff; +} + +.layui-laypage input:focus, .layui-laypage select:focus { + border-color: #79bbff !important; + box-shadow: none; +} + +.layui-table-view .layui-table td[data-edit]:hover:after { + border-color: #79bbff; +} + +.layui-form-checkbox[lay-skin=primary]:hover > i { + border-color: #79bbff; +} + +.layui-form-checked[lay-skin=primary] > i { + background-color: #409eff; + border-color: #409eff !important; +} + +.layui-table-checked { + background-color: #ecf5ff; +} + +.layui-table-checked:hover { + background-color: #d9ecff; +} + +@media (prefers-color-scheme: dark) { + header { + background-color: #395c74; + } + + .layui-btn { + background-color: #4f80a1; + } + + .layui-layer-btn .layui-layer-btn0 { + background-color: #4f80a1; + } + + .layui-btn-primary { + background-color: transparent; + border-color: #666; + } + + .layui-btn-primary:hover { + border-color: #666; + } + + .layui-input:focus, + .layui-textarea:focus { + border-color: #666 !important; + box-shadow: none; + } + + .layui-laypage .layui-laypage-curr .layui-laypage-em { + background-color: #4f80a1; + } + + .layui-laypage input:focus, .layui-laypage select:focus { + border-color: #666 !important; + box-shadow: none; + } + + .layui-table-view .layui-table td[data-edit]:hover:after { + border-color: #666; + } + + .layui-form-checkbox[lay-skin=primary]:hover > i { + border-color: #666; + } + + .layui-form-checked[lay-skin=primary] > i { + background-color: #4f80a1; + border-color: #4f80a1 !important; + } + + .layui-table-checked { + background-color: rgba(255, 255, 255, .04); + } + + .layui-table-checked:hover { + background-color: rgba(255, 255, 255, .08); + } +} \ No newline at end of file diff --git a/assets/templates/index.html b/assets/templates/index.html index 96c97bd..4125e15 100644 --- a/assets/templates/index.html +++ b/assets/templates/index.html @@ -18,42 +18,48 @@ -
-
-
-
- +
+
${ .FrpsMultiuser }
+
+
+ +
+
+
+ +
+
-
-
-
-
-
- +
+
+
+ +
+
-
-
-
-
-
- +
+
+
+ +
+
-
-
-
-
- - +
+
+ + +
-
- -
+ +
+ +