diff --git a/src/components/all-gpxes/AllGpxes.tsx b/src/components/all-gpxes/AllGpxes.tsx index e6edf37..ac667d3 100644 --- a/src/components/all-gpxes/AllGpxes.tsx +++ b/src/components/all-gpxes/AllGpxes.tsx @@ -1,4 +1,10 @@ -import { Component, createEffect, createResource, For } from 'solid-js'; +import { + Component, + createEffect, + createResource, + For, + Suspense, +} from 'solid-js'; import OlMap from 'ol/Map'; @@ -27,7 +33,11 @@ export const AllGpxes: Component = ({ map }) => { {(gpxId: string) => { console.log({ caller: 'AllGpxes / loop', gpxId }); - return ; + return ( + + + + ); }} ); diff --git a/src/components/gpx/Gpx.tsx b/src/components/gpx/Gpx.tsx index 43a6f04..7a1fe41 100644 --- a/src/components/gpx/Gpx.tsx +++ b/src/components/gpx/Gpx.tsx @@ -1,4 +1,10 @@ -import { Component, createEffect, createResource, For } from 'solid-js'; +import { + Component, + createEffect, + createResource, + For, + Suspense, +} from 'solid-js'; import OlMap from 'ol/Map'; @@ -41,13 +47,21 @@ export const Gpx: Component = ({ map, gpxId }) => { {(trkId: string) => { console.log({ caller: 'Gpx / loop', trkId }); - return ; + return ( + + + + ); }} {(wptId: string) => { console.log({ caller: 'Gpx / loop', wptId }); - return ; + return ( + + + + ); }} diff --git a/src/components/trk/Trk.tsx b/src/components/trk/Trk.tsx index 8e794a2..6625b5b 100644 --- a/src/components/trk/Trk.tsx +++ b/src/components/trk/Trk.tsx @@ -1,4 +1,10 @@ -import { Component, createEffect, createResource, For } from 'solid-js'; +import { + Component, + createEffect, + createResource, + For, + Suspense, +} from 'solid-js'; import OlMap from 'ol/Map'; @@ -33,7 +39,11 @@ export const Trk: Component = ({ vectorSource, trkId }) => { {(trksegId: string) => { console.log({ caller: 'Trk / loop', trksegId }); - return ; + return ( + + + + ); }} ); diff --git a/src/db/index.ts b/src/db/index.ts index 49536bf..10a0aa9 100644 --- a/src/db/index.ts +++ b/src/db/index.ts @@ -21,7 +21,7 @@ declare global { export const initDb = async (params: any) => { if (globalThis.db === undefined) { globalThis.db = new PouchDB('dyomedea', { - auto_compaction: true, + auto_compaction: false, revs_limit: 10, }); } @@ -47,7 +47,7 @@ export const initDb = async (params: any) => { db.put(previousDbDefinition); // TODO: support migrations } - await await db.compact(); + //await await db.compact(); await db.viewCleanup(); // WARNING: defs must use the canonical form and be identical to what will be returned by db.getIndexes @@ -55,7 +55,7 @@ export const initDb = async (params: any) => { { name: 'type', def: { - fields: [{ type: 'asc' }], + fields: [{ type: 'desc' }, { id: 'desc' }], }, }, ];