@necrolab/dashboard 0.4.213 → 0.4.214
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
CHANGED
|
@@ -136,7 +136,7 @@ app.ws("/api/updates", async function (ws, req) {
|
|
|
136
136
|
pushWSUpdate({ event: "startup", message: "Starting Bot", user: currentUser.name });
|
|
137
137
|
await utils.sleep(750);
|
|
138
138
|
|
|
139
|
-
pushWSUpdate({ event: "startup", done: true, user: currentUser.name });
|
|
139
|
+
pushWSUpdate({ event: "startup", done: true, user: currentUser.name, version: "1.0" });
|
|
140
140
|
ws.send(
|
|
141
141
|
JSON.stringify([
|
|
142
142
|
{ event: "set-button-disabled", button: "add-tasks", value: false },
|
package/package.json
CHANGED
|
@@ -49,7 +49,11 @@
|
|
|
49
49
|
/>
|
|
50
50
|
</div>
|
|
51
51
|
<div class="flex mt-5 justify-between flex-row items-center">
|
|
52
|
-
<
|
|
52
|
+
<div>
|
|
53
|
+
<p class="text-light-400 text-sm">Dashboard: v{{ version }}</p>
|
|
54
|
+
<p class="text-light-400 text-sm">Bot: v{{ ui.botVersion }}</p>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
53
57
|
<div class="flex gap-5">
|
|
54
58
|
<button
|
|
55
59
|
class="button-default hover:opacity-70 active:opacity-50 bg-dark-400 w-24 text-xs flex items-center justify-center gap-x-2"
|
|
@@ -98,9 +98,15 @@
|
|
|
98
98
|
<!-- <div class="w-10 h-10 rounded-full bg-light-300"></div> -->
|
|
99
99
|
<img :src="ui.profile?.profilePicture" alt="" class="h-10 w-10 rounded-full" />
|
|
100
100
|
</div>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
|
|
102
|
+
<div class="mx-auto mt-6 mb-14 flex gap-3">
|
|
103
|
+
<span class="bg-dark-500 rounded-full text-sm shadow-lg p-2 px-3 text-light-400"
|
|
104
|
+
>Dashboard: v{{ dashVersion }}</span
|
|
105
|
+
>
|
|
106
|
+
<span class="bg-dark-500 rounded-full text-sm shadow-lg p-2 px-3 text-light-400"
|
|
107
|
+
>Bot: v{{ ui.botVersion }}</span
|
|
108
|
+
>
|
|
109
|
+
</div>
|
|
104
110
|
</div>
|
|
105
111
|
</transition>
|
|
106
112
|
</div>
|
|
@@ -175,7 +181,7 @@ window.matchMedia("(orientation: portrait)").addEventListener("change", (e) => {
|
|
|
175
181
|
else landscapeIos.value = false;
|
|
176
182
|
});
|
|
177
183
|
|
|
178
|
-
const
|
|
184
|
+
const dashVersion = __APP_VERSION__;
|
|
179
185
|
const ui = useUIStore();
|
|
180
186
|
const menuOpen = storeToRefs(ui).menuOpen;
|
|
181
187
|
const toggleMenu = () => {
|
package/src/stores/connection.js
CHANGED
|
@@ -7,8 +7,10 @@ export class ConnectionHandler {
|
|
|
7
7
|
handleWebsocketMessages(msg) {
|
|
8
8
|
switch (msg.event) {
|
|
9
9
|
case "startup":
|
|
10
|
-
if (msg.done)
|
|
11
|
-
|
|
10
|
+
if (msg.done) {
|
|
11
|
+
this.ui.hideSpinner();
|
|
12
|
+
this.ui.setBotVersion(msg.version || "-");
|
|
13
|
+
} else this.ui.startSpinner(msg.message || "Starting Bot");
|
|
12
14
|
break;
|
|
13
15
|
|
|
14
16
|
case "stop-all":
|
package/src/stores/ui.js
CHANGED
|
@@ -26,6 +26,8 @@ export const useUIStore = defineStore("ui", () => {
|
|
|
26
26
|
const tasks = ref({});
|
|
27
27
|
|
|
28
28
|
const showSpinner = ref(false);
|
|
29
|
+
const botVersion = ref("-");
|
|
30
|
+
|
|
29
31
|
const spinnerMessage = ref("");
|
|
30
32
|
|
|
31
33
|
const profile = ref({
|
|
@@ -537,6 +539,10 @@ export const useUIStore = defineStore("ui", () => {
|
|
|
537
539
|
showSpinner.value = false;
|
|
538
540
|
enableScroll();
|
|
539
541
|
},
|
|
542
|
+
setBotVersion: (version) => {
|
|
543
|
+
botVersion.value = version;
|
|
544
|
+
},
|
|
545
|
+
botVersion,
|
|
540
546
|
|
|
541
547
|
spinnerMessage,
|
|
542
548
|
showSpinner,
|