diff --git a/db/migrations/1719842396_updated_settings.go b/db/migrations/1719842396_updated_settings.go
new file mode 100644
index 00000000..d6fe35d9
--- /dev/null
+++ b/db/migrations/1719842396_updated_settings.go
@@ -0,0 +1,89 @@
+package migrations
+
+import (
+ "encoding/json"
+
+ "github.com/pocketbase/dbx"
+ "github.com/pocketbase/pocketbase/daos"
+ m "github.com/pocketbase/pocketbase/migrations"
+ "github.com/pocketbase/pocketbase/models/schema"
+)
+
+func init() {
+ m.Register(func(db dbx.Builder) error {
+ dao := daos.New(db);
+
+ collection, err := dao.FindCollectionByNameOrId("uavt73rsqcn1n13")
+ if err != nil {
+ return err
+ }
+
+ // update
+ edit_language := &schema.SchemaField{}
+ if err := json.Unmarshal([]byte(`{
+ "system": false,
+ "id": "0sepzvkh",
+ "name": "language",
+ "type": "select",
+ "required": false,
+ "presentable": false,
+ "unique": false,
+ "options": {
+ "maxSelect": 1,
+ "values": [
+ "en",
+ "de",
+ "fr",
+ "hu",
+ "it",
+ "nl",
+ "pl",
+ "pt",
+ "zh"
+ ]
+ }
+ }`), edit_language); err != nil {
+ return err
+ }
+ collection.Schema.AddField(edit_language)
+
+ return dao.SaveCollection(collection)
+ }, func(db dbx.Builder) error {
+ dao := daos.New(db);
+
+ collection, err := dao.FindCollectionByNameOrId("uavt73rsqcn1n13")
+ if err != nil {
+ return err
+ }
+
+ // update
+ edit_language := &schema.SchemaField{}
+ if err := json.Unmarshal([]byte(`{
+ "system": false,
+ "id": "0sepzvkh",
+ "name": "language",
+ "type": "select",
+ "required": false,
+ "presentable": false,
+ "unique": false,
+ "options": {
+ "maxSelect": 1,
+ "values": [
+ "en",
+ "de",
+ "fr",
+ "hu",
+ "nl",
+ "pl",
+ "pt",
+ "zh"
+ ]
+ }
+ }`), edit_language); err != nil {
+ return err
+ }
+ collection.Schema.AddField(edit_language)
+
+ return dao.SaveCollection(collection)
+ })
+}
diff --git a/docs/public/trailer.mp4 b/docs/public/trailer.mp4
new file mode 100644
index 00000000..32b6bd88
Binary files /dev/null and b/docs/public/trailer.mp4 differ
diff --git a/docs/src/assets/logo_light.svg b/docs/src/assets/logo_light.svg
new file mode 100644
index 00000000..ed6e53d7
--- /dev/null
+++ b/docs/src/assets/logo_light.svg
@@ -0,0 +1,23 @@
+
diff --git a/docs/src/content/docs/api-reference/comment.md b/docs/src/content/docs/api-reference/comment.md
index c82dd967..1b9b1cd2 100644
--- a/docs/src/content/docs/api-reference/comment.md
+++ b/docs/src/content/docs/api-reference/comment.md
@@ -21,7 +21,7 @@ GET /comment/{id}
"author": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"expand": {
"author": {
"avatar": "string",
@@ -41,7 +41,7 @@ GET /comment/{id}
"rating": 0,
"text": "string",
"trail": "string",
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -61,7 +61,7 @@ HTTP Status Code **200**
|» author|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» expand|object|true|none||none|
|»» author|object|true|none||none|
|»»» avatar|string|true|none||none|
@@ -79,7 +79,7 @@ HTTP Status Code **200**
|» rating|integer|true|none||none|
|» text|string|true|none||none|
|» trail|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **404**
@@ -135,12 +135,12 @@ POST /comment/{id}
"author": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"id": "string",
"rating": 0,
"text": "string",
"trail": "string",
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -160,12 +160,12 @@ HTTP Status Code **200**
|» author|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» id|string|true|none||none|
|» rating|integer|true|none||none|
|» text|string|true|none||none|
|» trail|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **404**
@@ -348,12 +348,12 @@ PUT /comment
"author": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"id": "string",
"rating": 0,
"text": "string",
"trail": "string",
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -373,12 +373,12 @@ HTTP Status Code **200**
|» author|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» id|string|true|none||none|
|» rating|integer|true|none||none|
|» text|string|true|none||none|
|» trail|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **400**
diff --git a/docs/src/content/docs/api-reference/list.md b/docs/src/content/docs/api-reference/list.md
index 71e3e547..08eba0f5 100644
--- a/docs/src/content/docs/api-reference/list.md
+++ b/docs/src/content/docs/api-reference/list.md
@@ -53,18 +53,134 @@ GET /list/{id}
> 200 Response
```json
-{}
+{
+ "author": "string",
+ "avatar": "string",
+ "collectionId": "string",
+ "collectionName": "string",
+ "created": "2019-08-24T14:15:22Z",
+ "description": "string",
+ "expand": {
+ "trails": [
+ {
+ "author": "string",
+ "category": "string",
+ "collectionId": "string",
+ "collectionName": "string",
+ "created": "string",
+ "date": "string",
+ "description": "string",
+ "difficulty": "string",
+ "distance": 0,
+ "duration": 0,
+ "elevation_gain": 0,
+ "expand": {
+ "category": {},
+ "waypoints": [
+ null
+ ]
+ },
+ "gpx": "string",
+ "id": "string",
+ "lat": 0,
+ "location": "string",
+ "lon": 0,
+ "name": "string",
+ "photos": [
+ "string"
+ ],
+ "public": true,
+ "summit_logs": [
+ "string"
+ ],
+ "thumbnail": 0,
+ "updated": "string",
+ "waypoints": [
+ "string"
+ ]
+ }
+ ]
+ },
+ "id": "string",
+ "name": "string",
+ "trails": [
+ "string"
+ ],
+ "updated": "2019-08-24T14:15:22Z"
+}
```
### Responses
|HTTP Status Code |Meaning|Description|Data schema|
|---|---|---|---|
-|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|Success|Inline|
+|200|[OK](https://tools.ietf.org/html/rfc7231#section-6.3.1)|OK|Inline|
|404|[Not Found](https://tools.ietf.org/html/rfc7231#section-6.5.4)|Record Not Found|Inline|
### Responses Data Schema
+HTTP Status Code **200**
+
+|Name|Type|Required|Restrictions|Title|description|
+|---|---|---|---|---|---|
+|» author|string|true|none||none|
+|» avatar|string|true|none||none|
+|» collectionId|string|true|none||none|
+|» collectionName|string|true|none||none|
+|» created|string(date-time)|true|none||none|
+|» description|string|true|none||none|
+|» expand|object|true|none||none|
+|»» trails|[object]|true|none||none|
+|»»» author|string|true|none||none|
+|»»» category|string|true|none||none|
+|»»» collectionId|string|true|none||none|
+|»»» collectionName|string|true|none||none|
+|»»» created|string|true|none||none|
+|»»» date|string|true|none||none|
+|»»» description|string|true|none||none|
+|»»» difficulty|string|true|none||none|
+|»»» distance|number|true|none||none|
+|»»» duration|integer|true|none||none|
+|»»» elevation_gain|number|true|none||none|
+|»»» expand|object|true|none||none|
+|»»»» category|object|true|none||none|
+|»»»»» collectionId|string|true|none||none|
+|»»»»» collectionName|string|true|none||none|
+|»»»»» created|string|true|none||none|
+|»»»»» id|string|true|none||none|
+|»»»»» img|string|true|none||none|
+|»»»»» name|string|true|none||none|
+|»»»»» updated|string|true|none||none|
+|»»»» waypoints|[object]|true|none||none|
+|»»»»» author|string|true|none||none|
+|»»»»» collectionId|string|true|none||none|
+|»»»»» collectionName|string|true|none||none|
+|»»»»» created|string|true|none||none|
+|»»»»» description|string|true|none||none|
+|»»»»» icon|string|true|none||none|
+|»»»»» id|string|true|none||none|
+|»»»»» lat|number|true|none||none|
+|»»»»» lon|number|true|none||none|
+|»»»»» name|string|true|none||none|
+|»»»»» photos|[string]|true|none||none|
+|»»»»» updated|string|true|none||none|
+|»»» gpx|string|true|none||none|
+|»»» id|string|true|none||none|
+|»»» lat|number|true|none||none|
+|»»» location|string|true|none||none|
+|»»» lon|number|true|none||none|
+|»»» name|string|true|none||none|
+|»»» photos|[string]|true|none||none|
+|»»» public|boolean|true|none||none|
+|»»» summit_logs|[string]|true|none||none|
+|»»» thumbnail|integer|true|none||none|
+|»»» updated|string|true|none||none|
+|»»» waypoints|[string]|true|none||none|
+|» id|string|true|none||none|
+|» name|string|true|none||none|
+|» trails|[string]|true|none||none|
+|» updated|string(date-time)|true|none||none|
+
HTTP Status Code **404**
|Name|Type|Required|Restrictions|Title|description|
@@ -93,7 +209,8 @@ POST /list/{id}
```json
{
- "name": "string"
+ "name": "string",
+ "description": "string"
}
```
@@ -105,6 +222,7 @@ POST /list/{id}
|Content-Type|header|string| yes |none|
|body|body|object| no |none|
|» name|body|string| yes |none|
+|» description|body|string| no |none|
> Response Examples
@@ -116,14 +234,14 @@ POST /list/{id}
"avatar": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"name": "string",
"trails": [
"string"
],
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -144,12 +262,12 @@ HTTP Status Code **200**
|» avatar|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» description|string|true|none||none|
|» id|string|true|none||none|
|» name|string|true|none||none|
|» trails|[string]|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **404**
@@ -393,14 +511,14 @@ PUT /list
"avatar": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"name": "string",
"trails": [
"string"
],
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -421,12 +539,12 @@ HTTP Status Code **200**
|» avatar|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» description|string|true|none||none|
|» id|string|true|none||none|
|» name|string|true|none||none|
|» trails|[string]|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **400**
diff --git a/docs/src/content/docs/api-reference/summit-log.md b/docs/src/content/docs/api-reference/summit-log.md
index ca3e8f6a..2578d1da 100644
--- a/docs/src/content/docs/api-reference/summit-log.md
+++ b/docs/src/content/docs/api-reference/summit-log.md
@@ -20,11 +20,11 @@ GET /summit-log/{id}
{
"collectionId": "string",
"collectionName": "string",
- "created": "string",
- "date": "string",
+ "created": "2019-08-24T14:15:22Z",
+ "date": "2019-08-24",
"id": "string",
"text": "string",
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -43,11 +43,11 @@ HTTP Status Code **200**
|---|---|---|---|---|---|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
-|» date|string|true|none||none|
+|» created|string(date-time)|true|none||none|
+|» date|string(date)|true|none||none|
|» id|string|true|none||none|
|» text|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **404**
@@ -77,7 +77,8 @@ POST /summit-log/{id}
```json
{
- "name": "string"
+ "date": "2019-08-24",
+ "text": "string"
}
```
@@ -88,7 +89,8 @@ POST /summit-log/{id}
|id|path|string| yes |none|
|Content-Type|header|string| yes |none|
|body|body|object| no |none|
-|» name|body|string| yes |none|
+|» date|body|string(date)| yes |none|
+|» text|body|string| no |none|
> Response Examples
@@ -98,11 +100,11 @@ POST /summit-log/{id}
{
"collectionId": "string",
"collectionName": "string",
- "created": "string",
- "date": "string",
+ "created": "2019-08-24T14:15:22Z",
+ "date": "2019-08-24",
"id": "string",
"text": "string",
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -121,11 +123,11 @@ HTTP Status Code **200**
|---|---|---|---|---|---|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
-|» date|string|true|none||none|
+|» created|string(date-time)|true|none||none|
+|» date|string(date)|true|none||none|
|» id|string|true|none||none|
|» text|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **404**
@@ -252,7 +254,7 @@ PUT /summit-log
```json
{
- "date": "string",
+ "date": "2019-08-24",
"text": "string"
}
```
@@ -262,8 +264,8 @@ PUT /summit-log
|Name|Location|Type|Required|Description|
|---|---|---|---|---|
|body|body|object| no |none|
-|» date|body|string| yes |none|
-|» text|body|string| yes |none|
+|» date|body|string(date)| yes |none|
+|» text|body|string| no |none|
> Response Examples
@@ -273,11 +275,11 @@ PUT /summit-log
{
"collectionId": "string",
"collectionName": "string",
- "created": "string",
- "date": "string",
+ "created": "2019-08-24T14:15:22Z",
+ "date": "2019-08-24",
"id": "string",
"text": "string",
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -296,11 +298,11 @@ HTTP Status Code **200**
|---|---|---|---|---|---|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
-|» date|string|true|none||none|
+|» created|string(date-time)|true|none||none|
+|» date|string(date)|true|none||none|
|» id|string|true|none||none|
|» text|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **400**
diff --git a/docs/src/content/docs/api-reference/trail-share.md b/docs/src/content/docs/api-reference/trail-share.md
index f625996b..797dce26 100644
--- a/docs/src/content/docs/api-reference/trail-share.md
+++ b/docs/src/content/docs/api-reference/trail-share.md
@@ -20,11 +20,11 @@ GET /trail-share/{id}
{
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"id": "string",
- "permission": "string",
+ "permission": "view",
"trail": "string",
- "updated": "string",
+ "updated": "2019-08-24T14:15:22Z",
"user": "string"
}
```
@@ -44,13 +44,20 @@ HTTP Status Code **200**
|---|---|---|---|---|---|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» id|string|true|none||none|
|» permission|string|true|none||none|
|» trail|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
|» user|string|true|none||none|
+#### Enum
+
+|Name|Value|
+|---|---|
+|permission|view|
+|permission|edit|
+
HTTP Status Code **404**
|Name|Type|Required|Restrictions|Title|description|
@@ -111,11 +118,11 @@ POST /trail-share/{id}
{
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"id": "string",
- "permission": "string",
+ "permission": "view",
"trail": "string",
- "updated": "string",
+ "updated": "2019-08-24T14:15:22Z",
"user": "string"
}
```
@@ -135,13 +142,20 @@ HTTP Status Code **200**
|---|---|---|---|---|---|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» id|string|true|none||none|
|» permission|string|true|none||none|
|» trail|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
|» user|string|true|none||none|
+#### Enum
+
+|Name|Value|
+|---|---|
+|permission|view|
+|permission|edit|
+
HTTP Status Code **404**
|Name|Type|Required|Restrictions|Title|description|
@@ -315,11 +329,11 @@ PUT /trail-share
{
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"id": "string",
- "permission": "string",
+ "permission": "view",
"trail": "string",
- "updated": "string",
+ "updated": "2019-08-24T14:15:22Z",
"user": "string"
}
```
@@ -339,13 +353,20 @@ HTTP Status Code **200**
|---|---|---|---|---|---|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» id|string|true|none||none|
|» permission|string|true|none||none|
|» trail|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
|» user|string|true|none||none|
+#### Enum
+
+|Name|Value|
+|---|---|
+|permission|view|
+|permission|edit|
+
HTTP Status Code **400**
|Name|Type|Required|Restrictions|Title|description|
diff --git a/docs/src/content/docs/api-reference/trail.md b/docs/src/content/docs/api-reference/trail.md
index 513155eb..9c544b84 100644
--- a/docs/src/content/docs/api-reference/trail.md
+++ b/docs/src/content/docs/api-reference/trail.md
@@ -60,9 +60,10 @@ GET /trail/{id}
"category": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
+ "date": "2019-08-24",
"description": "string",
- "difficulty": "string",
+ "difficulty": "easy",
"distance": 0,
"duration": 0,
"elevation_gain": 0,
@@ -80,7 +81,7 @@ GET /trail/{id}
"string"
],
"thumbnail": 0,
- "updated": "string",
+ "updated": "2019-08-24T14:15:22Z",
"waypoints": [
"string"
]
@@ -104,12 +105,13 @@ HTTP Status Code **200**
|» category|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
+|» date|string(date)|true|none||none|
|» description|string|true|none||none|
|» difficulty|string|true|none||none|
-|» distance|integer|true|none||none|
-|» duration|integer|true|none||none|
-|» elevation_gain|integer|true|none||none|
+|» distance|number|true|none||none|
+|» duration|number|true|none||none|
+|» elevation_gain|number|true|none||none|
|» gpx|string|true|none||none|
|» id|string|true|none||none|
|» lat|number|true|none||none|
@@ -120,9 +122,17 @@ HTTP Status Code **200**
|» public|boolean|true|none||none|
|» summit_logs|[string]|true|none||none|
|» thumbnail|integer|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
|» waypoints|[string]|true|none||none|
+#### Enum
+
+|Name|Value|
+|---|---|
+|difficulty|easy|
+|difficulty|moderate|
+|difficulty|hard|
+
HTTP Status Code **404**
|Name|Type|Required|Restrictions|Title|description|
@@ -151,7 +161,18 @@ POST /trail/{id}
```json
{
- "name": "string"
+ "name": "string",
+ "category": "string",
+ "description": "string",
+ "difficulty": "easy",
+ "distance": 0,
+ "duration": 0,
+ "elevation_gain": 0,
+ "lat": 0,
+ "location": "string",
+ "lon": 0,
+ "public": true,
+ "thumbnail": 0
}
```
@@ -163,6 +184,25 @@ POST /trail/{id}
|Content-Type|header|string| yes |none|
|body|body|object| no |none|
|» name|body|string| yes |none|
+|» category|body|string| no |none|
+|» description|body|string| no |none|
+|» difficulty|body|string| no |none|
+|» distance|body|number| no |none|
+|» duration|body|number| no |none|
+|» elevation_gain|body|number| no |none|
+|» lat|body|number| no |none|
+|» location|body|string| no |none|
+|» lon|body|number| no |none|
+|» public|body|boolean| no |none|
+|» thumbnail|body|integer| no |none|
+
+#### Enum
+
+|Name|Value|
+|---|---|
+|» difficulty|easy|
+|» difficulty|moderate|
+|» difficulty|hard|
> Response Examples
@@ -174,9 +214,10 @@ POST /trail/{id}
"category": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
+ "date": "2019-08-24",
"description": "string",
- "difficulty": "string",
+ "difficulty": "easy",
"distance": 0,
"duration": 0,
"elevation_gain": 0,
@@ -223,7 +264,7 @@ POST /trail/{id}
"string"
],
"thumbnail": 0,
- "updated": "string",
+ "updated": "2019-08-24T14:15:22Z",
"waypoints": [
"string"
]
@@ -247,12 +288,13 @@ HTTP Status Code **200**
|» category|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
+|» date|string(date)|true|none||none|
|» description|string|true|none||none|
|» difficulty|string|true|none||none|
-|» distance|integer|true|none||none|
-|» duration|integer|true|none||none|
-|» elevation_gain|integer|true|none||none|
+|» distance|number|true|none||none|
+|» duration|number|true|none||none|
+|» elevation_gain|number|true|none||none|
|» expand|object|true|none||none|
|»» category|object|true|none||none|
|»»» collectionId|string|true|none||none|
@@ -285,9 +327,17 @@ HTTP Status Code **200**
|» public|boolean|true|none||none|
|» summit_logs|[string]|true|none||none|
|» thumbnail|integer|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
|» waypoints|[string]|true|none||none|
+#### Enum
+
+|Name|Value|
+|---|---|
+|difficulty|easy|
+|difficulty|moderate|
+|difficulty|hard|
+
HTTP Status Code **404**
|Name|Type|Required|Restrictions|Title|description|
@@ -476,34 +526,35 @@ string
```json
{
- "name": "string",
- "public": true,
- "difficulty": "string",
+ "author": "string",
+ "category": "string",
+ "collectionId": "string",
+ "collectionName": "string",
+ "created": "2019-08-24T14:15:22Z",
+ "date": "2019-08-24",
+ "description": "string",
+ "difficulty": "easy",
+ "distance": 0,
+ "duration": 0,
+ "elevation_gain": 0,
+ "gpx": "string",
+ "id": "string",
"lat": 0,
+ "location": "string",
"lon": 0,
- "thumbnail": 0,
+ "name": "string",
"photos": [
"string"
],
- "waypoints": [
- "string"
- ],
+ "public": true,
"summit_logs": [
"string"
],
- "expand": {
- "waypoints": [
- "string"
- ],
- "summit_logs": [
- "string"
- ]
- },
- "tags": [
+ "thumbnail": 0,
+ "updated": "2019-08-24T14:15:22Z",
+ "waypoints": [
"string"
- ],
- "description": "string",
- "author": "string"
+ ]
}
```
@@ -524,8 +575,8 @@ HTTP Status Code **200**
|» category|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
-|» date|string|true|none||none|
+|» created|string(date-time)|true|none||none|
+|» date|string(date)|true|none||none|
|» description|string|true|none||none|
|» difficulty|string|true|none||none|
|» distance|number|true|none||none|
@@ -541,9 +592,17 @@ HTTP Status Code **200**
|» public|boolean|true|none||none|
|» summit_logs|[string]|true|none||none|
|» thumbnail|integer|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
|» waypoints|[string]|true|none||none|
+#### Enum
+
+|Name|Value|
+|---|---|
+|difficulty|easy|
+|difficulty|moderate|
+|difficulty|hard|
+
HTTP Status Code **400**
|Name|Type|Required|Restrictions|Title|description|
diff --git a/docs/src/content/docs/api-reference/user.md b/docs/src/content/docs/api-reference/user.md
index 03d98660..3b32a13a 100644
--- a/docs/src/content/docs/api-reference/user.md
+++ b/docs/src/content/docs/api-reference/user.md
@@ -57,19 +57,12 @@ GET /user/{id}
"avatar": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"email": "string",
"emailVisibility": true,
"id": "string",
- "language": "string",
- "location": {
- "lat": 0,
- "lon": 0,
- "name": "string"
- },
"token": "string",
- "unit": "string",
- "updated": "string",
+ "updated": "2019-08-24T14:15:22Z",
"username": "string",
"verified": true
}
@@ -91,18 +84,12 @@ HTTP Status Code **200**
|» avatar|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» email|string|true|none||none|
|» emailVisibility|boolean|true|none||none|
|» id|string|true|none||none|
-|» language|string|true|none||none|
-|» location|object|true|none||none|
-|»» lat|number|true|none||none|
-|»» lon|number|true|none||none|
-|»» name|string|true|none||none|
|» token|string|true|none||none|
-|» unit|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
|» username|string|true|none||none|
|» verified|boolean|true|none||none|
@@ -153,19 +140,12 @@ POST /user/{id}
"avatar": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"email": "string",
"emailVisibility": true,
"id": "string",
- "language": "string",
- "location": {
- "lat": 0,
- "lon": 0,
- "name": "string"
- },
"token": "string",
- "unit": "string",
- "updated": "string",
+ "updated": "2019-08-24T14:15:22Z",
"username": "string",
"verified": true
}
@@ -187,18 +167,12 @@ HTTP Status Code **200**
|» avatar|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» email|string|true|none||none|
|» emailVisibility|boolean|true|none||none|
|» id|string|true|none||none|
-|» language|string|true|none||none|
-|» location|object|true|none||none|
-|»» lat|number|true|none||none|
-|»» lon|number|true|none||none|
-|»» name|string|true|none||none|
|» token|string|true|none||none|
-|» unit|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
|» username|string|true|none||none|
|» verified|boolean|true|none||none|
@@ -311,14 +285,11 @@ PUT /user
"avatar": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"emailVisibility": true,
"id": "string",
- "language": "string",
- "location": null,
"token": "string",
- "unit": "string",
- "updated": "string",
+ "updated": "2019-08-24T14:15:22Z",
"username": "string",
"verified": true
}
@@ -340,14 +311,11 @@ HTTP Status Code **200**
|» avatar|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» emailVisibility|boolean|true|none||none|
|» id|string|true|none||none|
-|» language|string|true|none||none|
-|» location|null|true|none||none|
|» token|string|true|none||none|
-|» unit|string|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
|» username|string|true|none||none|
|» verified|boolean|true|none||none|
diff --git a/docs/src/content/docs/api-reference/waypoint.md b/docs/src/content/docs/api-reference/waypoint.md
index eed606d1..eb1cc49f 100644
--- a/docs/src/content/docs/api-reference/waypoint.md
+++ b/docs/src/content/docs/api-reference/waypoint.md
@@ -21,7 +21,7 @@ GET /waypoint/{id}
"author": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"description": "string",
"icon": "string",
"id": "string",
@@ -31,7 +31,7 @@ GET /waypoint/{id}
"photos": [
"string"
],
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -51,15 +51,15 @@ HTTP Status Code **200**
|» author|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» description|string|true|none||none|
|» icon|string|true|none||none|
|» id|string|true|none||none|
-|» lat|integer|true|none||none|
-|» lon|integer|true|none||none|
+|» lat|number|true|none||none|
+|» lon|number|true|none||none|
|» name|string|true|none||none|
|» photos|[string]|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **404**
@@ -89,7 +89,11 @@ POST /waypoint/{id}
```json
{
- "name": "string"
+ "name": "string",
+ "description": "string",
+ "lat": 0,
+ "lon": 0,
+ "icon": "string"
}
```
@@ -100,7 +104,11 @@ POST /waypoint/{id}
|id|path|string| yes |none|
|Content-Type|header|string| yes |none|
|body|body|object| no |none|
-|» name|body|string| yes |none|
+|» name|body|string| no |none|
+|» description|body|string| no |none|
+|» lat|body|number| yes |none|
+|» lon|body|number| yes |none|
+|» icon|body|string| no |none|
> Response Examples
@@ -111,7 +119,7 @@ POST /waypoint/{id}
"author": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"description": "string",
"icon": "string",
"id": "string",
@@ -121,7 +129,7 @@ POST /waypoint/{id}
"photos": [
"string"
],
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -141,15 +149,15 @@ HTTP Status Code **200**
|» author|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» description|string|true|none||none|
|» icon|string|true|none||none|
|» id|string|true|none||none|
-|» lat|integer|true|none||none|
-|» lon|integer|true|none||none|
+|» lat|number|true|none||none|
+|» lon|number|true|none||none|
|» name|string|true|none||none|
|» photos|[string]|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **404**
@@ -305,8 +313,8 @@ PUT /waypoint
|» name|body|string| no |none|
|» description|body|string| no |none|
|» author|body|string| yes |none|
-|» lat|body|integer| yes |none|
-|» lon|body|integer| yes |none|
+|» lat|body|number| yes |none|
+|» lon|body|number| yes |none|
|» icon|body|string| no |none|
> Response Examples
@@ -318,7 +326,7 @@ PUT /waypoint
"author": "string",
"collectionId": "string",
"collectionName": "string",
- "created": "string",
+ "created": "2019-08-24T14:15:22Z",
"description": "string",
"icon": "string",
"id": "string",
@@ -328,7 +336,7 @@ PUT /waypoint
"photos": [
"string"
],
- "updated": "string"
+ "updated": "2019-08-24T14:15:22Z"
}
```
@@ -348,15 +356,15 @@ HTTP Status Code **200**
|» author|string|true|none||none|
|» collectionId|string|true|none||none|
|» collectionName|string|true|none||none|
-|» created|string|true|none||none|
+|» created|string(date-time)|true|none||none|
|» description|string|true|none||none|
|» icon|string|true|none||none|
|» id|string|true|none||none|
-|» lat|integer|true|none||none|
-|» lon|integer|true|none||none|
+|» lat|number|true|none||none|
+|» lon|number|true|none||none|
|» name|string|true|none||none|
|» photos|[string]|true|none||none|
-|» updated|string|true|none||none|
+|» updated|string(date-time)|true|none||none|
HTTP Status Code **400**
@@ -377,4 +385,3 @@ HTTP Status Code **400**
|»»» message|string|true|none||none|
|»»» data|object|true|none||none|
|» name|string|true|none||none|
-
diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx
index 133a3ecf..9ff6d96a 100644
--- a/docs/src/content/docs/index.mdx
+++ b/docs/src/content/docs/index.mdx
@@ -7,7 +7,8 @@ hero:
Welcome to wanderer
tagline: wanderer is a self-hosted trail database. You can upload your recorded GPS tracks or create new ones and add various metadata to build an easily searchable catalogue.
image:
- file: ../../assets/logo_dark.svg
+ html:
+
actions:
- text: Try the demo
link: https://demo.wanderer.to
diff --git a/web/package-lock.json b/web/package-lock.json
index 5aeed1ee..8510569a 100644
--- a/web/package-lock.json
+++ b/web/package-lock.json
@@ -16,6 +16,7 @@
"@types/three": "^0.161.2",
"canvg": "^4.0.1",
"crypto-random-string": "^5.0.0",
+ "easy-fit": "^0.0.8",
"instead": "^1.0.3",
"isomorphic-xml2js": "^0.1.3",
"jspdf": "^2.5.1",
@@ -2234,6 +2235,11 @@
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==",
"dev": true
},
+ "node_modules/easy-fit": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/easy-fit/-/easy-fit-0.0.8.tgz",
+ "integrity": "sha512-59BXYGsiteuFG7qfkOccPz2ioXH9RTWcO4ffY/m3niYdAyzYSsSkgqOB6vKncLcbIBZU9cC8V12dCbeAlPBeew=="
+ },
"node_modules/electron-to-chromium": {
"version": "1.4.647",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.647.tgz",
diff --git a/web/package.json b/web/package.json
index 17ca6302..ff4880c1 100644
--- a/web/package.json
+++ b/web/package.json
@@ -40,6 +40,7 @@
"@types/three": "^0.161.2",
"canvg": "^4.0.1",
"crypto-random-string": "^5.0.0",
+ "easy-fit": "^0.0.8",
"instead": "^1.0.3",
"isomorphic-xml2js": "^0.1.3",
"jspdf": "^2.5.1",
diff --git a/web/src/lib/components/trail/map_with_elevation.svelte b/web/src/lib/components/trail/map_with_elevation.svelte
index c57c5dc1..a7b15dbd 100644
--- a/web/src/lib/components/trail/map_with_elevation.svelte
+++ b/web/src/lib/components/trail/map_with_elevation.svelte
@@ -9,12 +9,12 @@
import "leaflet/dist/leaflet.css";
import { createEventDispatcher, onMount } from "svelte";
import { _ } from "svelte-i18n";
- import Dropdown, { type DropdownItem } from "../base/dropdown.svelte";
+ import Dropdown from "../base/dropdown.svelte";
export let trail: Trail | null;
export let markers: Marker[] = [];
export let map: Map | null = null;
- export let options = {};
+ export let options: any = {};
export let graticule: AutoGraticule | null = null;
export let crosshair: boolean = false;
@@ -28,7 +28,7 @@
$: gpxData = trail?.expand.gpx_data;
$: if (gpxData && controlElevation) {
controlElevation.updateOptions({
- autofitBounds: true,
+ autofitBounds: options.autofitBounds ?? true,
});
controlElevation.clear();
controlElevation.load(gpxData);
diff --git a/web/src/lib/i18n/index.ts b/web/src/lib/i18n/index.ts
index d4ba4086..c64d3947 100644
--- a/web/src/lib/i18n/index.ts
+++ b/web/src/lib/i18n/index.ts
@@ -9,6 +9,7 @@ register('en', () => import('./locales/en.json'))
register('de', () => import('./locales/de.json'))
register('fr', () => import('./locales/fr.json'))
register('hu', () => import('./locales/hu.json'))
+register('it', () => import('./locales/it.json'))
register('nl', () => import('./locales/nl.json'))
register('pl', () => import('./locales/pl.json'))
register('pt', () => import('./locales/pt.json'))
diff --git a/web/src/lib/models/settings.ts b/web/src/lib/models/settings.ts
index 85c5abd0..3c92a168 100644
--- a/web/src/lib/models/settings.ts
+++ b/web/src/lib/models/settings.ts
@@ -2,14 +2,14 @@
class Settings {
id?: string;
unit?: "metric" | "imperial";
- language?: "en" | "de" | "fr" | "hu" | "nl" | "pl" | "pt" | "zh";
+ language?: "en" | "de" | "fr" | "hu"| "it" | "nl" | "pl" | "pt" | "zh";
mapFocus?: "trails" | "location";
location?: { name: string, lat: number, lon: number };
user?: string;
constructor(
unit: "metric" | "imperial",
- language: "en" | "de" | "fr" | "hu" | "nl" | "pl" | "pt" | "zh",
+ language: "en" | "de" | "fr" | "hu"| "it" | "nl" | "pl" | "pt" | "zh",
mapFocus: "trails" | "location",
user: string,
params?: {
diff --git a/web/src/lib/util/gpx_util.ts b/web/src/lib/util/gpx_util.ts
index f35388c2..8a3f8316 100644
--- a/web/src/lib/util/gpx_util.ts
+++ b/web/src/lib/util/gpx_util.ts
@@ -1,11 +1,16 @@
import GPX from "$lib/models/gpx/gpx";
import { Trail } from "$lib/models/trail";
-import { Waypoint } from "$lib/models/waypoint";
+import { Waypoint, waypointSchema } from "$lib/models/waypoint";
import { currentUser } from "$lib/stores/user_store";
import GeoJsonToGpx from "$lib/vendor/geoJSONToGPX";
import { kml, tcx } from "$lib/vendor/toGeoJSON/toGeoJSON";
import cryptoRandomString from "crypto-random-string";
import { get } from "svelte/store";
+//@ts-ignore
+import EasyFit from "easy-fit"
+import Track from "$lib/models/gpx/track";
+import TrackSegment from "$lib/models/gpx/track-segment";
+import GPXWaypoint from "$lib/models/gpx/waypoint";
export async function gpx2trail(gpxString: string) {
const gpx = await GPX.parse(gpxString);
@@ -16,7 +21,7 @@ export async function gpx2trail(gpxString: string) {
const trail = new Trail("");
- trail.name = gpx.metadata?.name || gpx.trk?.at(0)?.name || gpx.rte?.at(0)?.name || `trail-${new Date().toISOString()}`;
+ trail.name = gpx.metadata?.name || gpx.trk?.at(0)?.name || gpx.rte?.at(0)?.name || `trail-${new Date().toISOString()}`;
trail.description = gpx.metadata?.desc;
@@ -72,13 +77,13 @@ export async function trail2gpx(trail: Trail) {
author: { name: trail.author ?? "", email: get(currentUser)?.email ?? "" }
}
- if(!gpx.wpt) {
+ if (!gpx.wpt) {
gpx.wpt = [];
}
for (const wp of trail.expand.waypoints) {
const gpxWpt = gpx.wpt.find((w) => w.$.lat == wp.lat && w.$.lon == wp.lon)
- if(!gpxWpt) {
+ if (!gpxWpt) {
gpx.wpt.push({
$: {
lat: wp.lat,
@@ -124,4 +129,43 @@ export function fromTCX(tcxData: string) {
}
const gpx = GeoJsonToGpx(geojson as any, options)
return new XMLSerializer().serializeToString(gpx)
+}
+
+export async function fromFIT(fitData: ArrayBuffer) {
+ const easyFit = new EasyFit({
+ });
+ return new Promise((resolve, reject) => easyFit.parse(fitData, function (error: string, data: any) {
+
+ if (error) {
+ console.log(error);
+ reject(error)
+ }
+ console.log(data);
+
+ const gpx = new GPX({
+ metadata: {
+ name: "",
+ desc: "",
+ time: data.activity?.timestamp ?? new Date(),
+ keywords: "wanderer"
+ },
+ trk: [
+ new Track({
+ trkseg: new TrackSegment({
+ trkpt: data.records.flatMap((d => {
+ return (d.position_lat && d.position_long) ? new GPXWaypoint({
+ $: { lat: d.position_lat, lon: d.position_long },
+ time: d.timestamp,
+ ele: d.altitude
+
+ }) : []
+ }))
+ })
+ })
+ ]
+ });
+ console.log(gpx);
+
+ resolve(gpx.toString());
+ }));
}
\ No newline at end of file
diff --git a/web/src/routes/profile/+page.svelte b/web/src/routes/profile/+page.svelte
index f2521420..ed5978b8 100644
--- a/web/src/routes/profile/+page.svelte
+++ b/web/src/routes/profile/+page.svelte
@@ -31,6 +31,7 @@
{ text: $_("english"), value: "en" },
{ text: $_("french"), value: "fr" },
{ text: $_("hungarian"), value: "hu" },
+ { text: $_("italian"), value: "it" },
{ text: $_("dutch"), value: "nl" },
{ text: $_("polish"), value: "pl" },
{ text: $_("portuguese"), value: "pt" },
diff --git a/web/src/routes/trail/edit/[id]/+page.svelte b/web/src/routes/trail/edit/[id]/+page.svelte
index e72f2d24..768f1bea 100644
--- a/web/src/routes/trail/edit/[id]/+page.svelte
+++ b/web/src/routes/trail/edit/[id]/+page.svelte
@@ -50,7 +50,7 @@
formatElevation,
formatTimeHHMM,
} from "$lib/util/format_util";
- import { fromKML, fromTCX, gpx2trail } from "$lib/util/gpx_util";
+ import { fromFIT, fromKML, fromTCX, gpx2trail } from "$lib/util/gpx_util";
import {
createAnchorMarker,
createMarkerFromWaypoint,
@@ -221,7 +221,37 @@
document.getElementById("fileInput")!.click();
}
- function handleFileSelection() {
+ async function parseFile(file: File) {
+ const fileExtension = file.name.split(".").pop()?.toLowerCase();
+
+ let gpxData = "";
+
+ if (fileExtension !== "fit") {
+ const fileContent = await file.text();
+ if (fileContent.includes("http://www.opengis.net/kml")) {
+ gpxData = fromKML(fileContent);
+ gpxFile = new Blob([gpxData], {
+ type: "application/gpx+xml",
+ });
+ return gpxData;
+ } else if (fileContent.includes("TrainingCenterDatabase")) {
+ gpxData = fromTCX(fileContent);
+ gpxFile = new Blob([gpxData], {
+ type: "application/gpx+xml",
+ });
+ } else {
+ gpxData = fileContent;
+ gpxFile = file;
+ }
+ } else {
+ const fileContent = await file.arrayBuffer();
+ gpxData = await fromFIT(fileContent);
+ }
+
+ return gpxData
+ }
+
+ async function handleFileSelection() {
const selectedFile = (
document.getElementById("fileInput") as HTMLInputElement
).files?.[0];
@@ -235,61 +265,45 @@
clearRoute();
drawingActive = false;
overwriteGPX = false;
- var reader = new FileReader();
- reader.readAsText(selectedFile);
+ let gpxData = await parseFile(selectedFile);
- reader.onload = async function (e) {
- let gpxData = "";
- const fileContent = e.target?.result as string;
- if (fileContent.includes("http://www.opengis.net/kml")) {
- gpxData = fromKML(e.target?.result as string);
- gpxFile = new Blob([gpxData], { type: "application/gpx+xml" });
- } else if (fileContent.includes("TrainingCenterDatabase")) {
- gpxData = fromTCX(e.target?.result as string);
- gpxFile = new Blob([gpxData], { type: "application/gpx+xml" });
- } else {
- gpxData = fileContent;
- gpxFile = selectedFile;
+ try {
+ const parseResult = await gpx2trail(gpxData);
+ $form = parseResult.trail;
+ $form.expand.gpx_data = gpxData;
+ $form.category = $categories[0].id;
+
+ setRoute(parseResult.gpx);
+ initRouteAnchors(parseResult.gpx);
+
+ for (const waypoint of $form.expand.waypoints) {
+ saveWaypoint(waypoint);
}
- try {
- const parseResult = await gpx2trail(gpxData);
- $form = parseResult.trail;
- $form.expand.gpx_data = gpxData;
+ } catch (e) {
+ console.log(e);
- setRoute(parseResult.gpx);
- initRouteAnchors(parseResult.gpx);
-
- for (const waypoint of $form.expand.waypoints) {
- saveWaypoint(waypoint);
- }
- } catch (e) {
- console.log(e);
-
- show_toast({
- icon: "close",
- type: "error",
- text: $_("error-reading-file"),
- });
- return;
- }
- const r = await fetch("/api/v1/search/cities500", {
- method: "POST",
- body: JSON.stringify({
- q: "",
- options: {
- filter: [
- `_geoRadius(${$form.lat}, ${$form.lon}, 10000)`,
- ],
- sort: [`_geoPoint(${$form.lat}, ${$form.lon}):asc`],
- limit: 1,
- },
- }),
+ show_toast({
+ icon: "close",
+ type: "error",
+ text: $_("error-reading-file"),
});
- const closestCity = (await r.json()).hits[0];
+ return;
+ }
+ const r = await fetch("/api/v1/search/cities500", {
+ method: "POST",
+ body: JSON.stringify({
+ q: "",
+ options: {
+ filter: [`_geoRadius(${$form.lat}, ${$form.lon}, 10000)`],
+ sort: [`_geoPoint(${$form.lat}, ${$form.lon}):asc`],
+ limit: 1,
+ },
+ }),
+ });
+ const closestCity = (await r.json()).hits[0];
- $form.location = closestCity.name;
- };
+ $form.location = closestCity.name;
}
function clearWaypoints() {
@@ -386,7 +400,7 @@
}
function beforSummitLogModalOpen() {
- summitLog.set(new SummitLog(new Date().toISOString().split('T')[0]));
+ summitLog.set(new SummitLog(new Date().toISOString().split("T")[0]));
openSummitLogModal();
}
@@ -640,7 +654,7 @@
type="file"
name="gpx"
id="fileInput"
- accept=".gpx,.GPX,.tcx,.TCX,.kml,.KML"
+ accept=".gpx,.GPX,.tcx,.TCX,.kml,.KML,.fit,.FIT"
style="display: none;"
on:change={handleFileSelection}
/>