@ansiversa/components 0.0.15 → 0.0.16
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,12 @@ 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 ROOT_URL = rawDomain.startsWith("http")
|
|
31
|
+
? rawDomain.replace(/\/+$/, "")
|
|
32
|
+
: `https://${normalizedDomain}`;
|
|
33
|
+
|
|
28
34
|
const iconMap: Record<string, string> = {
|
|
29
35
|
Apps: `
|
|
30
36
|
<svg class="av-icon" viewBox='0 0 24 24'>
|
|
@@ -60,15 +66,15 @@ function renderIcon(label: string) {
|
|
|
60
66
|
|
|
61
67
|
// ALWAYS SHOW THESE LINKS
|
|
62
68
|
const baseLinks: NavLink[] = [
|
|
63
|
-
{ label: "Apps", href:
|
|
64
|
-
{ label: "Pricing", href:
|
|
65
|
-
{ label: "About", href:
|
|
69
|
+
{ label: "Apps", href: `${ROOT_URL}/apps` },
|
|
70
|
+
{ label: "Pricing", href: `${ROOT_URL}/pricing` },
|
|
71
|
+
{ label: "About", href: `${ROOT_URL}/about` },
|
|
66
72
|
];
|
|
67
73
|
|
|
68
74
|
// SIGN-IN link only for guests
|
|
69
75
|
const authLink: NavLink = {
|
|
70
76
|
label: "Sign in",
|
|
71
|
-
href:
|
|
77
|
+
href: `${ROOT_URL}/login`,
|
|
72
78
|
variant: "primary",
|
|
73
79
|
};
|
|
74
80
|
|
|
@@ -125,19 +131,19 @@ const userInitial =
|
|
|
125
131
|
<div class="av-user-menu-divider"></div>
|
|
126
132
|
|
|
127
133
|
<div class="av-nav-user-menu">
|
|
128
|
-
<a href=
|
|
134
|
+
<a href={`${ROOT_URL}/dashboard`} class="av-user-menu-item av-dropdown-item" role="menuitem">
|
|
129
135
|
<span>Dashboard</span>
|
|
130
136
|
</a>
|
|
131
137
|
|
|
132
138
|
<a
|
|
133
|
-
href=
|
|
139
|
+
href={`${ROOT_URL}/change-password`}
|
|
134
140
|
class="av-user-menu-item av-dropdown-item"
|
|
135
141
|
role="menuitem"
|
|
136
142
|
>
|
|
137
143
|
<span>Change password</span>
|
|
138
144
|
</a>
|
|
139
145
|
|
|
140
|
-
<a href=
|
|
146
|
+
<a href={`${ROOT_URL}/settings`} class="av-user-menu-item av-dropdown-item" role="menuitem">
|
|
141
147
|
<span>Settings</span>
|
|
142
148
|
</a>
|
|
143
149
|
|
|
@@ -151,7 +157,7 @@ const userInitial =
|
|
|
151
157
|
</button>
|
|
152
158
|
</form> */}
|
|
153
159
|
<a
|
|
154
|
-
href=
|
|
160
|
+
href={`${ROOT_URL}/signout`}
|
|
155
161
|
class="av-user-menu-item av-dropdown-item av-user-menu-item--danger"
|
|
156
162
|
role="menuitem"
|
|
157
163
|
>
|
|
@@ -8,6 +8,12 @@ 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 ROOT_URL = rawDomain.startsWith("http")
|
|
15
|
+
? rawDomain.replace(/\/+$/, "")
|
|
16
|
+
: `https://${normalizedDomain}`;
|
|
11
17
|
---
|
|
12
18
|
|
|
13
19
|
|
|
@@ -32,7 +38,7 @@ const {
|
|
|
32
38
|
<meta property="og:title" content={title} />
|
|
33
39
|
<meta property="og:description" content={description} />
|
|
34
40
|
<meta property="og:site_name" content="Ansiversa" />
|
|
35
|
-
<meta property="og:url" content=
|
|
41
|
+
<meta property="og:url" content={ROOT_URL} />
|
|
36
42
|
|
|
37
43
|
<!-- Twitter -->
|
|
38
44
|
<meta name="twitter:card" content="summary_large_image" />
|
|
@@ -15,6 +15,12 @@ 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 ROOT_URL = rawDomain.startsWith("http")
|
|
22
|
+
? rawDomain.replace(/\/+$/, "")
|
|
23
|
+
: `https://${normalizedDomain}`;
|
|
18
24
|
---
|
|
19
25
|
|
|
20
26
|
|
|
@@ -40,7 +46,7 @@ const user = Astro.locals.user;
|
|
|
40
46
|
<meta property="og:title" content={title} />
|
|
41
47
|
<meta property="og:description" content={description} />
|
|
42
48
|
<meta property="og:site_name" content="Ansiversa" />
|
|
43
|
-
<meta property="og:url" content=
|
|
49
|
+
<meta property="og:url" content={ROOT_URL} />
|
|
44
50
|
|
|
45
51
|
<!-- Twitter -->
|
|
46
52
|
<meta name="twitter:card" content="summary_large_image" />
|