@ansiversa/components 0.0.15 → 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
|
@@ -25,6 +25,17 @@ const classes = ["av-navbar-actions"];
|
|
|
25
25
|
if (className) classes.push(className);
|
|
26
26
|
const classAttr = classes.join(" ");
|
|
27
27
|
|
|
28
|
+
const rawDomain = (import.meta.env.ANSIVERSA_COOKIE_DOMAIN || "ansiversa.com").trim();
|
|
29
|
+
const normalizedDomain = rawDomain.replace(/^(https?:\/\/)/i, "").replace(/\/+$/, "");
|
|
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)
|
|
36
|
+
? rawDomain.replace(/\/+$/, "")
|
|
37
|
+
: `${protocol}://${normalizedDomain}`;
|
|
38
|
+
|
|
28
39
|
const iconMap: Record<string, string> = {
|
|
29
40
|
Apps: `
|
|
30
41
|
<svg class="av-icon" viewBox='0 0 24 24'>
|
|
@@ -60,15 +71,15 @@ function renderIcon(label: string) {
|
|
|
60
71
|
|
|
61
72
|
// ALWAYS SHOW THESE LINKS
|
|
62
73
|
const baseLinks: NavLink[] = [
|
|
63
|
-
{ label: "Apps", href:
|
|
64
|
-
{ label: "Pricing", href:
|
|
65
|
-
{ label: "About", href:
|
|
74
|
+
{ label: "Apps", href: `${ROOT_URL}/apps` },
|
|
75
|
+
{ label: "Pricing", href: `${ROOT_URL}/pricing` },
|
|
76
|
+
{ label: "About", href: `${ROOT_URL}/about` },
|
|
66
77
|
];
|
|
67
78
|
|
|
68
79
|
// SIGN-IN link only for guests
|
|
69
80
|
const authLink: NavLink = {
|
|
70
81
|
label: "Sign in",
|
|
71
|
-
href:
|
|
82
|
+
href: `${ROOT_URL}/login`,
|
|
72
83
|
variant: "primary",
|
|
73
84
|
};
|
|
74
85
|
|
|
@@ -125,19 +136,19 @@ const userInitial =
|
|
|
125
136
|
<div class="av-user-menu-divider"></div>
|
|
126
137
|
|
|
127
138
|
<div class="av-nav-user-menu">
|
|
128
|
-
<a href=
|
|
139
|
+
<a href={`${ROOT_URL}/dashboard`} class="av-user-menu-item av-dropdown-item" role="menuitem">
|
|
129
140
|
<span>Dashboard</span>
|
|
130
141
|
</a>
|
|
131
142
|
|
|
132
143
|
<a
|
|
133
|
-
href=
|
|
144
|
+
href={`${ROOT_URL}/change-password`}
|
|
134
145
|
class="av-user-menu-item av-dropdown-item"
|
|
135
146
|
role="menuitem"
|
|
136
147
|
>
|
|
137
148
|
<span>Change password</span>
|
|
138
149
|
</a>
|
|
139
150
|
|
|
140
|
-
<a href=
|
|
151
|
+
<a href={`${ROOT_URL}/settings`} class="av-user-menu-item av-dropdown-item" role="menuitem">
|
|
141
152
|
<span>Settings</span>
|
|
142
153
|
</a>
|
|
143
154
|
|
|
@@ -151,7 +162,7 @@ const userInitial =
|
|
|
151
162
|
</button>
|
|
152
163
|
</form> */}
|
|
153
164
|
<a
|
|
154
|
-
href=
|
|
165
|
+
href={`${ROOT_URL}/signout`}
|
|
155
166
|
class="av-user-menu-item av-dropdown-item av-user-menu-item--danger"
|
|
156
167
|
role="menuitem"
|
|
157
168
|
>
|
|
@@ -8,6 +8,17 @@ const {
|
|
|
8
8
|
title = "Ansiversa",
|
|
9
9
|
description = "Ansiversa – A unified ecosystem of premium Apps designed to feel simple, powerful, and delightful.",
|
|
10
10
|
} = Astro.props;
|
|
11
|
+
|
|
12
|
+
const rawDomain = (import.meta.env.ANSIVERSA_COOKIE_DOMAIN || "ansiversa.com").trim();
|
|
13
|
+
const normalizedDomain = rawDomain.replace(/^(https?:\/\/)/i, "").replace(/\/+$/, "");
|
|
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)
|
|
20
|
+
? rawDomain.replace(/\/+$/, "")
|
|
21
|
+
: `${protocol}://${normalizedDomain}`;
|
|
11
22
|
---
|
|
12
23
|
|
|
13
24
|
|
|
@@ -32,7 +43,7 @@ const {
|
|
|
32
43
|
<meta property="og:title" content={title} />
|
|
33
44
|
<meta property="og:description" content={description} />
|
|
34
45
|
<meta property="og:site_name" content="Ansiversa" />
|
|
35
|
-
<meta property="og:url" content=
|
|
46
|
+
<meta property="og:url" content={ROOT_URL} />
|
|
36
47
|
|
|
37
48
|
<!-- Twitter -->
|
|
38
49
|
<meta name="twitter:card" content="summary_large_image" />
|
|
@@ -15,6 +15,17 @@ const {
|
|
|
15
15
|
} = Astro.props;
|
|
16
16
|
|
|
17
17
|
const user = Astro.locals.user;
|
|
18
|
+
|
|
19
|
+
const rawDomain = (import.meta.env.ANSIVERSA_COOKIE_DOMAIN || "ansiversa.com").trim();
|
|
20
|
+
const normalizedDomain = rawDomain.replace(/^(https?:\/\/)/i, "").replace(/\/+$/, "");
|
|
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)
|
|
27
|
+
? rawDomain.replace(/\/+$/, "")
|
|
28
|
+
: `${protocol}://${normalizedDomain}`;
|
|
18
29
|
---
|
|
19
30
|
|
|
20
31
|
|
|
@@ -40,7 +51,7 @@ const user = Astro.locals.user;
|
|
|
40
51
|
<meta property="og:title" content={title} />
|
|
41
52
|
<meta property="og:description" content={description} />
|
|
42
53
|
<meta property="og:site_name" content="Ansiversa" />
|
|
43
|
-
<meta property="og:url" content=
|
|
54
|
+
<meta property="og:url" content={ROOT_URL} />
|
|
44
55
|
|
|
45
56
|
<!-- Twitter -->
|
|
46
57
|
<meta name="twitter:card" content="summary_large_image" />
|