@gkd-kit/inspect 0.0.1701404525886 → 0.0.1701678184497
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.
- package/dist/404.html +7 -7
- package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-bda27d9e.js +1388 -0
- package/dist/assets/DevicePage-fee3235d.js +457 -0
- package/dist/assets/HomePage-5632f622.js +400 -0
- package/dist/assets/ImportPage-21674b0a.js +87 -0
- package/dist/assets/SnapshotPage-3157f92e.js +3629 -0
- package/dist/assets/SnapshotPage-3c2cecee.css +8 -0
- package/dist/assets/_404Page-09910a83.js +32 -0
- package/dist/assets/_404Page-1bb368b2.css +9 -0
- package/dist/assets/import-1c0da893.js +288 -0
- package/dist/assets/index-235f5a3e.js +21365 -0
- package/dist/assets/index-2bb4cdf2.js +9780 -0
- package/dist/assets/index-50ce64aa.css +360 -0
- package/dist/assets/jszip.min-9f22f6d7.js +2651 -0
- package/dist/assets/node-c1756ecf.js +7817 -0
- package/dist/assets/polyfills-bdd638aa.js +11381 -0
- package/dist/assets/storage-00dd3e29.js +4479 -0
- package/dist/assets/table-ad72f278.js +8763 -0
- package/dist/index.html +7 -7
- package/package.json +25 -26
- package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-b803bcbc.js +0 -10
- package/dist/assets/ActionCard.vue_vue_type_script_setup_true_lang-b803bcbc.js.map +0 -1
- package/dist/assets/DevicePage-2982dba9.js +0 -4
- package/dist/assets/DevicePage-2982dba9.js.map +0 -1
- package/dist/assets/HomePage-d2b7a174.js +0 -10
- package/dist/assets/HomePage-d2b7a174.js.map +0 -1
- package/dist/assets/ImportPage-42983845.js +0 -2
- package/dist/assets/ImportPage-42983845.js.map +0 -1
- package/dist/assets/SnapshotPage-37def4f3.js +0 -241
- package/dist/assets/SnapshotPage-37def4f3.js.map +0 -1
- package/dist/assets/SnapshotPage-49b5182f.css +0 -1
- package/dist/assets/_404Page-2ece9679.css +0 -1
- package/dist/assets/_404Page-d7737f5c.js +0 -2
- package/dist/assets/_404Page-d7737f5c.js.map +0 -1
- package/dist/assets/_plugin-vue_export-helper-c27b6911.js +0 -2
- package/dist/assets/_plugin-vue_export-helper-c27b6911.js.map +0 -1
- package/dist/assets/check-44032eaf.js +0 -2
- package/dist/assets/check-44032eaf.js.map +0 -1
- package/dist/assets/import-a5cc70a1.js +0 -2
- package/dist/assets/import-a5cc70a1.js.map +0 -1
- package/dist/assets/index-4b0effd3.js +0 -558
- package/dist/assets/index-4b0effd3.js.map +0 -1
- package/dist/assets/index-5093d345.css +0 -1
- package/dist/assets/index-f152e873.js +0 -17
- package/dist/assets/index-f152e873.js.map +0 -1
- package/dist/assets/jszip.min-f013cbb4.js +0 -13
- package/dist/assets/jszip.min-f013cbb4.js.map +0 -1
- package/dist/assets/node-781d54ba.js +0 -731
- package/dist/assets/node-781d54ba.js.map +0 -1
- package/dist/assets/polyfills-f223ca2c.js +0 -1
- package/dist/assets/storage-31afdb2c.js +0 -330
- package/dist/assets/storage-31afdb2c.js.map +0 -1
- package/dist/assets/table-0978d0a2.js +0 -958
- package/dist/assets/table-0978d0a2.js.map +0 -1
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import { s as shallowRef, d as defineComponent, ao as useRouter, a6 as onMounted, t as toValidURL, w as watchEffect, a as shallowReactive, e as watch, aq as resolveComponent, f as createElementBlock, b as createVNode, g as withCtx, u as unref, h as createBaseVNode, F as Fragment, j as NButton, k as createTextVNode, o as openBlock, N as NModal, ar as isRef, i as withKeys, l as toDisplayString, m as createCommentVNode } from "./index-235f5a3e.js";
|
|
2
|
+
import { l as enhanceFetch, m as message, j as delay, a as snapshotStorage, i as screenshotStorage, p as pLimit } from "./storage-00dd3e29.js";
|
|
3
|
+
import { u as useTitle, b as useStorage, c as useDebounceFn, a as errorWrap, d as checkSelector, l as lib } from "./index-2bb4cdf2.js";
|
|
4
|
+
import { u as useSnapshotColumns, a as NSelect, N as NDataTable } from "./table-ad72f278.js";
|
|
5
|
+
import { u as useTask, x as useBatchTask, c as NSpace, N as NInput, h as NCheckbox, d as NIcon, a as NInputGroup } from "./node-c1756ecf.js";
|
|
6
|
+
const useDeviceApi = (initOrigin) => {
|
|
7
|
+
const origin = shallowRef(initOrigin);
|
|
8
|
+
const rpc = async (rpcName, options = {}) => {
|
|
9
|
+
var _a;
|
|
10
|
+
if (!origin.value) {
|
|
11
|
+
throw new Error(`origin must exist`);
|
|
12
|
+
}
|
|
13
|
+
const u = new URL(`/api/` + rpcName, origin.value);
|
|
14
|
+
Object.entries(options.query || {}).forEach(([key, value]) => {
|
|
15
|
+
if (value === void 0)
|
|
16
|
+
return;
|
|
17
|
+
u.searchParams.set(key, String(value));
|
|
18
|
+
});
|
|
19
|
+
const response = await enhanceFetch(u, options.init).catch((e) => {
|
|
20
|
+
message.error(`网络错误:/` + rpcName);
|
|
21
|
+
throw e;
|
|
22
|
+
});
|
|
23
|
+
if (!response.ok) {
|
|
24
|
+
message.error(`接口错误:/` + rpcName + `:` + response.status);
|
|
25
|
+
throw response;
|
|
26
|
+
}
|
|
27
|
+
if ((_a = response.headers.get(`Content-Type`)) == null ? void 0 : _a.includes(`application/json`)) {
|
|
28
|
+
const error = await response.clone().json();
|
|
29
|
+
if (error.__error) {
|
|
30
|
+
message.error(error.message);
|
|
31
|
+
throw response;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return response;
|
|
35
|
+
};
|
|
36
|
+
const jsonRpc = async (...args) => {
|
|
37
|
+
const response = await rpc(...args);
|
|
38
|
+
return await response.json();
|
|
39
|
+
};
|
|
40
|
+
const blobRpc = async (...args) => {
|
|
41
|
+
const response = await rpc(...args);
|
|
42
|
+
return await response.blob();
|
|
43
|
+
};
|
|
44
|
+
const arrayBufferRpc = async (...args) => {
|
|
45
|
+
const response = await rpc(...args);
|
|
46
|
+
return await response.arrayBuffer();
|
|
47
|
+
};
|
|
48
|
+
const api = {
|
|
49
|
+
device: async () => jsonRpc(`device`),
|
|
50
|
+
snapshot: async (query) => {
|
|
51
|
+
return jsonRpc(`snapshot`, { query });
|
|
52
|
+
},
|
|
53
|
+
screenshot: async (query) => {
|
|
54
|
+
return arrayBufferRpc(`screenshot`, { query });
|
|
55
|
+
},
|
|
56
|
+
captureSnapshot: async () => {
|
|
57
|
+
return jsonRpc(`captureSnapshot`);
|
|
58
|
+
},
|
|
59
|
+
snapshots: async () => {
|
|
60
|
+
return jsonRpc(`snapshots`);
|
|
61
|
+
},
|
|
62
|
+
subsApps: async () => {
|
|
63
|
+
return jsonRpc(`subsApps`);
|
|
64
|
+
},
|
|
65
|
+
updateSubsApps: async (data) => {
|
|
66
|
+
return blobRpc(`updateSubsApps`, {
|
|
67
|
+
init: {
|
|
68
|
+
method: "POST",
|
|
69
|
+
body: JSON.stringify(data),
|
|
70
|
+
headers: {
|
|
71
|
+
"Content-Type": "application/json"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
execSelector: async (data) => {
|
|
77
|
+
return jsonRpc(
|
|
78
|
+
`execSelector`,
|
|
79
|
+
{
|
|
80
|
+
init: {
|
|
81
|
+
method: "POST",
|
|
82
|
+
// value 是旧版本的选择器
|
|
83
|
+
body: JSON.stringify({ ...data, value: data.selector }),
|
|
84
|
+
headers: {
|
|
85
|
+
"Content-Type": "application/json"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
return { origin, api };
|
|
93
|
+
};
|
|
94
|
+
const _hoisted_1 = /* @__PURE__ */ createBaseVNode("div", {
|
|
95
|
+
"h-15px": ""
|
|
96
|
+
}, null, -1);
|
|
97
|
+
const _hoisted_2 = /* @__PURE__ */ createBaseVNode("a", {
|
|
98
|
+
href: "https://github.com/gkd-kit/subscription/blob/main/src/types.ts",
|
|
99
|
+
target: "_blank",
|
|
100
|
+
rel: "noopener noreferrer"
|
|
101
|
+
}, " 查找说明 ", -1);
|
|
102
|
+
const _hoisted_3 = /* @__PURE__ */ createBaseVNode("div", {
|
|
103
|
+
"h-10px": ""
|
|
104
|
+
}, null, -1);
|
|
105
|
+
const _hoisted_4 = {
|
|
106
|
+
flex: "",
|
|
107
|
+
"gap-10px": "",
|
|
108
|
+
"flex-items-center": ""
|
|
109
|
+
};
|
|
110
|
+
const _hoisted_5 = /* @__PURE__ */ createBaseVNode("a", {
|
|
111
|
+
href: "https://github.com/gkd-kit/subscription/blob/main/src/types.ts",
|
|
112
|
+
target: "_blank",
|
|
113
|
+
rel: "noopener noreferrer"
|
|
114
|
+
}, " 操作说明 ", -1);
|
|
115
|
+
const _hoisted_6 = {
|
|
116
|
+
flex: "",
|
|
117
|
+
"flex-col": "",
|
|
118
|
+
"p-10px": "",
|
|
119
|
+
"gap-10px": "",
|
|
120
|
+
"h-full": ""
|
|
121
|
+
};
|
|
122
|
+
const _hoisted_7 = /* @__PURE__ */ createBaseVNode("svg", {
|
|
123
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
124
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
125
|
+
viewBox: "0 0 32 32"
|
|
126
|
+
}, [/* @__PURE__ */ createBaseVNode("path", {
|
|
127
|
+
d: "M16.612 2.214a1.01 1.01 0 0 0-1.242 0L1 13.419l1.243 1.572L4 13.621V26a2.004 2.004 0 0 0 2 2h20a2.004 2.004 0 0 0 2-2V13.63L29.757 15L31 13.428zM18 26h-4v-8h4zm2 0v-8a2.002 2.002 0 0 0-2-2h-4a2.002 2.002 0 0 0-2 2v8H6V12.062l10-7.79l10 7.8V26z",
|
|
128
|
+
fill: "currentColor"
|
|
129
|
+
})], -1);
|
|
130
|
+
const _hoisted_8 = {
|
|
131
|
+
class: "h-full",
|
|
132
|
+
flex: "",
|
|
133
|
+
"flex-items-center": ""
|
|
134
|
+
};
|
|
135
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
136
|
+
__name: "DevicePage",
|
|
137
|
+
setup(__props) {
|
|
138
|
+
const router = useRouter();
|
|
139
|
+
const title = useTitle(`新设备`);
|
|
140
|
+
const {
|
|
141
|
+
api,
|
|
142
|
+
origin
|
|
143
|
+
} = useDeviceApi();
|
|
144
|
+
const link = useStorage(`device_link`, ``);
|
|
145
|
+
const device = shallowRef();
|
|
146
|
+
const connect = useTask(async () => {
|
|
147
|
+
if (!link.value)
|
|
148
|
+
return;
|
|
149
|
+
origin.value = errorWrap(() => new URL(link.value.trim()), () => `非法设备地址`).origin;
|
|
150
|
+
link.value = origin.value;
|
|
151
|
+
device.value = await api.device();
|
|
152
|
+
});
|
|
153
|
+
onMounted(async () => {
|
|
154
|
+
await delay(500);
|
|
155
|
+
if (toValidURL(link.value)) {
|
|
156
|
+
connect.invoke();
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
const snapshots = shallowRef([]);
|
|
160
|
+
watchEffect(async () => {
|
|
161
|
+
if (!device.value)
|
|
162
|
+
return;
|
|
163
|
+
title.value = `已连接 ` + device.value.manufacturer;
|
|
164
|
+
const result = await api.snapshots();
|
|
165
|
+
result.sort((a, b) => b.id - a.id);
|
|
166
|
+
snapshots.value = result;
|
|
167
|
+
const subsApps = await api.subsApps();
|
|
168
|
+
subsText.value = lib.stringify(subsApps || [], function(key, value) {
|
|
169
|
+
if (value === null)
|
|
170
|
+
return void 0;
|
|
171
|
+
return value;
|
|
172
|
+
}, 2);
|
|
173
|
+
});
|
|
174
|
+
const captureSnapshot = useTask(async () => {
|
|
175
|
+
const snapshot = await api.captureSnapshot();
|
|
176
|
+
const screenshot = await api.screenshot({
|
|
177
|
+
id: snapshot.id
|
|
178
|
+
});
|
|
179
|
+
await snapshotStorage.setItem(snapshot.id, snapshot);
|
|
180
|
+
await screenshotStorage.setItem(snapshot.id, screenshot);
|
|
181
|
+
message.success(`保存快照成功`);
|
|
182
|
+
const result = await api.snapshots();
|
|
183
|
+
result.sort((a, b) => b.id - a.id);
|
|
184
|
+
snapshots.value = result;
|
|
185
|
+
});
|
|
186
|
+
const downloadAllSnapshot = useTask(async () => {
|
|
187
|
+
const snapshotIds = (await api.snapshots()).map((s) => s.id);
|
|
188
|
+
const existSnapshotIds = new Set((await screenshotStorage.keys()).map((s) => parseInt(s)));
|
|
189
|
+
const unimportSnapshotIds = snapshotIds.filter((k) => !existSnapshotIds.has(k));
|
|
190
|
+
if (unimportSnapshotIds.length == 0) {
|
|
191
|
+
message.success(`没有新记录可导入`);
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
let r = 0;
|
|
195
|
+
const limit = pLimit(3);
|
|
196
|
+
await Promise.all(unimportSnapshotIds.map((snapshotId) => limit(async () => {
|
|
197
|
+
const [newSnapshot, newScreenshot] = await Promise.all([api.snapshot({
|
|
198
|
+
id: snapshotId
|
|
199
|
+
}), api.screenshot({
|
|
200
|
+
id: snapshotId
|
|
201
|
+
})]);
|
|
202
|
+
if (!newSnapshot.nodes)
|
|
203
|
+
return;
|
|
204
|
+
await Promise.all([snapshotStorage.setItem(snapshotId, newSnapshot), screenshotStorage.setItem(snapshotId, newScreenshot)]);
|
|
205
|
+
r++;
|
|
206
|
+
})));
|
|
207
|
+
message.success(`导入${r}条新记录`);
|
|
208
|
+
});
|
|
209
|
+
const {
|
|
210
|
+
activityIdCol,
|
|
211
|
+
appIdCol,
|
|
212
|
+
appNameCol,
|
|
213
|
+
ctimeCol,
|
|
214
|
+
appVersionCodeCol,
|
|
215
|
+
appVersionNameCol,
|
|
216
|
+
reseColWidth
|
|
217
|
+
} = useSnapshotColumns();
|
|
218
|
+
const handleSorterChange = (sorter) => {
|
|
219
|
+
if (sorter.columnKey == ctimeCol.key) {
|
|
220
|
+
ctimeCol.sortOrder = sorter.order;
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
const previewSnapshot = useBatchTask(async (row) => {
|
|
224
|
+
if (!await snapshotStorage.hasItem(row.id)) {
|
|
225
|
+
await snapshotStorage.setItem(row.id, await api.snapshot({
|
|
226
|
+
id: row.id
|
|
227
|
+
}));
|
|
228
|
+
}
|
|
229
|
+
if (!await screenshotStorage.hasItem(row.id)) {
|
|
230
|
+
const bf = await api.screenshot({
|
|
231
|
+
id: row.id
|
|
232
|
+
});
|
|
233
|
+
await screenshotStorage.setItem(row.id, bf);
|
|
234
|
+
}
|
|
235
|
+
window.open(router.resolve({
|
|
236
|
+
name: "snapshot",
|
|
237
|
+
params: {
|
|
238
|
+
snapshotId: row.id
|
|
239
|
+
}
|
|
240
|
+
}).href);
|
|
241
|
+
}, (r) => r.id);
|
|
242
|
+
const columns = [ctimeCol, appNameCol, appIdCol, appVersionCodeCol, appVersionNameCol, activityIdCol, {
|
|
243
|
+
key: `actions`,
|
|
244
|
+
title: `Action`,
|
|
245
|
+
fixed: "right",
|
|
246
|
+
width: `120px`,
|
|
247
|
+
render(row) {
|
|
248
|
+
return createVNode(NSpace, {
|
|
249
|
+
"size": "small"
|
|
250
|
+
}, {
|
|
251
|
+
default: () => [createVNode(NButton, {
|
|
252
|
+
"size": "small",
|
|
253
|
+
"loading": previewSnapshot.loading[row.id],
|
|
254
|
+
"onClick": () => previewSnapshot.invoke(row)
|
|
255
|
+
}, {
|
|
256
|
+
default: () => [createTextVNode("查看")]
|
|
257
|
+
})]
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
}];
|
|
261
|
+
const pagination = shallowReactive({
|
|
262
|
+
page: 1,
|
|
263
|
+
pageSize: 50,
|
|
264
|
+
showSizePicker: true,
|
|
265
|
+
pageSizes: [50, 100],
|
|
266
|
+
onChange: (page) => {
|
|
267
|
+
pagination.page = page;
|
|
268
|
+
},
|
|
269
|
+
onUpdatePageSize: (pageSize) => {
|
|
270
|
+
pagination.pageSize = pageSize;
|
|
271
|
+
pagination.page = 1;
|
|
272
|
+
}
|
|
273
|
+
});
|
|
274
|
+
watch(pagination, reseColWidth);
|
|
275
|
+
const showSubsModel = shallowRef(false);
|
|
276
|
+
const subsText = shallowRef(``);
|
|
277
|
+
const updateSubs = useTask(async () => {
|
|
278
|
+
const appsSubs = errorWrap(() => lib.parse(subsText.value.trim() || `[]`));
|
|
279
|
+
await api.updateSubsApps([].concat(appsSubs));
|
|
280
|
+
message.success(`修改成功`);
|
|
281
|
+
});
|
|
282
|
+
const showSelectorModel = shallowRef(false);
|
|
283
|
+
const actionOptions = ["click", "clickNode", "clickCenter", "back", "longClick", "longClickNode", "longClickCenter"].map((s) => ({
|
|
284
|
+
value: s,
|
|
285
|
+
label: s
|
|
286
|
+
}));
|
|
287
|
+
const clickAction = shallowReactive({
|
|
288
|
+
selector: ``,
|
|
289
|
+
selectorValid: false,
|
|
290
|
+
action: actionOptions[0].value,
|
|
291
|
+
quickFind: false
|
|
292
|
+
});
|
|
293
|
+
const checkSelectorValid = useDebounceFn(() => {
|
|
294
|
+
clickAction.selectorValid = checkSelector(clickAction.selector);
|
|
295
|
+
}, 500);
|
|
296
|
+
watch(() => clickAction.selector.trim(), checkSelectorValid);
|
|
297
|
+
const execSelector = useTask(async () => {
|
|
298
|
+
const result = await api.execSelector({
|
|
299
|
+
...clickAction
|
|
300
|
+
});
|
|
301
|
+
if (result.message) {
|
|
302
|
+
message.success(`点击成功:` + result.message);
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (result.action) {
|
|
306
|
+
message.success((result.result ? `点击成功:` : `点击失败`) + result.action);
|
|
307
|
+
}
|
|
308
|
+
});
|
|
309
|
+
return (_ctx, _cache) => {
|
|
310
|
+
const _component_RouterLink = resolveComponent("RouterLink");
|
|
311
|
+
return openBlock(), createElementBlock(Fragment, null, [createVNode(unref(NModal), {
|
|
312
|
+
show: showSubsModel.value,
|
|
313
|
+
"onUpdate:show": _cache[1] || (_cache[1] = ($event) => showSubsModel.value = $event),
|
|
314
|
+
preset: "dialog",
|
|
315
|
+
style: {
|
|
316
|
+
"width": "800px"
|
|
317
|
+
},
|
|
318
|
+
title: "修改内存订阅",
|
|
319
|
+
"positive-text": "确认",
|
|
320
|
+
positiveButtonProps: {
|
|
321
|
+
loading: unref(updateSubs).loading,
|
|
322
|
+
onClick() {
|
|
323
|
+
unref(updateSubs).invoke();
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
}, {
|
|
327
|
+
default: withCtx(() => [createVNode(unref(NInput), {
|
|
328
|
+
value: subsText.value,
|
|
329
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => subsText.value = $event),
|
|
330
|
+
disabled: unref(updateSubs).loading,
|
|
331
|
+
type: "textarea",
|
|
332
|
+
class: "gkd_code",
|
|
333
|
+
autosize: {
|
|
334
|
+
minRows: 10,
|
|
335
|
+
maxRows: 25
|
|
336
|
+
},
|
|
337
|
+
placeholder: `请输入订阅文本
|
|
338
|
+
订阅支持JSON5
|
|
339
|
+
根节点可以是APP规则对象也可以是APP规则对象数组`
|
|
340
|
+
}, null, 8, ["value", "disabled"])]),
|
|
341
|
+
_: 1
|
|
342
|
+
}, 8, ["show", "positiveButtonProps"]), createVNode(unref(NModal), {
|
|
343
|
+
show: showSelectorModel.value,
|
|
344
|
+
"onUpdate:show": _cache[5] || (_cache[5] = ($event) => showSelectorModel.value = $event),
|
|
345
|
+
preset: "dialog",
|
|
346
|
+
style: {
|
|
347
|
+
"width": "800px"
|
|
348
|
+
},
|
|
349
|
+
title: "执行选择器",
|
|
350
|
+
"positive-text": "确认",
|
|
351
|
+
positiveButtonProps: {
|
|
352
|
+
loading: unref(execSelector).loading,
|
|
353
|
+
disabled: !unref(clickAction).selectorValid,
|
|
354
|
+
onClick() {
|
|
355
|
+
unref(execSelector).invoke();
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
}, {
|
|
359
|
+
default: withCtx(() => [createVNode(unref(NInput), {
|
|
360
|
+
value: unref(clickAction).selector,
|
|
361
|
+
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => unref(clickAction).selector = $event),
|
|
362
|
+
disabled: unref(execSelector).loading,
|
|
363
|
+
type: "textarea",
|
|
364
|
+
class: "gkd_code",
|
|
365
|
+
autosize: {
|
|
366
|
+
minRows: 4,
|
|
367
|
+
maxRows: 10
|
|
368
|
+
},
|
|
369
|
+
placeholder: "请输入合法的选择器"
|
|
370
|
+
}, null, 8, ["value", "disabled"]), _hoisted_1, createVNode(unref(NSpace), null, {
|
|
371
|
+
default: withCtx(() => [createVNode(unref(NCheckbox), {
|
|
372
|
+
checked: unref(clickAction).quickFind,
|
|
373
|
+
"onUpdate:checked": _cache[3] || (_cache[3] = ($event) => unref(clickAction).quickFind = $event)
|
|
374
|
+
}, {
|
|
375
|
+
default: withCtx(() => [createTextVNode(" 快速查找 ")]),
|
|
376
|
+
_: 1
|
|
377
|
+
}, 8, ["checked"]), _hoisted_2]),
|
|
378
|
+
_: 1
|
|
379
|
+
}), _hoisted_3, createBaseVNode("div", _hoisted_4, [createVNode(unref(NSelect), {
|
|
380
|
+
value: unref(clickAction).action,
|
|
381
|
+
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => unref(clickAction).action = $event),
|
|
382
|
+
options: unref(actionOptions),
|
|
383
|
+
class: "w-150px"
|
|
384
|
+
}, null, 8, ["value", "options"]), _hoisted_5])]),
|
|
385
|
+
_: 1
|
|
386
|
+
}, 8, ["show", "positiveButtonProps"]), createBaseVNode("div", _hoisted_6, [createVNode(unref(NSpace), null, {
|
|
387
|
+
default: withCtx(() => [createVNode(_component_RouterLink, {
|
|
388
|
+
to: "/"
|
|
389
|
+
}, {
|
|
390
|
+
default: withCtx(() => [createVNode(unref(NButton), null, {
|
|
391
|
+
icon: withCtx(() => [createVNode(unref(NIcon), null, {
|
|
392
|
+
default: withCtx(() => [_hoisted_7]),
|
|
393
|
+
_: 1
|
|
394
|
+
})]),
|
|
395
|
+
_: 1
|
|
396
|
+
})]),
|
|
397
|
+
_: 1
|
|
398
|
+
}), createVNode(unref(NInputGroup), null, {
|
|
399
|
+
default: withCtx(() => [createVNode(unref(NInput), {
|
|
400
|
+
value: unref(link),
|
|
401
|
+
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => isRef(link) ? link.value = $event : null),
|
|
402
|
+
placeholder: "请输入设备地址",
|
|
403
|
+
style: {
|
|
404
|
+
minWidth: `250px`
|
|
405
|
+
},
|
|
406
|
+
onKeyup: withKeys(unref(connect).invoke, ["enter"])
|
|
407
|
+
}, null, 8, ["value", "onKeyup"]), createVNode(unref(NButton), {
|
|
408
|
+
onClick: unref(connect).invoke,
|
|
409
|
+
loading: unref(connect).loading
|
|
410
|
+
}, {
|
|
411
|
+
default: withCtx(() => [createTextVNode(" 刷新连接 ")]),
|
|
412
|
+
_: 1
|
|
413
|
+
}, 8, ["onClick", "loading"])]),
|
|
414
|
+
_: 1
|
|
415
|
+
}), device.value ? (openBlock(), createElementBlock(Fragment, {
|
|
416
|
+
key: 0
|
|
417
|
+
}, [createBaseVNode("div", _hoisted_8, toDisplayString(`已连接 ${device.value.manufacturer} Android ${device.value.release}`), 1), createVNode(unref(NButton), {
|
|
418
|
+
onClick: unref(captureSnapshot).invoke,
|
|
419
|
+
loading: unref(captureSnapshot).loading
|
|
420
|
+
}, {
|
|
421
|
+
default: withCtx(() => [createTextVNode(" 快照 ")]),
|
|
422
|
+
_: 1
|
|
423
|
+
}, 8, ["onClick", "loading"]), createVNode(unref(NButton), {
|
|
424
|
+
onClick: unref(downloadAllSnapshot).invoke,
|
|
425
|
+
loading: unref(downloadAllSnapshot).loading
|
|
426
|
+
}, {
|
|
427
|
+
default: withCtx(() => [createTextVNode(" 下载设备所有快照 ")]),
|
|
428
|
+
_: 1
|
|
429
|
+
}, 8, ["onClick", "loading"]), createVNode(unref(NButton), {
|
|
430
|
+
onClick: _cache[7] || (_cache[7] = ($event) => showSubsModel.value = true)
|
|
431
|
+
}, {
|
|
432
|
+
default: withCtx(() => [createTextVNode(" 修改内存订阅 ")]),
|
|
433
|
+
_: 1
|
|
434
|
+
}), createVNode(unref(NButton), {
|
|
435
|
+
onClick: _cache[8] || (_cache[8] = ($event) => showSelectorModel.value = true)
|
|
436
|
+
}, {
|
|
437
|
+
default: withCtx(() => [createTextVNode(" 执行选择器 ")]),
|
|
438
|
+
_: 1
|
|
439
|
+
})], 64)) : createCommentVNode("", true)]),
|
|
440
|
+
_: 1
|
|
441
|
+
}), createVNode(unref(NDataTable), {
|
|
442
|
+
striped: "",
|
|
443
|
+
flexHeight: "",
|
|
444
|
+
data: snapshots.value,
|
|
445
|
+
columns,
|
|
446
|
+
pagination: unref(pagination),
|
|
447
|
+
"onUpdate:sorter": handleSorterChange,
|
|
448
|
+
size: "small",
|
|
449
|
+
class: "flex-1",
|
|
450
|
+
scrollX: 1200
|
|
451
|
+
}, null, 8, ["data", "pagination"])])], 64);
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
export {
|
|
456
|
+
_sfc_main as default
|
|
457
|
+
};
|