nonebot-plugin-l4d2-server 0.3.4a2__py3-none-any.whl → 0.3.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. README.md +23 -3
  2. nonebot_plugin_l4d2_server/__init__.py +75 -20
  3. nonebot_plugin_l4d2_server/command.py +5 -4
  4. nonebot_plugin_l4d2_server/config.py +26 -11
  5. nonebot_plugin_l4d2_server/data/L4D2/image/template/anne.html +7 -4
  6. nonebot_plugin_l4d2_server/data/L4D2/image/template/back.png +0 -0
  7. nonebot_plugin_l4d2_server/data/L4D2/image/template/help - /321/205/320/231/320/277/321/206/320/254/320/274.html" +232 -0
  8. nonebot_plugin_l4d2_server/data/L4D2/image/template/help.html +1 -1
  9. nonebot_plugin_l4d2_server/data/L4D2/image/template/help_dack.html +231 -0
  10. nonebot_plugin_l4d2_server/data/L4D2/image/template/ip.html +1 -1
  11. nonebot_plugin_l4d2_server/data/L4D2/l4d2.json +27 -139
  12. nonebot_plugin_l4d2_server/l4d2_anne/__init__.py +40 -17
  13. nonebot_plugin_l4d2_server/l4d2_anne/analysis.py +40 -0
  14. nonebot_plugin_l4d2_server/l4d2_anne/anne_telecom.py +70 -70
  15. nonebot_plugin_l4d2_server/l4d2_anne/server.py +2 -1
  16. nonebot_plugin_l4d2_server/l4d2_anne/startand.py +18 -0
  17. nonebot_plugin_l4d2_server/l4d2_file/__init__.py +28 -2
  18. nonebot_plugin_l4d2_server/l4d2_image/__init__.py +8 -11
  19. nonebot_plugin_l4d2_server/l4d2_queries/__init__.py +4 -0
  20. nonebot_plugin_l4d2_server/l4d2_queries/maps.py +27 -0
  21. nonebot_plugin_l4d2_server/l4d2_queries/qqgroup.py +12 -7
  22. nonebot_plugin_l4d2_server/l4d2_server/web.py +221 -0
  23. nonebot_plugin_l4d2_server/l4d2_server/webUI.py +353 -0
  24. nonebot_plugin_l4d2_server/l4d2_server/workshop.py +24 -5
  25. nonebot_plugin_l4d2_server/seach.py +2 -1
  26. nonebot_plugin_l4d2_server/utils.py +5 -7
  27. {nonebot_plugin_l4d2_server-0.3.4a2.dist-info → nonebot_plugin_l4d2_server-0.3.5.dist-info}/METADATA +28 -4
  28. nonebot_plugin_l4d2_server-0.3.5.dist-info/RECORD +49 -0
  29. nonebot_plugin_l4d2_server/data/L4D2/image/template/back2.jpg +0 -0
  30. nonebot_plugin_l4d2_server-0.3.4a2.dist-info/RECORD +0 -43
  31. {nonebot_plugin_l4d2_server-0.3.4a2.dist-info → nonebot_plugin_l4d2_server-0.3.5.dist-info}/LICENSE +0 -0
  32. {nonebot_plugin_l4d2_server-0.3.4a2.dist-info → nonebot_plugin_l4d2_server-0.3.5.dist-info}/WHEEL +0 -0
README.md CHANGED
@@ -216,6 +216,8 @@ _✨Nonebot & Left 4 Dead 2 server操作✨_
216
216
  | l4_image | 否 | True | 布尔值,是否显示图片 |
217
217
  | l4_font | 否 | 'simsun.ttc' | str,确保在开启图片的时候,字体存在 |
218
218
  | l4_only | 否 | False | 布尔值,如果不想在下载的时候阻碍其他指令可以开启,但是有不能下载超过200m地图的bug |
219
+ | l4_style | 否 | '' | str,图片风格,目前可选['balck'] |
220
+
219
221
 
220
222
  </details>
221
223
 
@@ -292,6 +294,23 @@ anne:<br>
292
294
  <details>
293
295
  <summary>展开/收起</summary>
294
296
 
