@necrolab/dashboard 0.4.37 → 0.4.39
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/.claude/settings.local.json +3 -1
- package/backend/api.js +20 -16
- package/backend/auth.js +2 -2
- package/backend/batching.js +1 -1
- package/backend/endpoints.js +5 -5
- package/backend/index.js +2 -2
- package/backend/mock-data.js +19 -20
- package/backend/mock-src/classes/logger.js +5 -7
- package/backend/mock-src/classes/utils.js +3 -2
- package/backend/mock-src/ticketmaster.js +2 -2
- package/backend/validator.js +2 -2
- package/dev-server.js +49 -0
- package/index.html +1 -1
- package/index.js +1 -1
- package/package.json +6 -5
- package/postcss.config.js +1 -1
- package/postinstall.js +5 -3
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/manifest.json +4 -4
- package/src/App.vue +471 -49
- package/src/assets/css/_input.scss +25 -25
- package/src/assets/css/main.scss +116 -22
- package/src/assets/img/android-chrome-192x192.png +0 -0
- package/src/assets/img/logo_icon-old.png +0 -0
- package/src/assets/img/logo_icon.png +0 -0
- package/src/components/Editors/Account/Account.vue +19 -19
- package/src/components/Editors/Account/AccountCreator.vue +3 -3
- package/src/components/Editors/Account/AccountView.vue +18 -7
- package/src/components/Editors/Profile/Profile.vue +24 -24
- package/src/components/Editors/Profile/ProfileView.vue +23 -10
- package/src/components/Editors/TagLabel.vue +6 -7
- package/src/components/Table/Header.vue +1 -1
- package/src/components/Table/Row.vue +1 -1
- package/src/components/Table/Table.vue +15 -0
- package/src/components/Tasks/Controls/DesktopControls.vue +1 -1
- package/src/components/Tasks/CreateTaskAXS.vue +15 -15
- package/src/components/Tasks/CreateTaskTM.vue +5 -4
- package/src/components/Tasks/Task.vue +23 -35
- package/src/components/Tasks/TaskView.vue +20 -27
- package/src/components/Tasks/Utilities.vue +1 -1
- package/src/components/icons/Mail.vue +2 -2
- package/src/components/ui/Modal.vue +84 -15
- package/src/components/ui/Navbar.vue +118 -39
- package/src/components/ui/controls/atomic/Dropdown.vue +23 -3
- package/src/components/ui/controls/atomic/MultiDropdown.vue +43 -23
- package/src/stores/sampleData.js +5 -4
- package/src/stores/ui.js +5 -4
- package/src/views/Accounts.vue +2 -2
- package/src/views/Console.vue +78 -30
- package/src/views/Editor.vue +175 -24
- package/src/views/FilterBuilder.vue +21 -7
- package/src/views/Profiles.vue +8 -8
- package/src/views/Tasks.vue +51 -2
- package/tailwind.config.js +1 -1
- package/vite.config.js +8 -1
- package/vue.config.js +1 -1
- package/{workbox-config.js → workbox-config.cjs} +1 -4
package/backend/api.js
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import enableWs from "express-ws";
|
|
2
|
+
import express from "express";
|
|
3
|
+
import cors from "cors";
|
|
4
|
+
import cookieParser from "cookie-parser";
|
|
5
|
+
import { encode } from "@msgpack/msgpack";
|
|
6
|
+
import fs from "node:fs";
|
|
7
|
+
import path from "node:path";
|
|
8
|
+
import { fileURLToPath } from "node:url";
|
|
9
|
+
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
11
|
+
const __dirname = path.dirname(__filename);
|
|
12
|
+
|
|
13
|
+
import { createLogger } from "./mock-src/classes/logger.js";
|
|
14
|
+
import utils from "./mock-src/classes/utils.js";
|
|
15
|
+
|
|
16
|
+
import Batcher from "./batching.js";
|
|
17
|
+
import endpoints from "./endpoints.js";
|
|
18
|
+
import authSystem from "./auth.js";
|
|
19
|
+
import { users } from "./mock-data.js";
|
|
16
20
|
|
|
17
21
|
const logger = createLogger("WEB UI");
|
|
18
22
|
|
|
@@ -420,7 +424,7 @@ app.get("/api/userconfig/balances", async (req, res) => {
|
|
|
420
424
|
return res.send({ CapSolver: 100, TwoCaptcha: 40 });
|
|
421
425
|
});
|
|
422
426
|
|
|
423
|
-
|
|
427
|
+
export default {
|
|
424
428
|
start: async () => {
|
|
425
429
|
// onChange = (await import('on-change')).default;
|
|
426
430
|
app.listen(port, "0.0.0.0", () => {
|
package/backend/auth.js
CHANGED
package/backend/batching.js
CHANGED
package/backend/endpoints.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createLogger } from "./mock-src/classes/logger.js";
|
|
2
|
+
import TicketMaster from "./mock-src/ticketmaster.js";
|
|
3
|
+
import utils from "./mock-src/classes/utils.js";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
import validateTaskData from "./validator.js";
|
|
6
6
|
const logger = createLogger("WEB UI");
|
|
7
7
|
|
|
8
8
|
const none = (v) => {
|
|
@@ -326,7 +326,7 @@ async function handleWebsocketMessage(msg) {
|
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
-
|
|
329
|
+
export default {
|
|
330
330
|
continueTask,
|
|
331
331
|
tasksOpen,
|
|
332
332
|
deleteTask,
|
package/backend/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { users, profiles, tmAccounts, axsAccounts } from "./mock-data.js";
|
|
2
2
|
|
|
3
3
|
const Bot = {};
|
|
4
4
|
|
|
@@ -20,4 +20,4 @@ Bot.AXS = {
|
|
|
20
20
|
Accounts: axsAccounts
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
export { default } from "./api.js";
|
package/backend/mock-data.js
CHANGED
|
@@ -44,23 +44,22 @@ const profile = {
|
|
|
44
44
|
const profiles = [];
|
|
45
45
|
for (let i = 0; i < 1000; i++) profiles.push({ ...profile, _id: i });
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
};
|
|
47
|
+
export { users, profiles };
|
|
48
|
+
|
|
49
|
+
export const tmAccounts = [
|
|
50
|
+
{
|
|
51
|
+
tags: ["admin"],
|
|
52
|
+
_id: 1,
|
|
53
|
+
password: "123",
|
|
54
|
+
email: "tm@tm.com"
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
|
|
58
|
+
export const axsAccounts = [
|
|
59
|
+
{
|
|
60
|
+
tags: ["admin"],
|
|
61
|
+
_id: 2,
|
|
62
|
+
password: "123",
|
|
63
|
+
email: "axs@axs.com"
|
|
64
|
+
}
|
|
65
|
+
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import util from "node:util";
|
|
2
2
|
|
|
3
3
|
const zeroPadding = (num, length) => String(num).padStart(length, "0");
|
|
4
4
|
|
|
@@ -103,10 +103,8 @@ class Logger {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return logger;
|
|
111
|
-
}
|
|
106
|
+
export const createLogger = (args) => {
|
|
107
|
+
const logger = new Logger();
|
|
108
|
+
logger.defaultArgs = typeof args == "string" ? [args] : typeof args == "object" ? args : undefined;
|
|
109
|
+
return logger;
|
|
112
110
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { createLogger } from "./classes/logger.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
export default class TicketMaster {
|
|
4
4
|
constructor(taskData) {
|
|
5
5
|
this.taskId = taskData.taskId || "T-" + ++Bot.CurrentTaskId;
|
|
6
6
|
this.logger = createLogger(this.taskId);
|
package/backend/validator.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import utils from "./mock-src/classes/utils.js";
|
|
2
2
|
|
|
3
3
|
const none = (v) => {
|
|
4
4
|
return v === undefined;
|
|
@@ -59,4 +59,4 @@ const validateTaskData = (task) => {
|
|
|
59
59
|
return task;
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
export default validateTaskData;
|
package/dev-server.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { createServer } from 'vite'
|
|
4
|
+
import process from 'process'
|
|
5
|
+
|
|
6
|
+
const startServer = async () => {
|
|
7
|
+
try {
|
|
8
|
+
const server = await createServer({
|
|
9
|
+
configFile: './vite.config.js',
|
|
10
|
+
server: {
|
|
11
|
+
port: 5173,
|
|
12
|
+
strictPort: true,
|
|
13
|
+
host: true,
|
|
14
|
+
cors: true,
|
|
15
|
+
hmr: {
|
|
16
|
+
overlay: false
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
// Handle unhandled errors gracefully
|
|
22
|
+
process.on('uncaughtException', (error) => {
|
|
23
|
+
if (error.code === 'ECONNRESET' || error.errno === -54) {
|
|
24
|
+
console.log('📱 iPhone disconnected/reconnected - continuing...')
|
|
25
|
+
return
|
|
26
|
+
}
|
|
27
|
+
console.error('Server error:', error)
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
process.on('unhandledRejection', (reason, promise) => {
|
|
31
|
+
if (reason?.code === 'ECONNRESET' || reason?.errno === -54) {
|
|
32
|
+
console.log('📱 iPhone connection reset - continuing...')
|
|
33
|
+
return
|
|
34
|
+
}
|
|
35
|
+
console.error('Unhandled rejection at:', promise, 'reason:', reason)
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
await server.listen()
|
|
39
|
+
server.printUrls()
|
|
40
|
+
|
|
41
|
+
console.log('🚀 Dev server running with iOS connection error handling')
|
|
42
|
+
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error('Failed to start server:', error)
|
|
45
|
+
process.exit(1)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
startServer()
|
package/index.html
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
<!-- Preload critical PWA manifest -->
|
|
97
97
|
<link rel="preload" as="fetch" href="/manifest.json" crossorigin />
|
|
98
98
|
<link rel="manifest" href="/manifest.json" />
|
|
99
|
-
<meta name="theme-color" content="
|
|
99
|
+
<meta name="theme-color" content="#1a1b1e" />
|
|
100
100
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
|
101
101
|
|
|
102
102
|
<!-- Prism.js for syntax highlighting -->
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import api from "./backend/index.js";
|
|
2
2
|
api.start();
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@necrolab/dashboard",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.39",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"scripts": {
|
|
5
|
-
"build": "rm -rf dist && vite build && npx workbox-cli generateSW workbox-config.
|
|
6
|
-
"dev": "
|
|
7
|
-
"bot": "
|
|
8
|
-
"expose": "
|
|
6
|
+
"build": "rm -rf dist && vite build && npx workbox-cli generateSW workbox-config.cjs",
|
|
7
|
+
"dev": "node dev-server.js",
|
|
8
|
+
"bot": "node dev-server.js",
|
|
9
|
+
"expose": "node dev-server.js",
|
|
9
10
|
"postinstall": "node postinstall.js",
|
|
10
11
|
"updaterenderer": "npm i @necrolab/tm-renderer@latest",
|
|
11
12
|
"preview": "vite preview",
|
package/postcss.config.js
CHANGED
package/postinstall.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import { execSync } from "node:child_process";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
3
5
|
|
|
4
|
-
const
|
|
6
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
5
7
|
|
|
6
8
|
console.log(__dirname);
|
|
7
9
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/public/favicon-16x16.png
CHANGED
|
Binary file
|
package/public/favicon-32x32.png
CHANGED
|
Binary file
|
package/public/favicon.ico
CHANGED
|
Binary file
|
package/public/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"short_name": "
|
|
3
|
-
"name": "
|
|
2
|
+
"short_name": "Necro",
|
|
3
|
+
"name": "Necro Dashboard",
|
|
4
4
|
"icons": [{
|
|
5
5
|
"src": "/android-chrome-192x192.png",
|
|
6
6
|
"type": "image/png",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
}
|
|
21
21
|
],
|
|
22
22
|
"start_url": "/",
|
|
23
|
-
"background_color": "#
|
|
23
|
+
"background_color": "#1a1b1e",
|
|
24
24
|
"display": "standalone",
|
|
25
25
|
"scope": "/",
|
|
26
|
-
"theme_color": "#
|
|
26
|
+
"theme_color": "#1a1b1e"
|
|
27
27
|
}
|