diff --git a/db/__debug_bin2531684965 b/db/__debug_bin2531684965 deleted file mode 100755 index 51fc79e8..00000000 Binary files a/db/__debug_bin2531684965 and /dev/null differ diff --git a/db/migrations/1742128778_updated_trails.go b/db/migrations/1742128778_updated_trails.go new file mode 100644 index 00000000..233892ac --- /dev/null +++ b/db/migrations/1742128778_updated_trails.go @@ -0,0 +1,91 @@ +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("e864strfxo14pm4") + if err != nil { + return err + } + + // update + edit_photos := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "aqbpyawe", + "name": "photos", + "type": "file", + "required": false, + "presentable": false, + "unique": false, + "options": { + "mimeTypes": [ + "image/jpeg", + "image/vnd.mozilla.apng", + "image/png", + "image/webp", + "image/svg+xml", + "image/heic", + "video/mp4" + ], + "thumbs": [], + "maxSelect": 99, + "maxSize": 20971520, + "protected": false + } + }`), edit_photos); err != nil { + return err + } + collection.Schema.AddField(edit_photos) + + return dao.SaveCollection(collection) + }, func(db dbx.Builder) error { + dao := daos.New(db); + + collection, err := dao.FindCollectionByNameOrId("e864strfxo14pm4") + if err != nil { + return err + } + + // update + edit_photos := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "aqbpyawe", + "name": "photos", + "type": "file", + "required": false, + "presentable": false, + "unique": false, + "options": { + "mimeTypes": [ + "image/jpeg", + "image/vnd.mozilla.apng", + "image/png", + "image/webp", + "image/svg+xml", + "image/heic" + ], + "thumbs": [], + "maxSelect": 99, + "maxSize": 20971520, + "protected": false + } + }`), edit_photos); err != nil { + return err + } + collection.Schema.AddField(edit_photos) + + return dao.SaveCollection(collection) + }) +} diff --git a/db/migrations/1742138390_updated_trails.go b/db/migrations/1742138390_updated_trails.go new file mode 100644 index 00000000..e48de61e --- /dev/null +++ b/db/migrations/1742138390_updated_trails.go @@ -0,0 +1,94 @@ +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("e864strfxo14pm4") + if err != nil { + return err + } + + // update + edit_photos := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "aqbpyawe", + "name": "photos", + "type": "file", + "required": false, + "presentable": false, + "unique": false, + "options": { + "mimeTypes": [ + "image/jpeg", + "image/vnd.mozilla.apng", + "image/png", + "image/webp", + "image/svg+xml", + "image/heic", + "video/mp4", + "video/webm", + "video/ogg" + ], + "thumbs": [], + "maxSelect": 99, + "maxSize": 20971520, + "protected": false + } + }`), edit_photos); err != nil { + return err + } + collection.Schema.AddField(edit_photos) + + return dao.SaveCollection(collection) + }, func(db dbx.Builder) error { + dao := daos.New(db); + + collection, err := dao.FindCollectionByNameOrId("e864strfxo14pm4") + if err != nil { + return err + } + + // update + edit_photos := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "aqbpyawe", + "name": "photos", + "type": "file", + "required": false, + "presentable": false, + "unique": false, + "options": { + "mimeTypes": [ + "image/jpeg", + "image/vnd.mozilla.apng", + "image/png", + "image/webp", + "image/svg+xml", + "image/heic", + "video/mp4" + ], + "thumbs": [], + "maxSelect": 99, + "maxSize": 20971520, + "protected": false + } + }`), edit_photos); err != nil { + return err + } + collection.Schema.AddField(edit_photos) + + return dao.SaveCollection(collection) + }) +} diff --git a/db/migrations/1742140105_updated_summit_logs.go b/db/migrations/1742140105_updated_summit_logs.go new file mode 100644 index 00000000..6391251a --- /dev/null +++ b/db/migrations/1742140105_updated_summit_logs.go @@ -0,0 +1,93 @@ +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("dd2l9a4vxpy2ni8") + if err != nil { + return err + } + + // update + edit_photos := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "ixnksbkt", + "name": "photos", + "type": "file", + "required": false, + "presentable": false, + "unique": false, + "options": { + "mimeTypes": [ + "image/jpeg", + "image/png", + "image/vnd.mozilla.apng", + "image/webp", + "image/svg+xml", + "image/heic", + "video/ogg", + "video/mp4", + "video/webm" + ], + "thumbs": [], + "maxSelect": 99, + "maxSize": 20971520, + "protected": false + } + }`), edit_photos); err != nil { + return err + } + collection.Schema.AddField(edit_photos) + + return dao.SaveCollection(collection) + }, func(db dbx.Builder) error { + dao := daos.New(db); + + collection, err := dao.FindCollectionByNameOrId("dd2l9a4vxpy2ni8") + if err != nil { + return err + } + + // update + edit_photos := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "ixnksbkt", + "name": "photos", + "type": "file", + "required": false, + "presentable": false, + "unique": false, + "options": { + "mimeTypes": [ + "image/jpeg", + "image/png", + "image/vnd.mozilla.apng", + "image/webp", + "image/svg+xml", + "image/heic" + ], + "thumbs": [], + "maxSelect": 99, + "maxSize": 20971520, + "protected": false + } + }`), edit_photos); err != nil { + return err + } + collection.Schema.AddField(edit_photos) + + return dao.SaveCollection(collection) + }) +} diff --git a/db/migrations/1742143702_updated_waypoints.go b/db/migrations/1742143702_updated_waypoints.go new file mode 100644 index 00000000..982ab220 --- /dev/null +++ b/db/migrations/1742143702_updated_waypoints.go @@ -0,0 +1,91 @@ +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("goeo2ubp103rzp9") + if err != nil { + return err + } + + // update + edit_photos := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "tfhs3juh", + "name": "photos", + "type": "file", + "required": false, + "presentable": false, + "unique": false, + "options": { + "mimeTypes": [ + "image/jpeg", + "image/png", + "image/vnd.mozilla.apng", + "image/webp", + "image/svg+xml", + "video/ogg", + "video/mp4", + "video/webm" + ], + "thumbs": [], + "maxSelect": 99, + "maxSize": 20971520, + "protected": false + } + }`), edit_photos); err != nil { + return err + } + collection.Schema.AddField(edit_photos) + + return dao.SaveCollection(collection) + }, func(db dbx.Builder) error { + dao := daos.New(db); + + collection, err := dao.FindCollectionByNameOrId("goeo2ubp103rzp9") + if err != nil { + return err + } + + // update + edit_photos := &schema.SchemaField{} + if err := json.Unmarshal([]byte(`{ + "system": false, + "id": "tfhs3juh", + "name": "photos", + "type": "file", + "required": false, + "presentable": false, + "unique": false, + "options": { + "mimeTypes": [ + "image/jpeg", + "image/png", + "image/vnd.mozilla.apng", + "image/webp", + "image/svg+xml" + ], + "thumbs": [], + "maxSelect": 99, + "maxSize": 20971520, + "protected": false + } + }`), edit_photos); err != nil { + return err + } + collection.Schema.AddField(edit_photos) + + return dao.SaveCollection(collection) + }) +} diff --git a/web/src/lib/components/photo_card.svelte b/web/src/lib/components/photo_card.svelte index 08dfdc69..1ef160d2 100644 --- a/web/src/lib/components/photo_card.svelte +++ b/web/src/lib/components/photo_card.svelte @@ -1,4 +1,5 @@
  • - + {#if isVideoURL(thumbnail)} + + + {:else} + + {/if}
    diff --git a/web/src/lib/components/trail/trail_timeline.svelte b/web/src/lib/components/trail/trail_timeline.svelte index a48e8732..c6d4c520 100644 --- a/web/src/lib/components/trail/trail_timeline.svelte +++ b/web/src/lib/components/trail/trail_timeline.svelte @@ -1,6 +1,6 @@