ascript 1.3.27__py3-none-win_amd64.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.
- ascript/__init__.py +8 -0
- ascript/hooks/__init__.py +0 -0
- ascript/hooks/hook-ascript.py +2 -0
- ascript/windows/__init__.py +29 -0
- ascript/windows/daos/__init__.py +0 -0
- ascript/windows/daos/screen.py +143 -0
- ascript/windows/hardware/__init__.py +5 -0
- ascript/windows/hardware/keyboard.py +279 -0
- ascript/windows/hardware/logitech_driver.py +179 -0
- ascript/windows/hardware/mouse.py +308 -0
- ascript/windows/license/__init__.py +16 -0
- ascript/windows/license/achttp.cp310-win_amd64.pyd +0 -0
- ascript/windows/license/achttp.cp311-win_amd64.pyd +0 -0
- ascript/windows/license/achttp.cp312-win_amd64.pyd +0 -0
- ascript/windows/license/achttp.cp313-win_amd64.pyd +0 -0
- ascript/windows/license/achttp.cp314-win_amd64.pyd +0 -0
- ascript/windows/license/achttp.cp38-win_amd64.pyd +0 -0
- ascript/windows/license/achttp.cp39-win_amd64.pyd +0 -0
- ascript/windows/media/__init__.py +0 -0
- ascript/windows/resources/__init__.py +0 -0
- ascript/windows/resources/libs/logitech/x64/LogitechGkeyEnginesWrapper.dll +0 -0
- ascript/windows/resources/libs/logitech/x86/LogitechGkeyEnginesWrapper.dll +0 -0
- ascript/windows/resources/templates/__init__.py +0 -0
- ascript/windows/resources/templates/__init__py.win.template +51 -0
- ascript/windows/resources/templates/build.as.win.template +14 -0
- ascript/windows/resources/templates/build.py +71 -0
- ascript/windows/resources/templates/logo_windows.ico +0 -0
- ascript/windows/resources/templates/windows/main.py +50 -0
- ascript/windows/resources/templates/windows/pyproject.toml +44 -0
- ascript/windows/resources/templates/windows/res/img/logo.ico +0 -0
- ascript/windows/screen/__init__.py +13 -0
- ascript/windows/screen/as_cv.py +382 -0
- ascript/windows/screen/canny.py +128 -0
- ascript/windows/screen/code_scanner.py +72 -0
- ascript/windows/screen/color_algorithms.py +277 -0
- ascript/windows/screen/find_colors.py +251 -0
- ascript/windows/screen/find_images.py +217 -0
- ascript/windows/screen/ocr/__init__.py +4 -0
- ascript/windows/screen/ocr/ocr.py +223 -0
- ascript/windows/screen/ocr/rapidocr_hook.py +301 -0
- ascript/windows/screen/ocrx.py +169 -0
- ascript/windows/screen/screen_core.py +139 -0
- ascript/windows/store/__init__.py +21 -0
- ascript/windows/system/__init__.py +8 -0
- ascript/windows/system/device.py +355 -0
- ascript/windows/system/easy_print.py +115 -0
- ascript/windows/system/env.py +492 -0
- ascript/windows/system/exception/__init__.py +1 -0
- ascript/windows/system/key_value.py +145 -0
- ascript/windows/system/pip.py +175 -0
- ascript/windows/system/r.py +165 -0
- ascript/windows/system/runtime.py +62 -0
- ascript/windows/tools/__init__.py +27 -0
- ascript/windows/tools/__main__.py +21 -0
- ascript/windows/tools/action.json +33 -0
- ascript/windows/tools/action.py +168 -0
- ascript/windows/tools/colors_tool.py +391 -0
- ascript/windows/tools/config.py +26 -0
- ascript/windows/tools/dumptool.py +18 -0
- ascript/windows/tools/eel_api.py +495 -0
- ascript/windows/tools/gpplug/__init__.py +0 -0
- ascript/windows/tools/gpplug/plug.py +70 -0
- ascript/windows/tools/mouse_catch.py +168 -0
- ascript/windows/tools/plug_manager.py +38 -0
- ascript/windows/tools/tool_api.py +906 -0
- ascript/windows/tools/tool_window.py +56 -0
- ascript/windows/tools/uia_worker.py +365 -0
- ascript/windows/tools/web/app_store_window.html +481 -0
- ascript/windows/tools/web/colors.html +532 -0
- ascript/windows/tools/web/css/screen.css +1342 -0
- ascript/windows/tools/web/css/viewtree.css +357 -0
- ascript/windows/tools/web/flot_control.html +195 -0
- ascript/windows/tools/web/img/ico/favicon.png +0 -0
- ascript/windows/tools/web/img/ico/paintpalette.png +0 -0
- ascript/windows/tools/web/img/svg/find_colors.svg +1 -0
- ascript/windows/tools/web/img/svg/find_images.svg +1 -0
- ascript/windows/tools/web/img/svg/illustration-6.svg +89 -0
- ascript/windows/tools/web/img/svg/img_default.svg +1 -0
- ascript/windows/tools/web/img/svg/ocr.svg +1 -0
- ascript/windows/tools/web/js/screen/colors.js +466 -0
- ascript/windows/tools/web/js/screen/gp_plug.js +108 -0
- ascript/windows/tools/web/js/screen/image_mouse.js +464 -0
- ascript/windows/tools/web/js/screen/img_view.js +558 -0
- ascript/windows/tools/web/js/screen/plug.js +246 -0
- ascript/windows/tools/web/js/screen/screen.js +690 -0
- ascript/windows/tools/web/js/screen/screen_api.js +778 -0
- ascript/windows/tools/web/js/screen/screen_maker.js +10 -0
- ascript/windows/tools/web/js/utils/map.js +73 -0
- ascript/windows/tools/web/js/utils/upload.js +157 -0
- ascript/windows/tools/web/js/viewtree/niv_js.js +27 -0
- ascript/windows/tools/web/js/viewtree/vtree.js +1510 -0
- ascript/windows/tools/web/libs/bootstrap/css/bootstrap.min.css +6 -0
- ascript/windows/tools/web/libs/bootstrap/js/bootstrap.bundle.min.js +7 -0
- ascript/windows/tools/web/libs/bootstrap-icons/0-circle.svg +4 -0
- ascript/windows/tools/web/libs/bootstrap-icons/0-square.svg +4 -0
- ascript/windows/tools/web/libs/bootstrap-icons/font/bootstrap-icons.css +2078 -0
- ascript/windows/tools/web/libs/bootstrap-icons/font/bootstrap-icons.json +2052 -0
- ascript/windows/tools/web/libs/bootstrap-icons/font/bootstrap-icons.min.css +5 -0
- ascript/windows/tools/web/libs/bootstrap-icons/font/bootstrap-icons.scss +2090 -0
- ascript/windows/tools/web/libs/bootstrap-icons/font/fonts/bootstrap-icons.woff +0 -0
- ascript/windows/tools/web/libs/bootstrap-icons/font/fonts/bootstrap-icons.woff2 +0 -0
- ascript/windows/tools/web/libs/feather-icons/dist/feather.min.js +13 -0
- ascript/windows/tools/web/libs/feather-icons/dist/icons.json +1 -0
- ascript/windows/tools/web/libs/jquery/core.js +399 -0
- ascript/windows/tools/web/libs/jquery/jquery.js +10598 -0
- ascript/windows/tools/web/libs/jquery/jquery.min.js +4 -0
- ascript/windows/tools/web/libs/jquery/jquery.min.js.zip +0 -0
- ascript/windows/tools/web/libs/jquery/jquery.slim.js +8495 -0
- ascript/windows/tools/web/libs/jquery/jquery.slim.min.js +2 -0
- ascript/windows/tools/web/libs/jquery-menu/jquery.contextMenu.js +2134 -0
- ascript/windows/tools/web/libs/jquery-menu/jquery.contextMenu.min.css +16 -0
- ascript/windows/tools/web/libs/jquery-zTree/css/zTreeStyle.css +97 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/1_close.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/1_open.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/2.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/3.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/4.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/5.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/6.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/7.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/8.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/diy/9.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/line_conn.gif +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/loading.gif +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/tree-node-btn.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/zTreeStandard.gif +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/img/zTreeStandard.png +0 -0
- ascript/windows/tools/web/libs/jquery-zTree/js/jquery.ztree.all.min.js +3 -0
- ascript/windows/tools/web/libs/treeview/css/jquery.treeview.css +79 -0
- ascript/windows/tools/web/libs/treeview/img/file.png +0 -0
- ascript/windows/tools/web/libs/treeview/img/ico_loading.png +0 -0
- ascript/windows/tools/web/libs/treeview/img/icon4.png +0 -0
- ascript/windows/tools/web/libs/treeview/img/icon5.png +0 -0
- ascript/windows/tools/web/libs/treeview/img/icon6.png +0 -0
- ascript/windows/tools/web/libs/treeview/img/py.png +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-black-line.gif +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-black.gif +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-default-line.gif +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-default.gif +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-famfamfam-line.gif +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-famfamfam.gif +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-gray-line.gif +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-gray.gif +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-red-line.gif +0 -0
- ascript/windows/tools/web/libs/treeview/img/treeview-red.gif +0 -0
- ascript/windows/tools/web/libs/treeview/js/jquery.treeview.edit.js +37 -0
- ascript/windows/tools/web/libs/treeview/js/jquery.treeview.js +250 -0
- ascript/windows/tools/web/license_window.html +255 -0
- ascript/windows/tools/web/plugs/a.html +653 -0
- ascript/windows/tools/web/plugs/demo.html +52 -0
- ascript/windows/tools/web/plugs/find_colors.html +629 -0
- ascript/windows/tools/web/plugs/find_images.html +699 -0
- ascript/windows/tools/web/plugs/rapidocr.html +954 -0
- ascript/windows/tools/web/vtree.html +496 -0
- ascript/windows/tools/webview/assets/index-HymBPl-I.css +1 -0
- ascript/windows/tools/webview/assets/index-PqA_m8tL.js +17 -0
- ascript/windows/tools/webview/index.html +13 -0
- ascript/windows/ui/__init__.py +6 -0
- ascript/windows/ui/app_store_window.py +272 -0
- ascript/windows/ui/draw_window.py +231 -0
- ascript/windows/ui/flot_test.py +297 -0
- ascript/windows/ui/flot_window.py +488 -0
- ascript/windows/ui/license_window.py +111 -0
- ascript/windows/ui/web_window.py +466 -0
- ascript/windows/utils/__init__.py +0 -0
- ascript/windows/utils/node_utils.py +20 -0
- ascript/windows/utils/screen_utils.py +280 -0
- ascript/windows/window/Selector.py +1015 -0
- ascript/windows/window/Window.py +747 -0
- ascript/windows/window/__init__.py +5 -0
- ascript/windows/window/launcher.py +213 -0
- ascript/windows/window/uia_runtime.py +26 -0
- ascript-1.3.27.dist-info/METADATA +41 -0
- ascript-1.3.27.dist-info/RECORD +177 -0
- ascript-1.3.27.dist-info/WHEEL +5 -0
- ascript-1.3.27.dist-info/entry_points.txt +2 -0
- ascript-1.3.27.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
.divContain {position:relative; height:100%;}
|
|
2
|
+
.div-dump { width:100%;}
|
|
3
|
+
.div-params {position:fixed; bottom:0;width:100%; height:100%;font-size:30px;display:none}
|
|
4
|
+
.titls {display:-webkit-flex; display: flex;width:100%;height:60px; background:#03dbb0;width:100%;position: relative;line-height: 60px;text-align: center;}
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
.right_bar{
|
|
9
|
+
background-color: #d7d7d7;
|
|
10
|
+
position: absolute;
|
|
11
|
+
height: 100%;
|
|
12
|
+
width: 20px;
|
|
13
|
+
top: 0;
|
|
14
|
+
right: 0px;
|
|
15
|
+
/* background-color: transparent; */
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
align-items: center;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
/* z-index: 10; */
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.right_bar_item{
|
|
25
|
+
font-size: smaller;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/* .right_bar:hover{
|
|
29
|
+
position: absolute;
|
|
30
|
+
right: -20px;
|
|
31
|
+
height: 100%;
|
|
32
|
+
width: 20px;
|
|
33
|
+
z-index: 999;
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
align-items: center;
|
|
37
|
+
cursor: move;
|
|
38
|
+
} */
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
.img-view {
|
|
43
|
+
position:absolute;
|
|
44
|
+
width: 100%;
|
|
45
|
+
height: 100%;
|
|
46
|
+
/* right: 25px;
|
|
47
|
+
bottom: 25px; */
|
|
48
|
+
overflow-x: hidden;
|
|
49
|
+
overflow-y: hidden;
|
|
50
|
+
|
|
51
|
+
}
|
|
52
|
+
.phone-box {
|
|
53
|
+
position: absolute;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
border: 1px dashed #999;
|
|
56
|
+
margin: 0 -1px -1px 0;
|
|
57
|
+
}
|
|
58
|
+
.actived-imgnode {
|
|
59
|
+
border: 3px solid red;
|
|
60
|
+
/* color: red; */
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.con_tools_bar {
|
|
64
|
+
/* 使用 Bootstrap 5 的三级背景色,会自动随主题切换 */
|
|
65
|
+
background-color: var(--bs-tertiary-bg);
|
|
66
|
+
/* 增加一条细细的顶边框,区分工作区 */
|
|
67
|
+
border-top: 1px solid var(--bs-border-color);
|
|
68
|
+
padding-left: 10px;
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: row;
|
|
71
|
+
align-items: center;
|
|
72
|
+
/* 确保文字颜色适配主题 */
|
|
73
|
+
color: var(--bs-body-color);
|
|
74
|
+
font-size: 12px;
|
|
75
|
+
height: 30px; /* 状态栏通常比较窄 */
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* 统一图标与文字的间距和颜色 */
|
|
79
|
+
.viewtree_toolsbar_item {
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center !important; /* 强制所有项垂直居中 */
|
|
82
|
+
margin-right: 15px;
|
|
83
|
+
color: var(--bs-secondary-color); /* 使用次要文字颜色,没那么刺眼 */
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.viewtree_toolsbar_item .bi-apple {
|
|
87
|
+
font-size: 14px; /* 统一图标大小 */
|
|
88
|
+
line-height: 1; /* 消除多余行高 */
|
|
89
|
+
margin-top: -2px; /* 视觉补偿,手动把苹果往上提一点 */
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.viewtree_toolsbar_item i,
|
|
93
|
+
.viewtree_toolsbar_item svg {
|
|
94
|
+
width: 14px;
|
|
95
|
+
height: 14px;
|
|
96
|
+
color: var(--bs-primary); /* 图标可以用主色调点缀 */
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.viewtree_toolsbar_item img{
|
|
100
|
+
width: 20px;
|
|
101
|
+
height: 20px;
|
|
102
|
+
margin-right: 2px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.notclick{
|
|
106
|
+
pointer-events: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
.attr_body{
|
|
112
|
+
width: 100%;
|
|
113
|
+
height: 100vh;
|
|
114
|
+
overflow: scroll;
|
|
115
|
+
margin-bottom: 100px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.attr_footer{
|
|
119
|
+
width: 100%;
|
|
120
|
+
position: absolute;
|
|
121
|
+
bottom: 0px;
|
|
122
|
+
z-index: 1003;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
#code_container{
|
|
126
|
+
word-wrap:break-word
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.sel_attrs{
|
|
130
|
+
border-bottom:1px dashed black;
|
|
131
|
+
background-color: #03dbb0;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.sel_attr_fixer{
|
|
135
|
+
position: absolute;
|
|
136
|
+
z-index: 1005;
|
|
137
|
+
background-color: #3c3f41;
|
|
138
|
+
right: 0px;
|
|
139
|
+
display: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
/* 1. 工具栏整体样式优化 */
|
|
145
|
+
.toolbar-wrapper {
|
|
146
|
+
padding: 8px 16px; /* 增加左右内边距 */
|
|
147
|
+
box-shadow: 0 2px 8px rgba(0,0,0,0.05); /* 淡淡的投影增加层次感 */
|
|
148
|
+
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* 2. 紧凑型输入组 */
|
|
152
|
+
.compact-group {
|
|
153
|
+
height: 32px; /* 强制压缩高度 */
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.compact-group .input-group-text,
|
|
157
|
+
.compact-group .btn,
|
|
158
|
+
.compact-group .form-control {
|
|
159
|
+
font-size: 0.85rem; /* 字体缩小 */
|
|
160
|
+
padding: 0.25rem 0.75rem;
|
|
161
|
+
border-color: #dcdcdc;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.compact-group .input-group-text {
|
|
165
|
+
background-color: #f8f9fa;
|
|
166
|
+
color: #666;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* 3. 悬浮效果 */
|
|
170
|
+
.btn-primary-sm {
|
|
171
|
+
height: 32px;
|
|
172
|
+
padding: 0 15px;
|
|
173
|
+
font-size: 0.85rem;
|
|
174
|
+
border-radius: 4px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
/* 自定义主题高亮项 */
|
|
180
|
+
.tree-node-active {
|
|
181
|
+
background-color: var(--bs-primary-bg-subtle) !important;
|
|
182
|
+
color: var(--bs-primary-text-emphasis) !important;
|
|
183
|
+
border-radius: 4px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
#p_i_xml_container {
|
|
187
|
+
white-space: pre-wrap;
|
|
188
|
+
word-break: break-all;
|
|
189
|
+
cursor: text;
|
|
190
|
+
transition: background-color 0.2s;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.code-step {
|
|
194
|
+
transition: background-color 0.2s;
|
|
195
|
+
display: inline-block;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.code-step:hover {
|
|
199
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
200
|
+
color: #9cdcfe !important;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* 适配深色模式的 Popover */
|
|
204
|
+
/* 解决弹窗透明问题,确保背景不透视 */
|
|
205
|
+
.popover {
|
|
206
|
+
background-color: var(--bs-body-bg) !important;
|
|
207
|
+
border: 1px solid var(--bs-border-color-translucent) !important;
|
|
208
|
+
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5) !important;
|
|
209
|
+
z-index: 2000 !important; /* 确保在最上层 */
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.popover-header {
|
|
213
|
+
background-color: var(--bs-tertiary-bg) !important;
|
|
214
|
+
color: var(--bs-emphasis-color) !important;
|
|
215
|
+
border-bottom: 1px solid var(--bs-border-color-translucent) !important;
|
|
216
|
+
font-size: 12px;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.popover-body {
|
|
220
|
+
background-color: var(--bs-body-bg) !important;
|
|
221
|
+
padding: 10px !important;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* 交互状态:点击时的高亮 */
|
|
225
|
+
.code-step.active-edit {
|
|
226
|
+
background-color: var(--bs-primary-bg-subtle);
|
|
227
|
+
outline: 1px dashed var(--bs-primary);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/* 逻辑类:标记面板当前是否为打开状态 */
|
|
231
|
+
.is-open {
|
|
232
|
+
/* 仅作为 JS 判定标记,不带样式 */
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* 鼠标悬停在自定义条目上的反馈 */
|
|
236
|
+
.attr-target:hover {
|
|
237
|
+
background-color: var(--bs-secondary-bg-subtle) !important;
|
|
238
|
+
cursor: pointer;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* 初始隐藏类 */
|
|
242
|
+
.init-hidden {
|
|
243
|
+
display: none !important;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* 只有当没有 .is-open 类时,面板才隐藏 */
|
|
247
|
+
/* 这种写法优先级高于普通类名,但低于 JS 的行内修改 */
|
|
248
|
+
#attrView:not(.is-open) {
|
|
249
|
+
display: none !important;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* 基础样式保持 flex */
|
|
253
|
+
#attrView {
|
|
254
|
+
display: flex;
|
|
255
|
+
flex-direction: column;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* 旋转动画定义 */
|
|
259
|
+
@keyframes rotate-loading {
|
|
260
|
+
from { transform: rotate(0deg); }
|
|
261
|
+
to { transform: rotate(360deg); }
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/* 动画触发类 */
|
|
265
|
+
.spin-animation {
|
|
266
|
+
/* 关键点:必须是 inline-block 旋转才生效 */
|
|
267
|
+
display: inline-block !important;
|
|
268
|
+
animation: rotate-loading 0.8s linear infinite;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/* 统一定义系统主题高亮 */
|
|
272
|
+
.tree-node-highlight {
|
|
273
|
+
/* 使用系统 Primary 蓝色 */
|
|
274
|
+
background-color: var(--bs-primary) !important;
|
|
275
|
+
border-color: var(--bs-primary) !important;
|
|
276
|
+
color: #ffffff !important;
|
|
277
|
+
|
|
278
|
+
/* 胶囊状外观 */
|
|
279
|
+
display: inline-block !important;
|
|
280
|
+
padding: 0px 4px !important;
|
|
281
|
+
border-radius: 4px !important;
|
|
282
|
+
box-shadow: 0 0 10px rgba(var(--bs-primary-rgb), 0.5) !important;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
/* 关键:强制让内部所有不同颜色的 span 在高亮时全部变白 */
|
|
286
|
+
.tree-node-highlight span {
|
|
287
|
+
color: #ffffff !important;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.ztree li {
|
|
291
|
+
/* 核心:告诉浏览器,如果这个节点在屏幕外,不要去计算它的布局和绘图 */
|
|
292
|
+
content-visibility: auto;
|
|
293
|
+
|
|
294
|
+
/* 配合 contain-intrinsic-size 效果更好 */
|
|
295
|
+
/* 预估一个节点的高度(比如 24px),防止滚动条抖动 */
|
|
296
|
+
contain-intrinsic-size: 1px 24px;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* 统一工具栏项的对齐方式 */
|
|
300
|
+
.viewtree_toolsbar_item {
|
|
301
|
+
display: inline-flex; /* 开启弹性布局 */
|
|
302
|
+
align-items: center; /* 垂直居中 */
|
|
303
|
+
vertical-align: middle; /* 修正行内对齐 */
|
|
304
|
+
margin-right: 15px; /* 间距 */
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/* 修正图标和文字之间的间距 */
|
|
308
|
+
.viewtree_toolsbar_item i,
|
|
309
|
+
.viewtree_toolsbar_item svg {
|
|
310
|
+
margin-right: 4px;
|
|
311
|
+
/* 统一微调:有些图标库自带 padding,这里强制统一高度感 */
|
|
312
|
+
display: flex;
|
|
313
|
+
align-items: center;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* 专门针对 Feather Icons 的 SVG 渲染微调 */
|
|
317
|
+
.viewtree_toolsbar_item svg.feather {
|
|
318
|
+
width: 14px;
|
|
319
|
+
height: 14px;
|
|
320
|
+
stroke-width: 2;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/* 专门针对 Bootstrap Icons 的微调 */
|
|
324
|
+
.viewtree_toolsbar_item .bi {
|
|
325
|
+
font-size: 14px;
|
|
326
|
+
line-height: 1;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
#windowList {
|
|
330
|
+
z-index: 1000000;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/* 500ms 触发后的特殊标记 - 适配 Bootstrap 5.3 主题 */
|
|
334
|
+
.tree-node-locked {
|
|
335
|
+
/* 使用主题主色调的 RGB 变量,并配合透明度 0.2 */
|
|
336
|
+
background-color: rgba(var(--bs-primary-rgb), 0.2) !important;
|
|
337
|
+
/* 使用主题主色调变量作为侧边线 */
|
|
338
|
+
border-left: 3px solid var(--bs-primary) !important;
|
|
339
|
+
transition: all 0.3s ease;
|
|
340
|
+
/* 确保文字颜色在锁定状态下依然有足够的对比度 */
|
|
341
|
+
color: var(--bs-emphasis-color) !important;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/* 针对 zTree 的 a 标签特殊处理 */
|
|
345
|
+
.ztree li a.tree-node-locked {
|
|
346
|
+
background-color: rgba(var(--bs-primary-rgb), 0.2) !important;
|
|
347
|
+
height: auto !important; /* 确保高度能包住边框 */
|
|
348
|
+
display: inline-block;
|
|
349
|
+
width: 100%;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* 深色模式下的微调(如果需要更亮的反馈) */
|
|
353
|
+
[data-bs-theme="dark"] .tree-node-locked {
|
|
354
|
+
background-color: rgba(var(--bs-primary-rgb), 0.25) !important;
|
|
355
|
+
/* 在暗黑模式下增加一点外发光,让锁定感更强 */
|
|
356
|
+
box-shadow: inset 0 0 5px rgba(var(--bs-primary-rgb), 0.1);
|
|
357
|
+
}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<style>
|
|
5
|
+
* { box-sizing: border-box; }
|
|
6
|
+
html, body {
|
|
7
|
+
margin: 0; padding: 0; width: 100%; height: 100%;
|
|
8
|
+
overflow: hidden; background-color: #1a1a1a;
|
|
9
|
+
display: flex; flex-direction: column; user-select: none;
|
|
10
|
+
}
|
|
11
|
+
.full-bar {
|
|
12
|
+
width: 100%; height: 76px; min-height: 76px;
|
|
13
|
+
display: flex; align-items: center;
|
|
14
|
+
padding: 0 12px; border: none;
|
|
15
|
+
cursor: move; flex-shrink: 0; z-index: 10;
|
|
16
|
+
background-color: #1a1a1a;
|
|
17
|
+
}
|
|
18
|
+
.full-bar.expanded-mode { border-bottom: 1px solid #333; }
|
|
19
|
+
.disk-box { width: 42px; height: 42px; flex-shrink: 0; position: relative; border-radius: 50%; overflow: hidden; border: 1px solid #444; }
|
|
20
|
+
|
|
21
|
+
#disk {
|
|
22
|
+
width: 100%; height: 100%; object-fit: cover;
|
|
23
|
+
transition: transform 0.6s cubic-bezier(0.2, 0, 0.2, 1.5);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.disk-overlay {
|
|
27
|
+
position: absolute; top: 0; left: 0; width: 100%; height: 100%;
|
|
28
|
+
background: rgba(0,0,0,0.7); display: flex; align-items: center; justify-content: center;
|
|
29
|
+
opacity: 0; transition: opacity 0.2s; cursor: pointer; -webkit-app-region: no-drag;
|
|
30
|
+
}
|
|
31
|
+
.full-bar:hover .disk-overlay { opacity: 1; }
|
|
32
|
+
|
|
33
|
+
/* 处理中状态:禁止点击 */
|
|
34
|
+
.disk-overlay.processing {
|
|
35
|
+
cursor: not-allowed !important;
|
|
36
|
+
opacity: 0.5 !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.btn-icon { width: 22px; height: 22px; fill: white; }
|
|
40
|
+
.center-info { display: flex; flex-direction: column; justify-content: center; margin-left: 12px; flex-grow: 1; overflow: hidden; }
|
|
41
|
+
.ui-title { color: #eeeeee; font-size: 13px; font-family: "微软雅黑"; font-weight: bold; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
|
42
|
+
.control-row { margin-top: 4px; font-size: 11px; font-family: 'Consolas', '微软雅黑'; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; -webkit-app-region: no-drag; cursor: pointer; }
|
|
43
|
+
#latest-log-preview { color: #00ff88; opacity: 0.8; display: block; }
|
|
44
|
+
#collapse-btn { color: #888; display: none; font-weight: bold; }
|
|
45
|
+
#collapse-btn:hover { color: #00ff88; }
|
|
46
|
+
.hide-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 4px; color: #666; cursor: pointer; transition: all 0.2s; -webkit-app-region: no-drag; opacity: 0; }
|
|
47
|
+
.full-bar:hover .hide-btn { opacity: 1; }
|
|
48
|
+
.hide-btn:hover { background: #444; color: white; }
|
|
49
|
+
.led { width: 4px; height: 24px; background: #333; margin-left: 10px; transition: all 0.3s; }
|
|
50
|
+
.is-active .led { background: #00ff88; box-shadow: -2px 0 8px rgba(0, 255, 136, 0.4); }
|
|
51
|
+
|
|
52
|
+
#log-window { width: 100%; flex-grow: 1; background: #121212; display: none; flex-direction: column; border: none; overflow: hidden; }
|
|
53
|
+
#log-container { flex: 1; width: 100%; padding: 10px; color: #00ff88; font-family: 'Consolas', monospace; font-size: 12px; overflow-y: auto; }
|
|
54
|
+
|
|
55
|
+
#log-container::-webkit-scrollbar { width: 6px; }
|
|
56
|
+
#log-container::-webkit-scrollbar-track { background: #1a1a1a; }
|
|
57
|
+
#log-container::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
|
|
58
|
+
#log-container::-webkit-scrollbar-thumb:hover { background: #444; }
|
|
59
|
+
|
|
60
|
+
.log-line { border-bottom: 1px solid #1a1a1a; padding: 4px 0; word-break: break-all; color: #00ff88; }
|
|
61
|
+
.log-line.latest { color: #ffffff !important; font-weight: bold; }
|
|
62
|
+
</style>
|
|
63
|
+
</head>
|
|
64
|
+
<body>
|
|
65
|
+
<div class="full-bar" id="mainBar" onmousedown="handleMouseDown(event)">
|
|
66
|
+
<div class="disk-box">
|
|
67
|
+
<img id="disk" src="">
|
|
68
|
+
<div id="overlay" class="disk-overlay" onclick="toggleStatus(event)">
|
|
69
|
+
<svg id="playIcon" class="btn-icon" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>
|
|
70
|
+
<svg id="stopIcon" class="btn-icon" viewBox="0 0 24 24" style="display:none;"><path d="M6 6h12v12H6z"/></svg>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="center-info">
|
|
74
|
+
<div class="ui-title" id="ui-title">Loading...</div>
|
|
75
|
+
<div class="control-row">
|
|
76
|
+
<div id="latest-log-preview" onclick="setExpand(true)">Waiting...</div>
|
|
77
|
+
<div id="collapse-btn" onclick="setExpand(false)">CLOSE PANEL ▴</div>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="hide-btn" onclick="sdkCall('hide_window')">
|
|
81
|
+
<svg style="width:18px; height:18px; fill:currentColor" viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="led" id="ledIndicator"></div>
|
|
84
|
+
</div>
|
|
85
|
+
<div id="log-window"><div id="log-container"></div></div>
|
|
86
|
+
|
|
87
|
+
<script>
|
|
88
|
+
let running = false; let currentAngle = 0; let animationId = null;
|
|
89
|
+
let isProcessing = false; // 状态锁:点击无效化的核心
|
|
90
|
+
|
|
91
|
+
const disk = document.getElementById('disk'); const mainBar = document.getElementById('mainBar');
|
|
92
|
+
const logWindow = document.getElementById('log-window'); const logContainer = document.getElementById('log-container');
|
|
93
|
+
const logPreview = document.getElementById('latest-log-preview'); const collapseBtn = document.getElementById('collapse-btn');
|
|
94
|
+
const overlay = document.getElementById('overlay');
|
|
95
|
+
|
|
96
|
+
async function sdkCall(method, ...args) {
|
|
97
|
+
if (typeof window.callPython !== 'function') {
|
|
98
|
+
throw new Error('AScript Python bridge is not ready');
|
|
99
|
+
}
|
|
100
|
+
return await window.callPython(method, ...args);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
window.addEventListener('onPythonReady', async () => {
|
|
104
|
+
const info = await sdkCall('get_init_data');
|
|
105
|
+
document.getElementById('ui-title').innerText = info.title;
|
|
106
|
+
disk.src = "data:" + (info.icon_mime || "image/png") + ";base64," + info.icon_b64;
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
window.addLog = function(msg) {
|
|
110
|
+
logPreview.innerText = msg;
|
|
111
|
+
const line = document.createElement('div'); line.className = 'log-line latest'; line.innerText = msg;
|
|
112
|
+
const oldLatest = logContainer.querySelector('.log-line.latest');
|
|
113
|
+
if (oldLatest) oldLatest.classList.remove('latest');
|
|
114
|
+
logContainer.appendChild(line);
|
|
115
|
+
logContainer.scrollTop = logContainer.scrollHeight;
|
|
116
|
+
if (logContainer.childNodes.length > 100) logContainer.removeChild(logContainer.firstChild);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
function setExpand(expand) {
|
|
120
|
+
if (expand) { logWindow.style.display = 'flex'; mainBar.classList.add('expanded-mode'); logPreview.style.display = 'none'; collapseBtn.style.display = 'block'; }
|
|
121
|
+
else { logWindow.style.display = 'none'; mainBar.classList.remove('expanded-mode'); logPreview.style.display = 'block'; collapseBtn.style.display = 'none'; }
|
|
122
|
+
sdkCall('resize_ui', expand);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
function rotateStep() {
|
|
126
|
+
if (!running) return;
|
|
127
|
+
currentAngle = (currentAngle + 4) % 360;
|
|
128
|
+
disk.style.transition = 'none';
|
|
129
|
+
disk.style.transform = `rotate(${currentAngle}deg)`;
|
|
130
|
+
animationId = requestAnimationFrame(rotateStep);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
async function toggleStatus(e) {
|
|
134
|
+
e.stopPropagation();
|
|
135
|
+
if (isProcessing) return; // 如果正在清理或启动中,点击无效
|
|
136
|
+
|
|
137
|
+
isProcessing = true;
|
|
138
|
+
overlay.classList.add('processing'); // 增加视觉反馈
|
|
139
|
+
|
|
140
|
+
running = !running;
|
|
141
|
+
if (running) {
|
|
142
|
+
mainBar.classList.add('is-active');
|
|
143
|
+
document.getElementById('playIcon').style.display = 'none';
|
|
144
|
+
document.getElementById('stopIcon').style.display = 'block';
|
|
145
|
+
rotateStep();
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
mainBar.classList.remove('is-active');
|
|
149
|
+
document.getElementById('playIcon').style.display = 'block';
|
|
150
|
+
document.getElementById('stopIcon').style.display = 'none';
|
|
151
|
+
cancelAnimationFrame(animationId);
|
|
152
|
+
disk.style.transition = 'transform 0.6s cubic-bezier(0.2, 0, 0.2, 1.5)';
|
|
153
|
+
disk.style.transform = 'rotate(0deg)';
|
|
154
|
+
currentAngle = 0;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// 调用 Python 并等待处理完成(善后 3s 也会在这里等待)
|
|
158
|
+
await sdkCall('on_toggle_click', running);
|
|
159
|
+
|
|
160
|
+
isProcessing = false;
|
|
161
|
+
overlay.classList.remove('processing'); // 解锁
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function handleMouseDown(e) {
|
|
165
|
+
if (['ui-title', 'mainBar', 'center-info'].some(c => e.target.classList.contains(c) || e.target.id === c)) {
|
|
166
|
+
sdkCall('drag_window');
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// 在你的 HTML script 标签内增加此方法
|
|
171
|
+
window.syncStatus = function(isActive) {
|
|
172
|
+
if (isActive === running) return;
|
|
173
|
+
|
|
174
|
+
// 复用 toggleStatus 的逻辑但不触发 callPython (因为是 Python 发起的)
|
|
175
|
+
running = isActive;
|
|
176
|
+
if (running) {
|
|
177
|
+
mainBar.classList.add('is-active');
|
|
178
|
+
document.getElementById('playIcon').style.display = 'none';
|
|
179
|
+
document.getElementById('stopIcon').style.display = 'block';
|
|
180
|
+
rotateStep();
|
|
181
|
+
} else {
|
|
182
|
+
mainBar.classList.remove('is-active');
|
|
183
|
+
document.getElementById('playIcon').style.display = 'block';
|
|
184
|
+
document.getElementById('stopIcon').style.display = 'none';
|
|
185
|
+
cancelAnimationFrame(animationId);
|
|
186
|
+
disk.style.transition = 'transform 0.6s cubic-bezier(0.2, 0, 0.2, 1.5)';
|
|
187
|
+
disk.style.transform = 'rotate(0deg)';
|
|
188
|
+
currentAngle = 0;
|
|
189
|
+
}
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
</script>
|
|
194
|
+
</body>
|
|
195
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1768960417824" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="36120" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M515.2768 111.9232c277.7088 0 506.88 177.408 506.88 402.8416 0 159.2832-162.9184 302.5408-361.1648 323.1232l-12.6976 0.9728-15.0528 0.4096h-17.92l-28.6208-0.7168 3.9424 7.68c3.2256 5.7856 6.7072 11.3664 10.24 16.2816l8.9088 11.4688a46.08 46.08 0 0 1-30.976 70.8096C263.0656 997.0176 8.3968 773.9392 8.3968 514.7648c0-225.4336 229.12-402.8416 506.88-402.8416z m0 92.16c-231.2704 0-414.72 142.08-414.72 310.6816 0 181.6064 163.584 344.0128 383.488 345.4976l11.6224-0.1024-0.6656-1.6896-3.6864-10.7008c-15.36-48.896-8.3968-95.5392 47.5136-101.5296l6.1952-0.512 9.216-0.1024 61.3888 1.4336 14.9504 0.0512 11.9808-0.256 8.8576-0.6144c155.2384-16.128 278.528-124.5696 278.528-231.424 0-168.6528-183.4496-310.7328-414.72-310.7328zM312.6272 376.7296a102.4 102.4 0 1 1 0 204.8 102.4 102.4 0 0 1 0-204.8z m421.888-16.9984a64 64 0 1 1 0 128 64 64 0 0 1 0-128zM523.9808 300.032a76.8 76.8 0 1 1 0 153.6 76.8 76.8 0 0 1 0-153.6z" p-id="36121" fill="#8a8a8a"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1768958102002" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10303" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M798.86 227.512H238.68c-29.752 0-52.5 22.76-52.5 52.516V768.42c0 28.012 22.752 52.524 52.5 52.524h560.176c28.012 0 52.532-24.512 52.532-52.524V280.032c0-28.012-22.764-52.52-52.532-52.52z m-441.128 89.28c29.764 0 56.016 24.504 56.016 56.008 0 31.508-24.504 56.016-56.016 56.016-29.756 0-56.016-24.508-56.016-56.016 0-31.504 26.26-56.012 56.016-56.012z m-40.256 425.372c-5.264 0-10.504-1.756-15.76-5.252-10.504-8.752-10.504-21.008-1.744-31.504l108.532-152.296c8.748-8.76 21.012-10.504 31.508-3.504l94.532 66.52 169.812-182.06c8.748-8.748 50.748-54.268 75.264-3.508v309.848c-0.008 1.76-462.144 1.76-462.144 1.76zM896 128H768V64h192v192h-64V128z m0 768V768h64v192H768v-64h128z m-768 0h128v64H64V768h64v128z m0-768v128H64V64h192v64H128z" p-id="10304" fill="#8a8a8a"></path></svg>
|