From 9695d2736fe3d6452432eb822eef8df0ff8e2df7 Mon Sep 17 00:00:00 2001 From: Yaniv Bouhadana <101nano@gmail.com> Date: Thu, 13 Jul 2023 17:59:10 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20-=20Add=20ride=20to=20calendar=20(#?= =?UTF-8?q?284)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Yaniv Bouhadana Co-authored-by: Guy Tepper --- .../calendar-icon/calendar-icon.tsx | 25 ++++++ app/components/calendar-icon/index.ts | 1 + app/components/icon/icon.props.ts | 21 ----- app/components/icon/icon.story.tsx | 19 ----- app/components/icon/icon.tsx | 19 ----- app/components/icon/icons/arrow-left.png | Bin 329 -> 0 bytes app/components/icon/icons/arrow-left@2x.png | Bin 329 -> 0 bytes app/components/icon/icons/bullet.png | Bin 204 -> 0 bytes app/components/icon/icons/bullet@2x.png | Bin 204 -> 0 bytes app/components/icon/icons/index.ts | 6 -- app/components/index.ts | 1 - .../route-details-header.tsx | 72 +++++++++++++----- app/components/star-icon/star-icon.tsx | 3 +- app/i18n/ar.json | 8 +- app/i18n/en.json | 8 +- app/i18n/he.json | 8 +- app/i18n/ru.json | 8 +- .../route-details/route-details-screen.tsx | 17 ++++- assets/calendar.android.png | Bin 0 -> 804 bytes assets/calendar.ios.png | Bin 0 -> 1716 bytes assets/calendar.png | Bin 0 -> 804 bytes ios/BetterRail/Info.plist | 6 ++ ios/Podfile.lock | 6 ++ package.json | 1 + storybook/storybook-registry.ts | 1 - yarn.lock | 5 ++ 26 files changed, 135 insertions(+), 100 deletions(-) create mode 100644 app/components/calendar-icon/calendar-icon.tsx create mode 100644 app/components/calendar-icon/index.ts delete mode 100644 app/components/icon/icon.props.ts delete mode 100644 app/components/icon/icon.story.tsx delete mode 100644 app/components/icon/icon.tsx delete mode 100644 app/components/icon/icons/arrow-left.png delete mode 100644 app/components/icon/icons/arrow-left@2x.png delete mode 100644 app/components/icon/icons/bullet.png delete mode 100644 app/components/icon/icons/bullet@2x.png delete mode 100644 app/components/icon/icons/index.ts create mode 100644 assets/calendar.android.png create mode 100644 assets/calendar.ios.png create mode 100644 assets/calendar.png diff --git a/app/components/calendar-icon/calendar-icon.tsx b/app/components/calendar-icon/calendar-icon.tsx new file mode 100644 index 00000000..3753a734 --- /dev/null +++ b/app/components/calendar-icon/calendar-icon.tsx @@ -0,0 +1,25 @@ +import { Image, ImageStyle, TouchableOpacity, ViewStyle } from "react-native" +import { translate } from "../../i18n" + +const CalenderImageIcon = require("../../../assets/calendar.png") + +const ICON_STYLE: ImageStyle = { + width: 27, + height: 25, + resizeMode: "contain", + tintColor: "lightgrey", + opacity: 0.9, +} +const CONTAINER: ViewStyle = { + justifyContent: "center", +} + +export const CalendarIcon = function CalendarIcon(props: { style?: ViewStyle; onPress: () => void }) { + const { onPress, style } = props + + return ( + + + + ) +} diff --git a/app/components/calendar-icon/index.ts b/app/components/calendar-icon/index.ts new file mode 100644 index 00000000..a2b5cc95 --- /dev/null +++ b/app/components/calendar-icon/index.ts @@ -0,0 +1 @@ +export * from "./calendar-icon" diff --git a/app/components/icon/icon.props.ts b/app/components/icon/icon.props.ts deleted file mode 100644 index 6928ede2..00000000 --- a/app/components/icon/icon.props.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ImageStyle, ViewStyle } from "react-native" -import { IconTypes } from "./icons" - -export interface IconProps { - /** - * Style overrides for the icon image - */ - style?: ImageStyle - - /** - * Style overrides for the icon container - */ - - containerStyle?: ViewStyle - - /** - * The name of the icon - */ - - icon?: IconTypes -} diff --git a/app/components/icon/icon.story.tsx b/app/components/icon/icon.story.tsx deleted file mode 100644 index d119ed40..00000000 --- a/app/components/icon/icon.story.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import * as React from "react" -import { storiesOf } from "@storybook/react-native" -import { StoryScreen, Story, UseCase } from "../../../storybook/views" -import { Icon } from "./icon" - -declare let module - -storiesOf("Icon", module) - .addDecorator((fn) => {fn()}) - .add("Names", () => ( - - - - - - - - - )) diff --git a/app/components/icon/icon.tsx b/app/components/icon/icon.tsx deleted file mode 100644 index c2d9723f..00000000 --- a/app/components/icon/icon.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import * as React from "react" -import { View, Image, ImageStyle } from "react-native" -import { IconProps } from "./icon.props" -import { icons } from "./icons" - -const ROOT: ImageStyle = { - resizeMode: "contain", -} - -export function Icon(props: IconProps) { - const { style: styleOverride, icon, containerStyle } = props - const style: ImageStyle = { ...ROOT, ...styleOverride } - - return ( - - - - ) -} diff --git a/app/components/icon/icons/arrow-left.png b/app/components/icon/icons/arrow-left.png deleted file mode 100644 index 9d607d76b984556aecfad8b82f122bfa27ddff8e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 329 zcmV-P0k-~$P)5r00001b5ch_0Itp) z=>Px$14%?dR45gllfe$bKoEv!wjyzI_aJp~B++;R4m^j16C#do&Lo~dQreSSE1tmJ z!4q(xW42vd9$p6@Sew&z*iX(=`Rynk5(mKkfq2hI4*r zu_K_s^h90b`9v7{(Uk~l+{&E*DtbXt&YoL|DNFuT3vQ;22nRM@ii}D}as14{KaGfz z2@5Y2*l)G#TUAt$qySkHT0#`S7LozjK>k))E|A5r00001b5ch_0Itp) z=>Px$14%?dR45gllfe$bKoEv!wjyzI_aJp~B++;R4m^j16C#do&Lo~dQreSSE1tmJ z!4q(xW42vd9$p6@Sew&z*iX(=`Rynk5(mKkfq2hI4*r zu_K_s^h90b`9v7{(Uk~l+{&E*DtbXt&YoL|DNFuT3vQ;22nRM@ii}D}as14{KaGfz z2@5Y2*l)G#TUAt$qySkHT0#`S7LozjK>k))E|AQKb6Zk^p0%R6#Ufi7b3boFyt=akR{0OG<# Ae*gdg diff --git a/app/components/icon/icons/bullet@2x.png b/app/components/icon/icons/bullet@2x.png deleted file mode 100644 index 8fc256f6d1dc6efa8d444d80919b64c261644f28..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 204 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqjKx9jP7LeL$-D$|+B{txLnI`V zQy7~5^YIz+?5`^|G%&Ji_`&o4zkEVMvUajf!2?d^kWWeh5ga<53ilXAUm7=-HmOKT zZf9mqIVf?2t&`C=^-q58U!II5DjrNJDkm6Ltn6=`HP2Yl=g7GvCTk9r@4vt6Oz_)~ zry#vX=0(JzK9<|uCAtB}izduX;7MXW>QKb6Zk^p0%R6#Ufi7b3boFyt=akR{0OG<# Ae*gdg diff --git a/app/components/icon/icons/index.ts b/app/components/icon/icons/index.ts deleted file mode 100644 index 00e8a591..00000000 --- a/app/components/icon/icons/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export const icons = { - back: require("./arrow-left.png"), - bullet: require("./bullet.png"), -} - -export type IconTypes = keyof typeof icons diff --git a/app/components/index.ts b/app/components/index.ts index 84d5048e..4ec6667a 100644 --- a/app/components/index.ts +++ b/app/components/index.ts @@ -1,6 +1,5 @@ export * from "./button/button" export * from "./close-button/close-button" -export * from "./icon/icon" export * from "./screen/screen" export * from "./text/text" export * from "./dummy-input/dummy-input" diff --git a/app/components/route-details-header/route-details-header.tsx b/app/components/route-details-header/route-details-header.tsx index 7097a9cf..9e0dcd78 100644 --- a/app/components/route-details-header/route-details-header.tsx +++ b/app/components/route-details-header/route-details-header.tsx @@ -12,6 +12,9 @@ import { stationsObject, stationLocale } from "../../data/stations" import { isRTL, translate } from "../../i18n" import { useStores } from "../../models" import * as Burnt from "burnt" +import * as AddCalendarEvent from "react-native-add-calendar-event" +import { CalendarIcon } from "../calendar-icon/calendar-icon" +import { RouteItem } from "../../services/api" const arrowIcon = require("../../../assets/arrow-left.png") @@ -84,48 +87,60 @@ const HEADER_RIGHT_WRAPPER: ViewStyle = { export interface RouteDetailsHeaderProps { originId: string destinationId: string + routeItem: RouteItem /** * The screen name we're displaying the header inside */ screenName?: "routeDetails" | "activeRide" style?: ViewStyle + eventConfig?: AddCalendarEvent.CreateOptions } export const RouteDetailsHeader = observer(function RouteDetailsHeader(props: RouteDetailsHeaderProps) { - const { originId, destinationId, screenName, style } = props + const { routeItem, originId, destinationId, screenName, style, eventConfig } = props const { favoriteRoutes } = useStores() const navigation = useNavigation() + const addToCalendar = () => { + const eventConfig = createEventConfig(routeItem) + AddCalendarEvent.presentEventCreatingDialog(eventConfig) + } + const originName = stationsObject[originId][stationLocale] const destinationName = stationsObject[destinationId][stationLocale] const routeId = `${originId}${destinationId}` - const isFavorite: boolean = useMemo(() => { - return favoriteRoutes.routes.find((favorite) => favorite.id === routeId) - }, [favoriteRoutes.routes.length]) + const isFavorite: boolean = useMemo( + () => !!favoriteRoutes.routes.find((favorite) => favorite.id === routeId), + [favoriteRoutes.routes.length], + ) useLayoutEffect(() => { screenName !== "activeRide" && navigation.setOptions({ headerRight: () => ( - { - const favorite = { id: routeId, originId, destinationId } - if (!isFavorite) { - Burnt.alert({ title: translate("favorites.added"), duration: 1.5 }) - HapticFeedback.trigger("impactMedium") - favoriteRoutes.add(favorite) - analytics().logEvent("favorite_route_added") - } else { - HapticFeedback.trigger("impactLight") - favoriteRoutes.remove(favorite.id) - analytics().logEvent("favorite_route_removed") - } - }} - /> + {screenName === "routeDetails" ? ( + + ) : ( + { + const favorite = { id: routeId, originId, destinationId } + if (!isFavorite) { + Burnt.alert({ title: translate("favorites.added"), duration: 1.5 }) + HapticFeedback.trigger("impactMedium") + favoriteRoutes.add(favorite) + analytics().logEvent("favorite_route_added") + } else { + HapticFeedback.trigger("impactLight") + favoriteRoutes.remove(favorite.id) + analytics().logEvent("favorite_route_removed") + } + }} + /> + )} ), }) @@ -160,3 +175,20 @@ export const RouteDetailsHeader = observer(function RouteDetailsHeader(props: Ro ) }) + +function createEventConfig(routeItem: RouteItem) { + const { destinationStationName: destination, originStationName: origin, trainNumber } = routeItem.trains[0] + + const title = translate("plan.eventTitle", { destination }) + const notes = translate("plan.trainFromToStation", { trainNumber, origin, destination }) + + const eventConfig: AddCalendarEvent.CreateOptions = { + title, + startDate: new Date(routeItem.departureTime).toISOString(), + endDate: new Date(routeItem.arrivalTime).toISOString(), + location: translate("plan.trainStation", { stationName: origin }), + notes, + } + + return eventConfig +} diff --git a/app/components/star-icon/star-icon.tsx b/app/components/star-icon/star-icon.tsx index f55b3966..ba871216 100644 --- a/app/components/star-icon/star-icon.tsx +++ b/app/components/star-icon/star-icon.tsx @@ -1,7 +1,7 @@ import React, { useMemo } from "react" import { Image, TouchableOpacity, ImageStyle, ViewStyle } from "react-native" import { observer } from "mobx-react-lite" -import { color, spacing } from "../../theme" +import { color } from "../../theme" const starImage = require("../../../assets/star.png") @@ -46,3 +46,4 @@ export const StarIcon = observer(function StarIcon(props: StarIconProps) { ) }) + diff --git a/app/i18n/ar.json b/app/i18n/ar.json index 36c84135..d640636c 100644 --- a/app/i18n/ar.json +++ b/app/i18n/ar.json @@ -20,7 +20,10 @@ "find": "حساب المسار", "resetTime": "إعادة تعيين الوقت", "switchStations": "تبديل المحطات", - "switchStationsHint": "اختصار لتبديل محطة البداية بمحطة الوصول" + "switchStationsHint": "اختصار لتبديل محطة البداية بمحطة الوصول", + "trainFromToStation": "القطار رقم %{trainNumber} من %{origin} إلى %{destination}", + "eventTitle": "رحلة إلى %{destination}", + "trainStation": "محطة القطار %{stationName}" }, "selectStation": { "placeholder": "البحث عن محطة", @@ -47,7 +50,8 @@ "waitingTime": "مدة الانتظار", "lastStop": "المحطة الأخيرة", "routeWarning": "تحذير الطريق الطويل", - "routeWarningText": "هناك طرق قطار أقصر حول وقت المغادرة." + "routeWarningText": "هناك طرق قطار أقصر حول وقت المغادرة.", + "addToCalendar": "إضافة إلى التقويم" }, "settings": { "title": "اعدادت", diff --git a/app/i18n/en.json b/app/i18n/en.json index 4a1fbfb2..898479af 100644 --- a/app/i18n/en.json +++ b/app/i18n/en.json @@ -24,7 +24,10 @@ "find": "Find Routes", "resetTime": "Reset Time", "switchStations": "Flip stations", - "switchStationsHint": "A shortcut to flip the origin station with the destination station" + "switchStationsHint": "A shortcut to flip the origin station with the destination station", + "trainFromToStation": "Train No. %{trainNumber} from %{origin} to %{destination}", + "eventTitle": "Ride to %{destination}", + "trainStation": "%{stationName} Train Station" }, "selectStation": { "placeholder": "Search Stations", @@ -55,7 +58,8 @@ "minutes": "min", "lastStop": "Last Stop", "routeWarning": "Long Route Warning", - "routeWarningText": "There are shorter train routes around the departure time." + "routeWarningText": "There are shorter train routes around the departure time.", + "addToCalendar": "Add to Calendar" }, "settings": { "title": "Settings", diff --git a/app/i18n/he.json b/app/i18n/he.json index 728b3a59..b6473e44 100644 --- a/app/i18n/he.json +++ b/app/i18n/he.json @@ -24,7 +24,10 @@ "find": "חישוב מסלול", "resetTime": "איפוס זמן", "switchStations": "החלפת תחנות", - "switchStationsHint": "קיצור דרך להחלפת תחנת המוצא עם תחנת היעד" + "switchStationsHint": "קיצור דרך להחלפת תחנת המוצא עם תחנת היעד", + "trainFromToStation": "רכבת מס' %{trainNumber} מ%{origin} אל %{destination}", + "eventTitle": "נסיעה ל%{destination}", + "trainStation": "תחנת רכבת %{stationName}" }, "selectStation": { "placeholder": "חיפוש תחנה", @@ -55,7 +58,8 @@ "minutes": "דק'", "lastStop": "יעד סופי", "routeWarning": "רכבת מאספת", - "routeWarningText": "קיימים מסלולי נסיעה קצרים יותר סביב שעת היציאה הנבחרת" + "routeWarningText": "קיימים מסלולי נסיעה קצרים יותר סביב שעת היציאה הנבחרת", + "addToCalendar": "הוספה ליומן" }, "settings": { "title": "הגדרות", diff --git a/app/i18n/ru.json b/app/i18n/ru.json index b19b83f3..13bb3a29 100644 --- a/app/i18n/ru.json +++ b/app/i18n/ru.json @@ -24,7 +24,10 @@ "find": "Найти маршруты", "resetTime": "сбросить время", "switchStations": "Перевернуть станции", - "switchStationsHint": "Ярлык для перестановки исходной станции со станцией назначения" + "switchStationsHint": "Ярлык для перестановки исходной станции со станцией назначения", + "trainFromToStation": "Поезд № %{trainNumber} из %{origin} в %{destination}", + "eventTitle": "Поездка в %{destination}", + "trainStation": "%{stationName} станция" }, "selectStation": { "placeholder": "Поиск остановки", @@ -54,7 +57,8 @@ "minutes": "минут", "lastStop": "Последняя остановка", "routeWarning": "Предупреждение о длинном маршруте", - "routeWarningText": "Во время отправления есть более короткие маршруты поездов." + "routeWarningText": "Во время отправления есть более короткие маршруты поездов.", + "addToCalendar": "Добавить в календарь" }, "settings": { "title": "Настройки", diff --git a/app/screens/route-details/route-details-screen.tsx b/app/screens/route-details/route-details-screen.tsx index f28cbf80..f7dbdb4a 100644 --- a/app/screens/route-details/route-details-screen.tsx +++ b/app/screens/route-details/route-details-screen.tsx @@ -1,6 +1,6 @@ /* eslint-disable react-native/no-inline-styles */ import React, { useEffect, useMemo, useRef, useState } from "react" -import { Platform, View, ViewStyle } from "react-native" +import { View, ViewStyle } from "react-native" import { observer } from "mobx-react-lite" import { useSafeAreaInsets } from "react-native-safe-area-context" import { SharedElement } from "react-navigation-shared-element" @@ -14,17 +14,25 @@ import { useRideProgress } from "../../hooks/use-ride-progress" import { RouteDetailsScreenProps } from "../../navigators/main-navigator" import { color, spacing } from "../../theme" import { RouteDetailsHeader, Screen } from "../../components" -import { RouteStationCard, RouteStopCard, RouteLine, RouteExchangeDetails } from "./components" -import { LiveRideSheet, LongRouteWarning, StartRideButton } from "./components" +import { + LiveRideSheet, + LongRouteWarning, + RouteExchangeDetails, + RouteLine, + RouteStationCard, + RouteStopCard, + StartRideButton, +} from "./components" import BottomSheet from "@gorhom/bottom-sheet" import { FirstRideAlert } from "./components/first-ride-alert" import { canRunLiveActivities } from "../../utils/ios-helpers" +import { CreateOptions } from "react-native-add-calendar-event" +import { translate } from "../../i18n" const ROOT: ViewStyle = { flex: 1, backgroundColor: color.background, } - export const RouteDetailsScreen = observer(function RouteDetailsScreen({ route }: RouteDetailsScreenProps) { const { ride } = useStores() const bottomSheetRef = useRef(null) @@ -66,6 +74,7 @@ export const RouteDetailsScreen = observer(function RouteDetailsScreen({ route } > Nn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4NxK=HNrE^*Ox&H$mU>R zViaOv2C^7|kfA-3fd$NFU;vr~1k4K<5wZ)I;Ib+UnBi;LsS+C#C9DzCHb_`sNdc^+B->Ug z!Z$#{Ilm}X!A#FU&p^qJOF==wrYI%ND#*nRsvXF)RmvzSDX`MlFE20GD>v55FG|-p zw6wI;H!#vSGSUUA&@HaaD@m--%_~-h7y>iLCAB!YD6^m>Ge1uOWNuLv~E``o$*}ys5 zB_223md)aH%AO&v z=*IR_TkY(0f#vNVxB80-*x}c4i-b j7H_WPUmf-(@9|gWME7Zja+E5gL5axI)z4*}Q$iB}ps@cm literal 0 HcmV?d00001 diff --git a/assets/calendar.ios.png b/assets/calendar.ios.png new file mode 100644 index 0000000000000000000000000000000000000000..d06703e7b895fd06545b7e2d3c2b4c70c33b2e74 GIT binary patch literal 1716 zcmV;l221&gP)Px#L}ge>W=%~1DgXcg2mk?xX#fNO00031000^Q000001E2u_0{{R30RRC20H6W@ z1ONa40RR91QlJ9>1ONa40RR91OaK4?06@&93jhEH9!W$&RCodHnp>=1LlnnPUFveA zb&5t)+Cz?8D=3Ooh}0!0qKyY3A;AmrDiUv=`XqP~k;Y43+>^%Tfw-ip6Lm?HN~KAA za8xPPme#ec|L-^>+t_RN?C;F?eZFtcO8#fhthHwCng5yn&Fr;j+CZF4m)n`b@xqWW zLzpJ?qwLq9b_qWU+l9@-L7`=Vum^>=g?$3Snus4X?lr=l!r?-+F#A>tKM74FE;Qz^ z#K~PkrOcJbs1OR4Z36?V#L*EJo5#rTStc=h60Np~d?u3^O`>}$@Ab)Cl1Z#hB4q9q z1|jnh{zxA9`;!0GWPqK`-LzpZI8%UGN2-chYB2DDd>2C=k98)o26LY4d8!XW;H91+ zSL-ownA|Ud$dl`}%ibjn%!9~TC5Ei3$G{Lovhrk^8UqtV@@}1FY79(gMrKLCKqfK) ziG;{RW+D?YkSI)^k%@?8R~{?7<@k!gH;k_ZvLF2@>|%z61;TYg^kiEvXO~~IuFuM6 zw$L;ZEvKdrOag^OAlI;Abz^RVC0_SaB6OI!s z;SAC{!XAM(>~G%`Mg&VpUcWAIriV7PT`OE5B$KM`4+o~&B~K}E*>>WNzzrWV+Hg+E zlKW*SyU(Lm15dx)XzyZ1ZGXI&Nvqapj(LH*oMhOnSh%;+#<)$ny4#O-d9Qj<+ifCu z7@U1)=uv-f*sNHswlQu~uI@IGB1Fh%)7l~;=jul%y=-+H=lRA1xiidEW-7ZoZ) z{0pA0R+-+HSRH2;IQZc zfwPV*7D=SrL^22l#Vo8N5C9Q%h4f!rq}z{nTL#sQpqa=-tY;!Kk%<^c6ejgz!}ku} zN?3vS2{AwJ^kKfh(?J6HOQA~e9TwcGJ*INZ3QQYT?ft@-z(SWyQoU>6qaKkEU_cI= zRX$3v<3i|l?-JSBlo#8ufe$4h7Rb(Cv)G2iwbuwS($RPATh*hZyk!U|8~LV@j%OIoZ`nUC@zIZeiM1fC9(7Nf!rAtWS5{O!+ps6i)eskT24tF!(# zihUvPw3gf_gWraX%-L20>3MJV+fa{9KmJ zzj%eOn5>t@GF;QEQ!X}xM)xc|?v~Bcx7x<&S~_(~B6+;Z#M0wy*(`mlZOZzURF{&- zPmG>@YUoj0whe(c97Qe@D^{6ra$U+*`w{hyM8z4Cy`;QWun5NON#RI=#lBMYVZS;%C@alis> zZq%2_xF?fYIhj~+M}(kogoHF!o|)wwyd-XB1{o|EdE;3jtP}V_Z91vHiUZCTadxOw z*hf~$v2s`8JKy{b^0000< KMNUMnLSTaXksS{J literal 0 HcmV?d00001 diff --git a/assets/calendar.png b/assets/calendar.png new file mode 100644 index 0000000000000000000000000000000000000000..c5b45704e06ca6ba72e74ff73710329b60078c33 GIT binary patch literal 804 zcmeAS@N?(olHy`uVBq!ia0vp^DnP8k!3HF!9g27iq*&4&eH|GXHuiJ>Nn{1`6_P!I zd>I(3)EF2VS{N990fib~Fff!FFfhDIU|_JC!N4G1FlSew4NxK=HNrE^*Ox&H$mU>R zViaOv2C^7|kfA-3fd$NFU;vr~1k4K<5wZ)I;Ib+UnBi;LsS+C#C9DzCHb_`sNdc^+B->Ug z!Z$#{Ilm}X!A#FU&p^qJOF==wrYI%ND#*nRsvXF)RmvzSDX`MlFE20GD>v55FG|-p zw6wI;H!#vSGSUUA&@HaaD@m--%_~-h7y>iLCAB!YD6^m>Ge1uOWNuLv~E``o$*}ys5 zB_223md)aH%AO&v z=*IR_TkY(0f#vNVxB80-*x}c4i-b j7H_WPUmf-(@9|gWME7Zja+E5gL5axI)z4*}Q$iB}ps@cm literal 0 HcmV?d00001 diff --git a/ios/BetterRail/Info.plist b/ios/BetterRail/Info.plist index db4bb328..9c289245 100644 --- a/ios/BetterRail/Info.plist +++ b/ios/BetterRail/Info.plist @@ -78,5 +78,11 @@ UIViewControllerBasedStatusBarAppearance + NSCalendarsUsageDescription + We need access to your calendar to schedule events and reminders. + + NSContactsUsageDescription + We need access to your contacts to import and manage contacts within our app. + diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ba02401b..80b56247 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -386,6 +386,8 @@ PODS: - React-jsinspector (0.71.7) - React-logger (0.71.7): - glog + - react-native-add-calendar-event (4.2.2): + - React-Core - react-native-blur (4.3.2): - React-Core - react-native-date-picker (4.2.10): @@ -607,6 +609,7 @@ DEPENDENCIES: - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) - React-logger (from `../node_modules/react-native/ReactCommon/logger`) + - react-native-add-calendar-event (from `../node_modules/react-native-add-calendar-event`) - "react-native-blur (from `../node_modules/@react-native-community/blur`)" - react-native-date-picker (from `../node_modules/react-native-date-picker`) - react-native-in-app-review (from `../node_modules/react-native-in-app-review`) @@ -724,6 +727,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/jsinspector" React-logger: :path: "../node_modules/react-native/ReactCommon/logger" + react-native-add-calendar-event: + :path: "../node_modules/react-native-add-calendar-event" react-native-blur: :path: "../node_modules/@react-native-community/blur" react-native-date-picker: @@ -853,6 +858,7 @@ SPEC CHECKSUMS: React-jsiexecutor: eaa5f71eb8f6861cf0e57f1a0f52aeb020d9e18e React-jsinspector: 9885f6f94d231b95a739ef7bb50536fb87ce7539 React-logger: 3f8ebad1be1bf3299d1ab6d7f971802d7395c7ef + react-native-add-calendar-event: 34ad00f629187cbb97c2f04195e17803b2b3bc5e react-native-blur: cfdad7b3c01d725ab62a8a729f42ea463998afa2 react-native-date-picker: 89c419d88fa8e3c5f2d3cbae0bb7f7454ae8ea55 react-native-in-app-review: db8bb167a5f238e7ceca5c242d6b36ce8c4404a4 diff --git a/package.json b/package.json index 32a86444..3f9e5cd2 100644 --- a/package.json +++ b/package.json @@ -58,6 +58,7 @@ "ramda": "0.27.1", "react": "18.2.0", "react-native": "0.71.7", + "react-native-add-calendar-event": "^4.2.2", "react-native-bouncy-checkbox": "^3.0.7", "react-native-date-picker": "4.2.10", "react-native-device-info": "10.6.0", diff --git a/storybook/storybook-registry.ts b/storybook/storybook-registry.ts index 1e59d883..789da6c5 100644 --- a/storybook/storybook-registry.ts +++ b/storybook/storybook-registry.ts @@ -1,6 +1,5 @@ require("../app/components/text/text.story") require("../app/components/button/button.story") -require("../app/components/icon/icon.story") require("../app/components/dummy-input/dummy-input.story") require("../app/components/button/button.story") require("../app/components/station-card/station-card.story") diff --git a/yarn.lock b/yarn.lock index 3e279d8f..7a9a3d7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16219,6 +16219,11 @@ react-lifecycles-compat@^3.0.4: resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== +react-native-add-calendar-event@^4.2.2: + version "4.2.2" + resolved "https://registry.yarnpkg.com/react-native-add-calendar-event/-/react-native-add-calendar-event-4.2.2.tgz#c9b7a658358d39d9e577e22fb43ed74b0b34c201" + integrity sha512-y8Us+DDvSZL3ndWJhwKisLG3gml9Ju4FoHQ2rNQyysa9vPRZwfNXsk1tRlSjJ7ZIrxWUwOrVbXe98PN44N+qsQ== + react-native-animatable@1.3.3: version "1.3.3" resolved "https://registry.npmjs.org/react-native-animatable/-/react-native-animatable-1.3.3.tgz"