@necrolab/dashboard 0.5.18 → 0.5.19

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.5.18",
3
+ "version": "0.5.19",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "build": "rm -rf dist && vite build && npx workbox-cli generateSW workbox-config.cjs",
package/postinstall.js CHANGED
@@ -17,7 +17,7 @@ try {
17
17
 
18
18
  try {
19
19
  // Detect if we're running inside the project itself or as a dependency
20
- const isInsideProject = __dirname.includes('node_modules') === false;
20
+ const isInsideProject = __dirname.includes("node_modules") === false;
21
21
 
22
22
  let distPath, versionFilePath;
23
23
 
@@ -46,7 +46,7 @@ try {
46
46
  `Version mismatch (Installed: ${installedVersion}, Target: ${currentVersion}). Proceeding with build.`
47
47
  );
48
48
  }
49
- } catch (readErr) {
49
+ } catch {
50
50
  console.log("Could not read version file. Proceeding with build.");
51
51
  }
52
52
  } else {
@@ -61,8 +61,6 @@ import { useUIStore } from "@/stores/ui";
61
61
  import TagLabel from "@/components/Editors/TagLabel.vue";
62
62
  import { useRowSelection } from "@/composables/useRowSelection";
63
63
  import { useCopyToClipboard } from "@/composables/useCopyToClipboard";
64
- import { computed } from "vue";
65
- import { useEnableDisable } from "@/composables/useEnableDisable";
66
64
 
67
65
  const ui = useUIStore();
68
66
  const { copy } = useCopyToClipboard();
@@ -140,9 +140,10 @@ const isEditorVisible = computed(() => props.currentFile !== '');
140
140
  const isJsonFile = computed(() => props.currentFile.endsWith('.json'));
141
141
 
142
142
  const errorMessage = computed(() => {
143
- if (!isJsonFile.value) return;
143
+ if (!isJsonFile.value) return null;
144
144
  try {
145
145
  JSON.parse(props.content);
146
+ return null;
146
147
  } catch (e) {
147
148
  return e.message;
148
149
  }
@@ -107,7 +107,7 @@ export function useDropdownPosition(dropdownRef, options = {}) {
107
107
  zIndex,
108
108
  maxHeight: `${maxHeight}px`
109
109
  };
110
- } catch (error) {
110
+ } catch {
111
111
  menuStyle.value = {
112
112
  position: "fixed",
113
113
  top: "0px",
@@ -13,10 +13,6 @@ export function useFormValidation() {
13
13
  }
14
14
  };
15
15
 
16
- const hasError = (fieldName) => {
17
- return errors.value.includes(fieldName);
18
- };
19
-
20
16
  const isValidEmail = (email) => {
21
17
  return email && email.includes("@");
22
18
  };
@@ -52,10 +48,6 @@ export function useFormValidation() {
52
48
  return true; // Not required for other countries
53
49
  };
54
50
 
55
- const isValidZipCode = (zipCode) => {
56
- return zipCode && zipCode.trim().length > 0;
57
- };
58
-
59
51
  const validateAccount = (account) => {
60
52
  clearErrors();
61
53
 
@@ -253,7 +253,6 @@ export function useNotchHandling(logger) {
253
253
 
254
254
  // Vue-specific watchers
255
255
  onMounted(() => {
256
- let attempts = 0;
257
256
  const maxAttempts = 5;
258
257
  const delays = [0, 50, 150, 300, 500];
259
258
 
@@ -118,7 +118,9 @@ export class ConnectionHandler {
118
118
  } else if (msg.update) {
119
119
  try {
120
120
  Object.entries(msg.update).forEach((change) => (this.ui.tasks[msg.id][change[0]] = change[1]));
121
- } catch {}
121
+ } catch {
122
+ // Ignore update errors if task doesn't exist
123
+ }
122
124
  } else {
123
125
  if (!this.ui.tasks[msg.id]) this.ui.tasks[msg.id] = msg.task;
124
126
  if (!this.ui.taskIdOrder.includes(msg.id)) {
@@ -46,13 +46,13 @@ class Logger {
46
46
 
47
47
  // For styled console output in browser
48
48
  if (style) {
49
- /* eslint-disable no-console */
49
+
50
50
  console.log(`%c${args.join(" ")}`, style);
51
- /* eslint-enable no-console */
51
+
52
52
  } else {
53
- /* eslint-disable no-console */
53
+
54
54
  console.log(...args);
55
- /* eslint-enable no-console */
55
+
56
56
  }
57
57
  }
58
58
 
@@ -16,7 +16,7 @@
16
16
  :taskLogMapping="taskLogMapping"
17
17
  :userScrolledUp="userScrolledUp"
18
18
  :filteredCount="filteredCount"
19
- @scroll="handleScrollDirection"
19
+ @scroll="startScrolling"
20
20
  @scroll-stop="stopScrolling"
21
21
  @autoscroll-toggle="onAutoscrollToggle" />
22
22
 
@@ -122,11 +122,10 @@ import { Smoothie } from "vue-smoothie";
122
122
  import { DEBUG } from "@/utils/debug";
123
123
 
124
124
  import Filter from "@/libs/ansii.js";
125
- import { ConsoleIcon, DownIcon, UpIcon } from "@/components/icons";
125
+ import { ConsoleIcon } from "@/components/icons";
126
126
  import Switch from "@/components/ui/controls/atomic/Switch.vue";
127
127
  import WebsocketHeartbeatJs from "websocket-heartbeat-js";
128
128
  import { onMounted, onUnmounted, ref, nextTick, computed, watch } from "vue";
129
- import Dropdown from "@/components/ui/controls/atomic/Dropdown.vue";
130
129
  import ConsoleToolbar from "@/components/Console/ConsoleToolbar.vue";
131
130
 
132
131
  const $autoscroll = ref(null);
@@ -216,7 +215,7 @@ const performScroll = (direction, smooth = true) => {
216
215
  }
217
216
 
218
217
  return true;
219
- } catch (e) {
218
+ } catch {
220
219
  if (DEBUG) return false;
221
220
  return false;
222
221
  }
@@ -70,8 +70,6 @@ let previous = {
70
70
 
71
71
  const loadAvailableFiles = async () => (availableFiles.value = await loadFromApi("/api/json-files"));
72
72
 
73
- const isJsonFile = () => currentFile.value.endsWith(".json");
74
-
75
73
  const loadFile = async (f) => {
76
74
  currentFile.value = f;
77
75
  if (DEBUG) {
@@ -158,8 +158,7 @@
158
158
 
159
159
  <script setup>
160
160
  import draggable from "vuedraggable";
161
- import { ref, computed, defineAsyncComponent, watch, onMounted, onUnmounted, nextTick } from "vue";
162
- import { onBeforeRouteLeave } from "vue-router";
161
+ import { ref, computed, defineAsyncComponent, watch, nextTick } from "vue";
163
162
  import { useFilterCSS } from "@/composables/useFilterCSS";
164
163
  import Filter from "@/components/Filter/Filter.vue";
165
164
  import { FilterIcon } from "@/components/icons";
@@ -216,7 +215,7 @@ const addWildcardFilter = () => {
216
215
 
217
216
  let RendererFactory = import("@necrolab/tm-renderer");
218
217
 
219
- const { injectStyles, cssUpdateTrigger } = useFilterCSS(filterBuilder, svg);
218
+ useFilterCSS(filterBuilder, svg);
220
219
 
221
220
  const doesFilterShow = (filter) => {
222
221
  if ((filter.event || filter.eventId) !== filterBuilder.value.currentEventId) return;
@@ -326,9 +325,6 @@ const updateShownVenue = async () => {
326
325
  await nextTick();
327
326
  await loadFilter();
328
327
  filterBuilder.value.reload(eventId.value);
329
-
330
- // Re-setup CSS system after reload
331
- setupCSSUpdates();
332
328
  filterBuilder.value.updateCss();
333
329
  };
334
330
 
@@ -164,7 +164,7 @@ watch(
164
164
  const f = (p) => searchRegex.test(p[filterFieldMap[field]]);
165
165
  ui.search.profiles.results = profs.filter(f);
166
166
 
167
- allTags.value = getAllTags();
167
+ allTags.value = useGetAllTags(ui.search.profiles.results);
168
168
  }
169
169
  );
170
170