bug fixes
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
},
|
||||
});
|
||||
case NotificationType.trailCreate:
|
||||
return $_("notification-new-trail", {
|
||||
return $_("notification-trail-create", {
|
||||
values: { user: n.expand.author.username },
|
||||
});
|
||||
case NotificationType.trailShare:
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<div
|
||||
class="absolute -top-1 left-4 text-sm rounded-full bg-content text-content-inverse px-1 text-center"
|
||||
>
|
||||
{unreadCount}
|
||||
{unreadCount}{unreadCount >= 10 ? "+" : ""}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="dropdown-toggle">
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
"notification-list-create": "",
|
||||
"notification-list-share": "",
|
||||
"notification-new-follower": "",
|
||||
"notification-new-trail": "",
|
||||
"notification-trail-comment": "",
|
||||
"notification-trail-create": "",
|
||||
"notification-trail-share": "",
|
||||
"notifications": "",
|
||||
"off": "Aus",
|
||||
@@ -245,6 +245,7 @@
|
||||
"show-on-map": "Auf der Karte anzeigen",
|
||||
"slogan": "Speichere deine Abenteuer!",
|
||||
"slope": "Steigung",
|
||||
"someone": "",
|
||||
"sort": "Sortieren",
|
||||
"speed": "Geschwindigkeit",
|
||||
"statistics": "Statistiken",
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
"notification-list-create": "{user} created a new list",
|
||||
"notification-list-share": "{user} shared a list with you",
|
||||
"notification-new-follower": "You have a new follower",
|
||||
"notification-new-trail": "{user} created a new trail",
|
||||
"notification-trail-comment": "{user} left a comment on your trail \"{trail}\"",
|
||||
"notification-trail-create": "{user} created a new trail",
|
||||
"notification-trail-share": "{user} shared a trail with you",
|
||||
"notifications": "Notifications",
|
||||
"off": "Off",
|
||||
@@ -245,6 +245,7 @@
|
||||
"show-on-map": "Show on map",
|
||||
"slogan": "Save your adventures!",
|
||||
"slope": "Slope",
|
||||
"someone": "Someone",
|
||||
"sort": "Sort",
|
||||
"speed": "Speed",
|
||||
"statistics": "Statistics",
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
"notification-list-create": "",
|
||||
"notification-list-share": "",
|
||||
"notification-new-follower": "",
|
||||
"notification-new-trail": "",
|
||||
"notification-trail-comment": "",
|
||||
"notification-trail-create": "",
|
||||
"notification-trail-share": "",
|
||||
"notifications": "",
|
||||
"off": "",
|
||||
@@ -245,6 +245,7 @@
|
||||
"show-on-map": "Voir sur la carte",
|
||||
"slogan": "Sauvegarder vos aventures !",
|
||||
"slope": "",
|
||||
"someone": "",
|
||||
"sort": "Trier",
|
||||
"speed": "",
|
||||
"statistics": "",
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
"notification-list-create": "",
|
||||
"notification-list-share": "",
|
||||
"notification-new-follower": "",
|
||||
"notification-new-trail": "",
|
||||
"notification-trail-comment": "",
|
||||
"notification-trail-create": "",
|
||||
"notification-trail-share": "",
|
||||
"notifications": "",
|
||||
"off": "",
|
||||
@@ -245,6 +245,7 @@
|
||||
"show-on-map": "Mutatás térképen",
|
||||
"slogan": "Mentse el a kalandjait!",
|
||||
"slope": "",
|
||||
"someone": "",
|
||||
"sort": "Rendezés",
|
||||
"speed": "",
|
||||
"statistics": "",
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
"notification-list-create": "",
|
||||
"notification-list-share": "",
|
||||
"notification-new-follower": "",
|
||||
"notification-new-trail": "",
|
||||
"notification-trail-comment": "",
|
||||
"notification-trail-create": "",
|
||||
"notification-trail-share": "",
|
||||
"notifications": "",
|
||||
"off": "Spento",
|
||||
@@ -245,6 +245,7 @@
|
||||
"show-on-map": "Mostra sulla mappa",
|
||||
"slogan": "Salva le tue avventure!",
|
||||
"slope": "Pendenza",
|
||||
"someone": "",
|
||||
"sort": "Ordina",
|
||||
"speed": "Velocità",
|
||||
"statistics": "",
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
"notification-list-create": "",
|
||||
"notification-list-share": "",
|
||||
"notification-new-follower": "",
|
||||
"notification-new-trail": "",
|
||||
"notification-trail-comment": "",
|
||||
"notification-trail-create": "",
|
||||
"notification-trail-share": "",
|
||||
"notifications": "",
|
||||
"off": "",
|
||||
@@ -245,6 +245,7 @@
|
||||
"show-on-map": "Tonen op kaart",
|
||||
"slogan": "Bewaar je avonturen!",
|
||||
"slope": "",
|
||||
"someone": "",
|
||||
"sort": "Sorteren",
|
||||
"speed": "",
|
||||
"statistics": "",
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
"notification-list-create": "",
|
||||
"notification-list-share": "",
|
||||
"notification-new-follower": "",
|
||||
"notification-new-trail": "",
|
||||
"notification-trail-comment": "",
|
||||
"notification-trail-create": "",
|
||||
"notification-trail-share": "",
|
||||
"notifications": "",
|
||||
"off": "",
|
||||
@@ -245,6 +245,7 @@
|
||||
"show-on-map": "Pokaż na mapie",
|
||||
"slogan": "Zapisz swoją wyprawę!",
|
||||
"slope": "",
|
||||
"someone": "",
|
||||
"sort": "Sortowanie",
|
||||
"speed": "",
|
||||
"statistics": "",
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
"notification-list-create": "",
|
||||
"notification-list-share": "",
|
||||
"notification-new-follower": "",
|
||||
"notification-new-trail": "",
|
||||
"notification-trail-comment": "",
|
||||
"notification-trail-create": "",
|
||||
"notification-trail-share": "",
|
||||
"notifications": "",
|
||||
"off": "",
|
||||
@@ -245,6 +245,7 @@
|
||||
"show-on-map": "Mostrar no mapa",
|
||||
"slogan": "Guarde as suas aventuras!",
|
||||
"slope": "",
|
||||
"someone": "",
|
||||
"sort": "Ordenar",
|
||||
"speed": "",
|
||||
"statistics": "",
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
"notification-list-create": "",
|
||||
"notification-list-share": "",
|
||||
"notification-new-follower": "",
|
||||
"notification-new-trail": "",
|
||||
"notification-trail-comment": "",
|
||||
"notification-trail-create": "",
|
||||
"notification-trail-share": "",
|
||||
"notifications": "",
|
||||
"off": "",
|
||||
@@ -245,6 +245,7 @@
|
||||
"show-on-map": "地图中展示",
|
||||
"slogan": "保存你的冒险!",
|
||||
"slope": "",
|
||||
"someone": "",
|
||||
"sort": "排序",
|
||||
"speed": "",
|
||||
"statistics": "",
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
<script>
|
||||
import { page } from "$app/stores";
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{$page.status} | wanderer</title>
|
||||
</svelte:head>
|
||||
<div
|
||||
class="flex flex-col gap-y-4 items-center justify-center relative"
|
||||
style="height: calc(100dvh - 120px); font-size: 4rem"
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
|
||||
let loading: boolean = false;
|
||||
|
||||
const key: "follower" | "followee" =
|
||||
$page.params.type == "following" ? "followee" : "follower";
|
||||
$: key = ($page.params.type == "following" ? "followee" : "follower") as "follower" | "followee";
|
||||
|
||||
$: pagination = {
|
||||
page: data.follows.page,
|
||||
|
||||
@@ -35,27 +35,27 @@
|
||||
|
||||
const notificationItems: { text: string; key: NotificationType }[] = [
|
||||
{
|
||||
text: $_("notification-trail-comment"),
|
||||
text: $_("settings-notification-trail-comment"),
|
||||
key: NotificationType.trailComment,
|
||||
},
|
||||
{
|
||||
text: $_("notification-new-follower"),
|
||||
text: $_("settings-notification-new-follower"),
|
||||
key: NotificationType.newFollower,
|
||||
},
|
||||
{
|
||||
text: $_("notification-trail-create"),
|
||||
text: $_("settings-notification-trail-create"),
|
||||
key: NotificationType.trailCreate,
|
||||
},
|
||||
{
|
||||
text: $_("notification-trail-share"),
|
||||
text: $_("settings-notification-trail-share"),
|
||||
key: NotificationType.trailShare,
|
||||
},
|
||||
{
|
||||
text: $_("notification-list-create"),
|
||||
text: $_("settings-notification-list-create"),
|
||||
key: NotificationType.listCreate,
|
||||
},
|
||||
{
|
||||
text: $_("notification-list-share"),
|
||||
text: $_("settings-notification-list-share"),
|
||||
key: NotificationType.listShare,
|
||||
},
|
||||
];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { trails_show } from "$lib/stores/trail_store";
|
||||
import { APIError } from "$lib/util/api_util";
|
||||
import { error, type Load } from "@sveltejs/kit";
|
||||
import { error, type Load, type NumericRange } from "@sveltejs/kit";
|
||||
|
||||
export const load: Load = async ({ params, fetch }) => {
|
||||
try {
|
||||
@@ -8,9 +8,9 @@ export const load: Load = async ({ params, fetch }) => {
|
||||
|
||||
return { trail }
|
||||
} catch (e) {
|
||||
if (e instanceof APIError && e.status == 404) {
|
||||
error(404, {
|
||||
message: 'Not found'
|
||||
if (e instanceof APIError) {
|
||||
error(e.status as NumericRange<400, 599>, {
|
||||
message: e.status == 404 ? 'Not found' : e.message
|
||||
});
|
||||
}
|
||||
console.log(e);
|
||||
|
||||
Reference in New Issue
Block a user