finishes translation
This commit is contained in:
@@ -51,7 +51,7 @@ You can also add photos to the trail itself. If you add more than one photo you
|
|||||||
|
|
||||||
### Summit book
|
### Summit book
|
||||||
|
|
||||||
If you do the same trail multiple times but do not want to create a new trail every time, you can simply make a new entry in the summit book to log the completion of the trail.
|
If you do the same trail multiple times but do not want to create a new trail every time, you can simply make a new entry in the summit book to log the completion of the trail. By default a new summit log entry is created automatically when you upload a fail containing GPS data in the trail creation process. For subsequent entries to the summit book you can provide an individual file containing your route data for this particular completion of the trail.
|
||||||
|
|
||||||
## Save the trail
|
## Save the trail
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,7 @@
|
|||||||
if (!date) {
|
if (!date) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log(date);
|
||||||
|
|
||||||
dispatch("click", date);
|
dispatch("click", date);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
><i class="fa fa-clock mr-2"></i>{formatTimeHHMM(
|
><i class="fa fa-clock mr-2"></i>{formatTimeHHMM(
|
||||||
log.duration,
|
log.duration ? log.duration / 60 : undefined,
|
||||||
)}</span
|
)}</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
|
|
||||||
const totals = gpxObject.getTotals();
|
const totals = gpxObject.getTotals();
|
||||||
|
|
||||||
$form.duration = totals.duration / 1000 / 60;
|
$form.duration = totals.duration / 1000;
|
||||||
$form.elevation_gain = totals.elevationGain;
|
$form.elevation_gain = totals.elevationGain;
|
||||||
$form.elevation_loss = totals.elevationLoss;
|
$form.elevation_loss = totals.elevationLoss;
|
||||||
$form.distance = totals.distance;
|
$form.distance = totals.distance;
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
{formatElevation(log.elevation_loss)}
|
{formatElevation(log.elevation_loss)}
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
{formatTimeHHMM(log.duration)}
|
{formatTimeHHMM(log.duration ? log.duration / 60 : undefined)}
|
||||||
</td>
|
</td>
|
||||||
{#if showCategory}
|
{#if showCategory}
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
"altitude": "Höhe",
|
"altitude": "Höhe",
|
||||||
"api-documentation": "API Dokumentation",
|
"api-documentation": "API Dokumentation",
|
||||||
"avatar": "Avatar",
|
"avatar": "Avatar",
|
||||||
"average-speed": "Durschn. Geschwindigkeit",
|
"average-speed": "Durchschn. Geschwindigkeit",
|
||||||
"basic-info": "Basisinformation",
|
"basic-info": "Basisinformation",
|
||||||
"before": "Vor",
|
"before": "Vor",
|
||||||
"can": "kann",
|
"can": "kann",
|
||||||
|
|||||||
@@ -58,9 +58,9 @@ export function formatSpeed(speed?: number) {
|
|||||||
const unit = get(page).data.settings?.unit ?? "metric";
|
const unit = get(page).data.settings?.unit ?? "metric";
|
||||||
|
|
||||||
if (unit == "metric") {
|
if (unit == "metric") {
|
||||||
return `${Math.round(speed)} km/h`
|
return `${(speed * 3.6).toFixed(2)} km/h`
|
||||||
} else {
|
} else {
|
||||||
const mph = speed * 0.621371;
|
const mph = speed * 3.6 * 0.621371;
|
||||||
|
|
||||||
return `${Math.round(mph)} mp/h`;
|
return `${Math.round(mph)} mp/h`;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,7 +123,7 @@
|
|||||||
|
|
||||||
switch (barChartSelectedValue) {
|
switch (barChartSelectedValue) {
|
||||||
case "duration":
|
case "duration":
|
||||||
return "min";
|
return "h";
|
||||||
case "elevation_gain":
|
case "elevation_gain":
|
||||||
case "elevation_loss":
|
case "elevation_loss":
|
||||||
return unit == "metric" ? "m" : "ft";
|
return unit == "metric" ? "m" : "ft";
|
||||||
@@ -144,6 +144,8 @@
|
|||||||
(acc[date] || 0) + ((log as any)[barChartSelectedValue] ?? 0);
|
(acc[date] || 0) + ((log as any)[barChartSelectedValue] ?? 0);
|
||||||
if (barChartSelectedValue === "distance") {
|
if (barChartSelectedValue === "distance") {
|
||||||
acc[date] = acc[date] / 1000;
|
acc[date] = acc[date] / 1000;
|
||||||
|
}else if(barChartSelectedValue === "duration") {
|
||||||
|
acc[date] = acc[date] / 60 / 60;
|
||||||
}
|
}
|
||||||
if ($page.data.settings?.unit !== "metric") {
|
if ($page.data.settings?.unit !== "metric") {
|
||||||
acc[date] =
|
acc[date] =
|
||||||
@@ -193,7 +195,13 @@
|
|||||||
);
|
);
|
||||||
|
|
||||||
$: averageSpeed =
|
$: averageSpeed =
|
||||||
totalDuration > 0 ? totalDistance / totalDuration : undefined;
|
totalDuration > 0
|
||||||
|
? $summitLogs.reduce(
|
||||||
|
(sum, log) =>
|
||||||
|
sum + (log.distance && log.duration ? log.distance : 0),
|
||||||
|
0,
|
||||||
|
) / totalDuration
|
||||||
|
: undefined;
|
||||||
|
|
||||||
function updateFilterCategory(categories: SelectItem[]) {
|
function updateFilterCategory(categories: SelectItem[]) {
|
||||||
filter.category = categories.map((c) => c.value);
|
filter.category = categories.map((c) => c.value);
|
||||||
@@ -201,10 +209,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handleDateClick(date: Date) {
|
function handleDateClick(date: Date) {
|
||||||
const datePlusN = new Date();
|
const datePlusN = date;
|
||||||
datePlusN.setDate(date.getDate() + 1);
|
datePlusN.setDate(date.getDate() + 1);
|
||||||
filter.startDate = datePlusN.toISOString().slice(0, 10);
|
filter.startDate = datePlusN.toISOString().slice(0, 10);
|
||||||
datePlusN.setDate(date.getDate() + 2);
|
datePlusN.setDate(date.getDate() + 1);
|
||||||
filter.endDate = datePlusN.toISOString().slice(0, 10);
|
filter.endDate = datePlusN.toISOString().slice(0, 10);
|
||||||
loadSummitLogs();
|
loadSummitLogs();
|
||||||
}
|
}
|
||||||
@@ -219,7 +227,6 @@
|
|||||||
<title>{$_("profile")} | wanderer</title>
|
<title>{$_("profile")} | wanderer</title>
|
||||||
</svelte:head>
|
</svelte:head>
|
||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="grid grid-cols-1 md:grid-cols-[356px_minmax(0,_1fr)] gap-y-4 items-start max-w-6xl mx-auto"
|
class="grid grid-cols-1 md:grid-cols-[356px_minmax(0,_1fr)] gap-y-4 items-start max-w-6xl mx-auto"
|
||||||
>
|
>
|
||||||
@@ -304,7 +311,7 @@
|
|||||||
<span class="text-gray-500 font-semibold text-lg self-start"
|
<span class="text-gray-500 font-semibold text-lg self-start"
|
||||||
><i class="fa fa-clock mr-3"></i>{$_("duration")}</span
|
><i class="fa fa-clock mr-3"></i>{$_("duration")}</span
|
||||||
>
|
>
|
||||||
<p class="text-4xl font-bold">{formatTimeHHMM(totalDuration)}</p>
|
<p class="text-4xl font-bold">{formatTimeHHMM(totalDuration / 60)}</p>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-col items-center gap-6 border border-input-border rounded-xl p-6"
|
class="flex flex-col items-center gap-6 border border-input-border rounded-xl p-6"
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import type { SummitLogFilter } from "$lib/models/summit_log";
|
import type { SummitLogFilter } from "$lib/models/summit_log";
|
||||||
import { categories_index } from "$lib/stores/category_store";
|
import { categories_index } from "$lib/stores/category_store";
|
||||||
import { summit_logs_index } from "$lib/stores/summit_log_store";
|
import { summit_logs_index } from "$lib/stores/summit_log_store";
|
||||||
import { fetchGPX } from "$lib/stores/trail_store";
|
|
||||||
import { type ServerLoad } from "@sveltejs/kit";
|
import { type ServerLoad } from "@sveltejs/kit";
|
||||||
|
|
||||||
export const load: ServerLoad = async ({ params, locals, fetch }) => {
|
export const load: ServerLoad = async ({ params, locals, fetch }) => {
|
||||||
|
|
||||||
const date = new Date(), y = date.getFullYear(), m = date.getMonth();
|
const date = new Date()
|
||||||
const firstDay = new Date(y, m, 1);
|
date.setUTCHours(6)
|
||||||
const lastDay = new Date(y, m + 1, 0);
|
const y = date.getFullYear()
|
||||||
|
const m = date.getMonth();
|
||||||
|
const firstDay = new Date(y, m, 2);
|
||||||
|
const lastDay = new Date(y, m + 1, 1);
|
||||||
|
|
||||||
const categories = await categories_index(fetch)
|
const categories = await categories_index(fetch)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user