Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:Plant-for-the-Planet-org/FireAle…
Browse files Browse the repository at this point in the history
…rt into feature/add-geo-event-provider
  • Loading branch information
dhakalaashish committed Aug 17, 2023
2 parents 7af46bb + 71de135 commit 63b1006
Show file tree
Hide file tree
Showing 113 changed files with 15,967 additions and 5,169 deletions.
45 changes: 3 additions & 42 deletions .github/workflows/ubuntu_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,47 +17,8 @@ jobs:
- name: Checkout branch
uses: actions/checkout@v2

- name: Caching node modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-filealert-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-filealert-
- name: Upgrade npm to latest version
run: sudo npm i -g npm@latest

- name: Install react-native CLI
run: "sudo npm install -g react-native-cli"

- name: Install npm dependencies
run: npm install
- name: Install dependencies
run: yarn nativeapp install

- name: Linting
run: npm run lint:errors

- name: Setting Environment Variables
env:
MAPBOXGL_ACCCESS_TOKEN: ${{ secrets.MAPBOXGL_ACCCESS_TOKEN }}
BUGSNAP_CLIENT_KEY: ${{ secrets.BUGSNAP_CLIENT_KEY }}
run: |
echo "MAPBOXGL_ACCCESS_TOKEN=$MAPBOXGL_ACCCESS_TOKEN" >> .env
echo "BUGSNAP_CLIENT_KEY=$BUGSNAP_CLIENT_KEY" >> .env
- name: Build Android app
run: |
react-native bundle \
--platform android \
--dev false \
--entry-file index.js \
--bundle-output android-release.bundle \
--sourcemap-output android-release.bundle.map
- name: Build iOS app
run: |
react-native bundle \
--platform ios \
--dev false \
--entry-file index.js \
--bundle-output ios-release.bundle \
--sourcemap-output ios-release.bundle.map
run: yarn nativeapp lint:errors
10 changes: 5 additions & 5 deletions apps/nativeapp/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GEM
specs:
CFPropertyList (3.0.5)
rexml
activesupport (6.1.7.1)
activesupport (6.1.7.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -54,7 +54,7 @@ GEM
netrc (~> 0.11)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.2)
escape (0.0.4)
ethon (0.16.0)
ffi (>= 1.15.0)
Expand All @@ -66,7 +66,7 @@ GEM
i18n (1.12.0)
concurrent-ruby (~> 1.0)
json (2.6.3)
minitest (5.17.0)
minitest (5.18.0)
molinillo (0.8.0)
nanaimo (0.3.0)
nap (1.1.0)
Expand All @@ -76,7 +76,7 @@ GEM
ruby-macho (2.5.1)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (2.0.5)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xcodeproj (1.22.0)
CFPropertyList (>= 2.3.3, < 4.0)
Expand All @@ -85,7 +85,7 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.3.0)
rexml (~> 3.2.4)
zeitwerk (2.6.6)
zeitwerk (2.6.7)