297
+ ### 0.3.5--2022.3.6
298
+
299
+ - 新增ping查询(在ip里包括)
300
+ - 新增api查询(未完成)
301
+ - 修复了电信服查询绑定名字无法查询的错误
302
+ - 新增了救援率的显示
303
+ - 新增web端(未完成)
304
+
305
+ ### 0.3.4--2022.3.1
306
+
307
+ - 新增本地插件smx查询
308
+ - 增加了三个内置群服
309
+ - 修改了图片的UI,变好看了
310
+ - 删减了部分图片和字体,使得轻量化
311
+ - 修复了海量bug
312
+ - 修复了python3.8中typing错误
313
+
295
314
  ### 0.3.3--2022.2.26
296
315
 
297
316
  - 重写协议,使用a2s库,同时解决win端不同报错无法输出
@@ -447,16 +466,17 @@ ubuntu20.04 python3.10
447
466
  - 2、~[自己写的求生之路查询库](https://github.com/Umamusume-Agnes-Digital/VSQ)~
448
467
  - 3、[可爱小Q的帮助(太好看了tql)](https://github.com/MeetWq/mybot)
449
468
  - 4、感谢petpet交流群各位大佬指点nonebot2事件处理api
469
+ - 5、ArcPav改的暗♂黑风格菜单
450
470
 
451
471
  <h2 id="cx">服务器相关 </h2>
452
472
 
453
- 目前插件会内置经腐竹同意的服的ip
473
+ 目前插件会内置经腐竹同意的服的查询(未来将使用api)
454
474
 
455
475
  | 指令 | 服务器 | op | 数量 |
456
476
  |:-----:|:----:|:----:|:----:|
457
- | 云 | anne电信服云服 | 东 | 26
477
+ | 云 | ~anne电信服云服~(暂时不提供) | 东 | 24
458
478
  | 呆呆 | 呆呆的小窝 | 提莫大魔王 | 15
459
- | 橘 | 橘希实香的小窝 | 橘希实香 | 4
479
+ | 橘 | 橘希实香的小窝 | 橘希实香 | 7
460
480
 
461
481
  如果需要上传自己的ip可以Pr、iss或者进qq群
462
482
 
@@ -16,7 +16,9 @@
16
16
  """
17
17
  from nonebot.matcher import Matcher
18
18
  from nonebot.typing import T_State
19
- from typing import Tuple
19
+ from nonebot.params import CommandArg,ArgPlainText,RegexGroup,Arg,Command,RawCommand
20
+
21
+ from typing import Tuple,Union,List
20
22
  from time import sleep
21
23
  from .config import *
22
24
  from .utils import *
@@ -28,16 +30,18 @@ from nonebot import get_driver
28
30
  from .l4d2_image.vtfs import img_to_vtf
29
31
  from .l4d2_queries.ohter import load_josn
30
32
  from .l4d2_queries.qqgroup import write_json,ip_anne_list
31
- from .l4d2_file import updown_l4d2_vpk
33
+ from .l4d2_file import updown_l4d2_vpk,all_zip_to_one
34
+ from .l4d2_queries.maps import seach_map,map_dict_to_str
32
35
  from .txt_to_img import mode_txt_to_img
33
36
  # from .l4d2_server import RCONClient
34
37
  from nonebot import get_bot, require
38
+ from .l4d2_server import web,webUI
35
39
  scheduler = require("nonebot_plugin_apscheduler").scheduler
36
40
 
37
41
  driver = get_driver()
38
42
 
39
43
 
40
- __version__ = "0.3.4a2"
44
+ __version__ = "0.3.5"
41
45
  __plugin_meta__ = PluginMetadata(
42
46
  name="求生之路小助手",
43
47
  description='群内对有关求生之路的查询和操作',
@@ -141,7 +145,6 @@ async def _(bot:Bot,event: MessageEvent):
141
145
  msg = mes_list(msg,name_vpk).replace(" ","")
142
146
 
143
147
  await find_vpk.finish(mode_txt_to_img(mes,msg))
144
- # await find_vpk.finish(msg)
145
148
 
146
149
  @del_vpk.handle()
147
150
  async def _(matcher:Matcher,args:Message = CommandArg()):
@@ -289,6 +292,8 @@ async def _(event:GroupMessageEvent,matcher:Matcher,args:Message = CommandArg())
289
292
  async def _(event:GroupMessageEvent):
290
293
  group_id = event.group_id
291
294
  msg = await show_ip(group_id)
295
+ if not msg:
296
+ await show_queries.finish("当前没有启动的服务器捏")
292
297
  if type(msg) == str:
293
298
  await show_queries.finish(msg)
294
299
  else:
@@ -312,25 +317,46 @@ async def _(state:T_State,tag:str = ArgPlainText("ip")):
312
317
  msg = await workshop_msg(tag)
313
318
  if not msg:
314
319
  await up_workshop.finish('没有这个物品捏')
315
- pic = await url_to_byte(msg['图片地址'])
316
- message = ''
317
- for item,value in msg.items():
318
- if item in ['图片地址','下载地址']:
319
- continue
320
- message += item + ':' + value + '\n'
321
- state['dic'] = msg
322
- await up_workshop.send(MessageSegment.image(pic) + Message(message))
320
+ elif type(msg) == dict:
321
+ pic = await url_to_byte(msg['图片地址'])
322
+ message = ''
323
+ for item,value in msg.items():
324
+ if item in ['图片地址','下载地址','细节']:
325
+ continue
326
+ message += item + ':' + value + '\n'
327
+ state['dic'] = msg
328
+ await up_workshop.send(MessageSegment.image(pic) + Message(message))
329
+ elif type(msg) == list:
330
+ lenge = len(msg)
331
+ pic = await url_to_byte(msg[0]['图片地址'])
332
+ message = f'有{lenge}个文件\n'
333
+ for one in msg:
334
+ ones = []
335
+ for item,value in one.items():
336
+ if item in ['图片地址','下载地址','细节']:
337
+ continue
338
+ message += item + ':' + value + '\n'
339
+ ones.append(one)
340
+ state['dic'] = ones
323
341
 
324
342
  @up_workshop.got("is_sure",prompt='如果需要上传,请发送 "yes"')
325
343
  async def _(matcher: Matcher,bot:Bot,event:GroupMessageEvent,state:T_State):
326
344
  is_sure = str(state["is_sure"])
327
345
  if is_sure == 'yes':
328
- data_dict:dict = state['dic']
329
- logger.info('开始上传')
330
- data_file = await url_to_byte(data_dict['下载地址'])
331
- file_name = data_dict['名字']+ '.vpk'
332
- await up_workshop.send('获取地址成功,尝试上传')
333
- await upload_file(bot, event, data_file, file_name)
346
+ data_dict:Union[dict,List[dict]] = state['dic']
347
+ if type(data_dict) == dict:
348
+ logger.info('开始上传')
349
+ data_file = await url_to_byte(data_dict['下载地址'])
350
+ file_name = data_dict['名字']+ '.vpk'
351
+ await up_workshop.send('获取地址成功,尝试上传')
352
+ await upload_file(bot, event, data_file, file_name)
353
+ else:
354
+ logger.info('开始上传')
355
+ for data_one in data_dict:
356
+ data_file = await url_to_byte(data_one['下载地址'])
357
+ await all_zip_to_one
358
+ file_name = data_one['名字']+ '.vpk'
359
+ await upload_file(bot, event, data_file, file_name)
334
360
  else:
335
361
  await up_workshop.finish('已取消上传')
336
362
 
@@ -351,6 +377,8 @@ async def _(args:Message = CommandArg()):
351
377
  @read_ip.handle()
352
378
  async def _():
353
379
  img = await qq_ip_queries_pic(ip_anne_list)
380
+ if img == None:
381
+ return "电信服的地址请加主群自行填写哦"
354
382
  await read_ip.finish(MessageSegment.image(img))
355
383
 
356
384
  @tan_jian.handle()
@@ -371,7 +399,10 @@ async def _(command: str = RawCommand(),args:Message = CommandArg()):
371
399
  host,port = split_maohao(one_ip['ip'])
372
400
  ip_list.append((one_ip['id'],host,port))
373
401
  img = await qq_ip_queries_pic(ip_list)
374
- await read_ip.finish(MessageSegment.image(img))
402
+ if img:
403
+ await read_ip.finish(MessageSegment.image(img))
404
+ else:
405
+ await read_ip.finish("服务器无响应")
375
406
  else:
376
407
  message = await json_server_to_tag_dict(command,msg)
377
408
  if len(message) == 0:
@@ -418,10 +449,34 @@ async def _(event:MessageEvent):
418
449
 
419
450
  @open_prison.handle()
420
451
  async def _(event:MessageEvent):
421
- await tan_jian.send('正在寻找空房...')
452
+
422
453
  msg = await get_tan_jian(ip_anne_list,3)
423
454
  await tan_jian.finish(msg)
424
455
 
456
+ @smx_file.handle()
457
+ async def _():
458
+ smx_path = Path(l4_file[CHECK_FILE],"left4dead2/addons/sourcemod/plugins")
459
+ smx_list = []
460
+ name_smx = get_vpk(smx_list,smx_path,file_=".smx")
461
+ logger.info("获取文件列表成功")
462
+ mes = "当前服务器下有以下smx文件"
463
+ msg = ''
464
+ msg = mes_list(msg,name_smx).replace(" ","")
465
+ await find_vpk.finish(mode_txt_to_img(mes,msg))
466
+
467
+ @search_api.handle()
468
+ async def _(args:Message = CommandArg()):
469
+ msg:str = args.extract_plain_text()
470
+ # if msg.startswith('代码'):
471
+ # 建图代码返回三方图信息
472
+ data = await seach_map(msg,l4_master[0],l4_key)
473
+ # else:
474
+ if type(data) == str:
475
+ await search_api.finish(data)
476
+ else:
477
+ await search_api.finish(await map_dict_to_str(data))
478
+
479
+
425
480
  @driver.on_shutdown
426
481
  async def close_db():
427
482
  """关闭数据库"""
@@ -1,5 +1,5 @@
1
- from nonebot import on_notice,on_command,on_regex,on_fullmatch,on_shell_command
2
- from nonebot.params import CommandArg,ArgPlainText,RegexGroup,Arg,Command,RawCommand
1
+ from nonebot import on_notice,on_command,on_regex,on_fullmatch,on_shell_command,on_keyword
2
+
3
3
  import re
4
4
  import nonebot
5
5
  from nonebot.permission import SUPERUSER
@@ -60,7 +60,7 @@ find_vpk = on_command("l4_map",aliases={"求生地图","查看求生地图"},pri
60
60
  del_vpk = on_command("l4_del_map",aliases={"求生地图删除","地图删除"},priority=20,block=True,permission= Master)
61
61
  rcon_to_server = on_command('rcon',aliases={"求生服务器指令","服务器指令","求生服务器控制台"},block=True,permission= Master)
62
62
  check_path = on_command('l4_check',aliases={'求生路径'},priority=20,block=True,permission= Master)
63
-
63
+ smx_file = on_command('l4_smx',aliases={'求生插件'},priority=20,block=True,permission= Master)
64
64
 
65
65
  # anne
66
66
  anne_player = on_command('Ranne',aliases={"求生anne"},priority=25,block=True)
@@ -86,7 +86,8 @@ show_queries = on_command('showq',aliases={"求生订阅"},priority=20,block=Tru
86
86
  join_server = on_command('showq',aliases={"求生加入"},priority=20,block=True)
87
87
  connect_rcon = on_command("Rrcon", aliases={"求生连接", '求生链接','求生rcon'}, priority=50, block=False)
88
88
  end_connect = ['stop', '结束', '连接结束', '结束连接']
89
-
89
+ search_api = on_command('search',aliases={'求生三方'}, priority=20, block=True)
90
+ which_map = on_keyword(("是什么图"),priority=20, block=False)
90
91
 
91
92
  # 下载内容
92
93
  up_workshop = on_command('workshop',aliases={'创意工坊下载','求生创意工坊'},priority=20,block=True)
@@ -1,5 +1,6 @@
1
1
  import nonebot
2
2
  from nonebot.permission import SUPERUSER
3
+ from nonebot import get_driver
3
4
  from nonebot.adapters.onebot.v11.permission import (
4
5
  GROUP_ADMIN,
5
6
  GROUP_OWNER,
@@ -17,7 +18,11 @@ except:
17
18
  file_format = (".vpk",".zip",".7z",'rar')
18
19
  # 权限
19
20
 
20
-
21
+ driver = get_driver()
22
+ try:
23
+ NICKNAME: str = list(driver.config.nickname)[0]
24
+ except Exception:
25
+ NICKNAME = 'bot'
21
26
  CHECK_FILE:int = 0
22
27
  ANNE_IP:dict = json.load(open(Path(__file__).parent.joinpath(
23
28
  'data/L4D2/l4d2.json'), "r", encoding="utf8"))
@@ -28,62 +33,72 @@ ADMINISTRATOR = SUPERUSER | GROUP_ADMIN | GROUP_OWNER | PRIVATE_FRIEND
28
33
  # file 填写求生服务器所在路径
29
34
 
30
35
  try:
31
- l4_file: List[str] = nonebot.get_driver().config.l4_file
36
+ l4_file: List[str] = driver.config.l4_file
32
37
  except:
33
38
  l4_file: List[str] = ['/home/ubuntu/l4d2']
34
39
 
35
40
 
36
41
  try:
37
- l4_image: bool = nonebot.get_driver().config.l4_image
42
+ l4_image: bool = driver.config.l4_image
38
43
  except:
39
44
  l4_image: bool = True
40
45
 
41
46
  try:
42
- l4_steamid: bool = nonebot.get_driver().config.l4_steamid
47
+ l4_steamid: bool = driver.config.l4_steamid
43
48
  except:
44
49
  l4_steamid: bool = True
45
50
 
46
51
  try:
47
- l4_only: bool = nonebot.get_driver().config.l4_only
52
+ l4_only: bool = driver.config.l4_only
48
53
  except:
49
54
  l4_only: bool = False
50
55
 
51
56
  try:
52
- l4_font: str = nonebot.get_driver().config.l4_font
57
+ l4_font: str = driver.config.l4_font
53
58
  except:
54
59
  l4_font: str = 'simsun.ttf'
55
60
 
56
61
  try:
57
- l4_host: List[str] = nonebot.get_driver().config.l4_host
62
+ l4_host: List[str] = driver.config.l4_host
58
63
  except:
59
64
  l4_host: List[str] = ['127.0.0.1']
60
65
 
61
66
 
62
67
  try:
63
- l4_port: List[str] = nonebot.get_driver().config.l4_port
68
+ l4_port: List[str] = driver.config.l4_port
64
69
  except:
65
70
  l4_port: List[str] = ['20715']
66
71
 
67
72
 
68
73
  try:
69
- l4_rcon: List[str] = nonebot.get_driver().config.l4_rcon
74
+ l4_rcon: List[str] = driver.config.l4_rcon
70
75
  except:
71
76
  l4_rcon: List[str] = ['114514']
72
77
 
73
78
 
74
79
  try:
75
- l4_master: List[str] = nonebot.get_driver().config.l4_master
80
+ l4_master: List[str] = driver.config.l4_master
76
81
  except:
77
82
  l4_master: List[str] = ['114514']
78
83
 
79
84
 
80
85
  try:
81
86
  l4_proxies: set = {
82
- 'http://':nonebot.get_driver().config.l4_proxies
87
+ 'http://':driver.config.l4_proxies
83
88
  }
84
89
  except:
85
90
  l4_proxies = ''
86
91
 
92
+ try:
93
+ l4_style:str = driver.config.l4_style
94
+ except:
95
+ l4_style:str = ''
96
+
97
+ try:
98
+ l4_key:str = driver.config.l4_key
99
+ except:
100
+ l4_key:str = ""
101
+
87
102
  l4_list = [l4_file, l4_steamid, l4_host, l4_port, l4_rcon, l4_master]
88
103
  l4_list = [ast.literal_eval(i) if isinstance(i, str) else i for i in l4_list]
89
104
  l4_file, l4_steamid, l4_host, l4_port, l4_rcon, l4_master = l4_list
@@ -3,7 +3,8 @@
3
3
  <link rel="stylesheet" type="text/css" href="vue.css">
4
4
  </head>
5
5
  </br>
6
- <body style="background-image: url('back.png');">
6
+ <body style="background-image: url('back.png'); background-size: cover;">
7
+ <font color="yellow">
7
8
  {% for item in data %}
8
9
  <h1 ><center>求生药役anne电信服数据</center></h1>
9
10
  <div class="scissors" style="border-top:1px dashed orange;">
@@ -11,6 +12,7 @@
11
12
  {% for msg_one in item.one_msg %}
12
13
  {{ msg_one }}<br>
13
14
  {% endfor %}</center></h3>
15
+ </font>
14
16
  <div class="scissors" style="border-top:1px dashed orange;">
15
17
  </div>
16
18
  <div class="myinfo">
@@ -42,16 +44,17 @@
42
44
  </tr>
43
45
  <tr>
44
46
  <td>游玩次数 | {{item.playtimes}}</td>
45
- <td></td>
47
+ <td>救&nbsp; 援&nbsp; 关 | {{item.last_one}}</td>
46
48
  </tr>
47
49
  </tbody>
48
50
  </table>
49
51
  </div>
52
+ <font color="yellow">
50
53
  {% endfor %}
51
54
  <h5><center>©爱丽数码</center></br>
52
55
  <center>
53
- https://github.com/Umamusume-Agnes-Digital/nonebot_plugin_l4d2_server
56
+ github.com/Umamusume-Agnes-Digital/nonebot_plugin_l4d2_server
54
57
  </center>
55
58
  </h5>
56
-
59
+ </font>
57
60
  </body>
@@ -0,0 +1,232 @@
1
+ <html>
2
+ <head>
3
+ <style>
4
+ body {
5
+ margin: 0px;
6
+ zoom: 150%;
7
+ background-color: #F7D04B;
8
+ }
9
+ .image {
10
+ display: flex;
11
+ flex-direction: column;
12
+ overflow: scroll;
13
+ width: max-content;
14
+ padding: 20px;
15
+ }
16
+ .head {
17
+ display: flex;
18
+ flex-direction: row;
19
+ align-items: center;
20
+ justify-content: space-between;
21
+ background-color: #F5D76E;
22
+ padding-left: 20px;
23
+ padding-right: 20px;
24
+ padding-top: 10px;
25
+ padding-bottom: 10px;
26
+ border: 2px solid;
27
+ border-radius: 50px;
28
+ border-color: #F1C40F;
29
+ font-size: 16px;
30
+ margin-bottom: 20px;
31
+ }
32
+
33
+ .plugins {
34
+ display: grid;
35
+ grid-template-columns: auto auto auto;
36
+ row-gap: 20px;
37
+ column-gap: 20px;
38
+ margin-bottom: 20px;
39
+ }
40
+ .plugin {
41
+ display: flex;
42
+ padding: 5px;
43
+ border: 1px solid;
44
+ border-radius: 5px;
45
+ border-color: #F1C40F;
46
+ box-shadow: 0px 2px 6px 1px rgba(0, 0, 0, 0.2);
47
+ background-color: #F7D04B;
48
+ }
49
+ .plugin_meta {
50
+ display: flex;
51
+ flex-direction: column;
52
+ padding: 5px;
53
+ width: 250px;
54
+ justify-content: space-between;
55
+ }
56
+ .plugin_name {
57
+ font-size: 20px;
58
+ color: #F1C40F;
59
+ }
60
+ .plugin_description {
61
+ font-size: 15px;
62
+ color: gray;
63
+ margin-top: 5px;
64
+ margin-bottom: 5px;
65
+ }
66
+ .plugin_meta_line1 {
67
+ display: flex;
68
+ flex-direction: row;
69
+ align-items: center;
70
+ justify-content: space-between;
71
+ }
72
+ .plugin_meta_line3 {
73
+ display: flex;
74
+ flex-direction: row;
75
+ align-items: center;
76
+ }
77
+ .package_name_label {
78
+ background-image: url(./fingerprint.svg);
79
+ width: 13px;
80
+ height: 13px;
81
+ margin-right: 8px;
82
+ }
83
+ .package_name {
84
+ font-size: 13px;
85
+ color: gray;
86
+ }
87
+ .switch {
88
+ position: relative;
89
+ display: inline-block;
90
+ width: 40px;
91
+ height: 24px;
92
+ }
93
+ .slider {
94
+ position: absolute;
95
+ cursor: pointer;
96
+ top: 0;
97
+ left: 0;
98
+ right: 0;
99
+ bottom: 0;
100
+ background-color: #ccc;
101
+ }
102
+ .slider:before {
103
+ position: absolute;
104
+ content: "";
105
+ height: 16px;
106
+ width: 16px;
107
+ left: 4px;
108
+ bottom: 4px;
109
+ background-color: white;
110
+ }
111
+ .switch input {
112
+ display: none;
113
+ }
114
+ .switch input:checked + .slider {
115
+ background-color: rgba(86, 40, 238, 0.5);
116
+ }
117
+ .switch input:checked + .slider:before {
118
+ -webkit-transform: translateX(16px);
119
+ -ms-transform: translateX(16px);
120
+ transform: translateX(16px);
121
+ }
122
+ .slider.round {
123
+ border-radius: 24px;
124
+ }
125
+ .slider.round:before {
126
+ border-radius: 50%;
127
+ }
128
+ .checkbox {
129
+ visibility: hidden;
130
+ }
131
+ .slider.locked {
132
+ opacity: 0.5;
133
+ }
134
+ .switch input + span .lock {
135
+ width: 8px;
136
+ height: 7px;
137
+ background: #99a3ba;
138
+ position: absolute;
139
+ left: 8px;
140
+ bottom: 7px;
141
+ border-radius: 2px;
142
+ display: block;
143
+ z-index: 1;
144
+ transition: all 0.45s ease;
145
+ }
146
+ .switch input + span .lock:before {
147
+ content: "";
148
+ width: 2px;
149
+ height: 2px;
150
+ border-radius: 1px;
151
+ background: #fff;
152
+ position: absolute;
153
+ display: block;
154
+ left: 50%;
155
+ top: 50%;
156
+ margin: -1px 0 0 -1px;
157
+ }
158
+ .switch input + span .lock:after {
159
+ content: "";
160
+ border-top-left-radius: 4px;
161
+ border-top-right-radius: 4px;
162
+ border: 1px solid #99a3ba;
163
+ border-bottom: 0;
164
+ width: 4px;
165
+ height: 4px;
166
+ left: 1px;
167
+ bottom: 6px;
168
+ position: absolute;
169
+ z-index: 1;
170
+ -webkit-transform-origin: 0 100%;
171
+ transform-origin: 0 100%;
172
+ transition: all 0.45s ease;
173
+ }
174
+ .switch input:checked + span .lock {
175
+ background: #5628ee;
176
+ -webkit-transform: translateX(16px);
177
+ -ms-transform: translateX(16px);
178
+ transform: translateX(16px);
179
+ }
180
+ .lock {
181
+ visibility: hidden;
182
+ }
183
+ .lock.locked {
184
+ visibility: inherit;
185
+ }
186
+ </style>
187
+ </head>
188
+ <body>
189
+ <div class="image">
190
+ <div class="head">
191
+ <span><b>已加载服务器</b></span>
192
+ <span>发送 “<b>服务器昵称/序号</b>” 查看详情</span>
193
+ </div>
194
+ <div class="plugins">
195
+ {% for plugin in plugins %}
196
+ <div class="plugin">
197
+ <div class="plugin_meta">
198
+ <div class="plugin_meta_line1">
199
+ <div class="plugin_name">{{ plugin.number }}:{{ plugin.name }}</div>
200
+ <div class="plugin_status">
201
+ <label class="switch">
202
+ <input class="checkbox" type="checkbox" {% if plugin.enabled %} checked {% endif %} />
203
+ <span class="slider round {% if plugin.locked %} locked {% endif %}">
204
+ <span class="lock {% if plugin.locked %} locked {% endif %}"></span>
205
+ </span>
206
+ </label>
207
+ </div>
208
+ </div>
209
+ <div class="plugin_meta_line2">
210
+ <font color="blue">{{ plugin.map_ }}</font><br>
211
+ {% for Player in plugin.Players %}
212
+ <font color="green">{{ Player }}</font><br>
213
+ {% endfor %}
214
+ </div>
215
+ <div class="plugin_meta_line3">
216
+ <div class="package_name_label"></div>
217
+ <div class="package_name">{{ plugin.max_players }}</div>
218
+ </div>
219
+ </div>
220
+ </div>
221
+ {% endfor %}
222
+ </div>
223
+ <div class="head">
224
+ <span><b>©爱丽数码</b></span>
225
+ <span>https://github.com/Umamusume-Agnes-Digital/nonebot_plugin_l4d2_server</span>
226
+ </div>
227
+ </div>
228
+ </html>
229
+ </body>
230
+
231
+
232
+
@@ -220,7 +220,7 @@
220
220
  </div>
221
221
  <div class="head">
222
222
  <span><b>©爱丽数码</b></span>
223
- <span>https://github.com/Umamusume-Agnes-Digital/nonebot_plugin_l4d2_server</span>
223
+ <span>github.com/Umamusume-Agnes-Digital/nonebot_plugin_l4d2_server</span>
224
224
  </div>
225
225
  </div>
226
226
  </html>