@networkpro/web 1.6.5 → 1.7.0

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.
Files changed (37) hide show
  1. package/CODE_OF_CONDUCT.md +2 -2
  2. package/LICENSE.md +20 -9
  3. package/_redirects +1 -0
  4. package/cspell.json +2 -0
  5. package/package.json +4 -4
  6. package/playwright.config.js +1 -0
  7. package/src/lib/components/FullWidthSection.svelte +19 -4
  8. package/src/lib/components/LegalNav.svelte +31 -29
  9. package/src/lib/components/PostHog.svelte +20 -8
  10. package/src/lib/components/layout/Footer.svelte +1 -1
  11. package/src/lib/components/layout/HeaderDefault.svelte +2 -2
  12. package/src/lib/components/layout/HeaderHome.svelte +2 -2
  13. package/src/lib/images.js +3 -2
  14. package/src/lib/index.js +2 -1
  15. package/src/lib/meta.js +6 -1
  16. package/src/lib/pages/LicenseContent.svelte +17 -17
  17. package/src/lib/pages/PrivacyContent.svelte +116 -6
  18. package/src/lib/pages/PrivacyDashboard.svelte +240 -0
  19. package/src/lib/pages/TermsUseContent.svelte +1 -1
  20. package/src/lib/styles/css/default.css +23 -10
  21. package/src/lib/styles/global.min.css +1 -3
  22. package/src/lib/utils/privacy.js +18 -3
  23. package/src/lib/utils/trackingCookies.js +40 -0
  24. package/src/lib/utils/trackingStatus.js +46 -0
  25. package/src/lib/utils/utm.js +8 -1
  26. package/src/routes/about/+page.svelte +1 -7
  27. package/src/routes/foss-spotlight/+page.svelte +1 -7
  28. package/src/routes/license/+page.svelte +2 -8
  29. package/src/routes/privacy/+page.server.js +18 -0
  30. package/src/routes/{privacy-policy → privacy}/+page.svelte +5 -11
  31. package/src/routes/{privacy-policy → privacy-dashboard}/+page.server.js +2 -2
  32. package/src/routes/privacy-dashboard/+page.svelte +69 -0
  33. package/src/routes/terms-conditions/+page.svelte +2 -8
  34. package/src/routes/terms-of-use/+page.svelte +2 -8
  35. package/src/service-worker.js +31 -6
  36. package/static/sitemap.xml +10 -22
  37. package/tests/e2e/app.spec.js +21 -63
@@ -155,7 +155,7 @@ For answers to common questions about this code of conduct, see the FAQ at
155
155
  <div style="font-size: 12px; font-weight: bold; text-align: center;">
156
156
 
