@ansiversa/components 0.0.16 → 0.0.17
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
|
@@ -27,9 +27,14 @@ const classAttr = classes.join(" ");
|
|
|
27
27
|
|
|
28
28
|
const rawDomain = (import.meta.env.ANSIVERSA_COOKIE_DOMAIN || "ansiversa.com").trim();
|
|
29
29
|
const normalizedDomain = rawDomain.replace(/^(https?:\/\/)/i, "").replace(/\/+$/, "");
|
|
30
|
-
const
|
|
30
|
+
const protocol = rawDomain.match(/^https?:\/\//i)
|
|
31
|
+
? undefined
|
|
32
|
+
: import.meta.env.PROD
|
|
33
|
+
? "https"
|
|
34
|
+
: "http";
|
|
35
|
+
const ROOT_URL = rawDomain.match(/^https?:\/\//i)
|
|
31
36
|
? rawDomain.replace(/\/+$/, "")
|
|
32
|
-
:
|
|
37
|
+
: `${protocol}://${normalizedDomain}`;
|
|
33
38
|
|
|
34
39
|
const iconMap: Record<string, string> = {
|
|
35
40
|
Apps: `
|
|
@@ -11,9 +11,14 @@ const {
|
|
|
11
11
|
|
|
12
12
|
const rawDomain = (import.meta.env.ANSIVERSA_COOKIE_DOMAIN || "ansiversa.com").trim();
|
|
13
13
|
const normalizedDomain = rawDomain.replace(/^(https?:\/\/)/i, "").replace(/\/+$/, "");
|
|
14
|
-
const
|
|
14
|
+
const protocol = rawDomain.match(/^https?:\/\//i)
|
|
15
|
+
? undefined
|
|
16
|
+
: import.meta.env.PROD
|
|
17
|
+
? "https"
|
|
18
|
+
: "http";
|
|
19
|
+
const ROOT_URL = rawDomain.match(/^https?:\/\//i)
|
|
15
20
|
? rawDomain.replace(/\/+$/, "")
|
|
16
|
-
:
|
|
21
|
+
: `${protocol}://${normalizedDomain}`;
|
|
17
22
|
---
|
|
18
23
|
|
|
19
24
|
|
|
@@ -18,9 +18,14 @@ const user = Astro.locals.user;
|
|
|
18
18
|
|
|
19
19
|
const rawDomain = (import.meta.env.ANSIVERSA_COOKIE_DOMAIN || "ansiversa.com").trim();
|
|
20
20
|
const normalizedDomain = rawDomain.replace(/^(https?:\/\/)/i, "").replace(/\/+$/, "");
|
|
21
|
-
const
|
|
21
|
+
const protocol = rawDomain.match(/^https?:\/\//i)
|
|
22
|
+
? undefined
|
|
23
|
+
: import.meta.env.PROD
|
|
24
|
+
? "https"
|
|
25
|
+
: "http";
|
|
26
|
+
const ROOT_URL = rawDomain.match(/^https?:\/\//i)
|
|
22
27
|
? rawDomain.replace(/\/+$/, "")
|
|
23
|
-
:
|
|
28
|
+
: `${protocol}://${normalizedDomain}`;
|
|
24
29
|
---
|
|
25
30
|
|
|
26
31
|
|