@necrolab/dashboard 0.4.216 → 0.4.219
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/.vscode/extensions.json +1 -1
- package/backend/api.js +9 -29
- package/backend/auth.js +2 -2
- package/backend/endpoints.js +4 -65
- package/backend/mock-src/classes/logger.js +3 -1
- package/backend/mock-src/classes/utils.js +5 -2
- package/backend/mock-src/ticketmaster.js +78 -78
- package/config/configs.json +1 -1
- package/config/filter.json +2 -3
- package/package.json +2 -3
- package/postinstall.js +11 -13
- package/src/components/Editors/Profile/ProfileView.vue +3 -3
- package/src/components/Tasks/CheckStock.vue +29 -7
- package/src/components/Tasks/Controls/DesktopControls.vue +2 -1
- package/src/components/Tasks/Controls/MobileControls.vue +1 -1
- package/src/components/Tasks/CreateTaskTM.vue +1 -1
- package/src/components/Tasks/MassEdit.vue +5 -1
- package/src/components/Tasks/QuickSettings.vue +6 -4
- package/src/components/Tasks/ScrapeVenue.vue +5 -1
- package/src/components/Tasks/Task.vue +2 -3
- package/src/components/Tasks/Utilities.vue +1 -1
- package/src/stores/connection.js +43 -47
- package/src/stores/sampleData.js +3 -3
- package/src/stores/ui.js +53 -18
- package/src/stores/utils.js +58 -1
- package/src/views/Console.vue +15 -6
- package/src/views/Tasks.vue +2 -2
- package/workbox-config.js +6 -10
- package/backend/mock-src/database.js +0 -0
- package/public/sw.js +0 -2
- package/public/workbox-49fdaf31.js +0 -2
- package/public/workbox-49fdaf31.js.map +0 -1
- package/public/workbox-88575b92.js +0 -2
- package/public/workbox-88575b92.js.map +0 -1
- package/public/workbox-a67a7b11.js +0 -2
- package/public/workbox-a67a7b11.js.map +0 -1
- package/public/workbox-d4314735.js +0 -2
- package/public/workbox-d4314735.js.map +0 -1
- package/public/workbox-e0f89ef3.js +0 -2
- package/public/workbox-e0f89ef3.js.map +0 -1
package/.vscode/extensions.json
CHANGED
package/backend/api.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
const enableWs = require("express-ws");
|
|
2
2
|
const express = require("express");
|
|
3
3
|
const cors = require("cors");
|
|
4
|
-
const uuid = require("uuid").v4;
|
|
5
4
|
const cookieParser = require("cookie-parser");
|
|
6
5
|
const { encode } = require("@msgpack/msgpack");
|
|
7
6
|
const fs = require("node:fs");
|
|
@@ -119,7 +118,7 @@ app.ws("/api/updates", async function (ws, req) {
|
|
|
119
118
|
}
|
|
120
119
|
|
|
121
120
|
try {
|
|
122
|
-
const id = uuid();
|
|
121
|
+
const id = utils.uuid();
|
|
123
122
|
|
|
124
123
|
logger.Info(`New websocket connected: ${id}`);
|
|
125
124
|
// Add client to array
|
|
@@ -161,7 +160,7 @@ app.ws("/api/updates", async function (ws, req) {
|
|
|
161
160
|
for (let c = 0; c < Bot.ConsoleBuffer.length; c++) {
|
|
162
161
|
pushWSUpdate({
|
|
163
162
|
type: "console",
|
|
164
|
-
|
|
163
|
+
...Bot.ConsoleBuffer[c]
|
|
165
164
|
});
|
|
166
165
|
}
|
|
167
166
|
}
|
|
@@ -292,25 +291,6 @@ app.get("/api/tasks", async (req, res) => {
|
|
|
292
291
|
return res.send(await endpoints.getTasks());
|
|
293
292
|
});
|
|
294
293
|
|
|
295
|
-
// Start all
|
|
296
|
-
app.post("/api/tasks/start-all", async (req, res) => {
|
|
297
|
-
const r = await endpoints.startAllTasks();
|
|
298
|
-
if (r.error) return res.send(r);
|
|
299
|
-
else closeTab(res);
|
|
300
|
-
});
|
|
301
|
-
|
|
302
|
-
// Stop all
|
|
303
|
-
app.post("/api/tasks/stop-all", async (req, res) => {
|
|
304
|
-
const r = await endpoints.stopAllTasks();
|
|
305
|
-
if (r.error) return res.send(r);
|
|
306
|
-
else closeTab(res);
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
app.post("/api/tasks/delete-all", async (req, res) => {
|
|
310
|
-
await endpoints.deleteAllTasks();
|
|
311
|
-
closeTab(res);
|
|
312
|
-
});
|
|
313
|
-
|
|
314
294
|
app.get("/api/tasks/load-presale", async (req, res) => {
|
|
315
295
|
await endpoints.deleteAllTasks();
|
|
316
296
|
closeTab(res);
|
|
@@ -401,14 +381,14 @@ app.get("/api/quickconfig", async (req, res) => {
|
|
|
401
381
|
return res.json({
|
|
402
382
|
keys: {
|
|
403
383
|
Captcha: {
|
|
404
|
-
CapMonster: "
|
|
405
|
-
CapSolver: "
|
|
406
|
-
Invizible: "
|
|
407
|
-
TwoCaptcha: "
|
|
384
|
+
CapMonster: "example",
|
|
385
|
+
CapSolver: "example",
|
|
386
|
+
Invizible: "example",
|
|
387
|
+
TwoCaptcha: "example"
|
|
408
388
|
},
|
|
409
389
|
SMS: {
|
|
410
|
-
Quackr: "
|
|
411
|
-
SMSActivate: "
|
|
390
|
+
Quackr: "example",
|
|
391
|
+
SMSActivate: "example"
|
|
412
392
|
}
|
|
413
393
|
}
|
|
414
394
|
});
|
|
@@ -442,7 +422,7 @@ app.get("/api/userconfig/proxylists", async (req, res) => {
|
|
|
442
422
|
});
|
|
443
423
|
|
|
444
424
|
app.get("/api/userconfig/balances", async (req, res) => {
|
|
445
|
-
return res.send({
|
|
425
|
+
return res.send({ CapSolver: 100, TwoCaptcha: 40 });
|
|
446
426
|
});
|
|
447
427
|
|
|
448
428
|
module.exports = {
|
package/backend/auth.js
CHANGED
package/backend/endpoints.js
CHANGED
|
@@ -53,53 +53,12 @@ const getTasks = async () => {
|
|
|
53
53
|
return getStrippedTasks();
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
-
const startAllTasks = async () => {
|
|
57
|
-
var taskIds = Object.keys(Bot.Tasks);
|
|
58
|
-
for (let c = 0; c < taskIds.length; c++) {
|
|
59
|
-
var taskId = taskIds[c] + "";
|
|
60
|
-
if (!Bot.Tasks[taskId] || Bot.Tasks[taskId].active) continue;
|
|
61
|
-
if (Bot.Tasks[taskId].status == "Stopped")
|
|
62
|
-
Bot.Tasks[taskId] = new TicketMaster({
|
|
63
|
-
taskId: Bot.Tasks[taskId].taskId,
|
|
64
|
-
...Bot.Tasks[taskId].settings
|
|
65
|
-
});
|
|
66
|
-
Bot.Tasks[taskId].start();
|
|
67
|
-
}
|
|
68
|
-
pushWSUpdate({
|
|
69
|
-
event: "start-all"
|
|
70
|
-
});
|
|
71
|
-
return {};
|
|
72
|
-
};
|
|
73
|
-
const stopAllTasks = async () => {
|
|
74
|
-
var taskIds = Object.keys(Bot.Tasks);
|
|
75
|
-
for (let c = 0; c < taskIds.length; c++) {
|
|
76
|
-
var taskId = taskIds[c] + "";
|
|
77
|
-
if (!Bot.Tasks[taskId] || !Bot.Tasks[taskId].active) continue;
|
|
78
|
-
Bot.Tasks[taskId].stop();
|
|
79
|
-
}
|
|
80
|
-
pushWSUpdate({
|
|
81
|
-
event: "stop-all"
|
|
82
|
-
});
|
|
83
|
-
return {};
|
|
84
|
-
};
|
|
85
|
-
const deleteAllTasks = async () => {
|
|
86
|
-
Bot.Tasks = {};
|
|
87
|
-
var taskIds = Object.keys(Bot.Tasks);
|
|
88
|
-
for (let c = 0; c < taskIds.length; c++) {
|
|
89
|
-
var taskId = taskIds[c] + "";
|
|
90
|
-
if (!Bot.Tasks[taskId]) continue;
|
|
91
|
-
Bot.Tasks[c].destroy();
|
|
92
|
-
}
|
|
93
|
-
pushWSUpdate({
|
|
94
|
-
event: "delete-all"
|
|
95
|
-
});
|
|
96
|
-
return {};
|
|
97
|
-
};
|
|
98
56
|
const tasksLoadPresale = async (data) => {
|
|
99
57
|
var { eventId, ticketQty } = data;
|
|
100
58
|
await createPresaleModeTasks(eventId, ticketQty);
|
|
101
59
|
return {};
|
|
102
60
|
};
|
|
61
|
+
|
|
103
62
|
const startTask = async (data) => {
|
|
104
63
|
const taskId = data.id;
|
|
105
64
|
|
|
@@ -121,6 +80,7 @@ const startTask = async (data) => {
|
|
|
121
80
|
Bot.Tasks[taskId].start();
|
|
122
81
|
return {};
|
|
123
82
|
};
|
|
83
|
+
|
|
124
84
|
const stopTask = async (data) => {
|
|
125
85
|
const taskId = data.id;
|
|
126
86
|
|
|
@@ -136,6 +96,7 @@ const stopTask = async (data) => {
|
|
|
136
96
|
Bot.Tasks[taskId].stop();
|
|
137
97
|
return {};
|
|
138
98
|
};
|
|
99
|
+
|
|
139
100
|
const deleteTask = async (data) => {
|
|
140
101
|
const taskId = data.id;
|
|
141
102
|
if (!Bot.Tasks[taskId])
|
|
@@ -286,13 +247,6 @@ const createAccounts = async () => {};
|
|
|
286
247
|
const saveAccount = async (account) => {
|
|
287
248
|
const user = account.user;
|
|
288
249
|
user.tags = [user.name];
|
|
289
|
-
// TODO: handle in database
|
|
290
|
-
if (account._id) {
|
|
291
|
-
// database.models.profile.findOneAndUpdate()
|
|
292
|
-
} else {
|
|
293
|
-
// database.models.profile.create()
|
|
294
|
-
}
|
|
295
|
-
|
|
296
250
|
Bot[account.module].Accounts.push(account);
|
|
297
251
|
pushWSUpdate({ event: "add-account", account: account });
|
|
298
252
|
return {};
|
|
@@ -315,12 +269,6 @@ const saveProfile = async (profile) => {
|
|
|
315
269
|
newTags = [...newTags, ...profile.tags];
|
|
316
270
|
profile.tags = newTags;
|
|
317
271
|
|
|
318
|
-
// TODO: handle in database
|
|
319
|
-
if (profile._id) {
|
|
320
|
-
// database.models.profile.findOneAndUpdate()
|
|
321
|
-
} else {
|
|
322
|
-
// database.models.profile.create()
|
|
323
|
-
}
|
|
324
272
|
Bot.Profiles.push(profile);
|
|
325
273
|
pushWSUpdate({ event: "add-profile", profile: profile });
|
|
326
274
|
return {};
|
|
@@ -341,14 +289,8 @@ async function handleWebsocketMessage(msg) {
|
|
|
341
289
|
return await tasksOpen(data);
|
|
342
290
|
case "tasks/delete":
|
|
343
291
|
return await deleteTask(data);
|
|
344
|
-
case "tasks/":
|
|
292
|
+
case "tasks/get":
|
|
345
293
|
return await getTasks();
|
|
346
|
-
case "tasks/start-all":
|
|
347
|
-
return await startAllTasks();
|
|
348
|
-
case "tasks/stop-all":
|
|
349
|
-
return await stopAllTasks();
|
|
350
|
-
case "tasks/delete-all":
|
|
351
|
-
return await deleteAllTasks();
|
|
352
294
|
case "tasks/load-presale":
|
|
353
295
|
return await tasksLoadPresale(data);
|
|
354
296
|
case "tasks/start":
|
|
@@ -389,9 +331,6 @@ module.exports = {
|
|
|
389
331
|
tasksOpen,
|
|
390
332
|
deleteTask,
|
|
391
333
|
getTasks,
|
|
392
|
-
startAllTasks,
|
|
393
|
-
stopAllTasks,
|
|
394
|
-
deleteAllTasks,
|
|
395
334
|
tasksLoadPresale,
|
|
396
335
|
startTask,
|
|
397
336
|
stopTask,
|
|
@@ -38,6 +38,7 @@ class Logger {
|
|
|
38
38
|
this.user = null;
|
|
39
39
|
this.global = false;
|
|
40
40
|
this.siteId = null;
|
|
41
|
+
this.taskId = null;
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
logToWorker(...args) {
|
|
@@ -48,7 +49,8 @@ class Logger {
|
|
|
48
49
|
metadata: {
|
|
49
50
|
global: this.global || !this.user,
|
|
50
51
|
user: this.user,
|
|
51
|
-
siteId: this.siteId
|
|
52
|
+
siteId: this.siteId,
|
|
53
|
+
taskId: this.taskId
|
|
52
54
|
}
|
|
53
55
|
});
|
|
54
56
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
2
|
+
const crypto = require("node:crypto");
|
|
2
3
|
|
|
3
4
|
module.exports = {
|
|
4
5
|
pickAccount: () => {
|
|
@@ -16,13 +17,15 @@ module.exports = {
|
|
|
16
17
|
return atob(i);
|
|
17
18
|
},
|
|
18
19
|
massEditPresaleCode: async (eventId, presaleCode) => {
|
|
19
|
-
for (const [
|
|
20
|
+
for (const [, value] of Object.entries(Bot.Tasks)) {
|
|
20
21
|
if (value.eventId === eventId) {
|
|
21
22
|
value.presaleCode = presaleCode;
|
|
22
23
|
}
|
|
23
24
|
}
|
|
24
25
|
},
|
|
25
|
-
|
|
26
|
+
uuid: () => {
|
|
27
|
+
return crypto.randomUUID();
|
|
28
|
+
},
|
|
26
29
|
chunk: (arr, len) => {
|
|
27
30
|
let chunks = [],
|
|
28
31
|
i = 0,
|
|
@@ -1,92 +1,92 @@
|
|
|
1
|
+
const { createLogger } = require("./classes/logger");
|
|
2
|
+
|
|
1
3
|
module.exports = class TicketMaster {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
constructor(taskData) {
|
|
5
|
+
this.taskId = taskData.taskId || "T-" + ++Bot.CurrentTaskId;
|
|
6
|
+
this.logger = createLogger(this.taskId);
|
|
7
|
+
this.data = taskData;
|
|
8
|
+
this.data.taskId = this.taskId;
|
|
9
|
+
this.logger.taskId = this.taskId;
|
|
10
|
+
this.logger.user = "admin";
|
|
11
|
+
this.logger.siteId = taskData.siteId;
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
this.data.account = this.data.account || "test@email.com";
|
|
14
|
+
this.data.email = this.data.email || "test@email.com";
|
|
15
|
+
this.data.password = this.data.password || "p@ssword";
|
|
16
|
+
this.data.proxy = this.data.proxy || "127.0.0.1";
|
|
17
|
+
this.data.tickets = this.data.tickets || "-";
|
|
18
|
+
this.data.status = this.data.status || "Created";
|
|
19
|
+
this.data.active = false;
|
|
20
|
+
this.data.statusColor = "green";
|
|
21
|
+
this.data.expirationTime = Date.now();
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
this.data.eventVenue = "Test Venue";
|
|
24
|
+
this.data.eventDate = Date.now();
|
|
25
|
+
this.data.eventLocalDate = Date.now();
|
|
26
|
+
this.data.eventName = "Test Event";
|
|
27
|
+
this.data.reservedTicketsList = "ticket1 | ticket2 | ticket3\n$100";
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
refreshTaskOnFrontEnd(taskData);
|
|
30
|
+
}
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
stripDown() {
|
|
33
|
+
return this.data;
|
|
34
|
+
}
|
|
33
35
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
setError(e) {
|
|
37
|
+
this.error = e;
|
|
38
|
+
this.status = e;
|
|
39
|
+
this.data.active = false;
|
|
40
|
+
}
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
start() {
|
|
43
|
+
this.logger.Info("Starting task");
|
|
44
|
+
this.data.active = true;
|
|
45
|
+
refreshTaskOnFrontEnd(this.data);
|
|
46
|
+
}
|
|
45
47
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
48
|
+
stop(deleted = false) {
|
|
49
|
+
this.logger.Error(deleted ? "Deleting task" : "Stopping task");
|
|
50
|
+
this.data.active = false;
|
|
51
|
+
this.data.statusColor = "red";
|
|
52
|
+
this.logger.ENABLED = false;
|
|
53
|
+
if (!deleted) {
|
|
54
|
+
this.setError("Stopped");
|
|
55
|
+
refreshTaskOnFrontEnd(this.data);
|
|
56
|
+
}
|
|
54
57
|
}
|
|
55
|
-
}
|
|
56
58
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
destroy() {
|
|
60
|
+
this.hidden = true;
|
|
61
|
+
this.stop(true);
|
|
62
|
+
delete Bot.Tasks[this.taskId];
|
|
63
|
+
refreshTaskOnFrontEnd({
|
|
64
|
+
taskId: this.taskId,
|
|
65
|
+
removed: true
|
|
66
|
+
});
|
|
67
|
+
}
|
|
66
68
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
get status() {
|
|
70
|
+
return this.statusString || "";
|
|
71
|
+
}
|
|
70
72
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
} catch {}
|
|
83
|
-
}
|
|
73
|
+
set status(value) {
|
|
74
|
+
if (!this.active && !["Idle", "Stopped"].includes(value)) return;
|
|
75
|
+
var oldValue = this.statusString + "";
|
|
76
|
+
this.statusString = value;
|
|
77
|
+
if (!this.hidden && global.refreshTaskOnFrontEnd && this.statusString != oldValue)
|
|
78
|
+
try {
|
|
79
|
+
refreshTaskOnFrontEnd(this.stripDown(), value, this.statusString);
|
|
80
|
+
} catch {
|
|
81
|
+
/* empty */
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
scrapeVenue() {
|
|
86
|
+
this.logger.Info("Scraping venue map");
|
|
87
|
+
}
|
|
88
88
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
};
|
|
89
|
+
scrapeSeats() {
|
|
90
|
+
this.logger.Info("Scraping seats");
|
|
91
|
+
}
|
|
92
|
+
};
|
package/config/configs.json
CHANGED
package/config/filter.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@necrolab/dashboard",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.219",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"build": "npx workbox-cli generateSW workbox-config.js && vite build",
|
|
6
6
|
"dev": "vite",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@faker-js/faker": "^7.6.0",
|
|
16
16
|
"@msgpack/msgpack": "^3.0.0-beta2",
|
|
17
|
-
"@necrolab/tm-renderer": "^0.1.
|
|
17
|
+
"@necrolab/tm-renderer": "^0.1.3",
|
|
18
18
|
"@vitejs/plugin-vue": "^5.0.3",
|
|
19
19
|
"@vueuse/core": "^10.7.2",
|
|
20
20
|
"autoprefixer": "^10.4.17",
|
|
@@ -30,7 +30,6 @@
|
|
|
30
30
|
"sass": "^1.70.0",
|
|
31
31
|
"simple-code-editor": "github:wwhtrbbtt/simple-code-editor",
|
|
32
32
|
"tailwindcss": "^3.4.1",
|
|
33
|
-
"uuid": "^9.0.1",
|
|
34
33
|
"vite": "^5.0.12",
|
|
35
34
|
"vue": "^3.4.21",
|
|
36
35
|
"vue-router": "^4.2.5",
|
package/postinstall.js
CHANGED
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
const fs = require(
|
|
2
|
-
const { execSync } = require(
|
|
3
|
-
const path = require(
|
|
1
|
+
const fs = require("node:fs");
|
|
2
|
+
const { execSync } = require("node:child_process");
|
|
3
|
+
const path = require("node:path");
|
|
4
4
|
|
|
5
5
|
console.log(__dirname);
|
|
6
6
|
|
|
7
|
-
var vitePath = path.resolve(path.join(__dirname,
|
|
7
|
+
var vitePath = path.resolve(path.join(__dirname, "/../../vite/bin/vite.js"));
|
|
8
8
|
console.log(vitePath);
|
|
9
9
|
execSync(`node "${vitePath}" build`, {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
cwd: __dirname,
|
|
11
|
+
stdio: "inherit"
|
|
12
12
|
});
|
|
13
13
|
|
|
14
|
-
var oldPath = path.resolve(
|
|
15
|
-
var distPath = path.resolve(path.join(__dirname,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
} catch {}
|
|
14
|
+
var oldPath = path.resolve("./dist/");
|
|
15
|
+
var distPath = path.resolve(path.join(__dirname, "../../../dashboard/dist/"));
|
|
16
|
+
fs.rmSync(distPath, {
|
|
17
|
+
recursive: true
|
|
18
|
+
});
|
|
21
19
|
|
|
22
20
|
fs.renameSync(oldPath, distPath);
|
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
<h4 class="hidden ipadlg:flex">Actions</h4>
|
|
35
35
|
</div>
|
|
36
36
|
</Header>
|
|
37
|
-
<div v-if="toRender.length
|
|
37
|
+
<div v-if="toRender.length != 0">
|
|
38
38
|
<RecycleScroller
|
|
39
39
|
:items="toRender"
|
|
40
40
|
:item-size="64"
|
|
41
41
|
key-field="index"
|
|
42
42
|
class="scroller max-h-big vue-recycle-scroller ready direction-vertical flex flex-col divide-y-2 divide-border overflow-y-auto hidden-scrollbars overflow-x-hidden stop-pan"
|
|
43
43
|
>
|
|
44
|
-
<template #default="props"
|
|
45
|
-
<div class="task">
|
|
44
|
+
<template #default="props">
|
|
45
|
+
<div class="task" :key="i[props.item.index]">
|
|
46
46
|
<Profile
|
|
47
47
|
@click="i[props.item.index]++"
|
|
48
48
|
:class="[props.item.index % 2 == 1 ? 'bg-dark-500' : 'bg-dark-550']"
|
|
@@ -3,24 +3,42 @@
|
|
|
3
3
|
<template #header> Check Stock <BoxIcon class="ml-4" /> </template>
|
|
4
4
|
<!-- Event ID -->
|
|
5
5
|
<div class="input-wrapper mt-7 mb-4">
|
|
6
|
-
<label class="label-override mb-2">Event ID <StadiumIcon /></label>
|
|
7
|
-
<div class="input-default">
|
|
8
|
-
<input
|
|
9
|
-
|
|
6
|
+
<label class="label-override mb-2">Event ID or URL <StadiumIcon /></label>
|
|
7
|
+
<div class="input-default flex items-center">
|
|
8
|
+
<input
|
|
9
|
+
:placeholder="!isEU(ui.currentCountry.siteId) ? '102PDA9125510GYU' : '529171'"
|
|
10
|
+
v-model="eventId"
|
|
11
|
+
class="flex-grow"
|
|
12
|
+
/>
|
|
13
|
+
<span class="text-red-400 text-lg absolute right-3 top-1/2 transform -translate-y-1/2">*</span>
|
|
10
14
|
</div>
|
|
11
15
|
</div>
|
|
12
16
|
<!-- Ticker Quantity -->
|
|
13
|
-
<div class="input-wrapper mb-
|
|
17
|
+
<div class="input-wrapper mb-4">
|
|
14
18
|
<label class="label-override mb-2">Presale code <AwardIcon /></label>
|
|
15
19
|
<div class="input-default">
|
|
16
20
|
<input placeholder="Presale code" v-model="presaleCode" />
|
|
17
21
|
</div>
|
|
18
22
|
</div>
|
|
23
|
+
<!-- DID -->
|
|
24
|
+
<div class="input-wrapper mb-4" v-if="!isEU(ui.currentCountry.siteId)">
|
|
25
|
+
<label class="label-override mb-2">DID <AwardIcon /></label>
|
|
26
|
+
<div class="input-default">
|
|
27
|
+
<input placeholder="psl" v-model="eventDid" />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<!-- CL ORIGIN -->
|
|
31
|
+
<div class="input-wrapper mb-8" v-if="isEU(ui.currentCountry.siteId)">
|
|
32
|
+
<label class="label-override mb-2">CL Origin / SubChannel ID <AwardIcon /></label>
|
|
33
|
+
<div class="input-default">
|
|
34
|
+
<input placeholder="ORIGIN2" v-model="clOrigin" />
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
19
37
|
<button
|
|
20
38
|
class="button-default hover:opacity-70 active:opacity-50 bg-dark-400 w-48 text-xs flex items-center justify-center gap-x-2 ml-auto"
|
|
21
39
|
@click="done()"
|
|
22
40
|
>
|
|
23
|
-
|
|
41
|
+
Check Stock <BoxIcon />
|
|
24
42
|
</button>
|
|
25
43
|
</Modal>
|
|
26
44
|
</template>
|
|
@@ -36,12 +54,16 @@ import Modal from "@/components/ui/Modal.vue";
|
|
|
36
54
|
import { StadiumIcon, BoxIcon, AwardIcon } from "@/components/icons";
|
|
37
55
|
import { useUIStore } from "@/stores/ui";
|
|
38
56
|
import { ref } from "vue";
|
|
57
|
+
import { isEU } from "@/stores/utils";
|
|
39
58
|
|
|
40
59
|
const ui = useUIStore();
|
|
41
60
|
const eventId = ref("");
|
|
42
61
|
const presaleCode = ref("");
|
|
62
|
+
const eventDid = ref("");
|
|
63
|
+
const clOrigin = ref("");
|
|
64
|
+
|
|
43
65
|
function done() {
|
|
44
66
|
ui.toggleModal("");
|
|
45
|
-
ui.checkStock(eventId.value, presaleCode.value);
|
|
67
|
+
ui.checkStock(eventId.value, presaleCode.value, eventDid.value, clOrigin.value);
|
|
46
68
|
}
|
|
47
69
|
</script>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
Expand
|
|
18
18
|
<ExpandIcon class="ml-2" />
|
|
19
19
|
</button>
|
|
20
|
-
<button @click="$emit('
|
|
20
|
+
<button @click="$emit('fold')" class="bg-dark-400 smooth-hover flex-grow xl:flex-initial">
|
|
21
21
|
Fold
|
|
22
22
|
<ShrinkIcon class="ml-2" />
|
|
23
23
|
</button>
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
class="bg-dark-400 smooth-hover flex-grow xl:flex-initial w-36"
|
|
35
35
|
@click="ui.toggleModal('mass-edit-presale-code')"
|
|
36
36
|
:disabled="ui.disabledButtons['mass-edit']"
|
|
37
|
+
v-if="ui.currentModule == 'TM'"
|
|
37
38
|
>
|
|
38
39
|
Mass Edit
|
|
39
40
|
<EditIcon class="ml-2" />
|
|
@@ -5,7 +5,10 @@
|
|
|
5
5
|
<div class="input-wrapper mt-7 mb-4">
|
|
6
6
|
<label class="label-override mb-2">Event ID <StadiumIcon /></label>
|
|
7
7
|
<div class="input-default">
|
|
8
|
-
<input
|
|
8
|
+
<input
|
|
9
|
+
:placeholder="!isEU(ui.currentCountry.siteId) ? '102PDA9125510GYU' : '529171'"
|
|
10
|
+
v-model="eventId"
|
|
11
|
+
/>
|
|
9
12
|
<span class="text-red-400 my-auto mr-2 mt-3">* </span>
|
|
10
13
|
</div>
|
|
11
14
|
</div>
|
|
@@ -37,6 +40,7 @@ import Modal from "@/components/ui/Modal.vue";
|
|
|
37
40
|
import { StadiumIcon, BagIcon, EditIcon } from "@/components/icons";
|
|
38
41
|
import { useUIStore } from "@/stores/ui";
|
|
39
42
|
import { ref } from "vue";
|
|
43
|
+
import { isEU } from "@/stores/utils";
|
|
40
44
|
|
|
41
45
|
const ui = useUIStore();
|
|
42
46
|
const code = ref("");
|