157
157
  [Home](https://netwk.pro) &nbsp; | &nbsp; [Terms of Use](https://netwk.pro/terms-of-use)
158
- [Privacy Policy](https://netwk.pro/privacy-policy) &nbsp; | &nbsp; [Legal](https://netwk.pro/legal)
158
+ [Privacy Policy](https://netwk.pro/privacy) &nbsp; | &nbsp; [Legal](https://netwk.pro/license)
159
159
 
160
160
  </div>
161
161
 
@@ -166,7 +166,7 @@ For answers to common questions about this code of conduct, see the FAQ at
166
166
  Copyright &copy; 2025
167
167
  **[Network Pro Strategies](https://netwk.pro/)** (Network Pro&trade;)
168
168
 
169
- Network Pro&trade;, the shield logo, and the "Locking Down Networks&trade;" slogan are [trademarks](https://netwk.pro/legal#trademark) of Network Pro Strategies.
169
+ Network Pro&trade;, the shield logo, and the "Locking Down Networks&trade;" slogan are [trademarks](https://netwk.pro/license#trademark) of Network Pro Strategies.
170
170
 
171
171
  Licensed under **[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)** and the **[GNU GPL](https://spdx.org/licenses/GPL-3.0-or-later.html)**, as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
172
172
 
package/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- <!-- =========================================================================
1
+ <!-- =====================================================================
2
2
  LICENSE.md
3
3
 
4
4
  Copyright © 2025 Network Pro Strategies (Network Pro™)
@@ -14,7 +14,7 @@ This file is part of Network Pro.
14
14
  # Legal, Copyright, and Licensing
15
15
 
16
16
  **Network Pro Strategies**
17
- **Effective Date:** May 18, 2025
17
+ **Effective Date:** May 28, 2025
18
18
 
19
19
  **Official Version Notice**
20
20
  This document is provided for convenience only. In the event of any discrepancy, the authoritative version is the one published at [https://netwk.pro](https://netwk.pro).
@@ -38,8 +38,9 @@ This document is provided for convenience only. In the event of any discrepancy,
38
38
  9. [Third-Party Code and Licenses](#third-party)
39
39
  10. [Prohibited Uses](#prohibited-uses)
40
40
  11. [Modifications and Liability Disclaimer](#disclaimer)
41
- 12. [Contact](#contact)
41
+ 12. [Authoritative Version Clause](#version)
42
42
  13. [Revisions](#revisions)
43
+ 14. [Contact](#contact)
43
44
 
44
45
  ---
45
46
 
@@ -191,12 +192,13 @@ Modifications, redistribution, or any use of the Licensed Material are performed
191
192
 
192
193
  <sub>[Back to top](#top)</sub>
193
194
 
194
- <a name="contact"></a>
195
+ <a name="version"></a>
195
196
 
196
- ## 12. Contact
197
+ ## 12. Authoritative Version Clause
197
198
 
198
- The Company may be contacted via our [contact form](https://netwk.pro/contact) or by email at:
199
- 📧 `contact (at) s.neteng.pro`
199
+ In the event of any discrepancy between different versions, formats, or distributions of any legal document issued by the Company&mdash;including but not limited to license terms, policies, notices, or agreements&mdash;the version published on the Company's primary website at [https://netwk.pro](https://netwk.pro) shall be deemed the official and controlling version.
200
+
201
+ It is your responsibility to review the most current version of any applicable legal document before relying on its contents. Continued use of the Company's materials, services, or Licensed Material constitutes acceptance of the most current version then in effect.
200
202
 
201
203
  <sub>[Back to top](#top)</sub>
202
204
 
@@ -208,14 +210,21 @@ This legal page may be updated to comply with legal or operational changes. The
208
210
 
209
211
  <sub>[Back to top](#top)</sub>
210
212
 
211
- <a name="attribution"></a>
213
+ <a name="contact"></a>
214
+
215
+ ## 14. Contact
216
+
217
+ The Company may be contacted via our [contact form](https://netwk.pro/contact) or by email at:
218
+ 📧 `contact (at) s.neteng.pro`
219
+
220
+ <sub>[Back to top](#top)</sub>
212
221
 
213
222
  ---
214
223
 
215
224
  <div style="font-size: 12px; font-weight: bold; text-align: center;">
216
225
 
217
226
  [Home](https://netwk.pro) &nbsp; | &nbsp; [Terms of Use](https://netwk.pro/terms-of-use)
218
- [Privacy Policy](https://netwk.pro/privacy-policy) &nbsp; | &nbsp; Legal
227
+ [Privacy Policy](https://netwk.pro/privacy) &nbsp; | &nbsp; Legal
219
228
 
220
229
  </div>
221
230
 
@@ -231,3 +240,5 @@ Network Pro&trade;, the shield logo, and the "Locking Down Networks&trade;" slog
231
240
  Licensed under **[CC BY 4.0](#cc-by)** and the **[GNU GPL](#gnu-gpl)**, as published by the [Free Software Foundation](https://www.fsf.org), either version 3 of the License, or (at your option) any later version.
232
241
 
233
242
  </div>
243
+
244
+ <!-- cspell:ignore dlnotes >
package/_redirects CHANGED
@@ -1 +1,2 @@
1
1
  https://www.netwk.pro/* https://netwk.pro/:splat 301
2
+ /privacy-policy /privacy 301
package/cspell.json CHANGED
@@ -3,9 +3,11 @@
3
3
  "language": "en",
4
4
  "words": [
5
5
  "acode",
6
+ "autocapture",
6
7
  "autorun",
7
8
  "beforeinstallprompt",
8
9
  "bootentry",
10
+ "ccby",
9
11
  "Embedder",
10
12
  "Ente",
11
13
  "esbuild",
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "sideEffects": [
5
5
  "./.netlify/shims.js"
6
6
  ],
7
- "version": "1.6.5",
7
+ "version": "1.7.0",
8
8
  "description": "Locking Down Networks, Unlocking Confidence | Security, Networking, Privacy — Network Pro Strategies",
9
9
  "keywords": [
10
10
  "advisory",
@@ -78,9 +78,9 @@
78
78
  },
79
79
  "dependencies": {
80
80
  "nodemailer": "^7.0.3",
81
- "posthog-js": "^1.246.0",
81
+ "posthog-js": "^1.248.1",
82
82
  "semver": "^7.7.2",
83
- "svelte": "5.33.4"
83
+ "svelte": "5.33.6"
84
84
  },
85
85
  "devDependencies": {
86
86
  "@eslint/compat": "^1.2.9",
@@ -94,7 +94,7 @@
94
94
  "@testing-library/svelte": "^5.2.8",
95
95
  "@vitest/coverage-v8": "^3.1.4",
96
96
  "autoprefixer": "^10.4.21",
97
- "browserslist": "^4.24.5",
97
+ "browserslist": "^4.25.0",
98
98
  "eslint": "^9.27.0",
99
99
  "eslint-config-prettier": "^10.1.5",
100
100
  "eslint-plugin-jsdoc": "^50.6.17",
@@ -36,6 +36,7 @@ export default defineConfig({
36
36
  baseURL: "http://localhost:4173?nosw", // Update to use preview server URL
37
37
  trace: "on-first-retry",
38
38
  timeout: 60000, // Default action timeout of 60 seconds for each step
39
+ navigationTimeout: 60000, // Timeout for navigation operations
39
40
  },
40
41
 
41
42
  /* Configure projects */
@@ -7,13 +7,28 @@ This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
9
  <script>
10
- export let centered = false; // this prop lets us control vertical centering
10
+ /**
11
+ * Optional: Allows vertical centering of the section
12
+ * @type {boolean}
13
+ */
14
+ export let centered = false;
15
+
16
+ /**
17
+ * Additional classes for the outer full-width wrapper
18
+ * @type {string}
19
+ */
20
+ export let outerClass = "";
21
+
22
+ /**
23
+ * Additional classes for the inner container
24
+ * @type {string}
25
+ */
26
+ export let containerClass = "";
11
27
  </script>
12
28
 
13
- <div class="full-width-section {centered ? 'centered' : ''}">
14
- <div class="container">
29
+ <div class={`full-width-section ${centered ? "centered" : ""} ${outerClass}`}>
30
+ <div class={`container ${containerClass}`}>
15
31
  <slot></slot>
16
- <!-- Slot to allow child content -->
17
32
  </div>
18
33
  </div>
19
34
 
@@ -13,15 +13,15 @@ This file is part of Network Pro.
13
13
  //console.log("Base path:", base);
14
14
 
15
15
  const termsLink = `${base}/terms-of-use`;
16
- const privacyLink = `${base}/privacy-policy`;
16
+ const privacyLink = `${base}/privacy`;
17
17
  const licenseLink = `${base}/license`;
18
+ const pdashLink = `${base}/privacy-dashboard`;
18
19
 
19
20
  /**
20
21
  * Navigation link object.
21
22
  * @typedef {Object} NavLink
22
23
  * @property {string} href - The URL the link points to.
23
24
  * @property {string} text - The text displayed for the link.
24
- * @property {string} target - Specifies where to open the link (e.g., "_self" or "_blank").
25
25
  * @property {number} [colspan] - Optional property to specify column span for the table cell.
26
26
  */
27
27
 
@@ -31,46 +31,48 @@ This file is part of Network Pro.
31
31
  */
32
32
  const rows = [
33
33
  [
34
- {
35
- href: termsLink,
36
- text: "Terms of Use",
37
- target: "_self",
38
- },
39
34
  {
40
35
  href: privacyLink,
41
36
  text: "Privacy Policy",
42
- target: "_self",
37
+ },
38
+ {
39
+ href: pdashLink,
40
+ text: "Privacy Dashboard",
43
41
  },
44
42
  ],
45
43
  [
44
+ {
45
+ href: termsLink,
46
+ text: "Terms of Use",
47
+ },
46
48
  {
47
49
  href: licenseLink,
48
50
  text: "Legal",
49
- target: "_self",
50
- colspan: 2,
51
51
  },
52
52
  ],
53
53
  ];
54
54
  </script>
55
55
 
56
56
  <!-- BEGIN LEGAL NAVIGATION -->
57
- <div class="bnav-wrap">
58
- <table class="bnav">
59
- <tbody>
60
- {#each rows as row}
61
- <tr>
62
- {#each row as link}
63
- <td
64
- class={link.colspan ? "bnav-cell" : "bnav-nav"}
65
- colspan={link.colspan || 1}>
66
- <a href={link.href} target={link.target}>
67
- {link.text}
68
- </a>
69
- </td>
70
- {/each}
71
- </tr>
72
- {/each}
73
- </tbody>
74
- </table>
75
- </div>
57
+ <nav aria-label="Legal navigation">
58
+ <div class="bnav-wrap">
59
+ <table class="bnav">
60
+ <tbody>
61
+ {#each rows as row}
62
+ <tr>
63
+ {#each row as link}
64
+ <td class="bnav-cell" colspan={link.colspan || 1}>
65
+ <a href={link.href} target="_self">
66
+ {link.text}
67
+ </a>
68
+ </td>
69
+ {/each}
70
+ </tr>
71
+ {/each}
72
+ </tbody>
73
+ </table>
74
+ </div>
75
+ </nav>
76
76
  <!-- END LEGAL NAVIGATION -->
77
+
78
+ <!-- cspell:ignore pdash bnav -->
@@ -10,15 +10,27 @@ This file is part of Network Pro.
10
10
  import posthog from "posthog-js";
11
11
  import { onMount } from "svelte";
12
12
  import { browser } from "$app/environment";
13
+ import { shouldTrackUser } from "$lib/utils/privacy.js";
13
14
 
14
- // cspell:disable
15
15
  onMount(() => {
16
- if (browser) {
17
- posthog.init("phc_Qshfo6AXzh4pS7aPigfqyeo4qj1qlyh7gDuHDeVMSR0", {
18
- api_host: "https://us.i.posthog.com",
19
- person_profiles: "identified_only",
20
- });
21
- }
16
+ if (!browser) return;
17
+
18
+ const allowTracking = shouldTrackUser();
19
+
20
+ // cspell:disable-next-line
21
+ posthog.init("phc_Qshfo6AXzh4pS7aPigfqyeo4qj1qlyh7gDuHDeVMSR0", {
22
+ api_host: "https://us.i.posthog.com",
23
+ loaded: (ph) => {
24
+ if (!allowTracking) {
25
+ console.log("[PostHog] ⛔ User opted out — disabling tracking");
26
+ ph.opt_out_capturing(); // Fully disable any tracking
27
+ } else {
28
+ console.log("[PostHog] ✅ Tracking enabled");
29
+ }
30
+ },
31
+ autocapture: allowTracking, // Optional: Disable autocapture
32
+ capture_pageview: allowTracking, // Optional: Disable initial pageview
33
+ person_profiles: "identified_only",
34
+ });
22
35
  });
23
- //cspell:enable
24
36
  </script>
@@ -14,7 +14,7 @@ This file is part of Network Pro.
14
14
  import { bySvg, ccSvg } from "$lib";
15
15
 
16
16
  // Log the base path to verify its value
17
- console.log("Base path:", base);
17
+ //console.log("Base path:", base);
18
18
 
19
19
  // Dynamic links for licensing and trademark
20
20
  const ccbyLink = `${base}/license#cc-by`;
@@ -10,7 +10,7 @@ This file is part of Network Pro.
10
10
  import { base } from "$app/paths";
11
11
 
12
12
  // Log the base path to verify its value
13
- console.log("Base path:", base);
13
+ //console.log("Base path:", base);
14
14
 
15
15
  const homeLink = base || "/";
16
16
  const aboutLink = `${base}/about`;
@@ -62,7 +62,7 @@ This file is part of Network Pro.
62
62
  </script>
63
63
 
64
64
  <!-- BEGIN DEFAULT HEADER -->
65
- <nav class="center-nav">
65
+ <nav class="center-nav" aria-label="Site navigation">
66
66
  {#each nav as { label, href, target, external }, index}
67
67
  <a {href} {target} rel={external ? rel : undefined}>
68
68
  {label}
@@ -10,7 +10,7 @@ This file is part of Network Pro.
10
10
  import { base } from "$app/paths";
11
11
 
12
12
  // Log the base path to verify its value
13
- console.log("Base path:", base);
13
+ //console.log("Base path:", base);
14
14
 
15
15
  const aboutLink = `${base}/about`;
16
16
  const fossLink = `${base}/foss-spotlight`;
@@ -60,7 +60,7 @@ This file is part of Network Pro.
60
60
  </script>
61
61
 
62
62
  <!-- BEGIN HOME HEADER -->
63
- <nav class="center-nav">
63
+ <nav class="center-nav" aria-label="Homepage navigation">
64
64
  {#each nav as { label, href, target, external }, index}
65
65
  <a {href} {target} rel={external ? rel : undefined}>
66
66
  {label}
package/src/lib/images.js CHANGED
@@ -10,11 +10,12 @@ This file is part of Network Pro.
10
10
 
11
11
  /**
12
12
  * Image import utility
13
- * Provides convenient access to images in the src/lib/img directory
14
13
  *
14
+ * @file images.js
15
+ * @description Provides convenient access to images in the src/lib/img directory
15
16
  * @module src/lib
16
17
  * @author SunDevil311
17
- * @updated 2025-05-24
18
+ * @updated 2025-05-28
18
19
  */
19
20
 
20
21
  // Import favicon images
package/src/lib/index.js CHANGED
@@ -8,8 +8,9 @@ This file is part of Network Pro.
8
8
 
9
9
  /**
10
10
  * Library index file
11
- * Main export point for library components, utilities, and assets
12
11
  *
12
+ * @file index.js
13
+ * @description Main export point for library components, utilities, and assets
13
14
  * @module src/lib
14
15
  * @author SunDevil311
15
16
  * @updated 2025-05-14
package/src/lib/meta.js CHANGED
@@ -26,7 +26,7 @@ const meta = {
26
26
  title: "About Us — Network Pro™",
27
27
  description: "About Us | Security, Networking, Privacy — Network Pro™",
28
28
  },
29
- "/privacy-policy": {
29
+ "/privacy": {
30
30
  title: "Privacy Policy — Network Pro™",
31
31
  description:
32
32
  "Privacy Policy | Security, Networking, Privacy — Network Pro™",
@@ -51,6 +51,11 @@ const meta = {
51
51
  description:
52
52
  "FOSS Spotlight | Security, Networking, Privacy — Network Pro™",
53
53
  },
54
+ "/privacy-dashboard": {
55
+ title: "Privacy Dashboard — Network Pro™",
56
+ description:
57
+ "Privacy Dashboard | Security, Networking, Privacy — Network Pro™",
58
+ },
54
59
  // Excludes redirect-only routes like /contact, /consultation, /privacy-rights
55
60
  };
56
61
 
@@ -51,9 +51,9 @@ This file is part of Network Pro.
51
51
  { id: "third-party", text: "Third-Party Code and Licenses" },
52
52
  { id: "prohibited-uses", text: "Prohibited Uses" },
53
53
  { id: "disclaimer", text: "Modifications and Liability Disclaimer" },
54
- { id: "contact", text: "Contact" },
55
- { id: "revisions", text: "Revisions" },
56
54
  { id: "authoritative", text: "Authoritative Version Clause" },
55
+ { id: "revisions", text: "Revisions" },
56
+ { id: "contact", text: "Contact" },
57
57
  ];
58
58
 
59
59
  /**
@@ -62,7 +62,7 @@ This file is part of Network Pro.
62
62
  */
63
63
  const constants = {
64
64
  company: "Network Pro Strategies",
65
- effectiveDate: "May 24, 2025",
65
+ effectiveDate: "May 28, 2025",
66
66
  classSmall: "small-text",
67
67
  rel: "noopener noreferrer",
68
68
  hrefTop: "#top",
@@ -472,20 +472,6 @@ This file is part of Network Pro.
472
472
  —including, without limitation, any claims or disputes brought by third parties,
473
473
  whether in contract, tort, or otherwise.
474
474
  </p>
475
- {:else if link.id === "contact"}
476
- <p>
477
- The Company can be contacted via our
478
- <a rel={constants.rel} href={contactLink} target={constants.targetBlank}
479
- >contact form</a>
480
- or by email at:<br />
481
- 📧 <code>contact (at) s.neteng.pro</code>
482
- </p>
483
- {:else if link.id === "revisions"}
484
- <p>
485
- This legal page may be updated to comply with legal or operational
486
- changes. The current effective date is listed at the top of this
487
- document.
488
- </p>
489
475
  {:else if link.id === "authoritative"}
490
476
  <p>
491
477
  In the event of any discrepancy between different versions, formats, or
@@ -504,6 +490,20 @@ This file is part of Network Pro.
504
490
  of the Company's materials, services, or Licensed Material constitutes
505
491
  acceptance of the most current version then in effect.
506
492
  </p>
493
+ {:else if link.id === "revisions"}
494
+ <p>
495
+ This legal page may be updated to comply with legal or operational
496
+ changes. The current effective date is listed at the top of this
497
+ document.
498
+ </p>
499
+ {:else if link.id === "contact"}
500
+ <p>
501
+ The Company can be contacted via our
502
+ <a rel={constants.rel} href={contactLink} target={constants.targetBlank}
503
+ >contact form</a>
504
+ or by email at:<br />
505
+ 📧 <code>contact (at) s.neteng.pro</code>
506
+ </p>
507
507
  {/if}
508
508
 
509
509
  <span class={constants.classSmall}>
@@ -6,10 +6,17 @@ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
6
  This file is part of Network Pro.
7
7
  ========================================================================== -->
8
8
 
9
- <!-- cspell:ignore prights -->
9
+ <!-- cspell:ignore prights prefs pdash -->
10
10
 
11
11
  <script>
12
12
  import { base } from "$app/paths";
13
+ import { onMount } from "svelte";
14
+ import { getTrackingPreferences } from "$lib/utils/trackingStatus.js";
15
+ /** @type {(type: 'enable' | 'disable') => void} */
16
+ import {
17
+ setTrackingPreference,
18
+ clearTrackingPreferences,
19
+ } from "$lib/utils/trackingCookies.js";
13
20
 
14
21
  // Log the base path to verify its value
15
22
  //console.log("Base path:", base);
@@ -17,16 +24,20 @@ This file is part of Network Pro.
17
24
  /**
18
25
  * URL to the Privacy Rights Request Form redirect route, using the base path
19
26
  * URL to the Contact Form redirect route, using the base path
27
+ * URL to the Privacy Dashboard using the base path
20
28
  * @type {string}
21
29
  */
22
30
  const prightsLink = `${base}/privacy-rights`;
23
31
  const contactLink = `${base}/contact`;
32
+ const pdashLink = `${base}/privacy-dashboard`;
24
33
 
25
34
  /**
26
35
  * URL to the privacy policy in Markdown format
36
+ * External URL to the GPC website
27
37
  * @type {string}
28
38
  */
29
39
  const privacyLink = "https://docs.netwk.pro/privacy";
40
+ const gpcLink = "https://globalprivacycontrol.org/";
30
41
 
31
42
  /**
32
43
  * Table of Contents Links
@@ -56,7 +67,7 @@ This file is part of Network Pro.
56
67
  email: "support (at) neteng.pro",
57
68
  secure: "contact (at) s.neteng.pro",
58
69
  phone: "(623) 252-4350",
59
- effectiveDate: "May 23, 2025",
70
+ effectiveDate: "May 28, 2025",
60
71
  };
61
72
 
62
73
  /**
@@ -78,6 +89,48 @@ This file is part of Network Pro.
78
89
  targetSelf: "_self",
79
90
  targetBlank: "_blank",
80
91
  };
92
+
93
+ let optedOut = false;
94
+ let optedIn = false;
95
+ let trackingStatus = "";
96
+
97
+ onMount(() => {
98
+ const prefs = getTrackingPreferences();
99
+ optedOut = prefs.optedOut;
100
+ optedIn = prefs.optedIn;
101
+ trackingStatus = prefs.status;
102
+ console.log("[Tracking] Status:", trackingStatus);
103
+ });
104
+
105
+ /**
106
+ * Toggle tracking opt-out.
107
+ * @param {boolean} value
108
+ */
109
+ function toggleTracking(value) {
110
+ optedOut = value;
111
+ if (optedOut) {
112
+ console.log("[Tracking] User opted out");
113
+ setTrackingPreference("disable");
114
+ } else {
115
+ console.log("[Tracking] User cleared opt-out");
116
+ clearTrackingPreferences();
117
+ }
118
+ }
119
+
120
+ /**
121
+ * Toggle tracking opt-in.
122
+ * @param {boolean} value
123
+ */
124
+ function toggleOptIn(value) {
125
+ optedIn = value;
126
+ if (optedIn) {
127
+ console.log("[Tracking] User opted in");
128
+ setTrackingPreference("enable");
129
+ } else {
130
+ console.log("[Tracking] User cleared opt-in");
131
+ clearTrackingPreferences();
132
+ }
133
+ }
81
134
  </script>
82
135
 
83
136
  <!-- BEGIN TITLE -->
@@ -181,10 +234,66 @@ This file is part of Network Pro.
181
234
  <p>
182
235
  We configure PostHog to prioritize user privacy. <strong
183
236
  >Analytics tracking is automatically disabled when a user's browser
184
- sends a “Do Not Track” (DNT) or “Global Privacy Control” (GPC /
185
- Sec-GPC) signal.</strong> No further action is required—your browser settings
186
- are honored by default.
237
+ sends a “Do Not Track” (DNT) or <a
238
+ rel={constants.rel}
239
+ href={gpcLink}
240
+ target={constants.targetBlank}
241
+ >“Global Privacy Control” (GPC / Sec-GPC)</a> signal.</strong> No further
242
+ action is required—your browser settings are honored by default.
243
+ </p>
244
+ <p>
245
+ You can view your current tracking status below, along with manual
246
+ opt-out and opt-in settings stored as browser cookies. These settings
247
+ override any Do Not Track (DNT) or Global Privacy Control (GPC) signals. <strong
248
+ >If you opt out, analytics tracking via PostHog is disabled entirely
249
+ until you change your preference.</strong> Your selection will persist
250
+ until manually updated.
187
251
  </p>
252
+ <p class="emphasis">
253
+ For convenient access, you can manage these settings through our <a
254
+ href={pdashLink}
255
+ target={constants.targetSelf}>Privacy Dashboard</a
256
+ >.
257
+ </p>
258
+
259
+ <div class="spacer"></div>
260
+
261
+ <h3>Tracking Preferences</h3>
262
+ <p id="tracking-status" aria-live="polite">
263
+ <strong>Tracking Status:</strong>
264
+ {trackingStatus}
265
+ </p>
266
+
267
+ <!-- Opt-out checkbox -->
268
+ <label>
269
+ <input
270
+ type="checkbox"
271
+ checked={optedOut}
272
+ disabled={optedIn}
273
+ aria-describedby="tracking-status"
274
+ on:change={(e) =>
275
+ toggleTracking(
276
+ /** @type {HTMLInputElement} */ (e.target).checked,
277
+ )} />
278
+ <strong>&nbsp;Disable analytics tracking (opt-out)</strong>
279
+ </label>
280
+
281
+ <br />
282
+
283
+ <!-- Opt-in checkbox -->
284
+ <label>
285
+ <input
286
+ type="checkbox"
287
+ checked={optedIn}
288
+ disabled={optedOut}
289
+ aria-describedby="tracking-status"
290
+ on:change={(e) =>
291
+ toggleOptIn(/** @type {HTMLInputElement} */ (e.target).checked)} />
292
+ <strong>&nbsp;Enable analytics tracking (opt-in)</strong>
293
+ </label>
294
+
295
+ <div class="spacer"></div>
296
+
188
297
  <p>
189
298
  PostHog Cloud is a third-party service, but we deploy it in a
190
299
  privacy-conscious manner that avoids intrusive profiling and aligns with
@@ -245,7 +354,8 @@ This file is part of Network Pro.
245
354
  information.
246
355
  </p>
247
356
  {:else if link.id === "rights"}
248
- <p><strong>Your Rights and Choices</strong></p>
357
+ <h3>Your Rights and Choices</h3>
358
+ <p> Under applicable state and federal law, you may have rights to: </p>
249
359
  <ul>
250
360
  <li
251
361
  ><strong>Access, update, or delete</strong> your personal information,