This commit is contained in:
Christian Beutel
2024-06-16 01:03:02 +02:00
parent aecb21aab3
commit 018545bbcd
10 changed files with 47 additions and 22 deletions

View File

@@ -1,3 +1,11 @@
# v0.7.1
## Features
- A warning is now displayed if the ORIGIN environment variable is misconfigured
## Bug fixes
- Fixes login for http connections
- Trails are now properly sorted across all pages
# v0.7.0 # v0.7.0
## Features ## Features
- Trail sort and sort direction are now remembered through a page reload - Trail sort and sort direction are now remembered through a page reload

View File

@@ -1,12 +1,12 @@
{ {
"name": "docs", "name": "docs",
"version": "0.7.0", "version": "0.7.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "docs", "name": "docs",
"version": "0.7.0", "version": "0.7.1",
"dependencies": { "dependencies": {
"@astrojs/check": "^0.7.0", "@astrojs/check": "^0.7.0",
"@astrojs/node": "^8.2.6", "@astrojs/node": "^8.2.6",

View File

@@ -1,7 +1,7 @@
{ {
"name": "docs", "name": "docs",
"type": "module", "type": "module",
"version": "0.7.0", "version": "0.7.1",
"scripts": { "scripts": {
"dev": "astro dev", "dev": "astro dev",
"start": "astro dev", "start": "astro dev",

View File

@@ -111,7 +111,7 @@ const isNotHomepage = Astro.props.slug !== "";
class="fill-primary dark:fill-white" class="fill-primary dark:fill-white"
font-size="0.75rem" font-size="0.75rem"
> >
v0.7.0 v0.7.1
</text> </text>
</svg> </svg>
</div> </div>

View File

@@ -3,6 +3,14 @@ title: Changelog
description: What changed in the last patch? description: What changed in the last patch?
--- ---
## v0.7.1
### Features
- A warning is now displayed if the ORIGIN environment variable is misconfigured
### Bug fixes
- Fixes login for http connections
- Trails are now properly sorted across all pages
## v0.7.0 ## v0.7.0
### Features ### Features
- Trail sort and sort direction are now remembered through a page reload - Trail sort and sort direction are now remembered through a page reload

4
web/package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "wanderer", "name": "wanderer",
"version": "0.7.0", "version": "0.7.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "wanderer", "name": "wanderer",
"version": "0.7.0", "version": "0.7.1",
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^6.5.1", "@fortawesome/fontawesome-free": "^6.5.1",
"@sveltejs/adapter-node": "^4.0.1", "@sveltejs/adapter-node": "^4.0.1",

View File

@@ -1,6 +1,6 @@
{ {
"name": "wanderer", "name": "wanderer",
"version": "0.7.0", "version": "0.7.1",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite dev", "dev": "vite dev",

View File

@@ -95,5 +95,5 @@
d="M43.857 43.3045C44.0569 43.0652 44.4246 43.0652 44.6245 43.3045L46.6259 45.7008C46.8978 46.0263 46.6663 46.5213 46.2421 46.5213H42.2394C41.8152 46.5213 41.5837 46.0263 41.8556 45.7008L43.857 43.3045Z" d="M43.857 43.3045C44.0569 43.0652 44.4246 43.0652 44.6245 43.3045L46.6259 45.7008C46.8978 46.0263 46.6663 46.5213 46.2421 46.5213H42.2394C41.8152 46.5213 41.5837 46.0263 41.8556 45.7008L43.857 43.3045Z"
fill="#242734" fill="#242734"
/> />
<text x="178" y="64" fill="white" font-size="0.75rem">v0.7.0</text> <text x="178" y="64" fill="white" font-size="0.75rem">v0.7.1</text>
</svg> </svg>

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -3,10 +3,6 @@ import '$lib/i18n';
import type { LayoutServerLoad } from './$types'; import type { LayoutServerLoad } from './$types';
import { env } from "$env/dynamic/private"; import { env } from "$env/dynamic/private";
export const load: LayoutServerLoad = async ({ locals, url }) => { export const load: LayoutServerLoad = async ({ locals, url }) => {
const warnings = [] return { settings: locals.settings, origin: env.ORIGIN }
if (env.ORIGIN != url.origin) {
warnings.push(`You are accessing wanderer from <span class="font-mono bg-gray-100">${url.origin}</span> but your ORIGIN environment variable is set to <span class="font-mono bg-gray-100">${env.ORIGIN}</span>. This may cause errors.`)
}
return { settings: locals.settings, warnings: warnings }
} }

View File

@@ -1,5 +1,7 @@
<script lang="ts"> <script lang="ts">
import { browser } from "$app/environment";
import { beforeNavigate, goto } from "$app/navigation"; import { beforeNavigate, goto } from "$app/navigation";
import { page } from "$app/stores";
import { env } from "$env/dynamic/public"; import { env } from "$env/dynamic/public";
import Toast from "$lib/components/base/toast.svelte"; import Toast from "$lib/components/base/toast.svelte";
import Footer from "$lib/components/footer.svelte"; import Footer from "$lib/components/footer.svelte";
@@ -11,10 +13,8 @@
import "../css/app.css"; import "../css/app.css";
import "../css/components.css"; import "../css/components.css";
import "../css/theme.css"; import "../css/theme.css";
import { page } from "$app/stores";
import { onMount } from "svelte"; import { onMount } from "svelte";
beforeNavigate((n) => { beforeNavigate((n) => {
if (!$currentUser && isRouteProtected(n.to?.url?.pathname ?? "")) { if (!$currentUser && isRouteProtected(n.to?.url?.pathname ?? "")) {
n.cancel(); n.cancel();
@@ -22,13 +22,19 @@
} }
}); });
onMount(() => {
if ($page.data.origin != location.origin) {
showWarning = true;
}
});
let hideDemoHint = false; let hideDemoHint = false;
let hideWarning = false; let showWarning = false;
</script> </script>
{#if env.PUBLIC_IS_DEMO === "true" && !hideDemoHint} {#if env.PUBLIC_IS_DEMO === "true" && !hideDemoHint}
<div <div
class="flex items-center justify-between bg-amber-200 text-center p-4 text-sm" class="flex items-center justify-between bg-amber-200 text-center p-4 text-sm text-black"
out:slide out:slide
> >
<div></div> <div></div>
@@ -42,14 +48,21 @@
</div> </div>
{/if} {/if}
{#if $page.data.warnings?.length && !hideWarning} {#if showWarning}
<div <div
class="flex items-center justify-between bg-red-200 text-center p-4 text-sm" class="flex items-center justify-between bg-red-200 text-center p-4 text-sm text-black"
out:slide out:slide
> >
<div></div> <div></div>
<span>{@html $page.data.warnings[0]} </span> <p>
<button class="btn-icon self-end" on:click={() => (hideWarning = true)} You are accessing wanderer from <span class="font-mono bg-gray-100"
>{location.origin}</span
>
but your ORIGIN environment variable is set to
<span class="font-mono bg-gray-100">{$page.data.origin}</span>. This
may cause errors.
</p>
<button class="btn-icon self-end" on:click={() => (showWarning = false)}
><i class="fa fa-close"></i></button ><i class="fa fa-close"></i></button
> >
</div> </div>