@geode/opengeodeweb-front 10.27.1 → 10.28.0-rc.1

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.
@@ -5,39 +5,67 @@ import { Status } from "@ogw_front/utils/status";
5
5
  import { appMode } from "@ogw_front/utils/local/app_mode";
6
6
  import { useInfraStore } from "@ogw_front/stores/infra";
7
7
 
8
- const { logo, appName } = defineProps({
9
- logo: {
10
- type: String,
11
- required: false,
12
- default: "",
13
- },
14
- appName: {
15
- type: String,
16
- required: true,
17
- },
8
+ const { appName, email, isUserAuthenticated, logo } = defineProps({
9
+ appName: { type: String, required: true },
10
+ email: { type: String, default: undefined },
11
+ isUserAuthenticated: { type: Boolean, default: false },
12
+ logo: { type: String, required: false, default: "" },
18
13
  });
19
14
 
20
15
  const infraStore = useInfraStore();
21
16
  if (infraStore.app_mode !== appMode.CLOUD) {
22
17
  infraStore.create_backend();
23
18
  }
19
+
20
+ function cloudCreateBackend() {
21
+ return infraStore.create_backend(email);
22
+ }
24
23
  </script>
25
24
 
26
25
  <template>
27
- <v-container class="justify">
28
- <v-row align-content="center" align="center">
29
- <v-col
30
- v-if="infraStore.status === Status.NOT_CREATED"
31
- class="align"
26
+ <VContainer class="justify">
27
+ <VRow align-content="center" align="center" justify="center">
28
+ <VCol cols="12" align-self="center">
29
+ <slot name="auth" />
30
+ </VCol>
31
+ <VCol
32
+ v-if="isUserAuthenticated && infraStore.status === Status.NOT_CREATED"
33
+ class="d-flex justify-center align-center"
32
34
  cols="12"
33
35
  align-self="center"
34
36
  z-index="4"
35
37
  >
36
- <Recaptcha :button_color="'secondary'" />
37
- </v-col>
38
- <v-col v-else-if="infraStore.status === Status.CREATING">
38
+ <VBtn
39
+ data-testid="loadAppButton"
40
+ class="load-btn"
41
+ text="Load the app"
42
+ size="x-large"
43
+ color="white"
44
+ @click="cloudCreateBackend"
45
+ />
46
+ </VCol>
47
+ <VCol v-else-if="infraStore.status === Status.CREATING">
39
48
  <Loading :logo="logo" :app-name="appName" />
40
- </v-col>
41
- </v-row>
42
- </v-container>
49
+ </VCol>
50
+ </VRow>
51
+ </VContainer>
43
52
  </template>
53
+
54
+ <style scoped>
55
+ .load-btn {
56
+ padding: 0 40px !important;
57
+ height: 50px !important;
58
+ border-radius: 8px;
59
+ text-transform: none !important;
60
+ font-weight: 600;
61
+ letter-spacing: 0.5px;
62
+ transition:
63
+ transform 0.2s ease,
64
+ box-shadow 0.2s ease !important;
65
+ }
66
+
67
+ .load-btn:hover {
68
+ transform: translateY(-2px);
69
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
70
+ }
71
+ </style>
@@ -8,7 +8,7 @@ export const useCloudStore = defineStore("cloud", {
8
8
  status: Status.NOT_CONNECTED,
9
9
  }),
10
10
  actions: {
11
- launch(name, email, launch) {
11
+ launch(email) {
12
12
  this.status = Status.CONNECTING;
13
13
  console.log("[CLOUD] Launching cloud backend...");
14
14
  const schema = {
@@ -16,18 +16,12 @@ export const useCloudStore = defineStore("cloud", {
16
16
  methods: ["POST"],
17
17
  type: "object",
18
18
  properties: {
19
- name: { type: "string" },
20
19
  email: { type: "string" },
21
- launch: { type: "boolean" },
22
20
  },
23
- required: ["name", "email", "launch"],
21
+ required: ["email"],
24
22
  additionalProperties: true,
25
23
  };
26
- const params = {
27
- name,
28
- email,
29
- launch,
30
- };
24
+ const params = { email };
31
25
  console.log("[CLOUD] params", params);
32
26
  const appStore = useAppStore();
33
27
  const feedbackStore = useFeedbackStore();
@@ -37,7 +37,7 @@ export const useInfraStore = defineStore("infra", {
37
37
  );
38
38
  console.log("[INFRA] Microservice unregistered:", microserviceId);
39
39
  },
40
- create_backend(name, email, launch) {
40
+ create_backend(email) {
41
41
  console.log("[INFRA] Starting create_backend - Mode:", this.app_mode);
42
42
  console.log(
43
43
  "[INFRA] Registered microservices:",
@@ -54,7 +54,7 @@ export const useInfraStore = defineStore("infra", {
54
54
  console.log("[INFRA] Lock granted for create_backend");
55
55
  if (this.app_mode === appMode.CLOUD) {
56
56
  const cloudStore = useCloudStore();
57
- await cloudStore.launch(name, email, launch);
57
+ await cloudStore.launch(email);
58
58
  } else {
59
59
  const appStore = useAppStore();
60
60
  await appStore.createProjectFolder();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geode/opengeodeweb-front",
3
- "version": "10.27.1",
3
+ "version": "10.28.0-rc.1",
4
4
  "description": "OpenSource Vue/Nuxt/Pinia/Vuetify framework for web applications",
5
5
  "homepage": "https://github.com/Geode-solutions/OpenGeodeWeb-Front",
6
6
  "bugs": {
@@ -34,8 +34,8 @@
34
34
  "build": ""
35
35
  },
36
36
  "dependencies": {
37
- "@geode/opengeodeweb-back": "latest",
38
- "@geode/opengeodeweb-viewer": "latest",
37
+ "@geode/opengeodeweb-back": "next",
38
+ "@geode/opengeodeweb-viewer": "next",
39
39
  "@google-cloud/run": "3.2.0",
40
40
  "@kitware/vtk.js": "33.3.0",
41
41
  "@mdi/font": "7.4.47",
@@ -6,17 +6,12 @@ import { GoogleAuth } from "google-auth-library";
6
6
  import { ServicesClient } from "@google-cloud/run";
7
7
 
8
8
  // Local imports
9
- import { artifactImages, checkRecaptchaParams, requestConfig } from "@ogw_server/utils/cloud";
9
+ import { artifactImages, requestConfig } from "@ogw_server/utils/cloud";
10
10
 
11
11
  export default defineEventHandler(async (event) => {
12
12
  try {
13
- const { name, email, launch } = await readBody(event);
14
- if (!checkRecaptchaParams(name, email, launch)) {
15
- return {
16
- statusCode: 500,
17
- body: JSON.stringify({ message: "INTERNAL_ERROR" }),
18
- };
19
- }
13
+ const { email } = await readBody(event);
14
+ console.log("[RUN CLOUD] Received request to create backend for email:", email);
20
15
  const credentials = JSON.parse(process.env.GOOGLE_CLOUD_KEY);
21
16
  const location = "europe-west9";
22
17
  const projectId = process.env.GOOGLE_CLOUD_PROJECT;
@@ -5,11 +5,6 @@ import { google } from "googleapis";
5
5
 
6
6
  // Local imports
7
7
 
8
- function checkRecaptchaParams(name, email, launch) {
9
- console.log("check_recaptcha_params", { name, email, launch });
10
- return name === "" && email === "" && launch === false;
11
- }
12
-
13
8
  async function artifactImage(registry, parent, repo) {
14
9
  const branch = process.env.NETLIFY_BRANCH;
15
10
  const [_, projectId] = parent.split("/");
@@ -110,4 +105,4 @@ function requestConfig(parent, routerImage, backImage, viewerImage) {
110
105
  };
111
106
  }
112
107
 
113
- export { checkRecaptchaParams, artifactImages, requestConfig };
108
+ export { artifactImages, requestConfig };