diff --git a/App.js b/App.js index a134ba6..d0962f8 100644 --- a/App.js +++ b/App.js @@ -4,7 +4,7 @@ import * as React from 'react'; import {Platform, StatusBar} from 'react-native'; import LocaleManager from './managers/LocaleManager'; import AsyncStorageManager from "./managers/AsyncStorageManager"; -import CustomIntroSlider from "./components/CustomIntroSlider"; +import CustomIntroSlider from "./components/Custom/CustomIntroSlider"; import {SplashScreen} from 'expo'; import ThemeManager from './managers/ThemeManager'; import {NavigationContainer} from '@react-navigation/native'; diff --git a/components/AuthenticatedScreen.js b/components/Amicale/AuthenticatedScreen.js similarity index 96% rename from components/AuthenticatedScreen.js rename to components/Amicale/AuthenticatedScreen.js index 361c4bf..06989b2 100644 --- a/components/AuthenticatedScreen.js +++ b/components/Amicale/AuthenticatedScreen.js @@ -3,8 +3,8 @@ import * as React from 'react'; import {View} from "react-native"; import {ActivityIndicator, withTheme} from 'react-native-paper'; -import ConnectionManager, {ERROR_TYPE} from "../managers/ConnectionManager"; -import NetworkErrorComponent from "./NetworkErrorComponent"; +import ConnectionManager, {ERROR_TYPE} from "../../managers/ConnectionManager"; +import NetworkErrorComponent from "../Custom/NetworkErrorComponent"; import i18n from 'i18n-js'; type Props = { diff --git a/components/LogoutDialog.js b/components/Amicale/LogoutDialog.js similarity index 97% rename from components/LogoutDialog.js rename to components/Amicale/LogoutDialog.js index 1df0433..0c32764 100644 --- a/components/LogoutDialog.js +++ b/components/Amicale/LogoutDialog.js @@ -2,7 +2,7 @@ import * as React from 'react'; import {ActivityIndicator, Button, Dialog, Paragraph, Portal, withTheme} from 'react-native-paper'; -import ConnectionManager from "../managers/ConnectionManager"; +import ConnectionManager from "../../managers/ConnectionManager"; import i18n from 'i18n-js'; type Props = { diff --git a/components/AlertDialog.js b/components/Custom/AlertDialog.js similarity index 100% rename from components/AlertDialog.js rename to components/Custom/AlertDialog.js diff --git a/components/CustomAgenda.js b/components/Custom/CustomAgenda.js similarity index 100% rename from components/CustomAgenda.js rename to components/Custom/CustomAgenda.js diff --git a/components/CustomIntroSlider.js b/components/Custom/CustomIntroSlider.js similarity index 98% rename from components/CustomIntroSlider.js rename to components/Custom/CustomIntroSlider.js index b62c5ac..3189b02 100644 --- a/components/CustomIntroSlider.js +++ b/components/Custom/CustomIntroSlider.js @@ -7,7 +7,7 @@ import {MaterialCommunityIcons} from "@expo/vector-icons"; import {Text} from "react-native-paper"; import i18n from 'i18n-js'; import AppIntroSlider from "react-native-app-intro-slider"; -import Update from "../constants/Update"; +import Update from "../../constants/Update"; type Props = { onDone: Function, @@ -34,7 +34,7 @@ export default class CustomIntroSlider extends React.Component { key: '1', title: i18n.t('intro.slide1.title'), text: i18n.t('intro.slide1.text'), - image: require('../assets/splash.png'), + image: require('../../assets/splash.png'), colors: ['#e01928', '#be1522'], }, { diff --git a/components/CustomModal.js b/components/Custom/CustomModal.js similarity index 100% rename from components/CustomModal.js rename to components/Custom/CustomModal.js diff --git a/components/HeaderButton.js b/components/Custom/HeaderButton.js similarity index 100% rename from components/HeaderButton.js rename to components/Custom/HeaderButton.js diff --git a/components/NetworkErrorComponent.js b/components/Custom/NetworkErrorComponent.js similarity index 100% rename from components/NetworkErrorComponent.js rename to components/Custom/NetworkErrorComponent.js diff --git a/components/EventDashboardItem.js b/components/Home/EventDashboardItem.js similarity index 100% rename from components/EventDashboardItem.js rename to components/Home/EventDashboardItem.js diff --git a/components/FeedItem.js b/components/Home/FeedItem.js similarity index 96% rename from components/FeedItem.js rename to components/Home/FeedItem.js index e26f4bd..d5f87ae 100644 --- a/components/FeedItem.js +++ b/components/Home/FeedItem.js @@ -4,7 +4,7 @@ import {TouchableOpacity, View} from "react-native"; import Autolink from "react-native-autolink"; import i18n from "i18n-js"; -const ICON_AMICALE = require('../assets/amicale.png'); +const ICON_AMICALE = require('../../assets/amicale.png'); /** * Gets the amicale INSAT logo diff --git a/components/PreviewEventDashboardItem.js b/components/Home/PreviewEventDashboardItem.js similarity index 97% rename from components/PreviewEventDashboardItem.js rename to components/Home/PreviewEventDashboardItem.js index b459255..d77b3f1 100644 --- a/components/PreviewEventDashboardItem.js +++ b/components/Home/PreviewEventDashboardItem.js @@ -5,7 +5,7 @@ import {StyleSheet, View} from "react-native"; import HTML from "react-native-render-html"; import i18n from "i18n-js"; import {Avatar, Button, Card, withTheme} from 'react-native-paper'; -import {getFormattedEventTime, isDescriptionEmpty} from "../utils/Planning"; +import {getFormattedEventTime, isDescriptionEmpty} from "../../utils/Planning"; /** * Component used to display an event preview if an event is available diff --git a/components/SquareDashboardItem.js b/components/Home/SquareDashboardItem.js similarity index 100% rename from components/SquareDashboardItem.js rename to components/Home/SquareDashboardItem.js diff --git a/components/EmptyWebSectionListItem.js b/components/Lists/EmptyWebSectionListItem.js similarity index 100% rename from components/EmptyWebSectionListItem.js rename to components/Lists/EmptyWebSectionListItem.js diff --git a/components/ProxiwashListItem.js b/components/Lists/ProxiwashListItem.js similarity index 98% rename from components/ProxiwashListItem.js rename to components/Lists/ProxiwashListItem.js index 9d577fe..e243f5d 100644 --- a/components/ProxiwashListItem.js +++ b/components/Lists/ProxiwashListItem.js @@ -1,7 +1,7 @@ import * as React from 'react'; import {Avatar, Card, Text, withTheme} from 'react-native-paper'; import {StyleSheet, View} from "react-native"; -import ProxiwashConstants from "../constants/ProxiwashConstants"; +import ProxiwashConstants from "../../constants/ProxiwashConstants"; /** * Component used to display a proxiwash item, showing machine progression and state diff --git a/components/PureFlatList.js b/components/Lists/PureFlatList.js similarity index 100% rename from components/PureFlatList.js rename to components/Lists/PureFlatList.js diff --git a/components/WebSectionList.js b/components/Lists/WebSectionList.js similarity index 99% rename from components/WebSectionList.js rename to components/Lists/WebSectionList.js index 3d0bdd2..4079cd8 100644 --- a/components/WebSectionList.js +++ b/components/Lists/WebSectionList.js @@ -1,7 +1,7 @@ // @flow import * as React from 'react'; -import {readData} from "../utils/WebData"; +import {readData} from "../../utils/WebData"; import i18n from "i18n-js"; import {Snackbar} from 'react-native-paper'; import {RefreshControl, SectionList, View} from "react-native"; diff --git a/components/WebViewScreen.js b/components/Screens/WebViewScreen.js similarity index 98% rename from components/WebViewScreen.js rename to components/Screens/WebViewScreen.js index 206920e..16903a7 100644 --- a/components/WebViewScreen.js +++ b/components/Screens/WebViewScreen.js @@ -4,7 +4,7 @@ import * as React from 'react'; import {View} from 'react-native'; import WebView from "react-native-webview"; import {ActivityIndicator, withTheme} from 'react-native-paper'; -import HeaderButton from "./HeaderButton"; +import HeaderButton from "../Custom/HeaderButton"; type Props = { navigation: Object, diff --git a/components/Sidebar.js b/components/Sidebar/Sidebar.js similarity index 97% rename from components/Sidebar.js rename to components/Sidebar/Sidebar.js index 6e6d0af..c104205 100644 --- a/components/Sidebar.js +++ b/components/Sidebar/Sidebar.js @@ -3,12 +3,12 @@ import * as React from 'react'; import {Dimensions, FlatList, Image, Platform, StyleSheet, View,} from 'react-native'; import i18n from "i18n-js"; -import {openBrowser} from "../utils/WebBrowser"; +import {openBrowser} from "../../utils/WebBrowser"; import SidebarDivider from "./SidebarDivider"; import SidebarItem from "./SidebarItem"; import {TouchableRipple, withTheme} from "react-native-paper"; -import ConnectionManager from "../managers/ConnectionManager"; -import LogoutDialog from "./LogoutDialog"; +import ConnectionManager from "../../managers/ConnectionManager"; +import LogoutDialog from "../Amicale/LogoutDialog"; const deviceWidth = Dimensions.get("window").width; @@ -226,7 +226,7 @@ class SideBar extends React.PureComponent { onPress={onPress} > diff --git a/components/SidebarDivider.js b/components/Sidebar/SidebarDivider.js similarity index 100% rename from components/SidebarDivider.js rename to components/Sidebar/SidebarDivider.js diff --git a/components/SidebarItem.js b/components/Sidebar/SidebarItem.js similarity index 100% rename from components/SidebarItem.js rename to components/Sidebar/SidebarItem.js diff --git a/navigation/DrawerNavigator.js b/navigation/DrawerNavigator.js index 36efbd0..b014aa5 100644 --- a/navigation/DrawerNavigator.js +++ b/navigation/DrawerNavigator.js @@ -11,9 +11,9 @@ import AvailableRoomScreen from "../screens/Websites/AvailableRoomScreen"; import BibScreen from "../screens/Websites/BibScreen"; import TetrisScreen from "../screens/Tetris/TetrisScreen"; import DebugScreen from '../screens/About/DebugScreen'; -import Sidebar from "../components/Sidebar"; +import Sidebar from "../components/Sidebar/Sidebar"; import {createStackNavigator, TransitionPresets} from "@react-navigation/stack"; -import HeaderButton from "../components/HeaderButton"; +import HeaderButton from "../components/Custom/HeaderButton"; import i18n from "i18n-js"; import LoginScreen from "../screens/Amicale/LoginScreen"; import ProfileScreen from "../screens/Amicale/ProfileScreen"; diff --git a/navigation/MainTabNavigator.js b/navigation/MainTabNavigator.js index b75bc35..451647f 100644 --- a/navigation/MainTabNavigator.js +++ b/navigation/MainTabNavigator.js @@ -13,7 +13,7 @@ import ProximoAboutScreen from "../screens/Proximo/ProximoAboutScreen"; import PlanexScreen from '../screens/Websites/PlanexScreen'; import {MaterialCommunityIcons} from "@expo/vector-icons"; import AsyncStorageManager from "../managers/AsyncStorageManager"; -import HeaderButton from "../components/HeaderButton"; +import HeaderButton from "../components/Custom/HeaderButton"; import {withTheme} from 'react-native-paper'; import i18n from "i18n-js"; diff --git a/screens/About/AboutScreen.js b/screens/About/AboutScreen.js index 615f872..9906098 100644 --- a/screens/About/AboutScreen.js +++ b/screens/About/AboutScreen.js @@ -5,7 +5,7 @@ import {FlatList, Linking, Platform, View} from 'react-native'; import i18n from "i18n-js"; import appJson from '../../app'; import AsyncStorageManager from "../../managers/AsyncStorageManager"; -import CustomModal from "../../components/CustomModal"; +import CustomModal from "../../components/Custom/CustomModal"; import {Avatar, Button, Card, List, Text, Title, withTheme} from 'react-native-paper'; const links = { diff --git a/screens/About/DebugScreen.js b/screens/About/DebugScreen.js index c13cea8..7c544ed 100644 --- a/screens/About/DebugScreen.js +++ b/screens/About/DebugScreen.js @@ -3,7 +3,7 @@ import * as React from 'react'; import {ScrollView, View} from "react-native"; import AsyncStorageManager from "../../managers/AsyncStorageManager"; -import CustomModal from "../../components/CustomModal"; +import CustomModal from "../../components/Custom/CustomModal"; import {Button, Card, List, Subheading, TextInput, Title, withTheme} from 'react-native-paper'; type Props = { diff --git a/screens/Amicale/LoginScreen.js b/screens/Amicale/LoginScreen.js index 509fd7b..7b84082 100644 --- a/screens/Amicale/LoginScreen.js +++ b/screens/Amicale/LoginScreen.js @@ -6,7 +6,7 @@ import {Avatar, Button, Card, HelperText, Text, TextInput, withTheme} from 'reac import ConnectionManager, {ERROR_TYPE} from "../../managers/ConnectionManager"; import {openBrowser} from "../../utils/WebBrowser"; import i18n from 'i18n-js'; -import AlertDialog from "../../components/AlertDialog"; +import AlertDialog from "../../components/Custom/AlertDialog"; type Props = { navigation: Object, diff --git a/screens/Amicale/ProfileScreen.js b/screens/Amicale/ProfileScreen.js index 778e106..aeb74a9 100644 --- a/screens/Amicale/ProfileScreen.js +++ b/screens/Amicale/ProfileScreen.js @@ -3,11 +3,11 @@ import * as React from 'react'; import {FlatList, StyleSheet, View} from "react-native"; import {Avatar, Button, Card, Divider, List, withTheme} from 'react-native-paper'; -import AuthenticatedScreen from "../../components/AuthenticatedScreen"; +import AuthenticatedScreen from "../../components/Amicale/AuthenticatedScreen"; import {openBrowser} from "../../utils/WebBrowser"; -import HeaderButton from "../../components/HeaderButton"; +import HeaderButton from "../../components/Custom/HeaderButton"; import i18n from 'i18n-js'; -import LogoutDialog from "../../components/LogoutDialog"; +import LogoutDialog from "../../components/Amicale/LogoutDialog"; type Props = { navigation: Object, diff --git a/screens/HomeScreen.js b/screens/HomeScreen.js index f7c8d57..dddc50c 100644 --- a/screens/HomeScreen.js +++ b/screens/HomeScreen.js @@ -3,12 +3,12 @@ import * as React from 'react'; import {View} from 'react-native'; import i18n from "i18n-js"; -import DashboardItem from "../components/EventDashboardItem"; -import WebSectionList from "../components/WebSectionList"; +import DashboardItem from "../components/Home/EventDashboardItem"; +import WebSectionList from "../components/Lists/WebSectionList"; import {Text, withTheme} from 'react-native-paper'; -import FeedItem from "../components/FeedItem"; -import SquareDashboardItem from "../components/SquareDashboardItem"; -import PreviewEventDashboardItem from "../components/PreviewEventDashboardItem"; +import FeedItem from "../components/Home/FeedItem"; +import SquareDashboardItem from "../components/Home/SquareDashboardItem"; +import PreviewEventDashboardItem from "../components/Home/PreviewEventDashboardItem"; import {stringToDate} from "../utils/Planning"; import {openBrowser} from "../utils/WebBrowser"; // import DATA from "../dashboard_data.json"; diff --git a/screens/Planning/PlanningScreen.js b/screens/Planning/PlanningScreen.js index 4e8805f..eb340f4 100644 --- a/screens/Planning/PlanningScreen.js +++ b/screens/Planning/PlanningScreen.js @@ -13,7 +13,7 @@ import { getFormattedEventTime, } from '../../utils/Planning'; import {Avatar, Divider, List} from 'react-native-paper'; -import CustomAgenda from "../../components/CustomAgenda"; +import CustomAgenda from "../../components/Custom/CustomAgenda"; LocaleConfig.locales['fr'] = { monthNames: ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'], diff --git a/screens/Proximo/ProximoListScreen.js b/screens/Proximo/ProximoListScreen.js index d4819ab..17cfbea 100644 --- a/screens/Proximo/ProximoListScreen.js +++ b/screens/Proximo/ProximoListScreen.js @@ -3,9 +3,9 @@ import * as React from 'react'; import {Image, Platform, ScrollView, View} from "react-native"; import i18n from "i18n-js"; -import CustomModal from "../../components/CustomModal"; +import CustomModal from "../../components/Custom/CustomModal"; import {Avatar, IconButton, List, RadioButton, Searchbar, Subheading, Text, Title, withTheme} from "react-native-paper"; -import PureFlatList from "../../components/PureFlatList"; +import PureFlatList from "../../components/Lists/PureFlatList"; function sortPrice(a, b) { return a.price - b.price; diff --git a/screens/Proximo/ProximoMainScreen.js b/screens/Proximo/ProximoMainScreen.js index 4e60a0d..b60901d 100644 --- a/screens/Proximo/ProximoMainScreen.js +++ b/screens/Proximo/ProximoMainScreen.js @@ -3,9 +3,9 @@ import * as React from 'react'; import {View} from 'react-native' import i18n from "i18n-js"; -import WebSectionList from "../../components/WebSectionList"; +import WebSectionList from "../../components/Lists/WebSectionList"; import {List, withTheme} from 'react-native-paper'; -import HeaderButton from "../../components/HeaderButton"; +import HeaderButton from "../../components/Custom/HeaderButton"; const DATA_URL = "https://etud.insa-toulouse.fr/~proximo/data/stock-v2.json"; diff --git a/screens/Proxiwash/ProxiwashScreen.js b/screens/Proxiwash/ProxiwashScreen.js index a8b0d40..1199974 100644 --- a/screens/Proxiwash/ProxiwashScreen.js +++ b/screens/Proxiwash/ProxiwashScreen.js @@ -3,15 +3,15 @@ import * as React from 'react'; import {Alert, Platform, View} from 'react-native'; import i18n from "i18n-js"; -import WebSectionList from "../../components/WebSectionList"; +import WebSectionList from "../../components/Lists/WebSectionList"; import * as Notifications from "../../utils/Notifications"; import AsyncStorageManager from "../../managers/AsyncStorageManager"; import * as Expo from "expo"; import {Avatar, Banner, Button, Card, Text, withTheme} from 'react-native-paper'; -import HeaderButton from "../../components/HeaderButton"; -import ProxiwashListItem from "../../components/ProxiwashListItem"; +import HeaderButton from "../../components/Custom/HeaderButton"; +import ProxiwashListItem from "../../components/Lists/ProxiwashListItem"; import ProxiwashConstants from "../../constants/ProxiwashConstants"; -import CustomModal from "../../components/CustomModal"; +import CustomModal from "../../components/Custom/CustomModal"; import AprilFoolsManager from "../../managers/AprilFoolsManager"; const DATA_URL = "https://etud.insa-toulouse.fr/~amicale_app/washinsa/washinsa.json"; diff --git a/screens/SelfMenuScreen.js b/screens/SelfMenuScreen.js index b2d8f8d..32b359e 100644 --- a/screens/SelfMenuScreen.js +++ b/screens/SelfMenuScreen.js @@ -3,7 +3,7 @@ import * as React from 'react'; import {View} from 'react-native'; import DateManager from "../managers/DateManager"; -import WebSectionList from "../components/WebSectionList"; +import WebSectionList from "../components/Lists/WebSectionList"; import {Card, Text, withTheme} from 'react-native-paper'; import AprilFoolsManager from "../managers/AprilFoolsManager"; diff --git a/screens/Tetris/TetrisScreen.js b/screens/Tetris/TetrisScreen.js index 76eeab5..f1b7b81 100644 --- a/screens/Tetris/TetrisScreen.js +++ b/screens/Tetris/TetrisScreen.js @@ -6,7 +6,7 @@ import {IconButton, Text, withTheme} from 'react-native-paper'; import {MaterialCommunityIcons} from "@expo/vector-icons"; import GameLogic from "./GameLogic"; import Grid from "./components/Grid"; -import HeaderButton from "../../components/HeaderButton"; +import HeaderButton from "../../components/Custom/HeaderButton"; import Preview from "./components/Preview"; import i18n from "i18n-js"; diff --git a/screens/Websites/AvailableRoomScreen.js b/screens/Websites/AvailableRoomScreen.js index 462876e..d26d334 100644 --- a/screens/Websites/AvailableRoomScreen.js +++ b/screens/Websites/AvailableRoomScreen.js @@ -1,7 +1,7 @@ // @flow import * as React from 'react'; -import WebViewScreen from "../../components/WebViewScreen"; +import WebViewScreen from "../../components/Screens/WebViewScreen"; import i18n from "i18n-js"; type Props = { diff --git a/screens/Websites/BibScreen.js b/screens/Websites/BibScreen.js index 3bd8d52..48d5864 100644 --- a/screens/Websites/BibScreen.js +++ b/screens/Websites/BibScreen.js @@ -1,7 +1,7 @@ // @flow import * as React from 'react'; -import WebViewScreen from "../../components/WebViewScreen"; +import WebViewScreen from "../../components/Screens/WebViewScreen"; import i18n from "i18n-js"; type Props = { diff --git a/screens/Websites/PlanexScreen.js b/screens/Websites/PlanexScreen.js index fa33e8d..8a112fb 100644 --- a/screens/Websites/PlanexScreen.js +++ b/screens/Websites/PlanexScreen.js @@ -2,7 +2,7 @@ import * as React from 'react'; import ThemeManager from "../../managers/ThemeManager"; -import WebViewScreen from "../../components/WebViewScreen"; +import WebViewScreen from "../../components/Screens/WebViewScreen"; import {Avatar, Banner} from "react-native-paper"; import i18n from "i18n-js"; import {View} from "react-native";