PLATFORMS
ruby
Expand Down
5 changes: 3 additions & 2 deletions apps/nativeapp/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ android {
namespace "eco.pp.firealert"
defaultConfig {
applicationId "eco.pp.firealert"
multiDexEnabled true
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
versionCode 4
versionName "1.2"
manifestPlaceholders = [auth0Domain: "@string/AUTH0_DOMAIN", auth0Scheme: "${applicationId}"]
}

Expand Down
12 changes: 12 additions & 0 deletions apps/nativeapp/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,29 @@
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">

<meta-data android:name="com.onesignal.suppressLaunchURLs" android:value="true"/>

<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true">

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="firealert.plant-for-the-planet.org" android:pathPrefix="/alert" />
</intent-filter>

</activity>
</application>
</manifest>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 10 additions & 7 deletions apps/nativeapp/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {store} from './redux/store';
import {TRPCProvider} from './services/trpc';
import AppNavigator from './routes/appNavigator';
import {MapLayerProvider} from './global/reducers/mapLayers';
import {BottomBarProvider} from './global/reducers/bottomBar';

MapboxGL.setAccessToken(Config.MAPBOXGL_ACCCESS_TOKEN);

Expand All @@ -22,13 +23,15 @@ function App(): JSX.Element {
offsetBottom={100}
placement={'bottom'}
animationType="zoom-in">
<TRPCProvider>
<Provider store={store}>
<MapLayerProvider>
<AppNavigator />
</MapLayerProvider>
</Provider>
</TRPCProvider>
<BottomBarProvider>
<TRPCProvider>
<Provider store={store}>
<MapLayerProvider>
<AppNavigator />
</MapLayerProvider>
</Provider>
</TRPCProvider>
</BottomBarProvider>
</ToastProvider>
</Auth0Provider>
);
Expand Down
Binary file added apps/nativeapp/app/assets/images/compassImage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/nativeapp/app/assets/svgs/addIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function AddIcon(props) {
{...props}>
<Path
d="M16.585 8.985c0-.882-.715-1.597-1.598-1.597h-4.793V2.595a1.598 1.598 0 10-3.194 0v4.793H2.207a1.598 1.598 0 100 3.195H7v4.793a1.598 1.598 0 103.194 0v-4.793h4.793c.883 0 1.598-.716 1.598-1.598z"
fill="#E86F56"
fill={props.color || '#E86F56'}
/>
</Svg>
);
Expand Down
25 changes: 25 additions & 0 deletions apps/nativeapp/app/assets/svgs/eyeIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import * as React from 'react';
import Svg, {G, Path} from 'react-native-svg';

function EyeIcon(props) {
return (
<Svg
width="25px"
height="25px"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<G
stroke="#E86F56"
strokeWidth={2}
strokeLinecap="round"
strokeLinejoin="round">
<Path d="M12 5C8.243 5 5.436 7.44 3.767 9.44a3.96 3.96 0 000 5.12C5.436 16.56 8.243 19 12 19c3.757 0 6.564-2.44 8.233-4.44a3.96 3.96 0 000-5.12C18.564 7.44 15.757 5 12 5z" />
<Path d="M12 15a3 3 0 100-6 3 3 0 000 6z" />
</G>
</Svg>
);
}

export default EyeIcon;
24 changes: 24 additions & 0 deletions apps/nativeapp/app/assets/svgs/eyeOffIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as React from 'react';
import Svg, {Path} from 'react-native-svg';

function EyeOffIcon(props) {
return (
<Svg
width="25px"
height="25px"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
stroke="#E86F56"
{...props}>
<Path
d="M9.764 5.295A8.619 8.619 0 0112 5c3.757 0 6.564 2.44 8.233 4.44a3.96 3.96 0 010 5.12c-.192.23-.4.466-.621.704M12.5 9.04a3.002 3.002 0 012.459 2.459M3 3l18 18m-9.5-6.041A3.004 3.004 0 019.17 13M4.35 8.778c-.208.223-.402.445-.582.661a3.961 3.961 0 000 5.122C5.435 16.56 8.242 19 12 19a8.62 8.62 0 002.274-.306"
strokeWidth={2}
strokeLinecap="round"
strokeLinejoin="round"
/>
</Svg>
);
}

export default EyeOffIcon;
26 changes: 26 additions & 0 deletions apps/nativeapp/app/assets/svgs/greenMapOutline.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as React from 'react';
import Svg, {G, Path, Defs, ClipPath} from 'react-native-svg';

function GreenMapOutline(props) {
return (
<Svg
width={24}
height={24}
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<G clipPath="url(#clip0_1225_10223)" fill="#68B030">
<Path d="M2.637 23.852c.391.202.87.202 1.26-.014l5.518-3.09 5.533 3.09c.39.216.898.216 1.289 0l6.17-3.442c.376-.216.608-.594.608-.998V6.09c0-.419-.247-.81-.638-1.013a1.383 1.383 0 00-1.26.014L15.6 8.18l-2.158-1.2-.883 2.24 1.897 1.053v10.568l-3.867-2.16v-6.235c-.42.23-.912.364-1.404.364H9.14c-.29 0-.565-.04-.84-.121v5.965l-3.78 2.106V10.193l1.217-.675-.493-1.107-1.433-.553-1.188.661c-.377.216-.608.594-.608.999v13.321c0 .419.246.81.637 1.013h-.015zM16.73 10.26l3.751-2.105v10.581l-3.75 2.106V10.26z" />
<Path d="M3.318 6.521l3.736 1.445 1.55 3.482a.79.79 0 00.753.459.778.778 0 00.739-.486l3.316-8.422a.725.725 0 00-.188-.783.83.83 0 00-.565-.216.97.97 0 00-.275.04L3.347 5.118a.77.77 0 00-.522.688c0 .31.174.594.478.715h.015z" />
</G>
<Defs>
<ClipPath id="clip0_1225_10223">
<Path fill="#fff" transform="translate(2 1)" d="M0 0H21V23H0z" />
</ClipPath>
</Defs>
</Svg>
);
}

export default GreenMapOutline;
20 changes: 20 additions & 0 deletions apps/nativeapp/app/assets/svgs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import Logo from './logo.jsx';
import EyeIcon from './eyeIcon.jsx';
import MapIcon from './mapIcon.jsx';
import AddIcon from './addIcon.jsx';
import SmsIcon from './smsIcon.jsx';
import InfoIcon from './infoIcon.jsx';
import SiteIcon from './siteIcon.jsx';
import CopyIcon from './copyIcon.jsx';
import ListIcon from './listIcon.jsx';
import BellIcon from './bellIcon.jsx';
import NasaLogo from './nasaLogo.jsx';
import NatureBg from './natureBg.jsx';
import RadarIcon from './radarIcon.jsx';
import LoginIcon from './loginIcon.jsx';
import CrossIcon from './crossIcon.jsx';
Expand All @@ -14,6 +18,8 @@ import MyLocIcon from './myLocIcon.jsx';
import PhoneIcon from './phoneIcon.jsx';
import EmailIcon from './emailIcon.jsx';
import GlobeIcon from './globeIcon.jsx';
import PasteIcon from './pasteIcon.jsx';
import EyeOffIcon from './eyeOffIcon.jsx';
import LayerCheck from './layerCheck.jsx';
import LogoutIcon from './logoutIcon.jsx';
import PlanetLogo from './planetLogo.jsx';
Expand All @@ -28,6 +34,7 @@ import {active_marker} from './active_marker';
import WhatsAppIcon from './whatsAppIcon.jsx';
import BlueFireIcon from './blueFireIcon.jsx';
import GlobeWebIcon from './globeWebIcon.jsx';
import LocationWave from './locationWave.jsx';
import PointSiteIcon from './pointSiteIcon.jsx';
import SatelliteDish from './satelliteDish.jsx';
import SatelliteIcon from './satelliteIcon.jsx';
Expand All @@ -36,30 +43,39 @@ import BackArrowIcon from './backArrowIcon.jsx';
import LocationPinIcon from './locationPin.jsx';
import MapOutlineIcon from './mapOutlineIcon.jsx';
import OrangeFireIcon from './orangeFireIcon.jsx';
import VerifyAccAlert from './verifyAccAlert.jsx';
import PurpleFireIcon from './purpleFireIcon.jsx';
import TrashSolidIcon from './trashSolidIcon.jsx';
import UserPlaceholder from './userPlaceholder.jsx';
import PencilRoundIcon from './pencilRoundIcon.jsx';
import GreenMapOutline from './greenMapOutline.jsx';
import TrashOutlineIcon from './trashOutlineIcon.jsx';
import VerificationWarning from './verificationWarning.jsx';
import DisabledTrashOutlineIcon from './disabledTrashOutlineIcon.jsx';

export {
Logo,
EyeIcon,
SmsIcon,
AddIcon,
MapIcon,
CopyIcon,
InfoIcon,
SiteIcon,
NatureBg,
BellIcon,
NasaLogo,
ListIcon,
PhoneIcon,
PasteIcon,
RadarIcon,
CrossIcon,
EmailIcon,
LoginIcon,
LayerIcon,
MyLocIcon,
GlobeIcon,
EyeOffIcon,
LayerCheck,
PencilIcon,
PlanetLogo,
Expand All @@ -68,6 +84,7 @@ export {
UploadCloud,
polygonIcon,
WarningIcon,
LocationWave,
locationIcon,
GlobeWebIcon,
BlueFireIcon,
Expand All @@ -80,11 +97,14 @@ export {
SatelliteDish,
DropdownArrow,
MapOutlineIcon,
VerifyAccAlert,
OrangeFireIcon,
PurpleFireIcon,
TrashSolidIcon,
PencilRoundIcon,
LocationPinIcon,
UserPlaceholder,
GreenMapOutline,
TrashOutlineIcon,
VerificationWarning,
DisabledTrashOutlineIcon,
Expand Down
21 changes: 21 additions & 0 deletions apps/nativeapp/app/assets/svgs/infoIcon.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react';
import Svg, {Path} from 'react-native-svg';

function InfoIcon(props) {
return (
<Svg
width={17}
height={17}
viewBox="0 0 17 17"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...props}>
<Path
d="M8.505 0C6.246 0 4.085.897 2.49 2.488A8.517 8.517 0 000 8.503 8.495 8.495 0 008.5 17a8.51 8.51 0 006.011-2.488A8.491 8.491 0 0017 8.502a8.504 8.504 0 00-2.489-6.009A8.47 8.47 0 008.505 0zm1.46 12.888a.546.546 0 01-.13.12 4.127 4.127 0 01-2.341.766c-.772 0-1.193-.536-1.023-1.285.213-.897.437-1.794.656-2.69a.665.665 0 00-.01-.492.564.564 0 00-.285-.23 1.205 1.205 0 00-.203-.038c-.082-.017-.202-.033-.262-.12L6.35 8.89a.265.265 0 01-.043-.213.284.284 0 01.125-.18l.154-.105.23-.125c.136-.071.278-.137.42-.192.296-.115.602-.202.914-.262.186-.033.377-.055.569-.066.153 0 .306.017.46.05.552.13.83.623.678 1.224-.214.902-.438 1.805-.662 2.701-.104.427 0 .618.432.733.065.017.131.027.197.044.224.06.273.197.136.377l.006.011zm-.727-6.753a1.454 1.454 0 01-1.45-1.465 1.451 1.451 0 011.466-1.438c.39 0 .756.158 1.024.437a1.45 1.45 0 01-1.04 2.466z"
fill="#828282"
/>
</Svg>
);
}

export default InfoIcon;
Loading

0 comments on commit 63b1006

Please sign in to comment.