アクションシートの依存更新
This commit is contained in:
parent
049b138ca5
commit
36b199ef98
26
App.js
26
App.js
@ -25,7 +25,9 @@ import {
|
||||
useBusAndTrainData,
|
||||
BusAndTrainDataProvider,
|
||||
} from "./stateBox/useBusAndTrainData.js";
|
||||
|
||||
import { AllTrainDiagramProvider } from "./stateBox/useAllTrainDiagram.js";
|
||||
import { SheetProvider } from "react-native-actions-sheet";
|
||||
import "./components/ActionSheetComponents/sheets.js";
|
||||
LogBox.ignoreLogs([
|
||||
"ViewPropTypes will be removed",
|
||||
"ColorPropType will be removed",
|
||||
@ -40,15 +42,19 @@ if (Platform.OS === "android") {
|
||||
export default function App() {
|
||||
useEffect(() => UpdateAsync(), []);
|
||||
return (
|
||||
<FavoriteStationProvider>
|
||||
<CurrentTrainProvider>
|
||||
<AreaInfoProvider>
|
||||
<BusAndTrainDataProvider>
|
||||
<AppContainer />
|
||||
</BusAndTrainDataProvider>
|
||||
</AreaInfoProvider>
|
||||
</CurrentTrainProvider>
|
||||
</FavoriteStationProvider>
|
||||
<SheetProvider>
|
||||
<FavoriteStationProvider>
|
||||
<CurrentTrainProvider>
|
||||
<AreaInfoProvider>
|
||||
<AllTrainDiagramProvider>
|
||||
<BusAndTrainDataProvider>
|
||||
<AppContainer />
|
||||
</BusAndTrainDataProvider>
|
||||
</AllTrainDiagramProvider>
|
||||
</AreaInfoProvider>
|
||||
</CurrentTrainProvider>
|
||||
</FavoriteStationProvider>
|
||||
</SheetProvider>
|
||||
);
|
||||
}
|
||||
export function AppContainer() {
|
||||
|
112
Apps.js
112
Apps.js
@ -12,6 +12,7 @@ import { EachTrainInfo } from "./components/ActionSheetComponents/EachTrainInfo"
|
||||
import { checkDuplicateTrainData } from "./lib/checkDuplicateTrainData";
|
||||
import { useFavoriteStation } from "./stateBox/useFavoriteStation";
|
||||
import { useCurrentTrain } from "./stateBox/useCurrentTrain";
|
||||
import { SheetManager } from "react-native-actions-sheet";
|
||||
/*
|
||||
import StatusbarDetect from './StatusbarDetect';
|
||||
var Status = StatusbarDetect(); */
|
||||
@ -29,7 +30,6 @@ export default function Apps({ navigation, webview, stationData }) {
|
||||
const [LoadError, setLoadError] = useState(false);
|
||||
|
||||
//列車情報表示関連
|
||||
const EachTrainInfoAsSR = useRef(null);
|
||||
const [trainInfo, setTrainInfo] = useState({
|
||||
trainNum: undefined,
|
||||
limited: undefined,
|
||||
@ -37,10 +37,7 @@ export default function Apps({ navigation, webview, stationData }) {
|
||||
});
|
||||
|
||||
//駅情報画面用
|
||||
const StationBoardAcSR = useRef(null);
|
||||
const [stationBoardData, setStationBoardData] = useState(undefined);
|
||||
const [originalStationList, setOriginalStationList] = useState();
|
||||
const [selectedStation, setSelectedStation] = useState(undefined);
|
||||
const [trainMenu, setTrainMenu] = useState("true");
|
||||
let once = false;
|
||||
useEffect(() => {
|
||||
@ -132,31 +129,43 @@ export default function Apps({ navigation, webview, stationData }) {
|
||||
setLoadError(true);
|
||||
return;
|
||||
}
|
||||
case "PopUpMenu": {
|
||||
const selectedStationPDFAddress = dataSet.pdf;
|
||||
const findStationEachLine = (selectLine) => {
|
||||
let NearStation = selectLine.filter(
|
||||
(d) => d.StationTimeTable == selectedStationPDFAddress
|
||||
);
|
||||
return NearStation;
|
||||
};
|
||||
let returnDataBase = lineList
|
||||
.map((d) => findStationEachLine(originalStationList[d]))
|
||||
.filter((d) => d.length > 0)
|
||||
.reduce((pre, current) => {
|
||||
pre.push(...current);
|
||||
return pre;
|
||||
}, []);
|
||||
case "PopUpMenu":
|
||||
{
|
||||
const selectedStationPDFAddress = dataSet.pdf;
|
||||
const findStationEachLine = (selectLine) => {
|
||||
let NearStation = selectLine.filter(
|
||||
(d) => d.StationTimeTable == selectedStationPDFAddress
|
||||
);
|
||||
return NearStation;
|
||||
};
|
||||
let returnDataBase = lineList
|
||||
.map((d) => findStationEachLine(originalStationList[d]))
|
||||
.filter((d) => d.length > 0)
|
||||
.reduce((pre, current) => {
|
||||
pre.push(...current);
|
||||
return pre;
|
||||
}, []);
|
||||
|
||||
if (returnDataBase.length) {
|
||||
setStationBoardData(returnDataBase);
|
||||
StationBoardAcSR.current?.show();
|
||||
} else {
|
||||
setStationBoardData(undefined);
|
||||
StationBoardAcSR.current?.hide();
|
||||
if (returnDataBase.length) {
|
||||
const payload = {
|
||||
currentStation: returnDataBase,
|
||||
originalStationList: originalStationList,
|
||||
navigate: navigate,
|
||||
goTo: "Apps",
|
||||
useShow: () =>
|
||||
SheetManager.show("StationDetailView", {
|
||||
payload,
|
||||
}),
|
||||
onExit: () => {
|
||||
SheetManager.hide("StationDetailView");
|
||||
},
|
||||
};
|
||||
SheetManager.show("StationDetailView", {
|
||||
payload,
|
||||
});
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
case "ShowTrainTimeInfo": {
|
||||
const { trainNum, limited } = dataSet;
|
||||
//alert(trainNum, limited);
|
||||
@ -167,7 +176,21 @@ export default function Apps({ navigation, webview, stationData }) {
|
||||
currentTrain.filter((a) => a.num == trainNum)
|
||||
),
|
||||
}); //遅延情報は未実装
|
||||
EachTrainInfoAsSR.current?.show();
|
||||
const payload = {
|
||||
data: {
|
||||
trainNum,
|
||||
limited,
|
||||
trainData: checkDuplicateTrainData(
|
||||
currentTrain.filter((a) => a.num == trainNum)
|
||||
),
|
||||
},
|
||||
navigate,
|
||||
originalStationList,
|
||||
openStationACFromEachTrainInfo,
|
||||
};
|
||||
SheetManager.show("EachTrainInfo", {
|
||||
payload,
|
||||
});
|
||||
return;
|
||||
}
|
||||
default: {
|
||||
@ -215,7 +238,7 @@ export default function Apps({ navigation, webview, stationData }) {
|
||||
}
|
||||
|
||||
const openStationACFromEachTrainInfo = (stationName) => {
|
||||
EachTrainInfoAsSR.current?.hide();
|
||||
SheetManager.hide("EachTrainInfo");
|
||||
const findStationEachLine = (selectLine) => {
|
||||
let NearStation = selectLine.filter((d) => d.Station_JP == stationName);
|
||||
return NearStation;
|
||||
@ -228,13 +251,26 @@ export default function Apps({ navigation, webview, stationData }) {
|
||||
return pre;
|
||||
}, []);
|
||||
if (returnDataBase.length) {
|
||||
setStationBoardData(returnDataBase);
|
||||
sleep(25, function () {
|
||||
StationBoardAcSR.current?.show();
|
||||
const payload = {
|
||||
currentStation: returnDataBase,
|
||||
originalStationList: originalStationList,
|
||||
navigate: navigate,
|
||||
goTo: "Apps",
|
||||
useShow: () =>
|
||||
SheetManager.show("StationDetailView", {
|
||||
payload,
|
||||
}),
|
||||
onExit: () => {
|
||||
SheetManager.hide("StationDetailView");
|
||||
},
|
||||
};
|
||||
SheetManager.show("StationDetailView", {
|
||||
payload,
|
||||
});
|
||||
});
|
||||
} else {
|
||||
setStationBoardData(undefined);
|
||||
StationBoardAcSR.current?.hide();
|
||||
SheetManager.hide("StationDetailView");
|
||||
}
|
||||
};
|
||||
return (
|
||||
@ -260,7 +296,6 @@ export default function Apps({ navigation, webview, stationData }) {
|
||||
onNavigationStateChange={onNavigationStateChange}
|
||||
onMessage={onMessage}
|
||||
injectedJavaScript={injectJavascript}
|
||||
onTouchMove={() => StationBoardAcSR.current?.hide()}
|
||||
onLoadEnd={() => {
|
||||
if (once) return () => {};
|
||||
if (!stationData) return () => {};
|
||||
@ -293,18 +328,7 @@ export default function Apps({ navigation, webview, stationData }) {
|
||||
LoadError={LoadError}
|
||||
/>
|
||||
|
||||
<StationDeteilView
|
||||
StationBoardAcSR={StationBoardAcSR}
|
||||
currentStation={stationBoardData}
|
||||
originalStationList={originalStationList}
|
||||
navigate={navigate}
|
||||
onExit={() => {
|
||||
StationBoardAcSR.current?.setModalVisible();
|
||||
navigate("Apps");
|
||||
}}
|
||||
/>
|
||||
<EachTrainInfo
|
||||
setRef={EachTrainInfoAsSR}
|
||||
data={trainInfo}
|
||||
navigate={navigate}
|
||||
originalStationList={originalStationList}
|
||||
|
@ -11,7 +11,7 @@ import {
|
||||
Platform,
|
||||
} from "react-native";
|
||||
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import ActionSheet from "react-native-actions-sheet";
|
||||
import ActionSheet, { SheetManager } from "react-native-actions-sheet";
|
||||
import { AS } from "../../storageControl";
|
||||
import LottieView from "lottie-react-native";
|
||||
import trainList from "../../assets/originData/trainList";
|
||||
@ -22,14 +22,15 @@ import {
|
||||
} from "react-native-responsive-screen";
|
||||
import lineColorList from "../../assets/originData/lineColorList";
|
||||
|
||||
export const EachTrainInfo = ({
|
||||
setRef,
|
||||
data,
|
||||
navigate,
|
||||
originalStationList,
|
||||
openStationACFromEachTrainInfo,
|
||||
from,
|
||||
}) => {
|
||||
export const EachTrainInfo = (props) => {
|
||||
if (!props.payload) return <></>;
|
||||
const {
|
||||
data,
|
||||
navigate,
|
||||
originalStationList,
|
||||
openStationACFromEachTrainInfo,
|
||||
from,
|
||||
} = props.payload;
|
||||
const [trainData, setTrainData] = useState([]);
|
||||
const [isTop, setIsTop] = useState(true);
|
||||
const [currentPosition, setCurrentPosition] = useState([]);
|
||||
@ -240,11 +241,7 @@ export const EachTrainInfo = ({
|
||||
};
|
||||
|
||||
return (
|
||||
<ActionSheet
|
||||
ref={setRef}
|
||||
gestureEnabled={isTop}
|
||||
CustomHeaderComponent={<></>}
|
||||
>
|
||||
<ActionSheet gestureEnabled={isTop} CustomHeaderComponent={<></>}>
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: "#0099CC",
|
||||
@ -297,7 +294,7 @@ export const EachTrainInfo = ({
|
||||
info: "train.html?tn=" + data.trainNum,
|
||||
from,
|
||||
});
|
||||
setRef.current?.hide();
|
||||
SheetManager.hide("EachTrainInfo");
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
|
@ -11,19 +11,11 @@ import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import ActionSheet from "react-native-actions-sheet";
|
||||
import LottieView from "lottie-react-native";
|
||||
export const JRSTraInfo = (props) => {
|
||||
const {
|
||||
JRSTraInfoEXAcSR,
|
||||
getTime,
|
||||
loadingDelayData,
|
||||
setLoadingDelayData,
|
||||
delayData,
|
||||
} = props;
|
||||
if (!props.payload) return <></>;
|
||||
const { getTime, loadingDelayData, setLoadingDelayData, delayData } =
|
||||
props.payload;
|
||||
return (
|
||||
<ActionSheet
|
||||
ref={JRSTraInfoEXAcSR}
|
||||
gestureEnabled
|
||||
CustomHeaderComponent={<></>}
|
||||
>
|
||||
<ActionSheet gestureEnabled CustomHeaderComponent={<></>}>
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: "#0099CC",
|
||||
@ -125,7 +117,9 @@ export const JRSTraInfo = (props) => {
|
||||
borderRadius: 5,
|
||||
alignItems: "center",
|
||||
}}
|
||||
onPress={() => Linking.openURL("https://mstdn.y-zu.org/@JRSTraInfoEX")}
|
||||
onPress={() =>
|
||||
Linking.openURL("https://mstdn.y-zu.org/@JRSTraInfoEX")
|
||||
}
|
||||
>
|
||||
<MaterialCommunityIcons name="mastodon" color="white" size={30} />
|
||||
<View style={{ flex: 1 }} />
|
||||
|
@ -13,13 +13,15 @@ import { useBusAndTrainData } from "../../stateBox/useBusAndTrainData";
|
||||
import { AS } from "../../storageControl";
|
||||
|
||||
export const StationDeteilView = (props) => {
|
||||
if (!props.payload) return <></>;
|
||||
const {
|
||||
StationBoardAcSR,
|
||||
currentStation,
|
||||
originalStationList,
|
||||
navigate,
|
||||
onExit,
|
||||
} = props;
|
||||
goTo,
|
||||
useShow,
|
||||
} = props.payload;
|
||||
const { busAndTrainData } = useBusAndTrainData();
|
||||
const [trainBus, setTrainBus] = useState();
|
||||
useEffect(() => {
|
||||
@ -43,11 +45,7 @@ export const StationDeteilView = (props) => {
|
||||
? getPDFViewURL(currentStation[0].StationTimeTable)
|
||||
: currentStation[0].StationTimeTable);
|
||||
return (
|
||||
<ActionSheet
|
||||
ref={StationBoardAcSR}
|
||||
gestureEnabled
|
||||
CustomHeaderComponent={<></>}
|
||||
>
|
||||
<ActionSheet gestureEnabled CustomHeaderComponent={<></>}>
|
||||
<View
|
||||
key={currentStation}
|
||||
style={{
|
||||
@ -85,9 +83,10 @@ export const StationDeteilView = (props) => {
|
||||
? Linking.openURL(currentStation[0].StationTimeTable)
|
||||
: navigate("howto", {
|
||||
info,
|
||||
onExit,
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
oLP={() => Linking.openURL(currentStation[0].StationTimeTable)}
|
||||
/>
|
||||
@ -109,9 +108,11 @@ export const StationDeteilView = (props) => {
|
||||
info:
|
||||
currentStation[0].JrHpUrl.replace("/index.html", "/") +
|
||||
"/kounai_map.html",
|
||||
onExit,
|
||||
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
oLP={() => {
|
||||
Linking.openURL(
|
||||
@ -132,9 +133,11 @@ export const StationDeteilView = (props) => {
|
||||
onPressButton={() => {
|
||||
navigate("howto", {
|
||||
info: currentStation[0].JrHpUrl,
|
||||
onExit,
|
||||
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
onLongPressButton={() =>
|
||||
Linking.openURL(currentStation[0].JrHpUrl)
|
||||
@ -153,9 +156,11 @@ export const StationDeteilView = (props) => {
|
||||
? Linking.openURL(currentStation[0].StationTimeTable)
|
||||
: navigate("howto", {
|
||||
info,
|
||||
onExit,
|
||||
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
onLongPressButton={() =>
|
||||
Linking.openURL(currentStation[0].StationTimeTable)
|
||||
@ -184,9 +189,11 @@ export const StationDeteilView = (props) => {
|
||||
onPressButton={() => {
|
||||
navigate("howto", {
|
||||
info: trainBus.address,
|
||||
onExit,
|
||||
|
||||
goTo,
|
||||
useShow,
|
||||
});
|
||||
StationBoardAcSR.current?.hide();
|
||||
onExit();
|
||||
}}
|
||||
onLongPressButton={() => Linking.openURL(trainBus.address)}
|
||||
>
|
||||
|
10
components/ActionSheetComponents/sheets.js
Normal file
10
components/ActionSheetComponents/sheets.js
Normal file
@ -0,0 +1,10 @@
|
||||
import { registerSheet } from "react-native-actions-sheet";
|
||||
import { EachTrainInfo } from "./EachTrainInfo";
|
||||
import { JRSTraInfo } from "./JRSTraInfo";
|
||||
import { StationDeteilView } from "./StationDeteilView";
|
||||
|
||||
registerSheet("EachTrainInfo", EachTrainInfo);
|
||||
registerSheet("JRSTraInfo", JRSTraInfo);
|
||||
registerSheet("StationDetailView", StationDeteilView);
|
||||
|
||||
export {};
|
@ -12,6 +12,7 @@ import { getTrainDelayStatus } from "../../lib/getTrainDelayStatus";
|
||||
import { checkDuplicateTrainData } from "../../lib/checkDuplicateTrainData";
|
||||
import { useCurrentTrain } from "../../stateBox/useCurrentTrain";
|
||||
import { useAreaInfo } from "../../stateBox/useAreaInfo";
|
||||
import { SheetManager } from "react-native-actions-sheet";
|
||||
|
||||
/**
|
||||
*
|
||||
@ -45,10 +46,11 @@ import { useAreaInfo } from "../../stateBox/useAreaInfo";
|
||||
export default function LED_vision(props) {
|
||||
const {
|
||||
station,
|
||||
setTrainInfo,
|
||||
EachTrainInfoAsSR,
|
||||
trainDiagram,
|
||||
getCurrentTrain,
|
||||
navigate,
|
||||
originalStationList,
|
||||
openStationACFromEachTrainInfo,
|
||||
} = props;
|
||||
const { currentTrain } = useCurrentTrain();
|
||||
const [stationDiagram, setStationDiagram] = useState({}); //当該駅の全時刻表
|
||||
@ -191,8 +193,9 @@ export default function LED_vision(props) {
|
||||
trainDescriptionSwitch={trainDescriptionSwitch}
|
||||
station={station}
|
||||
customTrainDataDetector={customTrainDataDetector}
|
||||
setTrainInfo={setTrainInfo}
|
||||
EachTrainInfoAsSR={EachTrainInfoAsSR}
|
||||
navigate={navigate}
|
||||
originalStationList={originalStationList}
|
||||
openStationACFromEachTrainInfo={openStationACFromEachTrainInfo}
|
||||
/>
|
||||
))}
|
||||
{areaString != "" && (
|
||||
@ -299,8 +302,9 @@ const EachData = ({
|
||||
trainDescriptionSwitch,
|
||||
station,
|
||||
customTrainDataDetector,
|
||||
setTrainInfo,
|
||||
EachTrainInfoAsSR,
|
||||
navigate,
|
||||
originalStationList,
|
||||
openStationACFromEachTrainInfo,
|
||||
}) => {
|
||||
const { currentTrain } = useCurrentTrain();
|
||||
const openTrainInfo = (d) => {
|
||||
@ -311,16 +315,24 @@ const EachData = ({
|
||||
train.trainNumDistance;
|
||||
TrainNumber = timeInfo + "号";
|
||||
}
|
||||
setTrainInfo({
|
||||
trainNum: d.train,
|
||||
limited: `${getTrainType(train.type).data}:${
|
||||
train.trainName
|
||||
}${TrainNumber}`,
|
||||
trainData: checkDuplicateTrainData(
|
||||
currentTrain.filter((a) => a.num == d.train)
|
||||
),
|
||||
const payload = {
|
||||
data: {
|
||||
trainNum: d.train,
|
||||
limited: `${getTrainType(train.type).data}:${
|
||||
train.trainName
|
||||
}${TrainNumber}`,
|
||||
trainData: checkDuplicateTrainData(
|
||||
currentTrain.filter((a) => a.num == d.train)
|
||||
),
|
||||
},
|
||||
navigate,
|
||||
originalStationList,
|
||||
openStationACFromEachTrainInfo,
|
||||
from: "LED",
|
||||
};
|
||||
SheetManager.show("EachTrainInfo", {
|
||||
payload,
|
||||
});
|
||||
EachTrainInfoAsSR.current?.show();
|
||||
};
|
||||
const [train, setTrain] = useState(customTrainDataDetector(d.train));
|
||||
useEffect(() => {
|
||||
|
11
howto.js
11
howto.js
@ -3,10 +3,17 @@ import React, { Component } from "react";
|
||||
import { StatusBar, View, TouchableOpacity, Text } from "react-native";
|
||||
import { WebView } from "react-native-webview";
|
||||
export default ({ navigation: { navigate }, route }) => {
|
||||
const { info, onExit = () => navigate("Apps") } = route.params;
|
||||
const { info, goTo, useShow } = route.params;
|
||||
const onExit = () => {
|
||||
navigate(goTo);
|
||||
useShow();
|
||||
};
|
||||
return (
|
||||
<View style={styles.View}>
|
||||
<WebView useWebKit source={{ uri: info.replace("http://", "https://") }} />
|
||||
<WebView
|
||||
useWebKit
|
||||
source={{ uri: info.replace("http://", "https://") }}
|
||||
/>
|
||||
<TouchableOpacity style={styles.touch} onPress={onExit}>
|
||||
<View style={{ flex: 1 }} />
|
||||
<Text style={{ fontSize: 25, fontWeight: "bold", color: "white" }}>
|
||||
|
101
menu.js
101
menu.js
@ -38,14 +38,13 @@ import { EachTrainInfo } from "./components/ActionSheetComponents/EachTrainInfo"
|
||||
import useInterval from "./lib/useInterval";
|
||||
import { HeaderConfig } from "./lib/HeaderConfig";
|
||||
import { useFavoriteStation } from "./stateBox/useFavoriteStation";
|
||||
import { SheetManager } from "react-native-actions-sheet";
|
||||
|
||||
export default function Menu(props) {
|
||||
const {
|
||||
navigation: { navigate },
|
||||
getCurrentTrain,
|
||||
} = props;
|
||||
const JRSTraInfoEXAcSR = useRef(null);
|
||||
const StationBoardAcSR = useRef(null);
|
||||
const { favoriteStation } = useFavoriteStation();
|
||||
|
||||
//位置情報
|
||||
@ -56,14 +55,6 @@ export default function Menu(props) {
|
||||
});
|
||||
}, []);
|
||||
|
||||
//列車情報表示関連
|
||||
const EachTrainInfoAsSR = useRef(null);
|
||||
const [trainInfo, setTrainInfo] = useState({
|
||||
trainNum: undefined,
|
||||
limited: undefined,
|
||||
trainData: undefined,
|
||||
});
|
||||
|
||||
const getCurrentPosition = () => {
|
||||
if (locationStatus !== "granted") return () => {};
|
||||
Location.getCurrentPositionAsync({}).then((location) =>
|
||||
@ -227,7 +218,27 @@ export default function Menu(props) {
|
||||
<Sign
|
||||
currentStation={item}
|
||||
originalStationList={originalStationList}
|
||||
oP={StationBoardAcSR.current?.setModalVisible}
|
||||
oP={() => {
|
||||
const payload = {
|
||||
currentStation:
|
||||
originalStationList &&
|
||||
allStationData.length != 0 &&
|
||||
allStationData[selectedCurrentStation],
|
||||
originalStationList: originalStationList,
|
||||
navigate: navigate,
|
||||
goTo: "menu",
|
||||
useShow: () =>
|
||||
SheetManager.show("StationDetailView", {
|
||||
payload,
|
||||
}),
|
||||
onExit: () => {
|
||||
SheetManager.hide("StationDetailView");
|
||||
},
|
||||
};
|
||||
SheetManager.show("StationDetailView", {
|
||||
payload,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
@ -241,14 +252,14 @@ export default function Menu(props) {
|
||||
station={
|
||||
originalStationList && allStationData[selectedCurrentStation][0]
|
||||
}
|
||||
setTrainInfo={setTrainInfo}
|
||||
EachTrainInfoAsSR={EachTrainInfoAsSR}
|
||||
trainDiagram={trainDiagram}
|
||||
getCurrentTrain={getCurrentTrain}
|
||||
navigate={navigate}
|
||||
originalStationList={originalStationList}
|
||||
openStationACFromEachTrainInfo={openStationACFromEachTrainInfo}
|
||||
/>
|
||||
)}
|
||||
<JRSTraInfoBox
|
||||
JRSTraInfoEXAcSR={JRSTraInfoEXAcSR}
|
||||
getTime={getTime}
|
||||
setLoadingDelayData={setLoadingDelayData}
|
||||
loadingDelayData={loadingDelayData}
|
||||
@ -256,36 +267,6 @@ export default function Menu(props) {
|
||||
/>
|
||||
<FixedContentBottom navigate={navigate} />
|
||||
</ScrollView>
|
||||
|
||||
<StationDeteilView
|
||||
StationBoardAcSR={StationBoardAcSR}
|
||||
currentStation={
|
||||
originalStationList &&
|
||||
allStationData.length != 0 &&
|
||||
allStationData[selectedCurrentStation]
|
||||
}
|
||||
originalStationList={originalStationList}
|
||||
navigate={navigate}
|
||||
onExit={() => {
|
||||
StationBoardAcSR.current?.setModalVisible();
|
||||
navigate("menu");
|
||||
}}
|
||||
/>
|
||||
<JRSTraInfo
|
||||
JRSTraInfoEXAcSR={JRSTraInfoEXAcSR}
|
||||
getTime={getTime}
|
||||
loadingDelayData={loadingDelayData}
|
||||
setLoadingDelayData={setLoadingDelayData}
|
||||
delayData={delayData}
|
||||
/>
|
||||
<EachTrainInfo
|
||||
setRef={EachTrainInfoAsSR}
|
||||
data={trainInfo}
|
||||
navigate={navigate}
|
||||
originalStationList={originalStationList}
|
||||
openStationACFromEachTrainInfo={openStationACFromEachTrainInfo}
|
||||
from="LED"
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
@ -349,13 +330,7 @@ const TopMenuButton = () => {
|
||||
};
|
||||
|
||||
const JRSTraInfoBox = (props) => {
|
||||
const {
|
||||
JRSTraInfoEXAcSR,
|
||||
getTime,
|
||||
setLoadingDelayData,
|
||||
loadingDelayData,
|
||||
delayData,
|
||||
} = props;
|
||||
const { getTime, setLoadingDelayData, loadingDelayData, delayData } = props;
|
||||
const styles = {
|
||||
touch: {
|
||||
backgroundColor: "#0099CC",
|
||||
@ -387,7 +362,17 @@ const JRSTraInfoBox = (props) => {
|
||||
};
|
||||
return (
|
||||
<TouchableOpacity
|
||||
onPress={JRSTraInfoEXAcSR.current?.setModalVisible}
|
||||
onPress={() => {
|
||||
const payload = {
|
||||
getTime,
|
||||
setLoadingDelayData,
|
||||
loadingDelayData,
|
||||
delayData,
|
||||
};
|
||||
SheetManager.show("JRSTraInfo", {
|
||||
payload,
|
||||
});
|
||||
}}
|
||||
style={styles.touch}
|
||||
>
|
||||
<ScrollView scrollEnabled={false} style={styles.scroll}>
|
||||
@ -570,6 +555,18 @@ const FixedContentBottom = (props) => {
|
||||
JR四国グループの施設をご案内
|
||||
</Text>
|
||||
</TextBox>
|
||||
{/* <TextBox
|
||||
backgroundColor="#0099CC"
|
||||
flex={1}
|
||||
onPressButton={() => props.navigate("AllTrainIDList")}
|
||||
>
|
||||
<Text style={{ color: "white", fontWeight: "bold", fontSize: 20 }}>
|
||||
JR四国のお店・サービス
|
||||
</Text>
|
||||
<Text style={{ color: "white", fontSize: 18 }}>
|
||||
JR四国グループの施設をご案内
|
||||
</Text>
|
||||
</TextBox> */}
|
||||
<View style={{ flexDirection: "row" }}>
|
||||
<TouchableOpacity
|
||||
style={{
|
||||
|
@ -29,7 +29,7 @@
|
||||
"pushy-react-native": "^1.0.18",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.72.6",
|
||||
"react-native-actions-sheet": "^0.4.9",
|
||||
"react-native-actions-sheet": "0.8.21",
|
||||
"react-native-auto-height-image": "^3.2.4",
|
||||
"react-native-elements": "^3.4.2",
|
||||
"react-native-gesture-handler": "~2.12.0",
|
||||
|
@ -8654,10 +8654,10 @@ react-lifecycles-compat@^3.0.4:
|
||||
resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
|
||||
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
|
||||
|
||||
react-native-actions-sheet@^0.4.9:
|
||||
version "0.4.9"
|
||||
resolved "https://registry.yarnpkg.com/react-native-actions-sheet/-/react-native-actions-sheet-0.4.9.tgz#2446f97eca4cc3674128c445665b1f8774a5d64a"
|
||||
integrity sha512-4FuybHH+psq738w/6OIfdUEL4/5pG43yH+C0YeX22jQo0tYppqxVqQr3ITiXHF2PDJtdIiV7egy8Xncuuw5n9w==
|
||||
react-native-actions-sheet@0.8.21:
|
||||
version "0.8.21"
|
||||
resolved "https://registry.yarnpkg.com/react-native-actions-sheet/-/react-native-actions-sheet-0.8.21.tgz#d9175e7d5d862217f990b2ccc8a216fb4fc35b06"
|
||||
integrity sha512-WUtrGbPSlY8YuVSxKVJ36f3PrVMGMOQ5Cp5dtpurc71Uih4LEGGhEEk8yme/QOquiGsu77be0sZT4CrSUOSXag==
|
||||
|
||||
react-native-auto-height-image@^3.2.4:
|
||||
version "3.2.4"
|
||||
|
Loading…
Reference in New Issue
Block a user