diff --git a/.github/workflows/eas-cloud.yml b/.github/workflows/eas-cloud.yml index 23c6880c2..3016314da 100644 --- a/.github/workflows/eas-cloud.yml +++ b/.github/workflows/eas-cloud.yml @@ -1,11 +1,11 @@ -# Native production pipeline +# Native production pipeline # Builds on EAS Cloud with auto submission name: EAS Build & Submit on: - workflow_dispatch: + workflow_dispatch: push: - branches: + branches: - main paths: - 'packages/app/**' @@ -46,4 +46,4 @@ jobs: - name: Build on EAS working-directory: ./apps/expo - run: eas build --platform all --profile production --non-interactive --no-wait --auto-submit \ No newline at end of file + run: eas build --platform all --profile production --non-interactive --no-wait --auto-submit diff --git a/app.json b/app.json new file mode 100644 index 000000000..a2d883156 --- /dev/null +++ b/app.json @@ -0,0 +1,14 @@ +{ + "expo": { + "name": "packrat-world", + "slug": "packrat-world", + "version": "0.0.1", + "description": "PackRat is the ultimate adventure planner designed for those who love to explore the great outdoors. Our app helps users plan and organize their trips with ease, whether it's a weekend camping trip, a day hike, or a cross-country road trip.", + "sdkVersion": "50.0.0", + "platforms": [ + "ios", + "android", + "web" + ] + } +} diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/item/[itemId].tsx b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/item/[itemId].tsx index 3f3539346..6b8869400 100644 --- a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/item/[itemId].tsx +++ b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/item/[itemId].tsx @@ -16,13 +16,12 @@ export default function Item() { - {/* */} ); diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/pack-templates/[id].tsx b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/pack-templates/[id].tsx new file mode 100644 index 000000000..141dd5bd6 --- /dev/null +++ b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/pack-templates/[id].tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { Platform } from 'react-native'; +import { Stack } from 'expo-router'; +import Head from 'expo-router/head'; +import useTheme from 'app/hooks/useTheme'; +import { DrawerToggleButton } from '@react-navigation/drawer'; +import { PackTemplateDetailsScreen } from 'app/modules/pack-templates'; + +export default function Pack() { + const { currentTheme } = useTheme(); + + return ( + <> + {Platform.OS === 'web' && ( + + Pack Template + + + )} + ( + + ), + + headerStyle: { + backgroundColor: currentTheme.colors.background, + }, + headerTitleStyle: { + fontSize: 24, + }, + headerTintColor: currentTheme.colors.tertiaryBlue, + // https://reactnavigation.org/docs/headers#adjusting-header-styles + + // https://reactnavigation.org/docs/headers#replacing-the-title-with-a-custom-component + }} + /> + + + ); +} diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/pack-templates/index.tsx b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/pack-templates/index.tsx new file mode 100644 index 000000000..84a589d3e --- /dev/null +++ b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/pack-templates/index.tsx @@ -0,0 +1,43 @@ +import React from 'react'; +import { FeedScreen } from 'app/modules/feed'; +import { Platform } from 'react-native'; +import { Stack } from 'expo-router'; +import Head from 'expo-router/head'; +import useTheme from 'app/hooks/useTheme'; +import { DrawerToggleButton } from '@react-navigation/drawer'; + +export default function PackTemplates() { + const { currentTheme } = useTheme(); + + return ( + <> + {Platform.OS === 'web' && ( + + Pack Templates + + )} + ( + + ), + + headerStyle: { + backgroundColor: currentTheme.colors.background, + }, + headerTitleStyle: { + fontSize: 24, + }, + headerTintColor: currentTheme.colors.tertiaryBlue, + + // https://reactnavigation.org/docs/headers#adjusting-header-styles + + // https://reactnavigation.org/docs/headers#replacing-the-title-with-a-custom-component + }} + /> + + + ); +} diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/products/index.tsx b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/products/index.tsx new file mode 100644 index 000000000..de317698b --- /dev/null +++ b/apps/expo/app/(app)/(drawer)/(tabs)/(stack)/products/index.tsx @@ -0,0 +1,42 @@ +import React from 'react'; +import { ProductsScreen } from 'app/modules/item'; +import { Platform } from 'react-native'; +import { Stack } from 'expo-router'; +import Head from 'expo-router/head'; +import useTheme from 'app/hooks/useTheme'; +import { DrawerToggleButton } from '@react-navigation/drawer'; + +export default function ProductsPage() { + const { currentTheme } = useTheme(); + + return ( + <> + {Platform.OS === 'web' && ( + + Products + + )} + ( + + ), + + headerStyle: { + backgroundColor: currentTheme.colors.background, + }, + headerTitleStyle: { + fontSize: 24, + }, + headerTintColor: currentTheme.colors.tertiaryBlue, + // https://reactnavigation.org/docs/headers#adjusting-header-styles + + // https://reactnavigation.org/docs/headers#replacing-the-title-with-a-custom-component + }} + /> + + + ); +} diff --git a/apps/expo/app/(app)/(drawer)/(tabs)/index.tsx b/apps/expo/app/(app)/(drawer)/(tabs)/index.tsx index 109c91904..baa0735da 100644 --- a/apps/expo/app/(app)/(drawer)/(tabs)/index.tsx +++ b/apps/expo/app/(app)/(drawer)/(tabs)/index.tsx @@ -1,11 +1,12 @@ import React from 'react'; import { Platform, View } from 'react-native'; -import { Stack } from 'expo-router'; +import { Redirect, Stack } from 'expo-router'; import { theme } from 'app/theme'; import { DashboardScreen } from 'app/modules/dashboard'; import useTheme from 'app/hooks/useTheme'; import { useAuthUser, LoginScreen } from 'app/modules/auth'; import Head from 'expo-router/head'; +import { useOfflineStore } from 'app/atoms'; export default function HomeScreen() { const { @@ -17,6 +18,7 @@ export default function HomeScreen() { } = useTheme(); const user = useAuthUser(); + const { connectionStatus } = useOfflineStore(); const mutualStyles = { backgroundColor: currentTheme.colors.background, @@ -35,9 +37,12 @@ export default function HomeScreen() { title: 'Home', }} /> - - {!user ? : } - + {connectionStatus === 'connected' && ( + + {!user ? : } + + )} + {connectionStatus === 'offline' && } ); } diff --git a/apps/expo/app/entry.tsx b/apps/expo/app/entry.tsx new file mode 100644 index 000000000..f84d1943b --- /dev/null +++ b/apps/expo/app/entry.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import LandingPage from 'app/components/landing_page'; +import { ConnectionGate } from 'app/components/ConnectionGate'; +import { Redirect } from 'expo-router'; + +export default function Entry() { + return ( + <> + + + + + + + + ); +} diff --git a/apps/expo/app/offline/_layout.tsx b/apps/expo/app/offline/_layout.tsx new file mode 100644 index 000000000..ba4ddd0a3 --- /dev/null +++ b/apps/expo/app/offline/_layout.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import { OfflineTabs } from 'app/components/navigation/OfflineTabs'; +import { useUserInOfflineMode } from 'app/modules/auth'; +import { Redirect } from 'expo-router'; +import { SafeArea } from 'app/provider/safe-area'; + +export default function OfflineLayout() { + const { isLoading } = useUserInOfflineMode(); + if (isLoading) { + return null; + } + + return ( + + + + ); +} diff --git a/apps/expo/app/offline/maps.tsx b/apps/expo/app/offline/maps.tsx new file mode 100644 index 000000000..1a433e32d --- /dev/null +++ b/apps/expo/app/offline/maps.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import { Stack } from 'expo-router'; +import { OfflineMapsScreen } from 'app/modules/map/screens/OfflineMapsScreen'; +import { EmptyState } from '@packrat/ui'; +import { MapPin } from '@tamagui/lucide-icons'; +import { OfflineMessage } from 'app/components/OfflineMessage'; + +export default function OfflineMaps() { + return ( + <> + + + } + text="No maps available. Connect to the network to add maps." + /> + } + /> + + ); +} diff --git a/apps/expo/app/offline/pack.tsx b/apps/expo/app/offline/pack.tsx new file mode 100644 index 000000000..5fdc90823 --- /dev/null +++ b/apps/expo/app/offline/pack.tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { Stack } from 'expo-router'; +import { FeedScreen } from 'app/modules/feed'; +import { OfflineMessage } from 'app/components/OfflineMessage'; + +export default function OfflineMaps() { + return ( + <> + + + + + ); +} diff --git a/apps/expo/package.json b/apps/expo/package.json index ac560ee71..778b19425 100644 --- a/apps/expo/package.json +++ b/apps/expo/package.json @@ -126,6 +126,7 @@ "react-native": "0.73.6", "react-native-dotenv": "^3.4.8", "react-native-elements": "^3.4.3", + "react-native-fast-image": "^8.6.3", "react-native-flash-message": "^0.4.2", "react-native-gesture-handler": "~2.14.0", "react-native-google-places-autocomplete": "^2.5.1", diff --git a/apps/next/pages/pack-templates/[id].tsx b/apps/next/pages/pack-templates/[id].tsx new file mode 100644 index 000000000..2045bddf8 --- /dev/null +++ b/apps/next/pages/pack-templates/[id].tsx @@ -0,0 +1,19 @@ +import React from 'react'; +import { PackTemplateDetailsScreen } from 'app/modules/pack-templates'; +import { AuthWrapper } from 'app/modules/auth'; + +// export const runtime = 'experimental-edge' + +function PackTemplate() { + return ( + <> + + + ); +} + +export default PackTemplate; + +PackTemplate.getLayout = function getLayout(page: any) { + return {page}; +}; diff --git a/apps/next/pages/pack-templates/index.tsx b/apps/next/pages/pack-templates/index.tsx new file mode 100644 index 000000000..e7523a47f --- /dev/null +++ b/apps/next/pages/pack-templates/index.tsx @@ -0,0 +1,15 @@ +import React from 'react'; +import { FeedScreen } from 'app/modules/feed'; +import { AuthWrapper } from 'app/modules/auth'; + +// export const runtime = 'experimental-edge' + +function PackTemplates() { + return ; +} + +export default PackTemplates; + +PackTemplates.getLayout = function getLayout(page: any) { + return {page}; +}; diff --git a/apps/next/pages/products/index.tsx b/apps/next/pages/products/index.tsx new file mode 100644 index 000000000..cddd329dd --- /dev/null +++ b/apps/next/pages/products/index.tsx @@ -0,0 +1,15 @@ +import { ProductsScreen } from 'app/modules/item'; +import { AuthWrapper } from 'app/modules/auth'; +// export const runtime = 'experimental-edge'; + +export default function ProductsPage() { + return ( + <> + + + ); +} + +ProductsPage.getLayout = function getLayout(page: any) { + return {page}; +}; diff --git a/apps/tauri/src/routeTree.gen.ts b/apps/tauri/src/routeTree.gen.ts index 681586714..788c3670c 100644 --- a/apps/tauri/src/routeTree.gen.ts +++ b/apps/tauri/src/routeTree.gen.ts @@ -21,8 +21,10 @@ const TripsIndexLazyImport = createFileRoute('/trips/')() const SignInIndexLazyImport = createFileRoute('/sign-in/')() const RegisterIndexLazyImport = createFileRoute('/register/')() const ProfileIndexLazyImport = createFileRoute('/profile/')() +const ProductsIndexLazyImport = createFileRoute('/products/')() const PasswordResetIndexLazyImport = createFileRoute('/password-reset/')() const PacksIndexLazyImport = createFileRoute('/packs/')() +const PackTemplatesIndexLazyImport = createFileRoute('/pack-templates/')() const MapsIndexLazyImport = createFileRoute('/maps/')() const MapIndexLazyImport = createFileRoute('/map/')() const ItemsIndexLazyImport = createFileRoute('/items/')() @@ -35,6 +37,7 @@ const TripTripIdLazyImport = createFileRoute('/trip/$tripId')() const ProfileIdLazyImport = createFileRoute('/profile/$id')() const PackCreateLazyImport = createFileRoute('/pack/create')() const PackIdLazyImport = createFileRoute('/pack/$id')() +const PackTemplatesIdLazyImport = createFileRoute('/pack-templates/$id')() const DestinationQueryLazyImport = createFileRoute('/destination/query')() const ProfileSettingsIndexLazyImport = createFileRoute('/profile/settings/')() @@ -67,6 +70,13 @@ const ProfileIndexLazyRoute = ProfileIndexLazyImport.update({ getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/profile/index.lazy').then((d) => d.Route)) +const ProductsIndexLazyRoute = ProductsIndexLazyImport.update({ + path: '/products/', + getParentRoute: () => rootRoute, +} as any).lazy(() => + import('./routes/products/index.lazy').then((d) => d.Route), +) + const PasswordResetIndexLazyRoute = PasswordResetIndexLazyImport.update({ path: '/password-reset/', getParentRoute: () => rootRoute, @@ -79,6 +89,13 @@ const PacksIndexLazyRoute = PacksIndexLazyImport.update({ getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/packs/index.lazy').then((d) => d.Route)) +const PackTemplatesIndexLazyRoute = PackTemplatesIndexLazyImport.update({ + path: '/pack-templates/', + getParentRoute: () => rootRoute, +} as any).lazy(() => + import('./routes/pack-templates/index.lazy').then((d) => d.Route), +) + const MapsIndexLazyRoute = MapsIndexLazyImport.update({ path: '/maps/', getParentRoute: () => rootRoute, @@ -143,6 +160,13 @@ const PackIdLazyRoute = PackIdLazyImport.update({ getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/pack/$id.lazy').then((d) => d.Route)) +const PackTemplatesIdLazyRoute = PackTemplatesIdLazyImport.update({ + path: '/pack-templates/$id', + getParentRoute: () => rootRoute, +} as any).lazy(() => + import('./routes/pack-templates/$id.lazy').then((d) => d.Route), +) + const DestinationQueryLazyRoute = DestinationQueryLazyImport.update({ path: '/destination/query', getParentRoute: () => rootRoute, @@ -175,6 +199,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof DestinationQueryLazyImport parentRoute: typeof rootRoute } + '/pack-templates/$id': { + id: '/pack-templates/$id' + path: '/pack-templates/$id' + fullPath: '/pack-templates/$id' + preLoaderRoute: typeof PackTemplatesIdLazyImport + parentRoute: typeof rootRoute + } '/pack/$id': { id: '/pack/$id' path: '/pack/$id' @@ -259,6 +290,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof MapsIndexLazyImport parentRoute: typeof rootRoute } + '/pack-templates/': { + id: '/pack-templates/' + path: '/pack-templates' + fullPath: '/pack-templates' + preLoaderRoute: typeof PackTemplatesIndexLazyImport + parentRoute: typeof rootRoute + } '/packs/': { id: '/packs/' path: '/packs' @@ -273,6 +311,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PasswordResetIndexLazyImport parentRoute: typeof rootRoute } + '/products/': { + id: '/products/' + path: '/products' + fullPath: '/products' + preLoaderRoute: typeof ProductsIndexLazyImport + parentRoute: typeof rootRoute + } '/profile/': { id: '/profile/' path: '/profile' @@ -313,29 +358,227 @@ declare module '@tanstack/react-router' { // Create and export the route tree -export const routeTree = rootRoute.addChildren({ - IndexRoute, - DestinationQueryLazyRoute, - PackIdLazyRoute, - PackCreateLazyRoute, - ProfileIdLazyRoute, - TripTripIdLazyRoute, - TripCreateLazyRoute, - AboutIndexLazyRoute, - AppearanceIndexLazyRoute, - DashboardIndexLazyRoute, - FeedIndexLazyRoute, - ItemsIndexLazyRoute, - MapIndexLazyRoute, - MapsIndexLazyRoute, - PacksIndexLazyRoute, - PasswordResetIndexLazyRoute, - ProfileIndexLazyRoute, - RegisterIndexLazyRoute, - SignInIndexLazyRoute, - TripsIndexLazyRoute, - ProfileSettingsIndexLazyRoute, -}) +export interface FileRoutesByFullPath { + '/': typeof IndexRoute + '/destination/query': typeof DestinationQueryLazyRoute + '/pack-templates/$id': typeof PackTemplatesIdLazyRoute + '/pack/$id': typeof PackIdLazyRoute + '/pack/create': typeof PackCreateLazyRoute + '/profile/$id': typeof ProfileIdLazyRoute + '/trip/$tripId': typeof TripTripIdLazyRoute + '/trip/create': typeof TripCreateLazyRoute + '/about': typeof AboutIndexLazyRoute + '/appearance': typeof AppearanceIndexLazyRoute + '/dashboard': typeof DashboardIndexLazyRoute + '/feed': typeof FeedIndexLazyRoute + '/items': typeof ItemsIndexLazyRoute + '/map': typeof MapIndexLazyRoute + '/maps': typeof MapsIndexLazyRoute + '/pack-templates': typeof PackTemplatesIndexLazyRoute + '/packs': typeof PacksIndexLazyRoute + '/password-reset': typeof PasswordResetIndexLazyRoute + '/products': typeof ProductsIndexLazyRoute + '/profile': typeof ProfileIndexLazyRoute + '/register': typeof RegisterIndexLazyRoute + '/sign-in': typeof SignInIndexLazyRoute + '/trips': typeof TripsIndexLazyRoute + '/profile/settings': typeof ProfileSettingsIndexLazyRoute +} + +export interface FileRoutesByTo { + '/': typeof IndexRoute + '/destination/query': typeof DestinationQueryLazyRoute + '/pack-templates/$id': typeof PackTemplatesIdLazyRoute + '/pack/$id': typeof PackIdLazyRoute + '/pack/create': typeof PackCreateLazyRoute + '/profile/$id': typeof ProfileIdLazyRoute + '/trip/$tripId': typeof TripTripIdLazyRoute + '/trip/create': typeof TripCreateLazyRoute + '/about': typeof AboutIndexLazyRoute + '/appearance': typeof AppearanceIndexLazyRoute + '/dashboard': typeof DashboardIndexLazyRoute + '/feed': typeof FeedIndexLazyRoute + '/items': typeof ItemsIndexLazyRoute + '/map': typeof MapIndexLazyRoute + '/maps': typeof MapsIndexLazyRoute + '/pack-templates': typeof PackTemplatesIndexLazyRoute + '/packs': typeof PacksIndexLazyRoute + '/password-reset': typeof PasswordResetIndexLazyRoute + '/products': typeof ProductsIndexLazyRoute + '/profile': typeof ProfileIndexLazyRoute + '/register': typeof RegisterIndexLazyRoute + '/sign-in': typeof SignInIndexLazyRoute + '/trips': typeof TripsIndexLazyRoute + '/profile/settings': typeof ProfileSettingsIndexLazyRoute +} + +export interface FileRoutesById { + __root__: typeof rootRoute + '/': typeof IndexRoute + '/destination/query': typeof DestinationQueryLazyRoute + '/pack-templates/$id': typeof PackTemplatesIdLazyRoute + '/pack/$id': typeof PackIdLazyRoute + '/pack/create': typeof PackCreateLazyRoute + '/profile/$id': typeof ProfileIdLazyRoute + '/trip/$tripId': typeof TripTripIdLazyRoute + '/trip/create': typeof TripCreateLazyRoute + '/about/': typeof AboutIndexLazyRoute + '/appearance/': typeof AppearanceIndexLazyRoute + '/dashboard/': typeof DashboardIndexLazyRoute + '/feed/': typeof FeedIndexLazyRoute + '/items/': typeof ItemsIndexLazyRoute + '/map/': typeof MapIndexLazyRoute + '/maps/': typeof MapsIndexLazyRoute + '/pack-templates/': typeof PackTemplatesIndexLazyRoute + '/packs/': typeof PacksIndexLazyRoute + '/password-reset/': typeof PasswordResetIndexLazyRoute + '/products/': typeof ProductsIndexLazyRoute + '/profile/': typeof ProfileIndexLazyRoute + '/register/': typeof RegisterIndexLazyRoute + '/sign-in/': typeof SignInIndexLazyRoute + '/trips/': typeof TripsIndexLazyRoute + '/profile/settings/': typeof ProfileSettingsIndexLazyRoute +} + +export interface FileRouteTypes { + fileRoutesByFullPath: FileRoutesByFullPath + fullPaths: + | '/' + | '/destination/query' + | '/pack-templates/$id' + | '/pack/$id' + | '/pack/create' + | '/profile/$id' + | '/trip/$tripId' + | '/trip/create' + | '/about' + | '/appearance' + | '/dashboard' + | '/feed' + | '/items' + | '/map' + | '/maps' + | '/pack-templates' + | '/packs' + | '/password-reset' + | '/products' + | '/profile' + | '/register' + | '/sign-in' + | '/trips' + | '/profile/settings' + fileRoutesByTo: FileRoutesByTo + to: + | '/' + | '/destination/query' + | '/pack-templates/$id' + | '/pack/$id' + | '/pack/create' + | '/profile/$id' + | '/trip/$tripId' + | '/trip/create' + | '/about' + | '/appearance' + | '/dashboard' + | '/feed' + | '/items' + | '/map' + | '/maps' + | '/pack-templates' + | '/packs' + | '/password-reset' + | '/products' + | '/profile' + | '/register' + | '/sign-in' + | '/trips' + | '/profile/settings' + id: + | '__root__' + | '/' + | '/destination/query' + | '/pack-templates/$id' + | '/pack/$id' + | '/pack/create' + | '/profile/$id' + | '/trip/$tripId' + | '/trip/create' + | '/about/' + | '/appearance/' + | '/dashboard/' + | '/feed/' + | '/items/' + | '/map/' + | '/maps/' + | '/pack-templates/' + | '/packs/' + | '/password-reset/' + | '/products/' + | '/profile/' + | '/register/' + | '/sign-in/' + | '/trips/' + | '/profile/settings/' + fileRoutesById: FileRoutesById +} + +export interface RootRouteChildren { + IndexRoute: typeof IndexRoute + DestinationQueryLazyRoute: typeof DestinationQueryLazyRoute + PackTemplatesIdLazyRoute: typeof PackTemplatesIdLazyRoute + PackIdLazyRoute: typeof PackIdLazyRoute + PackCreateLazyRoute: typeof PackCreateLazyRoute + ProfileIdLazyRoute: typeof ProfileIdLazyRoute + TripTripIdLazyRoute: typeof TripTripIdLazyRoute + TripCreateLazyRoute: typeof TripCreateLazyRoute + AboutIndexLazyRoute: typeof AboutIndexLazyRoute + AppearanceIndexLazyRoute: typeof AppearanceIndexLazyRoute + DashboardIndexLazyRoute: typeof DashboardIndexLazyRoute + FeedIndexLazyRoute: typeof FeedIndexLazyRoute + ItemsIndexLazyRoute: typeof ItemsIndexLazyRoute + MapIndexLazyRoute: typeof MapIndexLazyRoute + MapsIndexLazyRoute: typeof MapsIndexLazyRoute + PackTemplatesIndexLazyRoute: typeof PackTemplatesIndexLazyRoute + PacksIndexLazyRoute: typeof PacksIndexLazyRoute + PasswordResetIndexLazyRoute: typeof PasswordResetIndexLazyRoute + ProductsIndexLazyRoute: typeof ProductsIndexLazyRoute + ProfileIndexLazyRoute: typeof ProfileIndexLazyRoute + RegisterIndexLazyRoute: typeof RegisterIndexLazyRoute + SignInIndexLazyRoute: typeof SignInIndexLazyRoute + TripsIndexLazyRoute: typeof TripsIndexLazyRoute + ProfileSettingsIndexLazyRoute: typeof ProfileSettingsIndexLazyRoute +} + +const rootRouteChildren: RootRouteChildren = { + IndexRoute: IndexRoute, + DestinationQueryLazyRoute: DestinationQueryLazyRoute, + PackTemplatesIdLazyRoute: PackTemplatesIdLazyRoute, + PackIdLazyRoute: PackIdLazyRoute, + PackCreateLazyRoute: PackCreateLazyRoute, + ProfileIdLazyRoute: ProfileIdLazyRoute, + TripTripIdLazyRoute: TripTripIdLazyRoute, + TripCreateLazyRoute: TripCreateLazyRoute, + AboutIndexLazyRoute: AboutIndexLazyRoute, + AppearanceIndexLazyRoute: AppearanceIndexLazyRoute, + DashboardIndexLazyRoute: DashboardIndexLazyRoute, + FeedIndexLazyRoute: FeedIndexLazyRoute, + ItemsIndexLazyRoute: ItemsIndexLazyRoute, + MapIndexLazyRoute: MapIndexLazyRoute, + MapsIndexLazyRoute: MapsIndexLazyRoute, + PackTemplatesIndexLazyRoute: PackTemplatesIndexLazyRoute, + PacksIndexLazyRoute: PacksIndexLazyRoute, + PasswordResetIndexLazyRoute: PasswordResetIndexLazyRoute, + ProductsIndexLazyRoute: ProductsIndexLazyRoute, + ProfileIndexLazyRoute: ProfileIndexLazyRoute, + RegisterIndexLazyRoute: RegisterIndexLazyRoute, + SignInIndexLazyRoute: SignInIndexLazyRoute, + TripsIndexLazyRoute: TripsIndexLazyRoute, + ProfileSettingsIndexLazyRoute: ProfileSettingsIndexLazyRoute, +} + +export const routeTree = rootRoute + ._addFileChildren(rootRouteChildren) + ._addFileTypes() /* prettier-ignore-end */ @@ -347,6 +590,7 @@ export const routeTree = rootRoute.addChildren({ "children": [ "/", "/destination/query", + "/pack-templates/$id", "/pack/$id", "/pack/create", "/profile/$id", @@ -359,8 +603,10 @@ export const routeTree = rootRoute.addChildren({ "/items/", "/map/", "/maps/", + "/pack-templates/", "/packs/", "/password-reset/", + "/products/", "/profile/", "/register/", "/sign-in/", @@ -374,6 +620,9 @@ export const routeTree = rootRoute.addChildren({ "/destination/query": { "filePath": "destination/query.lazy.tsx" }, + "/pack-templates/$id": { + "filePath": "pack-templates/$id.lazy.tsx" + }, "/pack/$id": { "filePath": "pack/$id.lazy.tsx" }, @@ -410,12 +659,18 @@ export const routeTree = rootRoute.addChildren({ "/maps/": { "filePath": "maps/index.lazy.tsx" }, + "/pack-templates/": { + "filePath": "pack-templates/index.lazy.tsx" + }, "/packs/": { "filePath": "packs/index.lazy.tsx" }, "/password-reset/": { "filePath": "password-reset/index.lazy.tsx" }, + "/products/": { + "filePath": "products/index.lazy.tsx" + }, "/profile/": { "filePath": "profile/index.lazy.tsx" }, diff --git a/apps/tauri/src/routes/pack-templates/$id.lazy.tsx b/apps/tauri/src/routes/pack-templates/$id.lazy.tsx new file mode 100644 index 000000000..4543465ac --- /dev/null +++ b/apps/tauri/src/routes/pack-templates/$id.lazy.tsx @@ -0,0 +1,15 @@ +import { createLazyFileRoute } from '@tanstack/react-router'; +import { AuthWrapper } from 'app/modules/auth'; +import { PackTemplateDetailsScreen } from 'app/modules/pack-templates'; + +export const Route = createLazyFileRoute('/pack-templates/$id')({ + component: PackTemplateScreen, +}); + +function PackTemplateScreen() { + return ( + + + + ); +} diff --git a/apps/tauri/src/routes/pack-templates/index.lazy.tsx b/apps/tauri/src/routes/pack-templates/index.lazy.tsx new file mode 100644 index 000000000..bbe84ccbe --- /dev/null +++ b/apps/tauri/src/routes/pack-templates/index.lazy.tsx @@ -0,0 +1,17 @@ +import { FeedScreen } from 'app/modules/feed'; +import { AuthWrapper } from 'app/modules/auth'; +import { createLazyFileRoute } from '@tanstack/react-router'; + +export const Route = createLazyFileRoute('/pack-templates/')({ + component: PackTemplatesScreen, +}); + +function PackTemplatesScreen() { + return ( + + + + ); +} + +export default PackTemplatesScreen; diff --git a/apps/tauri/src/routes/products/index.lazy.tsx b/apps/tauri/src/routes/products/index.lazy.tsx new file mode 100644 index 000000000..0ea072109 --- /dev/null +++ b/apps/tauri/src/routes/products/index.lazy.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import { ProductsScreen } from 'app/modules/item'; +import { AuthWrapper } from 'app/modules/auth'; +import { createLazyFileRoute } from '@tanstack/react-router'; + +export const Route = createLazyFileRoute('/products/')({ + component: ProductsPage, +}); + +export default function ProductsPage() { + return ( + + + + ); +} diff --git a/apps/vite/src/index.css b/apps/vite/src/index.css index 6119ad9a8..5c3f38c1b 100644 --- a/apps/vite/src/index.css +++ b/apps/vite/src/index.css @@ -57,7 +57,7 @@ button:focus-visible { @media (prefers-color-scheme: light) { :root { color: #213547; - background-color: #ffffff; + /* background-color: #ffffff; */ } a:hover { color: #747bff; diff --git a/apps/vite/src/routeTree.gen.ts b/apps/vite/src/routeTree.gen.ts index ad9342afd..65099a5eb 100644 --- a/apps/vite/src/routeTree.gen.ts +++ b/apps/vite/src/routeTree.gen.ts @@ -21,9 +21,11 @@ const TripsIndexLazyImport = createFileRoute('/trips/')() const SignInIndexLazyImport = createFileRoute('/sign-in/')() const RegisterIndexLazyImport = createFileRoute('/register/')() const ProfileIndexLazyImport = createFileRoute('/profile/')() +const ProductsIndexLazyImport = createFileRoute('/products/')() const PrivacyIndexLazyImport = createFileRoute('/privacy/')() const PasswordResetIndexLazyImport = createFileRoute('/password-reset/')() const PacksIndexLazyImport = createFileRoute('/packs/')() +const PackTemplatesIndexLazyImport = createFileRoute('/pack-templates/')() const MapsIndexLazyImport = createFileRoute('/maps/')() const MapIndexLazyImport = createFileRoute('/map/')() const ItemsIndexLazyImport = createFileRoute('/items/')() @@ -36,6 +38,7 @@ const TripTripIdLazyImport = createFileRoute('/trip/$tripId')() const ProfileIdLazyImport = createFileRoute('/profile/$id')() const PackCreateLazyImport = createFileRoute('/pack/create')() const PackIdLazyImport = createFileRoute('/pack/$id')() +const PackTemplatesIdLazyImport = createFileRoute('/pack-templates/$id')() const ItemItemIdLazyImport = createFileRoute('/item/$itemId')() const DestinationQueryLazyImport = createFileRoute('/destination/query')() const ProfileSettingsIndexLazyImport = createFileRoute('/profile/settings/')() @@ -69,6 +72,13 @@ const ProfileIndexLazyRoute = ProfileIndexLazyImport.update({ getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/profile/index.lazy').then((d) => d.Route)) +const ProductsIndexLazyRoute = ProductsIndexLazyImport.update({ + path: '/products/', + getParentRoute: () => rootRoute, +} as any).lazy(() => + import('./routes/products/index.lazy').then((d) => d.Route), +) + const PrivacyIndexLazyRoute = PrivacyIndexLazyImport.update({ path: '/privacy/', getParentRoute: () => rootRoute, @@ -86,6 +96,13 @@ const PacksIndexLazyRoute = PacksIndexLazyImport.update({ getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/packs/index.lazy').then((d) => d.Route)) +const PackTemplatesIndexLazyRoute = PackTemplatesIndexLazyImport.update({ + path: '/pack-templates/', + getParentRoute: () => rootRoute, +} as any).lazy(() => + import('./routes/pack-templates/index.lazy').then((d) => d.Route), +) + const MapsIndexLazyRoute = MapsIndexLazyImport.update({ path: '/maps/', getParentRoute: () => rootRoute, @@ -150,6 +167,13 @@ const PackIdLazyRoute = PackIdLazyImport.update({ getParentRoute: () => rootRoute, } as any).lazy(() => import('./routes/pack/$id.lazy').then((d) => d.Route)) +const PackTemplatesIdLazyRoute = PackTemplatesIdLazyImport.update({ + path: '/pack-templates/$id', + getParentRoute: () => rootRoute, +} as any).lazy(() => + import('./routes/pack-templates/$id.lazy').then((d) => d.Route), +) + const ItemItemIdLazyRoute = ItemItemIdLazyImport.update({ path: '/item/$itemId', getParentRoute: () => rootRoute, @@ -194,6 +218,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ItemItemIdLazyImport parentRoute: typeof rootRoute } + '/pack-templates/$id': { + id: '/pack-templates/$id' + path: '/pack-templates/$id' + fullPath: '/pack-templates/$id' + preLoaderRoute: typeof PackTemplatesIdLazyImport + parentRoute: typeof rootRoute + } '/pack/$id': { id: '/pack/$id' path: '/pack/$id' @@ -278,6 +309,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof MapsIndexLazyImport parentRoute: typeof rootRoute } + '/pack-templates/': { + id: '/pack-templates/' + path: '/pack-templates' + fullPath: '/pack-templates' + preLoaderRoute: typeof PackTemplatesIndexLazyImport + parentRoute: typeof rootRoute + } '/packs/': { id: '/packs/' path: '/packs' @@ -299,6 +337,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof PrivacyIndexLazyImport parentRoute: typeof rootRoute } + '/products/': { + id: '/products/' + path: '/products' + fullPath: '/products' + preLoaderRoute: typeof ProductsIndexLazyImport + parentRoute: typeof rootRoute + } '/profile/': { id: '/profile/' path: '/profile' @@ -343,6 +388,7 @@ export interface FileRoutesByFullPath { '/': typeof IndexRoute '/destination/query': typeof DestinationQueryLazyRoute '/item/$itemId': typeof ItemItemIdLazyRoute + '/pack-templates/$id': typeof PackTemplatesIdLazyRoute '/pack/$id': typeof PackIdLazyRoute '/pack/create': typeof PackCreateLazyRoute '/profile/$id': typeof ProfileIdLazyRoute @@ -355,9 +401,11 @@ export interface FileRoutesByFullPath { '/items': typeof ItemsIndexLazyRoute '/map': typeof MapIndexLazyRoute '/maps': typeof MapsIndexLazyRoute + '/pack-templates': typeof PackTemplatesIndexLazyRoute '/packs': typeof PacksIndexLazyRoute '/password-reset': typeof PasswordResetIndexLazyRoute '/privacy': typeof PrivacyIndexLazyRoute + '/products': typeof ProductsIndexLazyRoute '/profile': typeof ProfileIndexLazyRoute '/register': typeof RegisterIndexLazyRoute '/sign-in': typeof SignInIndexLazyRoute @@ -369,6 +417,7 @@ export interface FileRoutesByTo { '/': typeof IndexRoute '/destination/query': typeof DestinationQueryLazyRoute '/item/$itemId': typeof ItemItemIdLazyRoute + '/pack-templates/$id': typeof PackTemplatesIdLazyRoute '/pack/$id': typeof PackIdLazyRoute '/pack/create': typeof PackCreateLazyRoute '/profile/$id': typeof ProfileIdLazyRoute @@ -381,9 +430,11 @@ export interface FileRoutesByTo { '/items': typeof ItemsIndexLazyRoute '/map': typeof MapIndexLazyRoute '/maps': typeof MapsIndexLazyRoute + '/pack-templates': typeof PackTemplatesIndexLazyRoute '/packs': typeof PacksIndexLazyRoute '/password-reset': typeof PasswordResetIndexLazyRoute '/privacy': typeof PrivacyIndexLazyRoute + '/products': typeof ProductsIndexLazyRoute '/profile': typeof ProfileIndexLazyRoute '/register': typeof RegisterIndexLazyRoute '/sign-in': typeof SignInIndexLazyRoute @@ -396,6 +447,7 @@ export interface FileRoutesById { '/': typeof IndexRoute '/destination/query': typeof DestinationQueryLazyRoute '/item/$itemId': typeof ItemItemIdLazyRoute + '/pack-templates/$id': typeof PackTemplatesIdLazyRoute '/pack/$id': typeof PackIdLazyRoute '/pack/create': typeof PackCreateLazyRoute '/profile/$id': typeof ProfileIdLazyRoute @@ -408,9 +460,11 @@ export interface FileRoutesById { '/items/': typeof ItemsIndexLazyRoute '/map/': typeof MapIndexLazyRoute '/maps/': typeof MapsIndexLazyRoute + '/pack-templates/': typeof PackTemplatesIndexLazyRoute '/packs/': typeof PacksIndexLazyRoute '/password-reset/': typeof PasswordResetIndexLazyRoute '/privacy/': typeof PrivacyIndexLazyRoute + '/products/': typeof ProductsIndexLazyRoute '/profile/': typeof ProfileIndexLazyRoute '/register/': typeof RegisterIndexLazyRoute '/sign-in/': typeof SignInIndexLazyRoute @@ -424,6 +478,7 @@ export interface FileRouteTypes { | '/' | '/destination/query' | '/item/$itemId' + | '/pack-templates/$id' | '/pack/$id' | '/pack/create' | '/profile/$id' @@ -436,9 +491,11 @@ export interface FileRouteTypes { | '/items' | '/map' | '/maps' + | '/pack-templates' | '/packs' | '/password-reset' | '/privacy' + | '/products' | '/profile' | '/register' | '/sign-in' @@ -449,6 +506,7 @@ export interface FileRouteTypes { | '/' | '/destination/query' | '/item/$itemId' + | '/pack-templates/$id' | '/pack/$id' | '/pack/create' | '/profile/$id' @@ -461,9 +519,11 @@ export interface FileRouteTypes { | '/items' | '/map' | '/maps' + | '/pack-templates' | '/packs' | '/password-reset' | '/privacy' + | '/products' | '/profile' | '/register' | '/sign-in' @@ -474,6 +534,7 @@ export interface FileRouteTypes { | '/' | '/destination/query' | '/item/$itemId' + | '/pack-templates/$id' | '/pack/$id' | '/pack/create' | '/profile/$id' @@ -486,9 +547,11 @@ export interface FileRouteTypes { | '/items/' | '/map/' | '/maps/' + | '/pack-templates/' | '/packs/' | '/password-reset/' | '/privacy/' + | '/products/' | '/profile/' | '/register/' | '/sign-in/' @@ -501,6 +564,7 @@ export interface RootRouteChildren { IndexRoute: typeof IndexRoute DestinationQueryLazyRoute: typeof DestinationQueryLazyRoute ItemItemIdLazyRoute: typeof ItemItemIdLazyRoute + PackTemplatesIdLazyRoute: typeof PackTemplatesIdLazyRoute PackIdLazyRoute: typeof PackIdLazyRoute PackCreateLazyRoute: typeof PackCreateLazyRoute ProfileIdLazyRoute: typeof ProfileIdLazyRoute @@ -513,9 +577,11 @@ export interface RootRouteChildren { ItemsIndexLazyRoute: typeof ItemsIndexLazyRoute MapIndexLazyRoute: typeof MapIndexLazyRoute MapsIndexLazyRoute: typeof MapsIndexLazyRoute + PackTemplatesIndexLazyRoute: typeof PackTemplatesIndexLazyRoute PacksIndexLazyRoute: typeof PacksIndexLazyRoute PasswordResetIndexLazyRoute: typeof PasswordResetIndexLazyRoute PrivacyIndexLazyRoute: typeof PrivacyIndexLazyRoute + ProductsIndexLazyRoute: typeof ProductsIndexLazyRoute ProfileIndexLazyRoute: typeof ProfileIndexLazyRoute RegisterIndexLazyRoute: typeof RegisterIndexLazyRoute SignInIndexLazyRoute: typeof SignInIndexLazyRoute @@ -527,6 +593,7 @@ const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, DestinationQueryLazyRoute: DestinationQueryLazyRoute, ItemItemIdLazyRoute: ItemItemIdLazyRoute, + PackTemplatesIdLazyRoute: PackTemplatesIdLazyRoute, PackIdLazyRoute: PackIdLazyRoute, PackCreateLazyRoute: PackCreateLazyRoute, ProfileIdLazyRoute: ProfileIdLazyRoute, @@ -539,9 +606,11 @@ const rootRouteChildren: RootRouteChildren = { ItemsIndexLazyRoute: ItemsIndexLazyRoute, MapIndexLazyRoute: MapIndexLazyRoute, MapsIndexLazyRoute: MapsIndexLazyRoute, + PackTemplatesIndexLazyRoute: PackTemplatesIndexLazyRoute, PacksIndexLazyRoute: PacksIndexLazyRoute, PasswordResetIndexLazyRoute: PasswordResetIndexLazyRoute, PrivacyIndexLazyRoute: PrivacyIndexLazyRoute, + ProductsIndexLazyRoute: ProductsIndexLazyRoute, ProfileIndexLazyRoute: ProfileIndexLazyRoute, RegisterIndexLazyRoute: RegisterIndexLazyRoute, SignInIndexLazyRoute: SignInIndexLazyRoute, @@ -564,6 +633,7 @@ export const routeTree = rootRoute "/", "/destination/query", "/item/$itemId", + "/pack-templates/$id", "/pack/$id", "/pack/create", "/profile/$id", @@ -576,9 +646,11 @@ export const routeTree = rootRoute "/items/", "/map/", "/maps/", + "/pack-templates/", "/packs/", "/password-reset/", "/privacy/", + "/products/", "/profile/", "/register/", "/sign-in/", @@ -595,6 +667,9 @@ export const routeTree = rootRoute "/item/$itemId": { "filePath": "item/$itemId.lazy.tsx" }, + "/pack-templates/$id": { + "filePath": "pack-templates/$id.lazy.tsx" + }, "/pack/$id": { "filePath": "pack/$id.lazy.tsx" }, @@ -631,6 +706,9 @@ export const routeTree = rootRoute "/maps/": { "filePath": "maps/index.lazy.tsx" }, + "/pack-templates/": { + "filePath": "pack-templates/index.lazy.tsx" + }, "/packs/": { "filePath": "packs/index.lazy.tsx" }, @@ -640,6 +718,9 @@ export const routeTree = rootRoute "/privacy/": { "filePath": "privacy/index.lazy.tsx" }, + "/products/": { + "filePath": "products/index.lazy.tsx" + }, "/profile/": { "filePath": "profile/index.lazy.tsx" }, diff --git a/apps/vite/src/routes/__root.tsx b/apps/vite/src/routes/__root.tsx index a80d0f1aa..bdb2dbab9 100644 --- a/apps/vite/src/routes/__root.tsx +++ b/apps/vite/src/routes/__root.tsx @@ -6,16 +6,18 @@ import { Navbar } from 'app/components/navigation'; import { Provider } from 'app/provider'; import { NODE_ENV } from '@packrat/config'; import ThemeContext from '../../../../packages/app/context/theme'; +import Footer from 'app/components/footer/Footer'; const ThemedMainContentWeb = () => { const { isDark } = useContext(ThemeContext); - const backgroundColor = isDark ? '#050505' : '#fdfbff'; + const backgroundColor = isDark ? '#000000' : '#F5F5F5'; return ( +