@necrolab/dashboard 0.5.28 → 0.5.30
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/backend/api.js +7 -5
- package/backend/batching.js +59 -2
- package/backend/index.js +1 -1
- package/index.html +10 -23
- package/package.json +1 -1
- package/src/assets/css/base/scroll.scss +1 -1
- package/src/assets/css/main.scss +14 -14
- package/src/components/Console/ConsoleToolbar.vue +8 -8
- package/src/components/Editors/Account/Account.vue +9 -5
- package/src/components/Editors/Account/AccountView.vue +37 -18
- package/src/components/Editors/Account/CreateAccount.vue +38 -4
- package/src/components/Editors/Profile/CreateProfile.vue +29 -4
- package/src/components/Editors/Profile/Profile.vue +11 -6
- package/src/components/Editors/Profile/ProfileCountryChooser.vue +2 -2
- package/src/components/Editors/Profile/ProfileView.vue +37 -18
- package/src/components/Tasks/CreateTaskAXS.vue +16 -2
- package/src/components/Tasks/CreateTaskTM.vue +28 -5
- package/src/components/Tasks/QuickSettings.vue +77 -10
- package/src/components/Tasks/Task.vue +20 -7
- package/src/components/Tasks/TaskView.vue +144 -58
- package/src/components/Tasks/ViewTask.vue +17 -3
- package/src/components/ui/Modal.vue +1 -1
- package/src/components/ui/ReadonlyFieldsSection.vue +3 -3
- package/src/components/ui/StatusBadge.vue +1 -1
- package/src/components/ui/TaskToggle.vue +2 -3
- package/src/components/ui/controls/CountryChooser.vue +2 -2
- package/src/components/ui/controls/atomic/Dropdown.vue +2 -2
- package/src/components/ui/controls/atomic/MultiDropdown.vue +1 -1
- package/src/composables/useDynamicTableHeight.js +4 -4
- package/src/composables/useRowSelection.js +0 -1
- package/src/composables/useZoomPrevention.js +16 -55
- package/src/stores/connection.js +453 -68
- package/src/stores/sampleData.js +34 -24
- package/src/stores/ui.js +89 -100
- package/src/views/Accounts.vue +2 -5
- package/src/views/Console.vue +13 -14
- package/src/views/Profiles.vue +2 -5
- package/src/views/Tasks.vue +29 -1
- package/vite.config.js +4 -2
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
<div class="col-span-6">
|
|
10
10
|
<label class="flex items-center mb-2 text-light-200 font-medium">Status</label>
|
|
11
11
|
<div class="flex-gap-3 items-center h-10">
|
|
12
|
-
<StatusBadge :enabled="data.enabled" size="large" />
|
|
13
|
-
<span class="text-sm font-medium" :class="data.enabled ? 'text-green-400' : 'text-red-400'">
|
|
14
|
-
{{ data.enabled ? 'Enabled' : 'Disabled' }}
|
|
12
|
+
<StatusBadge :enabled="Boolean(data.enabled)" size="large" />
|
|
13
|
+
<span class="text-sm font-medium" :class="Boolean(data.enabled) ? 'text-green-400' : 'text-red-400'">
|
|
14
|
+
{{ Boolean(data.enabled) ? 'Enabled' : 'Disabled' }}
|
|
15
15
|
</span>
|
|
16
16
|
</div>
|
|
17
17
|
</div>
|
|
@@ -32,8 +32,7 @@ const props = defineProps({
|
|
|
32
32
|
default: ""
|
|
33
33
|
},
|
|
34
34
|
modelValue: {
|
|
35
|
-
|
|
36
|
-
required: true
|
|
35
|
+
default: false
|
|
37
36
|
},
|
|
38
37
|
disabled: {
|
|
39
38
|
type: Boolean,
|
|
@@ -48,7 +47,7 @@ const props = defineProps({
|
|
|
48
47
|
const emit = defineEmits(["update:modelValue"]);
|
|
49
48
|
|
|
50
49
|
const model = computed({
|
|
51
|
-
get: () => props.modelValue,
|
|
50
|
+
get: () => Boolean(props.modelValue),
|
|
52
51
|
set: (value) => emit("update:modelValue", value)
|
|
53
52
|
});
|
|
54
53
|
</script>
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
class="bg-dark-400 border border-dark-650 rounded-lg shadow-2xl z-50 p-2 !max-h-52 !overflow-y-auto custom-scrollbar-y min-w-20 w-25"
|
|
21
21
|
:style="menuStyle"
|
|
22
22
|
@click.stop
|
|
23
|
-
@wheel.stop
|
|
24
|
-
@touchmove.stop
|
|
23
|
+
@wheel.passive.stop
|
|
24
|
+
@touchmove.passive.stop
|
|
25
25
|
>
|
|
26
26
|
<div class="country-header-item">TM</div>
|
|
27
27
|
<div
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
:style="menuStyle"
|
|
26
26
|
role="listbox"
|
|
27
27
|
@click.stop
|
|
28
|
-
@wheel.stop>
|
|
28
|
+
@wheel.passive.stop>
|
|
29
29
|
<button
|
|
30
30
|
v-bind:key="f"
|
|
31
31
|
class="dropdown-item"
|
|
@@ -133,7 +133,7 @@ const handleClickOutside = (event) => {
|
|
|
133
133
|
|
|
134
134
|
onMounted(() => {
|
|
135
135
|
document.addEventListener('mousedown', handleClickOutside);
|
|
136
|
-
document.addEventListener('touchstart', handleClickOutside);
|
|
136
|
+
document.addEventListener('touchstart', handleClickOutside, { passive: true });
|
|
137
137
|
});
|
|
138
138
|
|
|
139
139
|
onUnmounted(() => {
|
|
@@ -5,10 +5,10 @@ export function useDynamicTableHeight(options = {}) {
|
|
|
5
5
|
const { windowHeight, windowWidth } = useWindowDimensions();
|
|
6
6
|
|
|
7
7
|
const {
|
|
8
|
-
topReservedSpace = 243,
|
|
9
|
-
bottomBuffer = 16,
|
|
10
|
-
rowHeight = 64,
|
|
11
|
-
minRowsToShow = 2
|
|
8
|
+
topReservedSpace = options.TOP_RESERVED_SPACE ?? 243,
|
|
9
|
+
bottomBuffer = options.BOTTOM_BUFFER ?? 16,
|
|
10
|
+
rowHeight = options.ROW_HEIGHT ?? 64,
|
|
11
|
+
minRowsToShow = options.MIN_ROWS_TO_SHOW ?? 2
|
|
12
12
|
} = options;
|
|
13
13
|
|
|
14
14
|
const dynamicTableHeight = computed(() => {
|
|
@@ -9,40 +9,22 @@ export function useZoomPrevention() {
|
|
|
9
9
|
MINUS: 189
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
document.addEventListener('gesturechange', (e) => {
|
|
30
|
-
e.preventDefault();
|
|
31
|
-
}, { passive: false });
|
|
32
|
-
|
|
33
|
-
document.addEventListener('gestureend', (e) => {
|
|
34
|
-
e.preventDefault();
|
|
35
|
-
}, { passive: false });
|
|
36
|
-
|
|
37
|
-
// Prevent double-tap zoom
|
|
38
|
-
let lastTouchEnd = 0;
|
|
39
|
-
document.addEventListener('touchend', (e) => {
|
|
40
|
-
const now = Date.now();
|
|
41
|
-
if (now - lastTouchEnd <= 300) {
|
|
42
|
-
e.preventDefault();
|
|
43
|
-
}
|
|
44
|
-
lastTouchEnd = now;
|
|
45
|
-
}, { passive: false });
|
|
12
|
+
const isIOSLikeDevice =
|
|
13
|
+
/iPad|iPhone|iPod/.test(navigator.userAgent) ||
|
|
14
|
+
(navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1);
|
|
15
|
+
const hasTouch = typeof window !== "undefined" && "ontouchstart" in window;
|
|
16
|
+
|
|
17
|
+
if (isIOSLikeDevice || hasTouch) {
|
|
18
|
+
// Prevent double-tap zoom
|
|
19
|
+
let lastTouchEnd = 0;
|
|
20
|
+
document.addEventListener('touchend', (e) => {
|
|
21
|
+
const now = Date.now();
|
|
22
|
+
if (now - lastTouchEnd <= 300) {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
}
|
|
25
|
+
lastTouchEnd = now;
|
|
26
|
+
}, { passive: false });
|
|
27
|
+
}
|
|
46
28
|
|
|
47
29
|
// Prevent ALL keyboard zoom combinations
|
|
48
30
|
document.addEventListener("keydown", function (event) {
|
|
@@ -69,27 +51,6 @@ export function useZoomPrevention() {
|
|
|
69
51
|
}
|
|
70
52
|
}, { passive: false });
|
|
71
53
|
|
|
72
|
-
// Prevent Ctrl/Cmd + Mouse wheel zoom (desktop)
|
|
73
|
-
document.addEventListener("wheel", function (event) {
|
|
74
|
-
if (event.ctrlKey || event.metaKey) {
|
|
75
|
-
event.preventDefault();
|
|
76
|
-
}
|
|
77
|
-
}, { passive: false });
|
|
78
|
-
|
|
79
|
-
// Also block mousewheel for older browsers
|
|
80
|
-
document.addEventListener("mousewheel", function (event) {
|
|
81
|
-
if (event.ctrlKey || event.metaKey) {
|
|
82
|
-
event.preventDefault();
|
|
83
|
-
}
|
|
84
|
-
}, { passive: false });
|
|
85
|
-
|
|
86
|
-
// Block DOMMouseScroll for Firefox
|
|
87
|
-
document.addEventListener("DOMMouseScroll", function (event) {
|
|
88
|
-
if (event.ctrlKey || event.metaKey) {
|
|
89
|
-
event.preventDefault();
|
|
90
|
-
}
|
|
91
|
-
}, { passive: false });
|
|
92
|
-
|
|
93
54
|
return {
|
|
94
55
|
KEY_CODES
|
|
95
56
|
};
|