re-add privacy statement

Re-Added privacy statement and ported it over to jones' new system
This commit is contained in:
StroepWafel
2025-11-29 16:51:59 +10:30
parent 60ce18280e
commit fd86e57442
5 changed files with 174 additions and 18 deletions
+32 -17
View File
@@ -55,6 +55,11 @@
closeExtensionPopup(); closeExtensionPopup();
}; };
const openPrivacyStatement = () => {
window.open("https://betterseqta.org/privacy", "_blank");
closeExtensionPopup();
};
let { standalone } = $props<{ standalone?: boolean }>(); let { standalone } = $props<{ standalone?: boolean }>();
let showColourPicker = $state<boolean>(false); let showColourPicker = $state<boolean>(false);
@@ -101,25 +106,34 @@
/> />
{#if !standalone} {#if !standalone}
<button <div class="absolute top-1 right-1 flex items-center gap-2">
onclick={openAbout} <button
class="absolute top-1 right-[63px] w-8 h-8 text-lg rounded-xl font-IconFamily bg-zinc-100 dark:bg-zinc-700" onclick={openAbout}
> class="w-8 h-8 text-lg rounded-xl font-IconFamily bg-zinc-100 dark:bg-zinc-700 flex items-center justify-center"
{"\ueb73"} >
</button> {"\ueb73"}
</button>
<button <button
onclick={openChangelog} onclick={openPrivacyStatement}
class="absolute top-1 right-10 w-8 h-8 text-lg rounded-xl font-IconFamily bg-zinc-100 dark:bg-zinc-700" class="w-8 h-8 text-lg rounded-xl font-IconFamily bg-zinc-100 dark:bg-zinc-700 flex items-center justify-center"
> aria-label="Privacy Statement"
{"\ue929"} >
</button> {"\uecba"}
</button>
<button <button
onclick={openMinecraftServer} onclick={openChangelog}
class="absolute top-1 right-1 w-8 h-8 bg-zinc-100 dark:bg-zinc-700 rounded-xl p-1" class="w-8 h-8 text-lg rounded-xl font-IconFamily bg-zinc-100 dark:bg-zinc-700 flex items-center justify-center"
aria-label="Open Minecraft Server" >
> {"\ue929"}
</button>
<button
onclick={openMinecraftServer}
class="w-8 h-8 bg-zinc-100 dark:bg-zinc-700 rounded-xl p-1 flex items-center justify-center"
aria-label="Open Minecraft Server"
>
<svg <svg
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 64 70" viewBox="0 0 64 70"
@@ -248,6 +262,7 @@
/> />
</svg> </svg>
</button> </button>
</div>
{/if} {/if}
</div> </div>
+8 -1
View File
@@ -24,6 +24,7 @@ import loading from "@/seqta/ui/Loading";
import { SendNewsPage } from "@/seqta/utils/SendNewsPage"; import { SendNewsPage } from "@/seqta/utils/SendNewsPage";
import { loadHomePage } from "@/seqta/utils/Loaders/LoadHomePage"; import { loadHomePage } from "@/seqta/utils/Loaders/LoadHomePage";
import { OpenWhatsNewPopup } from "@/seqta/utils/Openers/OpenWhatsNewPopup"; import { OpenWhatsNewPopup } from "@/seqta/utils/Openers/OpenWhatsNewPopup";
import { showPrivacyNotification } from "@/seqta/utils/Openers/OpenPrivacyNotification";
import { updateTimetableTimes } from "@/seqta/utils/updateTimetableTimes"; import { updateTimetableTimes } from "@/seqta/utils/updateTimetableTimes";
@@ -93,7 +94,13 @@ export async function finishLoad() {
console.error("Error during loading cleanup:", err); console.error("Error during loading cleanup:", err);
} }
if (settingsState.justupdated && !document.getElementById("whatsnewbk")) { // Show privacy statement notification on first open of this version (before what's new)
if (!settingsState.privacyStatementShown && !document.getElementById("whatsnewbk")) {
showPrivacyNotification();
settingsState.privacyStatementShown = true;
}
if (settingsState.justupdated && !document.getElementById("whatsnewbk") && !document.getElementById("privacy-notification")) {
OpenWhatsNewPopup(); OpenWhatsNewPopup();
} }
} }
@@ -0,0 +1,85 @@
import stringToHTML from "../stringToHTML";
import { settingsState } from "../listeners/SettingsState";
import { animate } from "motion";
import { OpenWhatsNewPopup } from "./OpenWhatsNewPopup";
export function showPrivacyNotification() {
if (document.getElementById("privacy-notification")) return;
const popupBackground = document.createElement("div");
popupBackground.id = "privacy-notification";
popupBackground.classList.add("whatsnewBackground");
popupBackground.style.zIndex = "10000001";
const container = document.createElement("div");
container.classList.add("whatsnewContainer");
container.style.height = "auto";
container.style.maxWidth = "800px";
container.style.width = "90%";
const header = stringToHTML(
/* html */
`<div class="whatsnewHeader">
<h1>Privacy Statement</h1>
<p>Important Information</p>
</div>`,
).firstChild as HTMLElement;
const text = stringToHTML(/* html */ `
<div class="whatsnewTextContainer" style="overflow-y: auto; font-size: 1.3rem; line-height: 1.6;">
<p>
It has come to our attention that several schools have expressed concerns about BetterSEQTA+. This is very disheartening, so we have decided to release a statement on the situation.
</p>
<p>
To view our privacy policy, please click the <strong>shield icon</strong> in the settings&nbsp;menu, or<a href="https://betterseqta.org/privacy" target="_blank" rel="noopener noreferrer" id="privacy-link" style="color: inherit; text-decoration: underline; cursor: pointer; white-space: nowrap;">&nbsp;click here</a>.
</p>
<p style="font-weight: bold; margin-top: 15px;">
We never collect any information from you, and aim to provide the best features possible.
</p>
</div>
`).firstChild as HTMLElement;
if (header) container.append(header);
container.append(text);
const closeButton = document.createElement("div");
closeButton.id = "whatsnewclosebutton";
container.append(closeButton);
popupBackground.append(container);
document.getElementById("container")?.append(popupBackground);
if (settingsState.animations) {
animate([popupBackground as HTMLElement], { opacity: [0, 1] });
}
popupBackground.addEventListener("click", (event) => {
if (event.target === popupBackground) {
popupBackground.remove();
// Show what's new if it was waiting
if (settingsState.justupdated && !document.getElementById("whatsnewbk")) {
OpenWhatsNewPopup();
}
}
});
closeButton.addEventListener("click", () => {
popupBackground.remove();
// Show what's new if it was waiting
if (settingsState.justupdated && !document.getElementById("whatsnewbk")) {
OpenWhatsNewPopup();
}
});
// Handle privacy link click - ensure it opens in new tab
setTimeout(() => {
const privacyLink = document.getElementById("privacy-link");
if (privacyLink) {
privacyLink.addEventListener("click", (e) => {
e.preventDefault();
window.open("https://betterseqta.org/privacy", "_blank", "noopener,noreferrer");
});
}
}, 100);
}
@@ -0,0 +1,48 @@
import stringToHTML from "../stringToHTML";
import { openPopup } from "./PopupManager";
export function OpenPrivacyStatement() {
const header = stringToHTML(
/* html */
`<div class="whatsnewHeader">
<h1>Privacy Statement</h1>
<p>Our commitment to your privacy</p>
</div>`,
).firstChild as HTMLElement;
const text = stringToHTML(/* html */ `
<div class="whatsnewTextContainer" style="overflow-y: auto; max-height: 60vh;">
<h2 style="margin-top: 0;">Privacy Policy</h2>
<p>At BetterSEQTA+, we take your privacy seriously. We want to be completely transparent about how we handle your data.</p>
<h3>Data Collection</h3>
<p><strong>We never collect any information from you.</strong> BetterSEQTA+ is designed to work entirely on your device. All processing happens locally in your browser, and we do not send any data to external servers.</p>
<h3>What We Don't Do</h3>
<ul style="text-align: left; margin: 10px 0;">
<li>We do not track your browsing activity</li>
<li>We do not collect personal information</li>
<li>We do not store your SEQTA credentials</li>
<li>We do not send data to third-party services</li>
<li>We do not use analytics or tracking cookies</li>
</ul>
<h3>Local Storage</h3>
<p>BetterSEQTA+ uses your browser's local storage to save your preferences and settings. This data remains on your device and is never transmitted anywhere. You can clear this data at any time through your browser's settings.</p>
<h3>Open Source</h3>
<p>BetterSEQTA+ is an open-source project. You can review our code on <a href="https://github.com/BetterSEQTA/BetterSEQTA-Plus" target="_blank" style="color: inherit; text-decoration: underline;">GitHub</a> to verify our privacy practices. We believe in transparency and encourage you to inspect the code yourself.</p>
<h3>Our Commitment</h3>
<p>We are committed to providing the best features possible while respecting your privacy. We understand that schools and students have concerns about data privacy, and we want to assure you that BetterSEQTA+ is designed with privacy as a core principle.</p>
<p style="margin-top: 20px; font-weight: bold;">If you have any questions or concerns about our privacy practices, please reach out to us through our <a href="https://github.com/BetterSEQTA/BetterSEQTA-Plus" target="_blank" style="color: inherit; text-decoration: underline;">GitHub repository</a>.</p>
</div>
`).firstChild as HTMLElement;
openPopup({
header,
content: [text],
});
}
+1
View File
@@ -30,6 +30,7 @@ export interface SettingsState {
subjectfilters: Record<string, any>; subjectfilters: Record<string, any>;
transparencyEffects: boolean; transparencyEffects: boolean;
justupdated?: boolean; justupdated?: boolean;
privacyStatementShown?: boolean;
timeFormat?: string; timeFormat?: string;
animations: boolean; animations: boolean;
defaultPage: string; defaultPage: string;