@necrolab/dashboard 0.4.3 → 0.4.32

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@necrolab/dashboard",
3
- "version": "0.4.3",
3
+ "version": "0.4.32",
4
4
  "scripts": {
5
5
  "build": "rm -rf dist && vite build && npx workbox-cli generateSW workbox-config.js",
6
6
  "dev": "vite",
package/postinstall.js CHANGED
@@ -1,9 +1,21 @@
1
- const { execSync } = require("node:child_process");
2
1
  const fs = require("node:fs");
2
+ const { execSync } = require("node:child_process");
3
+
3
4
  const path = require("node:path");
4
5
 
5
- const vitePath = path.resolve(path.join(__dirname, "/node_modules/vite/bin/vite.js"));
6
- if (fs.existsSync(vitePath)) execSync(`node "${vitePath}" build`, { cwd: __dirname, stdio: "inherit" });
6
+ console.log(__dirname);
7
+
8
+ var vitePath = path.resolve(path.join(__dirname, "/../../vite/bin/vite.js"));
9
+ console.log(vitePath);
10
+ execSync(`node "${vitePath}" build`, {
11
+ cwd: __dirname,
12
+ stdio: "inherit"
13
+ });
14
+
15
+ var oldPath = path.resolve("./dist/");
16
+ var distPath = path.resolve(path.join(__dirname, "../../../dashboard/dist/"));
17
+ fs.rmSync(distPath, {
18
+ recursive: true
19
+ });
7
20
 
8
- const distPath = path.resolve(path.join(__dirname, "/dist/"));
9
- if (fs.existsSync(distPath)) fs.rmSync(distPath, { recursive: true });
21
+ fs.renameSync(oldPath, distPath);
@@ -34,7 +34,8 @@
34
34
  <span
35
35
  class="ml-1 font-bold"
36
36
  :class="{
37
- 'text-red-400': props.task._timeLeftString === '00:00' || props.task._timeLeftString === 'No Cartholds'
37
+ 'text-red-400':
38
+ props.task._timeLeftString === '00:00' || props.task._timeLeftString === 'No Cartholds'
38
39
  }"
39
40
  >
40
41
  {{ props.task._timeLeftString !== "00:00" ? props.task._timeLeftString : "Expired" }}
@@ -46,11 +47,13 @@
46
47
  <!-- Status circle -->
47
48
  <div
48
49
  class="status-indicator mx-1 md:ml-3 ml-2"
49
- :class="colorToClass(
50
- props.task.active || props.task.status.toLowerCase() === 'idle'
51
- ? props.task.statusColor
52
- : 'red'
53
- )"
50
+ :class="
51
+ colorToClass(
52
+ props.task.active || props.task.status.toLowerCase() === 'idle'
53
+ ? props.task.statusColor
54
+ : 'red'
55
+ )
56
+ "
54
57
  ></div>
55
58
  <!-- Actual status -->
56
59
  <span class="font-bold text-sm p-1 md:mr-3 mr-2 truncate uppercase">{{
@@ -68,12 +71,12 @@
68
71
  <PlayIcon />
69
72
  </button>
70
73
  </li>
71
- <li v-if="task.status?.toLowerCase().includes('waiting') && props.task._timeLeftString !== '00:00'">
74
+ <li v-if="task.status?.toLowerCase() == 'waiting' && props.task._timeLeftString !== '00:00'">
72
75
  <button @click="ui.continueTask(task.taskId, 'autocheckout')">
73
76
  <BagWhiteIcon />
74
77
  </button>
75
78
  </li>
76
- <li v-if="task.status?.toLowerCase().includes('waiting')">
79
+ <li v-if="task.status?.toLowerCase() == 'waiting'">
77
80
  <button @click="ui.continueTask(task.taskId, 'change_reservation')">
78
81
  <EditIcon />
79
82
  </button>
@@ -83,7 +86,10 @@
83
86
  <TrashIcon />
84
87
  </button>
85
88
  </li>
86
- <li class="text-xl -mt-2" @click.right.prevent="window.setTimeout(() => ui.setOpenContextMenu(task.taskId), 10)">
89
+ <li
90
+ class="text-xl -mt-2"
91
+ @click.right.prevent="window.setTimeout(() => ui.setOpenContextMenu(task.taskId), 10)"
92
+ >
87
93
  <button class="mt-1" @click="props.task.isExpanded = !props.task.isExpanded">
88
94
  <span>{{ props.task.isExpanded ? "-" : "+" }}</span>
89
95
  </button>
@@ -100,7 +106,6 @@
100
106
  class="col-span-12 flex flex-wrap gap-x-4 gap-y-4 lg:gap-x-10 pt-8 pb-2 xl:justify-around will-change-auto"
101
107
  v-if="props.task.isExpanded"
102
108
  >
103
-
104
109
  <!-- Details -->
105
110
  <TaskLabel
106
111
  class="md:hidden"
@@ -180,15 +185,15 @@ h4 {
180
185
 
181
186
  .task-buttons {
182
187
  @apply flex mx-auto gap-x-2;
183
-
188
+
184
189
  button {
185
190
  @apply p-1 rounded transition-colors hover:bg-dark-500;
186
191
  }
187
-
192
+
188
193
  svg {
189
194
  @apply w-4 h-4;
190
195
  }
191
-
196
+
192
197
  img {
193
198
  @apply w-4 h-4;
194
199
  }
@@ -198,15 +203,15 @@ h4 {
198
203
  h4 {
199
204
  font-size: 10px;
200
205
  }
201
-
206
+
202
207
  .task-buttons {
203
208
  @apply gap-x-1;
204
209
  }
205
-
210
+
206
211
  .task-id {
207
212
  font-size: 6px;
208
213
  }
209
-
214
+
210
215
  .task-id-alt {
211
216
  font-size: 7px;
212
217
  }
package/src/stores/ui.js CHANGED
@@ -236,7 +236,10 @@ export const useUIStore = defineStore("ui", () => {
236
236
  queueStats.value.sleeping = relevantTasks.filter((t) =>
237
237
  sleepingStatuses.includes(t.status.toLowerCase())
238
238
  ).length;
239
- const positions = relevantTasks.map((t) => t.queuePosition).filter((e) => !isNaN(e));
239
+ const positions = relevantTasks
240
+ .map((t) => t.queuePosition)
241
+ .filter((e) => !isNaN(e))
242
+ .filter(Boolean);
240
243
  queueStats.value.nextQueuePasses = positions.sort((a, b) => a - b);
241
244
  };
242
245