diff --git a/.expo/README.md b/.expo/README.md new file mode 100644 index 0000000..f7eb5fe --- /dev/null +++ b/.expo/README.md @@ -0,0 +1,8 @@ +> Why do I have a folder named ".expo" in my project? +The ".expo" folder is created when an Expo project is started using "expo start" command. +> What do the files contain? +- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds. +- "settings.json": contains the server configuration that is used to serve the application manifest. +> Should I commit the ".expo" folder? +No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine. +Upon project creation, the ".expo" folder is already added to your ".gitignore" file. diff --git a/.expo/devices.json b/.expo/devices.json new file mode 100644 index 0000000..5efff6c --- /dev/null +++ b/.expo/devices.json @@ -0,0 +1,3 @@ +{ + "devices": [] +} diff --git a/.expo/types/router.d.ts b/.expo/types/router.d.ts new file mode 100644 index 0000000..d433eef --- /dev/null +++ b/.expo/types/router.d.ts @@ -0,0 +1,14 @@ +/* eslint-disable */ +import * as Router from 'expo-router'; + +export * from 'expo-router'; + +declare module 'expo-router' { + export namespace ExpoRouter { + export interface __routes { + hrefInputParams: { pathname: Router.RelativePathString, params?: Router.UnknownInputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownInputParams } | { pathname: `/`; params?: Router.UnknownInputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownInputParams; }; + hrefOutputParams: { pathname: Router.RelativePathString, params?: Router.UnknownOutputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownOutputParams } | { pathname: `/`; params?: Router.UnknownOutputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownOutputParams; }; + href: Router.RelativePathString | Router.ExternalPathString | `/${`?${string}` | `#${string}` | ''}` | `/_sitemap${`?${string}` | `#${string}` | ''}` | { pathname: Router.RelativePathString, params?: Router.UnknownInputParams } | { pathname: Router.ExternalPathString, params?: Router.UnknownInputParams } | { pathname: `/`; params?: Router.UnknownInputParams; } | { pathname: `/_sitemap`; params?: Router.UnknownInputParams; }; + } + } +} diff --git a/.gitignore b/.gitignore index ceaea36..2edc363 100644 --- a/.gitignore +++ b/.gitignore @@ -130,3 +130,9 @@ dist .yarn/install-state.gz .pnp.* + +# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb +# The following patterns were generated by expo-cli + +expo-env.d.ts +# @end expo-cli \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..11eca66 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/selfstarter.iml b/.idea/selfstarter.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/selfstarter.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/app/(tabs)/_layout.tsx b/app-example/app/(tabs)/_layout.tsx similarity index 100% rename from app/(tabs)/_layout.tsx rename to app-example/app/(tabs)/_layout.tsx diff --git a/app/(tabs)/explore.tsx b/app-example/app/(tabs)/explore.tsx similarity index 100% rename from app/(tabs)/explore.tsx rename to app-example/app/(tabs)/explore.tsx diff --git a/app/(tabs)/index.tsx b/app-example/app/(tabs)/index.tsx similarity index 100% rename from app/(tabs)/index.tsx rename to app-example/app/(tabs)/index.tsx diff --git a/app/+not-found.tsx b/app-example/app/+not-found.tsx similarity index 100% rename from app/+not-found.tsx rename to app-example/app/+not-found.tsx diff --git a/app-example/app/_layout.tsx b/app-example/app/_layout.tsx new file mode 100644 index 0000000..db74578 --- /dev/null +++ b/app-example/app/_layout.tsx @@ -0,0 +1,39 @@ +import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native'; +import { useFonts } from 'expo-font'; +import { Stack } from 'expo-router'; +import * as SplashScreen from 'expo-splash-screen'; +import { StatusBar } from 'expo-status-bar'; +import { useEffect } from 'react'; +import 'react-native-reanimated'; + +import { useColorScheme } from '@/hooks/useColorScheme'; + +// Prevent the splash screen from auto-hiding before asset loading is complete. +SplashScreen.preventAutoHideAsync(); + +export default function RootLayout() { + const colorScheme = useColorScheme(); + const [loaded] = useFonts({ + SpaceMono: require('../assets/fonts/SpaceMono-Regular.ttf'), + }); + + useEffect(() => { + if (loaded) { + SplashScreen.hideAsync(); + } + }, [loaded]); + + if (!loaded) { + return null; + } + + return ( + + + + + + + + ); +} diff --git a/components/Collapsible.tsx b/app-example/components/Collapsible.tsx similarity index 100% rename from components/Collapsible.tsx rename to app-example/components/Collapsible.tsx diff --git a/components/ExternalLink.tsx b/app-example/components/ExternalLink.tsx similarity index 100% rename from components/ExternalLink.tsx rename to app-example/components/ExternalLink.tsx diff --git a/components/HapticTab.tsx b/app-example/components/HapticTab.tsx similarity index 100% rename from components/HapticTab.tsx rename to app-example/components/HapticTab.tsx diff --git a/components/HelloWave.tsx b/app-example/components/HelloWave.tsx similarity index 100% rename from components/HelloWave.tsx rename to app-example/components/HelloWave.tsx diff --git a/components/ParallaxScrollView.tsx b/app-example/components/ParallaxScrollView.tsx similarity index 100% rename from components/ParallaxScrollView.tsx rename to app-example/components/ParallaxScrollView.tsx diff --git a/components/ThemedText.tsx b/app-example/components/ThemedText.tsx similarity index 100% rename from components/ThemedText.tsx rename to app-example/components/ThemedText.tsx diff --git a/components/ThemedView.tsx b/app-example/components/ThemedView.tsx similarity index 100% rename from components/ThemedView.tsx rename to app-example/components/ThemedView.tsx diff --git a/components/__tests__/ThemedText-test.tsx b/app-example/components/__tests__/ThemedText-test.tsx similarity index 100% rename from components/__tests__/ThemedText-test.tsx rename to app-example/components/__tests__/ThemedText-test.tsx diff --git a/components/__tests__/__snapshots__/ThemedText-test.tsx.snap b/app-example/components/__tests__/__snapshots__/ThemedText-test.tsx.snap similarity index 100% rename from components/__tests__/__snapshots__/ThemedText-test.tsx.snap rename to app-example/components/__tests__/__snapshots__/ThemedText-test.tsx.snap diff --git a/components/ui/IconSymbol.ios.tsx b/app-example/components/ui/IconSymbol.ios.tsx similarity index 100% rename from components/ui/IconSymbol.ios.tsx rename to app-example/components/ui/IconSymbol.ios.tsx diff --git a/components/ui/IconSymbol.tsx b/app-example/components/ui/IconSymbol.tsx similarity index 100% rename from components/ui/IconSymbol.tsx rename to app-example/components/ui/IconSymbol.tsx diff --git a/components/ui/TabBarBackground.ios.tsx b/app-example/components/ui/TabBarBackground.ios.tsx similarity index 100% rename from components/ui/TabBarBackground.ios.tsx rename to app-example/components/ui/TabBarBackground.ios.tsx diff --git a/components/ui/TabBarBackground.tsx b/app-example/components/ui/TabBarBackground.tsx similarity index 100% rename from components/ui/TabBarBackground.tsx rename to app-example/components/ui/TabBarBackground.tsx diff --git a/constants/Colors.ts b/app-example/constants/Colors.ts similarity index 100% rename from constants/Colors.ts rename to app-example/constants/Colors.ts diff --git a/hooks/useColorScheme.ts b/app-example/hooks/useColorScheme.ts similarity index 100% rename from hooks/useColorScheme.ts rename to app-example/hooks/useColorScheme.ts diff --git a/hooks/useColorScheme.web.ts b/app-example/hooks/useColorScheme.web.ts similarity index 100% rename from hooks/useColorScheme.web.ts rename to app-example/hooks/useColorScheme.web.ts diff --git a/hooks/useThemeColor.ts b/app-example/hooks/useThemeColor.ts similarity index 100% rename from hooks/useThemeColor.ts rename to app-example/hooks/useThemeColor.ts diff --git a/scripts/reset-project.js b/app-example/scripts/reset-project.js similarity index 100% rename from scripts/reset-project.js rename to app-example/scripts/reset-project.js diff --git a/app/_layout.tsx b/app/_layout.tsx index db74578..d2a8b0b 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -1,39 +1,5 @@ -import { DarkTheme, DefaultTheme, ThemeProvider } from '@react-navigation/native'; -import { useFonts } from 'expo-font'; -import { Stack } from 'expo-router'; -import * as SplashScreen from 'expo-splash-screen'; -import { StatusBar } from 'expo-status-bar'; -import { useEffect } from 'react'; -import 'react-native-reanimated'; - -import { useColorScheme } from '@/hooks/useColorScheme'; - -// Prevent the splash screen from auto-hiding before asset loading is complete. -SplashScreen.preventAutoHideAsync(); +import { Stack } from "expo-router"; export default function RootLayout() { - const colorScheme = useColorScheme(); - const [loaded] = useFonts({ - SpaceMono: require('../assets/fonts/SpaceMono-Regular.ttf'), - }); - - useEffect(() => { - if (loaded) { - SplashScreen.hideAsync(); - } - }, [loaded]); - - if (!loaded) { - return null; - } - - return ( - - - - - - - - ); + return ; } diff --git a/app/index.tsx b/app/index.tsx new file mode 100644 index 0000000..61a63de --- /dev/null +++ b/app/index.tsx @@ -0,0 +1,87 @@ +import {FlatList, Text, View, ColorValue, ListRenderItemInfo} from "react-native"; +// @ts-ignore +import SwipeableFlatList from 'react-native-swipeable-list'; + +export default function Index() { + return ( + + + + ); +} + +function ComputerList(computers: { computers: Computer[] }) { + return ( + + ) => + + + {item.emoji} + + + {item.name} + {item.mac_address} + + + }/> + + ) +} + +type Server = { + name: string, + domain: string, + computers: Computer[], +} + +type Computer = { + name: string, + emoji: string, + background_color: ColorValue, + mac_address: string, +} diff --git a/package-lock.json b/package-lock.json index 35a8358..6731f87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "react-native-reanimated": "~3.16.1", "react-native-safe-area-context": "4.12.0", "react-native-screens": "~4.4.0", + "react-native-swipeable-list": "^0.1.2", "react-native-web": "~0.19.13", "react-native-webview": "13.12.5" }, @@ -11747,6 +11748,16 @@ "react-native": "*" } }, + "node_modules/react-native-swipeable-list": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/react-native-swipeable-list/-/react-native-swipeable-list-0.1.2.tgz", + "integrity": "sha512-FDeFLByUep3m3xuwS/ZkktxL7Xzg90XnKoo+KLTF04jiddyVZQMnXTHG8O4pyiEtg/swcBlT6XUktV+/KTVNXQ==", + "license": "MIT", + "peerDependencies": { + "react": ">=16.11.0", + "react-native": ">=0.61.4" + } + }, "node_modules/react-native-web": { "version": "0.19.13", "resolved": "https://registry.npmjs.org/react-native-web/-/react-native-web-0.19.13.tgz", diff --git a/package.json b/package.json index 6bf25d3..911b6a8 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "react-native-reanimated": "~3.16.1", "react-native-safe-area-context": "4.12.0", "react-native-screens": "~4.4.0", + "react-native-swipeable-list": "^0.1.2", "react-native-web": "~0.19.13", "react-native-webview": "13.12.5" },