Skip to content

Commit

Permalink
Merge pull request #7 from mathiasberggren/feature/mobile
Browse files Browse the repository at this point in the history
Add mobile project
  • Loading branch information
rasouza authored Apr 5, 2024
2 parents 2ff6716 + b3d17a2 commit 7a87102
Show file tree
Hide file tree
Showing 104 changed files with 23,371 additions and 8,694 deletions.
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"conventionalCommits.scopes": ["monorepo", "movie-scraper", "api"]
"conventionalCommits.scopes": ["monorepo", "movie-scraper", "api", "mobile"]
}
3 changes: 1 addition & 2 deletions apps/data-fetcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"@liuli-util/vite-plugin-node": "^0.8.1",
"@types/puppeteer": "^7.0.4",
"tsx": "^4.7.2",
"typescript": "^5.4.3",
"vite": "^5.2.8"
"typescript": "^5.4.3"
}
}
9 changes: 9 additions & 0 deletions apps/mobile/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules/**/*
.expo/*
npm-debug.*
package-lock.json
yarn.lock
*.jks
*.p12
*.key
*.mobileprovision
1 change: 1 addition & 0 deletions apps/mobile/.watchmanconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
90 changes: 90 additions & 0 deletions apps/mobile/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
import React, { useCallback, useEffect, useState } from "react";
import * as SplashScreen from "expo-splash-screen";
import * as Font from "expo-font";
import { Asset } from "expo-asset";
import { Block, GalioProvider } from "galio-framework";
import { NavigationContainer } from "@react-navigation/native";
import { Image } from "react-native";

// Keep the splash screen visible while we fetch resources
SplashScreen.preventAutoHideAsync();

// Before rendering any navigation stack
import { enableScreens } from "react-native-screens";
enableScreens();

import Screens from "./navigation/Screens";
import { Images, articles, argonTheme } from "./constants";

// cache app images
const assetImages = [
Images.Onboarding,
Images.LogoOnboarding,
Images.Logo,
Images.Pro,
Images.ArgonLogo,
Images.iOSLogo,
Images.androidLogo,
];

// cache product images
articles.map((article) => assetImages.push(article.image));

function cacheImages(images) {
return images.map((image) => {
if (typeof image === "string") {
return Image.prefetch(image);
} else {
return Asset.fromModule(image).downloadAsync();
}
});
}

export default function App() {
const [appIsReady, setAppIsReady] = useState(false);

useEffect(() => {
async function prepare() {
try {
//Load Resources
await _loadResourcesAsync();
// Pre-load fonts, make any API calls you need to do here
await Font.loadAsync({
"open-sans-regular": require("./assets/font/OpenSans-Regular.ttf"),
"open-sans-light": require("./assets/font/OpenSans-Light.ttf"),
"open-sans-bold": require("./assets/font/OpenSans-Bold.ttf"),
});
} catch (e) {
console.warn(e);
} finally {
// Tell the application to render
setAppIsReady(true);
}
}
prepare();
}, []);

const _loadResourcesAsync = async () => {
return Promise.all([...cacheImages(assetImages)]);
};

const onLayoutRootView = useCallback(async () => {
if (appIsReady) {
await SplashScreen.hideAsync();
}
}, [appIsReady]);

if (!appIsReady) {
return null;
}

return (
<NavigationContainer onReady={onLayoutRootView}>
<GalioProvider theme={argonTheme}>
<Block flex>
<Screens />
</Block>
</GalioProvider>
</NavigationContainer>
);
}
179 changes: 179 additions & 0 deletions apps/mobile/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
## [1.9.0] 2023-05-15

## Updated dependencies

-Expo sdk updated from 45 to 48
-react update from 17 to 18
-react native version updated 0.68 to 0.71.7
-Other packages updated according to expo sdk.
-expo-app-loading package is deprecated. Added a new package expo-splash-screen. For this,App.js file

## [1.8.0] 2022-07-19

### Updated dependencies

- Fixed the dual header shown issue.
- Updated @react-native-masked-view/masked-view@0.2.4 to @react-native-masked-view/masked-view@0.2.6
- Updated expo@^42.0.0 to expo@^45.0.0
- Updated expo-app-loading@~1.1.2 to expo-app-loading@~2.0.0
- Updated expo-expo-asset@~8.3.2 to expo-asset@~8.5.0
- Updated expo-font@~9.2.1 to expo-font@~10.1.0
- Updated expo-module-core@^0.2.0 to expo-module-core@~0.9.2
- Updated expo-linear-gradient@~9.2.0 to expo-linear-gradient@~11.3.0
- Updated [email protected] to [email protected]
- Updated [email protected] to [email protected]
- Updated react-native-gesture-handler@^1.10.3 to react-native-gesture-handler@~2.2.1
- Updated react-native-reanimated@~2.2.0 to react-native-reanimated@~2.8.0
- Updated [email protected] to [email protected]
- Updated react-native-screens@~3.4.0 to react-native-screens@~3.11.1
- Updated dev dependencies
- Updated [email protected] to babel-preset-expo@~9.1.0
- Updated Babel Config
- Added a new plugin of react-native-reanimated/plugin

## [1.7.0] 2022- 04- 26

### Updated dependencies

- dependencies updated
- expo module core added
- expo-linear-gradient added
- stackNavigator and drawerNavigation changes ( color scheme set )
- expo updated
- syntax update in header Shown

## [1.6.0] 2020 - 11 - 04

### Updated dependencies

- updated `@react-navigation/[email protected]` to `@react-navigation/[email protected]`
- updated `@react-navigation/[email protected]` to `@react-navigation/[email protected]`
- updated `@react-navigation/[email protected]` to `@react-navigation/[email protected]`
- updated `expo SDK@39` to `expo SDK@40`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `react-native SDK@39` to `react-native SDK@40`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- added `[email protected]`

### Updated files

- `useNativeDriver` warning solved for `Tabs.js` and `Gallery.js`
- updated `App.js` to work with the new package included `expo-app-loading`
- implemented `SafeAreaView` inside the `Onboarding.js` screen
- `keyboardVerticalOffset` value changed for `Chat.js`

## [1.5.0] 2020 - 11 - 04

### Updated dependencies

- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `@react-native-community/[email protected]` to `@react-native-community/[email protected]`
- updated `react-native [email protected]` to `react-native [email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `expo [email protected]` to `expo [email protected]`
- updated `[email protected]` to `[email protected]`
- changed the git source for react-native-modal-dropdown

### Updated files

- Cart.js - fixing styles for Buttons after updated galio framework
- Elements.js - layout fixed by adding width to ScrollView
- Product.js - chat button styling fixed and animated warning removed
- Header.js - fixed goBack looping problem by unfocusing the input when the screen first renders

## [1.4.0] 2020 - 06 - 04

### Updated dependencies

- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `@react-native-community/[email protected]` to `@react-native-community/[email protected]`
- updated `react-native [email protected]` to `react-native [email protected]`
- updated `[email protected]` to `[email protected]`
- updated `Expo @36.0.0` to `Expo @37.0.0`
- updated `@react-navigation/[email protected]` to `@react-navigation/[email protected]`
- updated `@react-navigation/[email protected]` to `@react-navigation/[email protected]`
- updated `@react-navigation/[email protected]` to `@react-navigation/[email protected]`
- updated `@react-navigation/[email protected]` to `@react-navigation/[email protected]`

### Updated files

- moved `assets/font/argon.json` to `assets/config/argon.json` in order to make sure there wouldn't be any issue with the build for Android
- fixed issue in Cart where button navigated to a broken route

## [1.3.0] 2020 - 03 - 04

### Removed dependencies

- removed `[email protected]`

### Added dependencies

- added `@react-navigation/[email protected]`
- added `@react-navigation/[email protected]`
- added `@react-navigation/[email protected]`
- added `@react-navigation/[email protected]`
- added `@react-native-community/[email protected]`
- added `[email protected]`
- added `[email protected]`
- added `[email protected]`

### Updated dependencies

- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`
- updated `[email protected]` to `[email protected]`

### Updated files

- changed the whole routing from `Screens.js` because `[email protected]` has a new dynamic API
- changed `Menu.js` for a new Drawer custom component
- changed `DrawerItem.js` for a new type of `<DrawerCustomItem />`
- changed props and variables so that the new `react-navigation` API could work with the following files: `Beauty.js`, `Header.js`, `Product.js`, `Gallery.js`, `Pro.js`, `Product.js`, `Settings.js`, `Register.js`

## [1.2.0] 2019-11-06

### Updated dependencies

- `[email protected]` to `[email protected]`
- `[email protected]` to `[email protected]`
- `[email protected]` to `[email protected]`
- `react-native [email protected]` to `react-native [email protected]`
- `[email protected]` to `[email protected]`

### Updated files

- fixed left Header button used for navigation
- the back button is now bigger

## [1.1.0] 2019-09-18

### Updated dependencies

- `[email protected]` to `[email protected]`
- `[email protected]` to `[email protected]`
- `[email protected]` to `[email protected]`
- `react-native [email protected]` to `react-native [email protected]`
- added `[email protected]`
- `[email protected]` to `[email protected]`

## [1.0.0] 2019-08-07

### Initial Release
40 changes: 40 additions & 0 deletions apps/mobile/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Prerequisites

Please answer the following questions for yourself before submitting an issue.

- [ ] I am running the latest version
- [ ] I checked the documentation and found no answer
- [ ] I checked to make sure that this issue has not already been filed
- [ ] I'm reporting the issue to the correct repository (for multi-repository projects)

# Expected Behavior

Please describe the behavior you are expecting

# Current Behavior

What is the current behavior?

# Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

## Steps to Reproduce

Please provide detailed steps for reproducing the issue.

1. step 1
2. step 2
3. you get it...

## Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

* Device:
* Operating System:
* Browser and Version:

## Failure Logs

Please include any relevant log snippets or files here.
21 changes: 21 additions & 0 deletions apps/mobile/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Creative Tim

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 7a87102

Please sign in to comment.