diff --git a/frontend/src/lib/store.ts b/frontend/src/lib/store.ts index 99a94d8..cac34b8 100644 --- a/frontend/src/lib/store.ts +++ b/frontend/src/lib/store.ts @@ -12,3 +12,5 @@ const initialThemeValue = browser : defaultThemeValue; export const themeStore = writable(initialThemeValue); + +export const CURRENT_CHANGELOG = "0.4.0"; diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 32c55d3..11861e5 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -49,6 +49,7 @@ >) {/if} · About & contact · + Changelog · Donate · diff --git a/frontend/src/routes/nav/Navigation.svelte b/frontend/src/routes/nav/Navigation.svelte index ef1e992..b2f43b1 100644 --- a/frontend/src/routes/nav/Navigation.svelte +++ b/frontend/src/routes/nav/Navigation.svelte @@ -16,7 +16,7 @@ } from "sveltestrap"; import Logo from "./Logo.svelte"; - import { userStore, themeStore } from "$lib/store"; + import { userStore, themeStore, CURRENT_CHANGELOG } from "$lib/store"; import { ErrorCode, type APIError, @@ -36,11 +36,14 @@ let isAdmin = false; let numReports = 0; let numWarnings = 0; + let changelogRead = "99.99.99"; $: currentUser = $userStore; $: theme = $themeStore; onMount(() => { + changelogRead = localStorage.getItem("changelog-read") || "0.0.0"; + const localUser = localStorage.getItem("pronouns-user"); userStore.set(localUser ? JSON.parse(localUser) : null); @@ -146,6 +149,13 @@ {/if} + {#if changelogRead < CURRENT_CHANGELOG} + + + Changelog v{CURRENT_CHANGELOG} + + + {/if} {:else} Log in diff --git a/frontend/src/routes/page/changelog/+page.svelte b/frontend/src/routes/page/changelog/+page.svelte new file mode 100644 index 0000000..51cc848 --- /dev/null +++ b/frontend/src/routes/page/changelog/+page.svelte @@ -0,0 +1,25 @@ + + + + Changelog - pronouns.cc + + + + +
+
+
+
+ {@html html} +
+
+
+
diff --git a/frontend/src/routes/page/changelog/+page.ts b/frontend/src/routes/page/changelog/+page.ts new file mode 100644 index 0000000..e69de29 diff --git a/frontend/src/routes/page/changelog/changelog.md b/frontend/src/routes/page/changelog/changelog.md new file mode 100644 index 0000000..bca87ce --- /dev/null +++ b/frontend/src/routes/page/changelog/changelog.md @@ -0,0 +1,17 @@ +# Changelog + +## 0.4.0 - April 20th 2023 + +- **Added custom preferences!** + These can be used instead of, or in addition to, the existing five preferences + and can use any icon in [Bootstrap Icons](https://icons.getbootstrap.com/). + Change them in your [profile settings](/edit/profile). +- Added the ability to sign in with Tumblr and Google accounts, + in addition to Discord and Mastodon. +- Added this changelog. +- Added a donation link to the footer, and a message on the settings page. Sadly, running a website like this costs money :( + +--- + +- The website will now correctly handle tokens expiring, so you don't get stuck in an infinite loop as soon as they expire anymore. +- Fixed pronoun links, pronouns with special characters will link to the correct page now.