fixes comment look and feel
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
<svg width="118" height="109" viewBox="0 0 118 109" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M79.4545 40.42C71.0745 40.42 62.5645 40.08 54.5945 37.86C46.7745 35.69 39.5945 31.48 33.1945 26.61C28.9945 23.44 25.1945 20.92 19.7445 21.3C14.4236 21.5788 9.33476 23.5674 5.2345 26.97C-1.6955 33.03 -0.645497 44.23 2.1245 52.11C6.2845 63.99 18.9445 72.23 29.7045 77.6C42.1345 83.81 55.7845 87.42 69.4845 89.5C81.4845 91.32 96.9045 92.64 107.295 84.81C116.855 77.61 119.474 61.16 117.134 50.06C116.568 46.7781 114.817 43.8179 112.215 41.74C105.505 36.83 95.5045 40.11 87.9645 40.27C85.1645 40.34 82.3145 40.4 79.4545 40.42Z" fill="#272933"/>
|
||||
<path d="M58.9645 108.95C79.2389 108.95 95.6745 107.925 95.6745 106.66C95.6745 105.395 79.2389 104.37 58.9645 104.37C38.6901 104.37 22.2545 105.395 22.2545 106.66C22.2545 107.925 38.6901 108.95 58.9645 108.95Z" fill="#272933"/>
|
||||
<path d="M111.444 26.29C111.986 26.29 112.424 25.8512 112.424 25.31C112.424 24.7687 111.986 24.33 111.444 24.33C110.903 24.33 110.464 24.7687 110.464 25.31C110.464 25.8512 110.903 26.29 111.444 26.29Z" fill="#4A5059"/>
|
||||
<path d="M69.1845 19.31C69.7257 19.31 70.1645 18.8712 70.1645 18.33C70.1645 17.7887 69.7257 17.35 69.1845 17.35C68.6432 17.35 68.2045 17.7887 68.2045 18.33C68.2045 18.8712 68.6432 19.31 69.1845 19.31Z" fill="#4A5059"/>
|
||||
<path d="M30.0345 82.85V87.16" stroke="#4A5059" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M27.8845 85H32.1845" stroke="#4A5059" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.2645 1V5.31" stroke="#4A5059" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12.1145 3.15002H16.4145" stroke="#4A5059" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M92.2145 23.16V27.46" stroke="#4A5059" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M90.0646 25.3101H94.3746" stroke="#4A5059" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M53.2945 80.73C57.9142 87.1887 64.9062 91.5523 72.7378 92.8644C80.5695 94.1766 88.6019 92.3302 95.0745 87.73C95.8763 87.1648 96.6474 86.5572 97.3845 85.91L109.314 89.5L104.744 76.14C107.026 71.3647 108.003 66.0709 107.578 60.7958C107.152 55.5207 105.338 50.4521 102.321 46.1043C99.3039 41.7565 95.1902 38.2842 90.3975 36.0398C85.6047 33.7954 80.3036 32.8588 75.0319 33.325C69.7603 33.7912 64.7058 35.6436 60.3813 38.6943C56.0569 41.745 52.6164 45.8853 50.409 50.6952C48.2016 55.5051 47.3058 60.8133 47.8126 66.0811C48.3193 71.349 50.2106 76.3891 53.2945 80.69V80.73Z" fill="#2D333E" stroke="#4A5059" stroke-miterlimit="10"/>
|
||||
<path d="M88.0645 65.31C89.158 65.31 90.0445 64.4235 90.0445 63.33C90.0445 62.2365 89.158 61.35 88.0645 61.35C86.971 61.35 86.0845 62.2365 86.0845 63.33C86.0845 64.4235 86.971 65.31 88.0645 65.31Z" fill="#4A5059"/>
|
||||
<path d="M78.5145 65.31C79.6081 65.31 80.4946 64.4235 80.4946 63.33C80.4946 62.2365 79.6081 61.35 78.5145 61.35C77.421 61.35 76.5345 62.2365 76.5345 63.33C76.5345 64.4235 77.421 65.31 78.5145 65.31Z" fill="#4A5059"/>
|
||||
<path d="M68.9745 65.31C70.068 65.31 70.9545 64.4235 70.9545 63.33C70.9545 62.2365 70.068 61.35 68.9745 61.35C67.881 61.35 66.9945 62.2365 66.9945 63.33C66.9945 64.4235 67.881 65.31 68.9745 65.31Z" fill="#4A5059"/>
|
||||
<path d="M63.0746 60.33C58.4548 66.7886 51.4629 71.1523 43.6312 72.4644C35.7996 73.7766 27.7672 71.9302 21.2946 67.33C20.4946 66.75 19.7146 66.15 18.9846 65.51L7.06458 69.13L11.6246 55.77C9.34444 50.9942 8.3682 45.7003 8.79493 40.4254C9.22165 35.1505 11.0361 30.0823 14.0543 25.7352C17.0724 21.388 21.1868 17.9167 25.9799 15.6733C30.773 13.4299 36.0743 12.4943 41.3458 12.9615C46.6172 13.4287 51.6713 15.2821 55.9951 18.3335C60.319 21.3849 63.7587 25.5258 65.9652 30.336C68.1717 35.1462 69.0666 40.4545 68.5589 45.7222C68.0512 50.99 66.1591 56.0297 63.0746 60.33Z" fill="#2D333E" stroke="#4A5059" stroke-miterlimit="10"/>
|
||||
<path d="M30.1545 48.73C31.0419 47.2312 32.3011 45.9867 33.8103 45.1171C35.3195 44.2474 37.0277 43.782 38.7694 43.7659C40.5112 43.7498 42.2276 44.1836 43.7526 45.0252C45.2777 45.8668 46.5596 47.0878 47.4745 48.57" stroke="#4A5059" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M50.0245 39.95C50.8032 39.95 51.4345 39.3187 51.4345 38.54C51.4345 37.7613 50.8032 37.13 50.0245 37.13C49.2458 37.13 48.6145 37.7613 48.6145 38.54C48.6145 39.3187 49.2458 39.95 50.0245 39.95Z" fill="#4A5059"/>
|
||||
<path d="M27.6945 39.95C28.4733 39.95 29.1045 39.3187 29.1045 38.54C29.1045 37.7613 28.4733 37.13 27.6945 37.13C26.9158 37.13 26.2845 37.7613 26.2845 38.54C26.2845 39.3187 26.9158 39.95 27.6945 39.95Z" fill="#4A5059"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1,20 @@
|
||||
<svg width="118" height="109" viewBox="0 0 118 109" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M79.4562 40.45C71.0762 40.45 62.5662 40.11 54.5962 37.89C46.7762 35.71 39.5962 31.51 33.1962 26.64C28.9962 23.46 25.1962 20.94 19.7462 21.32C14.4305 21.5981 9.34433 23.575 5.23621 26.96C-1.69379 33.02 -0.643785 44.23 2.11621 52.11C6.28621 63.98 18.9362 72.23 29.7062 77.6C42.1362 83.81 55.7862 87.45 69.4862 89.45C81.4862 91.28 96.8962 92.6 107.296 84.76C116.856 77.56 119.476 61.12 117.136 50.02C116.568 46.7388 114.818 43.7792 112.216 41.7C105.506 36.79 95.4962 40.07 87.9562 40.23C85.1562 40.33 82.3162 40.45 79.4562 40.45Z" fill="#F2F2F2"/>
|
||||
<path d="M58.9662 108.95C79.2406 108.95 95.6762 107.925 95.6762 106.66C95.6762 105.395 79.2406 104.37 58.9662 104.37C38.6919 104.37 22.2562 105.395 22.2562 106.66C22.2562 107.925 38.6919 108.95 58.9662 108.95Z" fill="#F2F2F2"/>
|
||||
<path d="M111.436 26.29C111.977 26.29 112.416 25.8512 112.416 25.31C112.416 24.7688 111.977 24.33 111.436 24.33C110.895 24.33 110.456 24.7688 110.456 25.31C110.456 25.8512 110.895 26.29 111.436 26.29Z" fill="#CFCFCF"/>
|
||||
<path d="M69.1762 19.31C69.7175 19.31 70.1562 18.8712 70.1562 18.33C70.1562 17.7888 69.7175 17.35 69.1762 17.35C68.635 17.35 68.1962 17.7888 68.1962 18.33C68.1962 18.8712 68.635 19.31 69.1762 19.31Z" fill="#CFCFCF"/>
|
||||
<path d="M30.0362 82.85V87.15" stroke="#BABABA" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M27.8862 85H32.1862" stroke="#BABABA" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M14.2662 1V5.3" stroke="#BABABA" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M12.1062 3.14999H16.4162" stroke="#BABABA" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M92.2162 23.15V27.46" stroke="#BABABA" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M90.0662 25.31H94.3662" stroke="#BABABA" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M53.2962 80.73C57.9159 87.1887 64.9079 91.5523 72.7396 92.8645C80.5712 94.1766 88.6036 92.3302 95.0762 87.73C95.8761 87.1623 96.6471 86.5549 97.3862 85.91L109.316 89.52L104.746 76.17C107.027 71.3947 108.005 66.1009 107.579 60.8258C107.154 55.5508 105.34 50.4822 102.323 46.1343C99.3056 41.7865 95.1919 38.3142 90.3992 36.0698C85.6065 33.8255 80.3053 32.8888 75.0337 33.355C69.762 33.8212 64.7075 35.6737 60.3831 38.7243C56.0586 41.775 52.6181 45.9153 50.4107 50.7252C48.2033 55.5351 47.3075 60.8433 47.8143 66.1112C48.321 71.3791 50.2123 76.4192 53.2962 80.72V80.73Z" fill="white" stroke="#BABABA" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M88.0662 65.31C89.1598 65.31 90.0462 64.4235 90.0462 63.33C90.0462 62.2365 89.1598 61.35 88.0662 61.35C86.9727 61.35 86.0862 62.2365 86.0862 63.33C86.0862 64.4235 86.9727 65.31 88.0662 65.31Z" fill="#BABABA"/>
|
||||
<path d="M78.5162 65.31C79.6097 65.31 80.4962 64.4235 80.4962 63.33C80.4962 62.2365 79.6097 61.35 78.5162 61.35C77.4227 61.35 76.5362 62.2365 76.5362 63.33C76.5362 64.4235 77.4227 65.31 78.5162 65.31Z" fill="#BABABA"/>
|
||||
<path d="M68.9762 65.31C70.0697 65.31 70.9562 64.4235 70.9562 63.33C70.9562 62.2365 70.0697 61.35 68.9762 61.35C67.8827 61.35 66.9962 62.2365 66.9962 63.33C66.9962 64.4235 67.8827 65.31 68.9762 65.31Z" fill="#BABABA"/>
|
||||
<path d="M63.0762 60.32C58.4565 66.7787 51.4645 71.1423 43.6329 72.4545C35.8012 73.7666 27.7688 71.9202 21.2962 67.32C20.4939 66.7555 19.7228 66.1479 18.9862 65.5L7.05621 69.13L11.6262 55.77C9.34499 50.9947 8.36759 45.7009 8.79318 40.4258C9.21878 35.1508 11.0322 30.0821 14.0495 25.7343C17.0668 21.3865 21.1805 17.9142 25.9732 15.6698C30.766 13.4254 36.0671 12.4888 41.3388 12.955C46.6104 13.4212 51.6649 15.2737 55.9894 18.3243C60.3138 21.375 63.7543 25.5153 65.9617 30.3252C68.1692 35.1351 69.0649 40.4433 68.5582 45.7112C68.0514 50.9791 66.1601 56.0192 63.0762 60.32Z" fill="white" stroke="#BABABA" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M30.1562 48.73C31.0435 47.2311 32.3027 45.9867 33.812 45.117C35.3212 44.2474 37.0293 43.782 38.7711 43.7659C40.5128 43.7498 42.2293 44.1835 43.7543 45.0252C45.2793 45.8668 46.5613 47.0878 47.4762 48.57" stroke="#BABABA" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
<path d="M50.0262 39.94C50.8049 39.94 51.4362 39.3087 51.4362 38.53C51.4362 37.7513 50.8049 37.12 50.0262 37.12C49.2475 37.12 48.6162 37.7513 48.6162 38.53C48.6162 39.3087 49.2475 39.94 50.0262 39.94Z" fill="#BABABA"/>
|
||||
<path d="M27.6862 39.94C28.465 39.94 29.0962 39.3087 29.0962 38.53C29.0962 37.7513 28.465 37.12 27.6862 37.12C26.9075 37.12 26.2762 37.7513 26.2762 38.53C26.2762 39.3087 26.9075 39.94 27.6862 39.94Z" fill="#BABABA"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.5 KiB |
@@ -74,7 +74,7 @@
|
||||
<span class="text-xs text-gray-500 ml-2"
|
||||
>{$_(`n-${timeSince.unit}-ago`, {
|
||||
values: { n: timeSince.value },
|
||||
})}</span
|
||||
})} {comment.updated != comment.created ? `(${$_("edited")})` : ""}</span
|
||||
>
|
||||
</p>
|
||||
{#if mode == "edit"}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<script lang="ts">
|
||||
import emptyStateCommentDark from "$lib/assets/svgs/empty_states/empty_state_comment_dark.svg";
|
||||
import emptyStateCommentLight from "$lib/assets/svgs/empty_states/empty_state_comment_light.svg";
|
||||
import { theme } from "$lib/stores/theme_store";
|
||||
|
||||
import { _ } from "svelte-i18n";
|
||||
export let width: number = 256;
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col justify-center items-center gap-y-4">
|
||||
<img
|
||||
style="width: {width}px"
|
||||
class="rounded-full aspect-square"
|
||||
src={$theme === "light" ? emptyStateCommentLight : emptyStateCommentDark}
|
||||
alt="Empty State showing a wanderer going into the distance"
|
||||
/>
|
||||
|
||||
<h3 class="text-xl font-medium text-center text-gray-500">{$_("no-comments-so-far")}...</h3>
|
||||
</div>
|
||||
@@ -21,21 +21,24 @@
|
||||
formatTimeHHMM,
|
||||
} from "$lib/util/format_util";
|
||||
|
||||
import emptyStateTrailDark from "$lib/assets/svgs/empty_states/empty_state_trail_dark.svg";
|
||||
import emptyStateTrailLight from "$lib/assets/svgs/empty_states/empty_state_trail_light.svg";
|
||||
import { pb } from "$lib/pocketbase";
|
||||
import { theme } from "$lib/stores/theme_store";
|
||||
import { show_toast } from "$lib/stores/toast_store";
|
||||
import * as M from "maplibre-gl";
|
||||
import "photoswipe/style.css";
|
||||
import { onMount } from "svelte";
|
||||
import { _ } from "svelte-i18n";
|
||||
import Button from "../base/button.svelte";
|
||||
import SkeletonNotificationCard from "../base/skeleton_notification_card.svelte";
|
||||
import Textarea from "../base/textarea.svelte";
|
||||
import CommentCard from "../comment/comment_card.svelte";
|
||||
import PhotoGallery from "../photo_gallery.svelte";
|
||||
import ShareInfo from "../share_info.svelte";
|
||||
import SummitLogTable from "../summit_log/summit_log_table.svelte";
|
||||
import { pb } from "$lib/pocketbase";
|
||||
import * as M from "maplibre-gl";
|
||||
import MapWithElevationMaplibre from "./map_with_elevation_maplibre.svelte";
|
||||
import emptyStateTrailDark from "$lib/assets/svgs/empty_states/empty_state_trail_dark.svg";
|
||||
import emptyStateTrailLight from "$lib/assets/svgs/empty_states/empty_state_trail_light.svg";
|
||||
import { theme } from "$lib/stores/theme_store";
|
||||
import EmptyStateComment from "../empty_states/empty_state_comment.svelte";
|
||||
|
||||
export let trail: Trail;
|
||||
export let mode: "overview" | "map" | "list" = "map";
|
||||
@@ -62,6 +65,8 @@
|
||||
let openGallery: (idx?: number) => void;
|
||||
|
||||
let newComment: Comment = new Comment("", 0, "", trail.id ?? "");
|
||||
|
||||
let commentsLoading: boolean = false;
|
||||
let commentCreateLoading: boolean = false;
|
||||
let commentDeleteLoading: boolean = false;
|
||||
|
||||
@@ -90,7 +95,9 @@
|
||||
}
|
||||
|
||||
async function fetchComments() {
|
||||
commentsLoading = true;
|
||||
await comments_index(trail);
|
||||
commentsLoading = false;
|
||||
}
|
||||
|
||||
async function createComment() {
|
||||
@@ -101,7 +108,8 @@
|
||||
newComment.author = $currentUser.id;
|
||||
newComment.trail = trail.id;
|
||||
|
||||
comments_create(newComment).then((c) => {
|
||||
try {
|
||||
const c = await comments_create(newComment);
|
||||
newComment.text = "";
|
||||
c.expand = {
|
||||
author: { ...$currentUser!, private: false },
|
||||
@@ -109,10 +117,16 @@
|
||||
|
||||
const newCommentList = [c, ...$comments];
|
||||
comments.set(newCommentList);
|
||||
} catch (e) {
|
||||
show_toast({
|
||||
icon: "close",
|
||||
type: "error",
|
||||
text: $_("error-posting-comment"),
|
||||
});
|
||||
|
||||
} finally {
|
||||
commentCreateLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
async function editComment(data: { comment: Comment; text: string }) {
|
||||
data.comment.text = data.text;
|
||||
@@ -360,12 +374,20 @@
|
||||
on:click={createComment}
|
||||
loading={commentCreateLoading}
|
||||
secondary={true}
|
||||
disabled={newComment.text.length == 0}
|
||||
>Comment</Button
|
||||
disabled={commentCreateLoading ||
|
||||
newComment.text.length == 0}>Comment</Button
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
<ul class="space-y-4">
|
||||
{#if commentsLoading}
|
||||
{#each { length: 3 } as _, index}
|
||||
<SkeletonNotificationCard
|
||||
></SkeletonNotificationCard>
|
||||
{/each}
|
||||
{:else if $comments.length == 0}
|
||||
<EmptyStateComment width={192}></EmptyStateComment>
|
||||
{:else}
|
||||
{#each $comments ?? [] as comment}
|
||||
<li>
|
||||
<CommentCard
|
||||
@@ -373,11 +395,13 @@
|
||||
mode={comment.author == $currentUser?.id
|
||||
? "edit"
|
||||
: "show"}
|
||||
on:delete={(e) => deleteComment(e.detail)}
|
||||
on:delete={(e) =>
|
||||
deleteComment(e.detail)}
|
||||
on:edit={(e) => editComment(e.detail)}
|
||||
></CommentCard>
|
||||
</li>
|
||||
{/each}
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"edit-entry": "Eintrag bearbeiten",
|
||||
"edit-list": "Liste bearbeiten",
|
||||
"edit-waypoint": "Wegpunkt bearbeiten",
|
||||
"edited": "",
|
||||
"elevation-gain": "Höhenunterschied (aufw.)",
|
||||
"elevation-loss": "Höhenunterschied (abw.)",
|
||||
"email": "Email",
|
||||
@@ -94,6 +95,7 @@
|
||||
"error-during-login": "Fehler beim Login",
|
||||
"error-during-password-reset": "Email zum Zurücksetzen des Passworts konnte nicht versandt werden",
|
||||
"error-exporting-trail": "Fehler beim Exportieren des Trails",
|
||||
"error-posting-comment": "",
|
||||
"error-printing-map": "Fehler beim Drucken der Karte",
|
||||
"error-reading-file": "Fehler beim Lesen der Datei",
|
||||
"error-saving-list": "Fehler beim Speichern der Liste",
|
||||
@@ -162,7 +164,7 @@
|
||||
"n-hours-ago": "vor {n} Stunden",
|
||||
"n-minutes-ago": "vor {n} Minuten",
|
||||
"n-months-ago": "vor {n} Monaten",
|
||||
"n-seconds-ago": "vor {n} Sekunden",
|
||||
"n-seconds-ago": "{n, plural, =0 {gerade eben} other {vor {n} Sekunden}}",
|
||||
"n-years-ago": "vor {n} Jahren",
|
||||
"name": "Name",
|
||||
"near": "Nahe",
|
||||
@@ -173,6 +175,7 @@
|
||||
"new-password-text": "Neues Passwort setzen",
|
||||
"new-trail": "Neue Route",
|
||||
"no-account": "Du hast noch kein Konto?",
|
||||
"no-comments-so-far": "",
|
||||
"no-data": "Keine Daten",
|
||||
"no-grid": "Kein Gitter",
|
||||
"no-notifications": "",
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"edit-entry": "Edit Entry",
|
||||
"edit-list": "Edit List",
|
||||
"edit-waypoint": "Edit Waypoint",
|
||||
"edited": "edited",
|
||||
"elevation-gain": "Elevation Gain",
|
||||
"elevation-loss": "Elevation Loss",
|
||||
"email": "Email",
|
||||
@@ -94,6 +95,7 @@
|
||||
"error-during-login": "Error during login",
|
||||
"error-during-password-reset": "Unable to send password reset email",
|
||||
"error-exporting-trail": "Error exporting trail",
|
||||
"error-posting-comment": "Error posting comment",
|
||||
"error-printing-map": "Error printing map",
|
||||
"error-reading-file": "Error reading file",
|
||||
"error-saving-list": "Error saving list",
|
||||
@@ -162,7 +164,7 @@
|
||||
"n-hours-ago": "{n} hours ago",
|
||||
"n-minutes-ago": "{n} minutes ago",
|
||||
"n-months-ago": "{n} months ago",
|
||||
"n-seconds-ago": "{n} seconds ago",
|
||||
"n-seconds-ago": "{n, plural, =0 {just now} other {{n} seconds ago}}",
|
||||
"n-years-ago": "{n} years ago",
|
||||
"name": "Name",
|
||||
"near": "Near",
|
||||
@@ -173,6 +175,7 @@
|
||||
"new-password-text": "Set a new password",
|
||||
"new-trail": "New Trail",
|
||||
"no-account": "Don't have an account?",
|
||||
"no-comments-so-far": "No comments so far",
|
||||
"no-data": "No data",
|
||||
"no-grid": "No Grid",
|
||||
"no-notifications": "No notifications",
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"edit-entry": "Éditer une entrée",
|
||||
"edit-list": "Éditer la liste",
|
||||
"edit-waypoint": "Éditer le point de repère",
|
||||
"edited": "",
|
||||
"elevation-gain": "Gain d'altitude",
|
||||
"elevation-loss": "",
|
||||
"email": "Email",
|
||||
@@ -94,6 +95,7 @@
|
||||
"error-during-login": "Erreur durant la connexion",
|
||||
"error-during-password-reset": "",
|
||||
"error-exporting-trail": "",
|
||||
"error-posting-comment": "",
|
||||
"error-printing-map": "Erreur d'impression de la carte",
|
||||
"error-reading-file": "Erreur de lecture du fichier",
|
||||
"error-saving-list": "",
|
||||
@@ -162,7 +164,7 @@
|
||||
"n-hours-ago": "il y a {n} heures",
|
||||
"n-minutes-ago": "il y a {n} minutes",
|
||||
"n-months-ago": "il y a {n} mois",
|
||||
"n-seconds-ago": "il y a {n} secondes",
|
||||
"n-seconds-ago": "{n, plural, =0 {à l'instant} other {il y a {n} secondes}}",
|
||||
"n-years-ago": "il y a {n} ans",
|
||||
"name": "Nom",
|
||||
"near": "Proche",
|
||||
@@ -173,6 +175,7 @@
|
||||
"new-password-text": "",
|
||||
"new-trail": "Nouvel itinéraire",
|
||||
"no-account": "Pas encore de compte ?",
|
||||
"no-comments-so-far": "",
|
||||
"no-data": "",
|
||||
"no-grid": "",
|
||||
"no-notifications": "",
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"edit-entry": "Bejegyzés szerkesztése",
|
||||
"edit-list": "Lista szerkesztése",
|
||||
"edit-waypoint": "Útvonalpont szerkesztése",
|
||||
"edited": "",
|
||||
"elevation-gain": "Magasságnövekedés",
|
||||
"elevation-loss": "",
|
||||
"email": "Email",
|
||||
@@ -94,6 +95,7 @@
|
||||
"error-during-login": "Hiba bejelentkezés közben",
|
||||
"error-during-password-reset": "",
|
||||
"error-exporting-trail": "",
|
||||
"error-posting-comment": "",
|
||||
"error-printing-map": "",
|
||||
"error-reading-file": "Hiba a fájl olvasása közben",
|
||||
"error-saving-list": "",
|
||||
@@ -173,6 +175,7 @@
|
||||
"new-password-text": "",
|
||||
"new-trail": "Új útvonal",
|
||||
"no-account": "Nincs még fiókja?",
|
||||
"no-comments-so-far": "",
|
||||
"no-data": "",
|
||||
"no-grid": "",
|
||||
"no-notifications": "",
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"edit-entry": "Modifica voce",
|
||||
"edit-list": "Modifica lista",
|
||||
"edit-waypoint": "Modifica waypoint",
|
||||
"edited": "",
|
||||
"elevation-gain": "Guadagno di quota",
|
||||
"elevation-loss": "",
|
||||
"email": "Email",
|
||||
@@ -94,6 +95,7 @@
|
||||
"error-during-login": "Errore durante il login",
|
||||
"error-during-password-reset": "",
|
||||
"error-exporting-trail": "Errore durante l'esportazione del percorso",
|
||||
"error-posting-comment": "",
|
||||
"error-printing-map": "Errore durante la stampa della mappa",
|
||||
"error-reading-file": "Errore durante la lettura del file",
|
||||
"error-saving-list": "",
|
||||
@@ -162,7 +164,7 @@
|
||||
"n-hours-ago": "{n} ore fa",
|
||||
"n-minutes-ago": "{n} minuti fa",
|
||||
"n-months-ago": "{n} mesi fa",
|
||||
"n-seconds-ago": "{n} secondi fa",
|
||||
"n-seconds-ago": "{n, plural, =0 {solo ora} other {{n} secondi fa}}",
|
||||
"n-years-ago": "{n} anni fa",
|
||||
"name": "Nome",
|
||||
"near": "Vicino",
|
||||
@@ -173,6 +175,7 @@
|
||||
"new-password-text": "",
|
||||
"new-trail": "Nuovo percorso",
|
||||
"no-account": "Non hai ancora un account?",
|
||||
"no-comments-so-far": "",
|
||||
"no-data": "",
|
||||
"no-grid": "",
|
||||
"no-notifications": "",
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"edit-entry": "Item bewerken",
|
||||
"edit-list": "Lijst aanpassen",
|
||||
"edit-waypoint": "Routepunt aanpassen",
|
||||
"edited": "",
|
||||
"elevation-gain": "Hoogteverschil",
|
||||
"elevation-loss": "",
|
||||
"email": "E-mail",
|
||||
@@ -94,6 +95,7 @@
|
||||
"error-during-login": "Het inloggen is mislukt",
|
||||
"error-during-password-reset": "",
|
||||
"error-exporting-trail": "",
|
||||
"error-posting-comment": "",
|
||||
"error-printing-map": "Fout bij afdrukken van kaart",
|
||||
"error-reading-file": "Het bestand kan niet worden ingelezen",
|
||||
"error-saving-list": "",
|
||||
@@ -162,7 +164,7 @@
|
||||
"n-hours-ago": "{n} uuren geleden",
|
||||
"n-minutes-ago": "{n} minuten geleden",
|
||||
"n-months-ago": "{n} maanden geleden",
|
||||
"n-seconds-ago": "{n} seconden geleden",
|
||||
"n-seconds-ago": "{n, plural, =0 {zojuist} other {{n} seconden geleden}}",
|
||||
"n-years-ago": "{n} jaren geleden",
|
||||
"name": "Naam",
|
||||
"near": "Nabij",
|
||||
@@ -173,6 +175,7 @@
|
||||
"new-password-text": "",
|
||||
"new-trail": "Nieuwe wandelroute",
|
||||
"no-account": "Heb je nog geen account?",
|
||||
"no-comments-so-far": "",
|
||||
"no-data": "",
|
||||
"no-grid": "",
|
||||
"no-notifications": "",
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"edit-entry": "Edytuj pozycję",
|
||||
"edit-list": "Edytuj Listę",
|
||||
"edit-waypoint": "Edytuj Punkt",
|
||||
"edited": "",
|
||||
"elevation-gain": "Wzrost Wysokości",
|
||||
"elevation-loss": "",
|
||||
"email": "Email",
|
||||
@@ -94,6 +95,7 @@
|
||||
"error-during-login": "Błąd podczas logowania",
|
||||
"error-during-password-reset": "",
|
||||
"error-exporting-trail": "",
|
||||
"error-posting-comment": "",
|
||||
"error-printing-map": "",
|
||||
"error-reading-file": "Błąd wczytywania pliku",
|
||||
"error-saving-list": "",
|
||||
@@ -173,6 +175,7 @@
|
||||
"new-password-text": "",
|
||||
"new-trail": "Nowa ścieżka",
|
||||
"no-account": "Nie masz konta?",
|
||||
"no-comments-so-far": "",
|
||||
"no-data": "",
|
||||
"no-grid": "",
|
||||
"no-notifications": "",
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"edit-entry": "Editar entrada",
|
||||
"edit-list": "Editar lista",
|
||||
"edit-waypoint": "Editar ponto de passagem",
|
||||
"edited": "",
|
||||
"elevation-gain": "Ganho de elevação",
|
||||
"elevation-loss": "",
|
||||
"email": "Email",
|
||||
@@ -94,6 +95,7 @@
|
||||
"error-during-login": "Erro durante o login",
|
||||
"error-during-password-reset": "",
|
||||
"error-exporting-trail": "",
|
||||
"error-posting-comment": "",
|
||||
"error-printing-map": "",
|
||||
"error-reading-file": "Erro ao ler o arquivo",
|
||||
"error-saving-list": "",
|
||||
@@ -173,6 +175,7 @@
|
||||
"new-password-text": "",
|
||||
"new-trail": "Nova trilha",
|
||||
"no-account": "Não tem uma conta?",
|
||||
"no-comments-so-far": "",
|
||||
"no-data": "",
|
||||
"no-grid": "",
|
||||
"no-notifications": "",
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
"edit-entry": "编辑日程",
|
||||
"edit-list": "编辑列表",
|
||||
"edit-waypoint": "编辑坐标",
|
||||
"edited": "",
|
||||
"elevation-gain": "上升海拔",
|
||||
"elevation-loss": "",
|
||||
"email": "电子邮箱",
|
||||
@@ -94,6 +95,7 @@
|
||||
"error-during-login": "登录错误",
|
||||
"error-during-password-reset": "",
|
||||
"error-exporting-trail": "",
|
||||
"error-posting-comment": "",
|
||||
"error-printing-map": "",
|
||||
"error-reading-file": "读取文件错误",
|
||||
"error-saving-list": "",
|
||||
@@ -173,6 +175,7 @@
|
||||
"new-password-text": "",
|
||||
"new-trail": "创建新路线",
|
||||
"no-account": "还未注册?",
|
||||
"no-comments-so-far": "",
|
||||
"no-data": "",
|
||||
"no-grid": "",
|
||||
"no-notifications": "",
|
||||
|
||||
@@ -7,6 +7,7 @@ export class Comment {
|
||||
author: string;
|
||||
trail: string;
|
||||
created?: string;
|
||||
updated?: string;
|
||||
expand?: {
|
||||
author: UserAnonymous
|
||||
}
|
||||
|
||||
@@ -66,11 +66,9 @@ export function formatSpeed(speed?: number) {
|
||||
}
|
||||
|
||||
export function formatTimeSince(date: Date) {
|
||||
const seconds = Math.floor((new Date().getTime() - date.getTime()) / 1000);
|
||||
|
||||
var seconds = Math.floor((new Date().getTime() - date.getTime()) / 1000);
|
||||
|
||||
var interval = seconds / 31536000;
|
||||
|
||||
let interval = seconds / 31536000;
|
||||
if (interval > 1) {
|
||||
return { unit: "years", value: Math.floor(interval) };
|
||||
}
|
||||
@@ -90,5 +88,5 @@ export function formatTimeSince(date: Date) {
|
||||
if (interval > 1) {
|
||||
return { unit: "minutes", value: Math.floor(interval) };
|
||||
}
|
||||
return { unit: "seconds", value: Math.floor(interval) };
|
||||
return { unit: "seconds", value: seconds };
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
{ text: $_("imperial"), value: "imperial" },
|
||||
];
|
||||
|
||||
let selectedLanguage = "en";
|
||||
let selectedLanguage = settings.language ?? "en";
|
||||
|
||||
async function handleLanguageSelection(
|
||||
value: "en" | "de" | "fr" | "hu" | "nl" | "pl" | "pt",
|
||||
|
||||
Reference in New Issue
Block a user