Skip to content

Commit

Permalink
v0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Beutel committed Jun 7, 2024
1 parent ccb7a4c commit 09335a8
Show file tree
Hide file tree
Showing 15 changed files with 105 additions and 7 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v0.6.0
## Features
- You can now share trails with other users by selecting "Share" from the trail contextmenu. You can set the permission level as "View" or "Edit".
- Adds missing translations

## Bug fixes
- Fixed a bug that prevented comments from showing up
- GPX files without a name in the metadata section will now receive a generic name when uploaded through the API

# v0.5.1
## Features
- You can now export trails as GPX or GEOJson files. Optionally you can include photos and summit book entries of the trail. This replaces the "Download GPX" function in previous versions.
Expand Down
42 changes: 42 additions & 0 deletions db/migrations/1717766881_updated_trails.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
package migrations

import (
"github.com/pocketbase/dbx"
"github.com/pocketbase/pocketbase/daos"
m "github.com/pocketbase/pocketbase/migrations"
"github.com/pocketbase/pocketbase/tools/types"
)

func init() {
m.Register(func(db dbx.Builder) error {
dao := daos.New(db);

collection, err := dao.FindCollectionByNameOrId("e864strfxo14pm4")
if err != nil {
return err
}

collection.ListRule = types.Pointer("author = @request.auth.id || public = true || (@request.auth.id != \"\" && trail_share_via_trail.user ?= @request.auth.id)")

collection.ViewRule = types.Pointer("author = @request.auth.id || public = true || (@request.auth.id != \"\" && trail_share_via_trail.user ?= @request.auth.id)")

collection.UpdateRule = types.Pointer("author = @request.auth.id || (@request.auth.id != \"\" && trail_share_via_trail.trail = id && trail_share_via_trail.user ?= @request.auth.id && trail_share_via_trail.permission = \"edit\")")

return dao.SaveCollection(collection)
}, func(db dbx.Builder) error {
dao := daos.New(db);

collection, err := dao.FindCollectionByNameOrId("e864strfxo14pm4")
if err != nil {
return err
}

collection.ListRule = types.Pointer("author = @request.auth.id || public = true || (trail_share_via_trail.user ?= @request.auth.id)")

collection.ViewRule = types.Pointer("author = @request.auth.id || public = true || (trail_share_via_trail.user ?= @request.auth.id)")

collection.UpdateRule = types.Pointer("author = @request.auth.id || (trail_share_via_trail.trail = id && trail_share_via_trail.user ?= @request.auth.id && trail_share_via_trail.permission = \"edit\")")

return dao.SaveCollection(collection)
})
}
4 changes: 2 additions & 2 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wanderer",
"version": "0.5.1",
"version": "0.6.0",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
4 changes: 2 additions & 2 deletions web/src/lib/components/category_card.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import type { Category } from "$lib/models/category";
import { getFileURL } from "$lib/util/file_util";
import { _ } from "svelte-i18n";
export let category: Category;
</script>

Expand All @@ -17,7 +17,7 @@
class="absolute bottom-0 w-full h-1/2 bg-gradient-to-b from-transparent to-black opacity-50"
></div>
<h5 class="absolute text-white font-bold bottom-4 left-4 text-xl">
{category.name}
{$_(category.name)}
</h5>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
fill="#242734"
/>
<text x="178" y="64" fill="white" font-size="0.75rem">v0.5.1</text>
<text x="178" y="64" fill="white" font-size="0.75rem">v0.6.0</text>
</svg>
1 change: 0 additions & 1 deletion web/src/lib/components/trail/trail_card.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { page } from "$app/stores";
import type { Trail } from "$lib/models/trail";
import { getFileURL } from "$lib/util/file_util";
import {
Expand Down
6 changes: 6 additions & 0 deletions web/src/lib/i18n/locales/de.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"Biking": "Radfahren",
"Canoeing": "Kanufahren",
"Climbing": "Klettern",
"Hiking": "Wandern",
"Skiing": "Skifahren",
"Walking": "Laufen",
"about": "Über",
"account-delete-confirm": "Du bist dabei, dein Konto zu löschen. Alle deine Routen werden ebenfalls gelöscht. Möchtest du fortfahren?",
"add-entry": "Eintrag hinzufügen",
Expand Down
6 changes: 6 additions & 0 deletions web/src/lib/i18n/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"Biking": "Biking",
"Canoeing": "Canoeing",
"Climbing": "Climbing",
"Hiking": "Hiking",
"Skiing": "Skiing",
"Walking": "Walking",
"about": "About",
"account-delete-confirm": "You are about to delete your account. All your trails will also be deleted. Do you want to proceed?",
"add-entry": "Add Entry",
Expand Down
6 changes: 6 additions & 0 deletions web/src/lib/i18n/locales/fr.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"Biking": "",
"Canoeing": "",
"Climbing": "",
"Hiking": "",
"Skiing": "",
"Walking": "",
"about": "Informations",
"account-delete-confirm": "Vous êtes sur le point de supprimer votre compte. Toutes vos trails seront également supprimées. Voulez-vous continuer ?",
"add-entry": "Ajouter une entrée",
Expand Down
6 changes: 6 additions & 0 deletions web/src/lib/i18n/locales/hu.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"Biking": "",
"Canoeing": "",
"Climbing": "",
"Hiking": "",
"Skiing": "",
"Walking": "",
"about": "A programról",
"account-delete-confirm": "Ön most a profilját készül törölni. Minden nyomvonala törlődik. Szeretné folytatni?",
"add-entry": "Bejegyzés hozzáadása",
Expand Down
6 changes: 6 additions & 0 deletions web/src/lib/i18n/locales/nl.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"Biking": "",
"Canoeing": "",
"Climbing": "",
"Hiking": "",
"Skiing": "",
"Walking": "",
"about": "Over",
"account-delete-confirm": "Je staat op het punt je account te verwijderen. Al je wandelroutes worden hierdoor eveneens verwijderd. Wil je doorgaan?",
"add-entry": "Item toevoegen",
Expand Down
6 changes: 6 additions & 0 deletions web/src/lib/i18n/locales/pl.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"Biking": "",
"Canoeing": "",
"Climbing": "",
"Hiking": "",
"Skiing": "",
"Walking": "",
"about": "Na temat",
"account-delete-confirm": "Usuniesz swoje konto. Wszystkie twoje ścieżki zostaną usunięte. Czy chcesz kontynuować?",
"add-entry": "Dodaj Pozycję",
Expand Down
6 changes: 6 additions & 0 deletions web/src/lib/i18n/locales/pt.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"Biking": "",
"Canoeing": "",
"Climbing": "",
"Hiking": "",
"Skiing": "",
"Walking": "",
"about": "Sobre",
"account-delete-confirm": "Você está prestes a excluir sua conta. Todas as suas trilhas também serão excluídas. Queres prosseguir?",
"add-entry": "Adicionar entrada",
Expand Down
6 changes: 6 additions & 0 deletions web/src/lib/i18n/locales/zh.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"Biking": "",
"Canoeing": "",
"Climbing": "",
"Hiking": "",
"Skiing": "",
"Walking": "",
"about": "关于",
"account-delete-confirm": "您现在要删除当前账户,所有的路线都会删除无法恢复,确认继续操作吗?",
"add-entry": "添加日程",
Expand Down

0 comments on commit 09335a8

Please sign in to comment.