diff --git a/002_source/ionic_mobile/src/ERRORS.ts b/002_source/ionic_mobile/src/ERRORS.ts new file mode 100644 index 0000000..33f8d33 --- /dev/null +++ b/002_source/ionic_mobile/src/ERRORS.ts @@ -0,0 +1 @@ +export const ERR_POCKETBASE_URL_IS_EMPTY = 'POCKETBASE url is empty'; diff --git a/002_source/ionic_mobile/src/constants.tsx b/002_source/ionic_mobile/src/constants.tsx index 80a9d44..3698f36 100644 --- a/002_source/ionic_mobile/src/constants.tsx +++ b/002_source/ionic_mobile/src/constants.tsx @@ -8,6 +8,10 @@ // 0.0.7 - add back button for listening practice, matching frenzy, connective revision // 0.0.8 - add back button for listening practice card, matching frenzy card, connective revision card // 0.0.9 - fix ticket 26,27,28,29 +import { Capacitor } from '@capacitor/core'; + +import { ERR_POCKETBASE_URL_IS_EMPTY } from './ERRORS'; + // 0.0.10 - remove debug symbol and re-route ending page const VERSIONS = 'v0.0.10'; const HELLOWORLD_MP3 = '/helloworld.mp3'; @@ -76,11 +80,14 @@ const TEST = process.env.NODE_ENV === 'test'; const MY_FAVORITE = 'My Favorite'; // +if (!import.meta.env.VITE_POCKETBASE_URL) throw new Error(ERR_POCKETBASE_URL_IS_EMPTY); const POCKETBASE_URL = import.meta.env.VITE_POCKETBASE_URL; // // database constants export const COL_USERS = 'users'; export const COL_USER_METAS = 'UserMetas'; +// +export const RUNNING_PLATFORM = Capacitor.getPlatform(); export { //