45 |
46 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/templates/style.css:
--------------------------------------------------------------------------------
1 | html {
2 | font-size: 25px;
3 | }
4 |
5 | rt {
6 | font-size: 0.6em;
7 | }
8 |
9 | body, html {
10 | margin: 0;
11 | padding: 0;
12 | height: 100%;
13 | overflow: hidden;
14 | }
15 |
16 | body {
17 | /* 背景图设置 */
18 | background: url('{{ bg }}') no-repeat center center fixed;
19 | background-size: cover;
20 | display: flex;
21 | justify-content: center;
22 | align-items: center;
23 | }
24 |
25 | .card {
26 | background-color: rgba(255, 255, 255, {{ alpha }});
27 | border-radius: 30px;
28 | padding: 50px;
29 | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
30 | text-align: center;
31 | }
32 |
33 | /* 以下为各种状态的颜色 */
34 |
35 | .sleeping {
36 | color: gray;
37 | }
38 |
39 | .awake {
40 | color: rgb(16, 128, 0);
41 | }
42 |
43 | .error {
44 | color: red;
45 | }
--------------------------------------------------------------------------------
/utils.py:
--------------------------------------------------------------------------------
1 | from datetime import datetime
2 | import json
3 | import os
4 |
5 |
6 | def info(log):
7 | print(f"[Info] {datetime.now().strftime('[%Y-%m-%d %H:%M:%S]')} " + log)
8 |
9 |
10 | def infon(log):
11 | print(f"\n[Info] {datetime.now().strftime('[%Y-%m-%d %H:%M:%S]')} " + log)
12 |
13 |
14 | def warning(log):
15 | print(f"[Warning] {datetime.now().strftime('[%Y-%m-%d %H:%M:%S]')} " + log)
16 |
17 |
18 | def error(log):
19 | print(f"[Error] {datetime.now().strftime('[%Y-%m-%d %H:%M:%S]')} " + log)
20 |
21 |
22 | def format_dict(dic):
23 | '''
24 | 列表 -> 格式化 json
25 | @param dic: 列表
26 | '''
27 | return json.dumps(dic, indent=4, ensure_ascii=False, sort_keys=False, separators=(', ', ': '))
28 |
--------------------------------------------------------------------------------
/前台应用状态.macro:
--------------------------------------------------------------------------------
1 | {"macro":{"disabledTimestamp":0,"exportedActionBlocks":[],"forceEvenIfNotEnabledTimestamp":0,"isActionBlock":false,"isBeingImported":false,"isClonedInstance":false,"isExtra":false,"isFavourite":false,"lastEditedTimestamp":1732691436491,"localVariables":[],"m_GUID":-6031364693124630676,"m_actionList":[{"requestConfig":{"allowAnyCertificate":false,"basicAuthEnabled":false,"basicAuthPassword":"","basicAuthUsername":"","blockNextAction":false,"contentBodyFileDisplayName":"","contentBodyFileUri":"","contentBodySource":0,"contentBodyText":"","contentType":"","followRedirects":false,"headerParams":[],"queryParams":[],"requestTimeOutSeconds":30,"requestType":0,"saveResponseFileName":"","saveResponseFolderPathDisplayName":"","saveResponseFolderPathUri":"","saveResponseType":0,"saveReturnCodeToVariable":false,"saveReturnHeadersToVariable":false,"urlToOpen":"http://sleepy.1812z.top/set?secret\u003d123456\u0026status\u003d0\u0026app_name\u003d{fg_app_name}"},"m_SIGUID":-6631721251777490861,"m_classType":"HttpRequestAction","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false}],"m_category":"未分类","m_constraintList":[],"m_description":"","m_descriptionOpen":false,"m_enabled":false,"m_excludeLog":false,"m_headingColor":0,"m_isOrCondition":false,"m_name":"前台应用状态","m_triggerList":[{"isAllApps":true,"m_applicationNameList":[],"m_launched":true,"m_packageNameList":[],"usePackageNameOption":0,"m_SIGUID":-5937240281190642385,"m_classType":"ApplicationLaunchedTrigger","m_constraintList":[],"m_isDisabled":false,"m_isOrCondition":false}]},"macroExportVersion":1}
--------------------------------------------------------------------------------