@geode/opengeodeweb-front 9.7.0-rc.3 → 9.7.0-rc.5
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/.eslintrc.cjs
CHANGED
package/components/Launcher.vue
CHANGED
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"eslint-plugin-nuxt": "^4.0.0",
|
|
18
18
|
"eslint-plugin-prettier": "^5.1.3",
|
|
19
19
|
"eslint-plugin-prettier-vue": "^5.0.0",
|
|
20
|
-
"eslint-plugin-vue": "^9.
|
|
20
|
+
"eslint-plugin-vue": "^9.33.0",
|
|
21
21
|
"eslint-plugin-vuetify": "^2.4.0",
|
|
22
22
|
"happy-dom": "^15.11.7",
|
|
23
23
|
"jsdom": "^24.1.3",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
},
|
|
38
38
|
"description": "OpenSource Vue/Vuetify framework for web applications",
|
|
39
39
|
"type": "module",
|
|
40
|
-
"version": "9.7.0-rc.
|
|
40
|
+
"version": "9.7.0-rc.5",
|
|
41
41
|
"main": "./nuxt.config.js",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@geode/opengeodeweb-back": "5.6.3",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"pinia": "^2.2.2",
|
|
55
55
|
"sass": "^1.77.8",
|
|
56
56
|
"semver": "^7.6.3",
|
|
57
|
+
"uuid": "^11.1.0",
|
|
57
58
|
"vue-recaptcha": "^2.0.3",
|
|
58
59
|
"vue3-carousel": "^0.3.3"
|
|
59
60
|
},
|
package/stores/feedback.js
CHANGED
|
@@ -1,26 +1,41 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from "uuid"
|
|
2
|
+
|
|
1
3
|
export const use_feedback_store = defineStore("feedback", {
|
|
2
4
|
state: () => ({
|
|
3
5
|
feedbacks: [],
|
|
4
6
|
server_error: false,
|
|
7
|
+
feedbacks_timeout_miliseconds: 5000,
|
|
5
8
|
}),
|
|
6
9
|
actions: {
|
|
7
10
|
async add_error(code, route, name, description) {
|
|
11
|
+
const feedbackId = uuidv4()
|
|
8
12
|
await this.feedbacks.push({
|
|
13
|
+
id: feedbackId,
|
|
9
14
|
type: "error",
|
|
10
15
|
code,
|
|
11
16
|
route,
|
|
12
17
|
name,
|
|
13
18
|
description,
|
|
14
19
|
})
|
|
20
|
+
setTimeout(() => {
|
|
21
|
+
this.delete_feedback(feedbackId)
|
|
22
|
+
}, this.feedbacks_timeout_miliseconds)
|
|
15
23
|
},
|
|
16
24
|
async add_success(description) {
|
|
25
|
+
const feedbackId = uuidv4()
|
|
17
26
|
await this.feedbacks.push({
|
|
27
|
+
id: feedbackId,
|
|
18
28
|
type: "success",
|
|
19
29
|
description,
|
|
20
30
|
})
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
this.delete_feedback(feedbackId)
|
|
33
|
+
}, this.feedbacks_timeout_miliseconds)
|
|
21
34
|
},
|
|
22
|
-
async delete_feedback(
|
|
23
|
-
|
|
35
|
+
async delete_feedback(feedbackId) {
|
|
36
|
+
this.feedbacks = this.feedbacks.filter(
|
|
37
|
+
(feedback) => feedback.id !== feedbackId,
|
|
38
|
+
)
|
|
24
39
|
},
|
|
25
40
|
async delete_server_error() {
|
|
26
41
|
this.server_error = false
|
package/stores/viewer.js
CHANGED
|
@@ -60,7 +60,6 @@ export const use_viewer_store = defineStore("viewer", {
|
|
|
60
60
|
if (process.env.NODE_ENV == "test") return
|
|
61
61
|
if (this.status === Status.CONNECTED) return
|
|
62
62
|
navigator.locks.request("viewer.ws_connect", async (lock) => {
|
|
63
|
-
console.log("VIEWER STATUS", this.status)
|
|
64
63
|
if (this.status === Status.CONNECTED) return
|
|
65
64
|
console.log("VIEWER LOCK GRANTED !", lock)
|
|
66
65
|
this.status = Status.CONNECTING
|
|
@@ -71,18 +70,12 @@ export const use_viewer_store = defineStore("viewer", {
|
|
|
71
70
|
config.sessionURL = this.base_url
|
|
72
71
|
|
|
73
72
|
const { client } = this
|
|
74
|
-
console.log("client", client)
|
|
75
|
-
console.log("status", this.status)
|
|
76
73
|
if (this.status === Status.CONNECTED && client.isConnected()) {
|
|
77
|
-
console.log("disconnect")
|
|
78
|
-
|
|
79
74
|
client.disconnect(-1)
|
|
80
75
|
this.status = Status.NOT_CONNECTED
|
|
81
76
|
}
|
|
82
77
|
let clientToConnect = client
|
|
83
78
|
if (_.isEmpty(clientToConnect)) {
|
|
84
|
-
console.log("isEmpty")
|
|
85
|
-
|
|
86
79
|
clientToConnect = vtkWSLinkClient.newInstance()
|
|
87
80
|
}
|
|
88
81
|
|
|
@@ -112,13 +105,11 @@ export const use_viewer_store = defineStore("viewer", {
|
|
|
112
105
|
const { connectImageStream } = await import(
|
|
113
106
|
"@kitware/vtk.js/Rendering/Misc/RemoteView"
|
|
114
107
|
)
|
|
115
|
-
console.log("before connect")
|
|
116
108
|
const viewer_store = this
|
|
117
109
|
return new Promise((resolve, reject) => {
|
|
118
110
|
clientToConnect
|
|
119
111
|
.connect(config)
|
|
120
112
|
.then((validClient) => {
|
|
121
|
-
console.log("validClient", validClient)
|
|
122
113
|
connectImageStream(validClient.getConnection().getSession())
|
|
123
114
|
viewer_store.client = validClient
|
|
124
115
|
clientToConnect.endBusy()
|
|
@@ -34,11 +34,32 @@ describe("Feedback Store", () => {
|
|
|
34
34
|
})
|
|
35
35
|
})
|
|
36
36
|
|
|
37
|
+
describe("add_error", () => {
|
|
38
|
+
test("test feedbacks_timeout", () => {
|
|
39
|
+
feedback_store.feedbacks_timeout_miliseconds = 500
|
|
40
|
+
feedback_store.add_error(
|
|
41
|
+
500,
|
|
42
|
+
"/test",
|
|
43
|
+
"test message",
|
|
44
|
+
"test description",
|
|
45
|
+
)
|
|
46
|
+
expect(feedback_store.feedbacks.length).toBe(1)
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
expect(feedback_store.feedbacks.length).toBe(0)
|
|
49
|
+
}, 1000)
|
|
50
|
+
})
|
|
51
|
+
})
|
|
52
|
+
|
|
37
53
|
describe("add_success", () => {
|
|
38
54
|
test("test add_success", () => {
|
|
55
|
+
feedback_store.feedbacks_timeout_miliseconds = 500
|
|
39
56
|
feedback_store.add_success("test description")
|
|
40
57
|
expect(feedback_store.feedbacks.length).toBe(1)
|
|
41
58
|
expect(feedback_store.feedbacks[0].type).toBe("success")
|
|
59
|
+
|
|
60
|
+
setTimeout(() => {
|
|
61
|
+
expect(feedback_store.feedbacks.length).toBe(0)
|
|
62
|
+
}, 1000)
|
|
42
63
|
})
|
|
43
64
|
})
|
|
44
65
|
describe("delete_feedback", () => {
|