diff --git a/App.js b/App.js
index 8a4557c..9fd49de 100644
--- a/App.js
+++ b/App.js
@@ -1,4 +1,4 @@
-import React, { useEffect, useRef } from "react";
+import React, { useEffect, useRef, useState } from "react";
import { NavigationContainer } from "@react-navigation/native";
import {
createStackNavigator,
@@ -8,14 +8,23 @@ import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { AntDesign, Ionicons } from "@expo/vector-icons";
import { Platform, UIManager } from "react-native";
import { UpdateAsync } from "./UpdateAsync.js";
+import { getStationList2 } from "./lib/getStationList2";
+import { AS } from "./storageControl";
import Apps from "./Apps";
-import tndView from "./ndView";
-import trainbase from "./trainbaseview";
-import howto from "./howto";
-import menu from "./menu";
+import TNDView from "./ndView";
+import TrainBase from "./trainbaseview";
+import HowTo from "./howto";
+import Menu from "./menu";
import News from "./components/news.js";
import Setting from "./components/settings.js";
-import trainMenu from "./components/trainMenu.js";
+import TrainMenu from "./components/trainMenu.js";
+import FavoriteList from "./components/FavoriteList.js";
+import { LogBox } from "react-native";
+
+LogBox.ignoreLogs([
+ "ViewPropTypes will be removed",
+ "ColorPropType will be removed",
+]);
const Stack = createStackNavigator();
const Tab = createBottomTabNavigator();
if (Platform.OS === "android") {
@@ -24,95 +33,245 @@ if (Platform.OS === "android") {
}
}
export default function App() {
- const navigationRef = useRef();
useEffect(() => {
UpdateAsync();
}, []);
+ const [favoriteStation, setFavoriteStation] = useState([]);
+
+ useEffect(() => {
+ AS.getItem("favoriteStation")
+ .then((d) => {
+ const returnData = JSON.parse(d);
+ setFavoriteStation(returnData);
+ })
+ .catch((d) => console.log(d));
+ }, []);
+ const [busAndTrainData, setBusAndTrainData] = useState([]);
+ useEffect(() => {
+ AS.getItem("busAndTrain")
+ .then((d) => {
+ const returnData = JSON.parse(d);
+ setBusAndTrainData(returnData);
+ })
+ .catch((d) => {
+ fetch(
+ "https://script.google.com/macros/s/AKfycbw0UW6ZeCDgUYFRP0zxpc_Oqfy-91dBdbWv-cM8n3narKp14IyCd2wy5HW7taXcW7E/exec"
+ )
+ .then((d) => d.json())
+ .then((d) => {
+ setBusAndTrainData(d);
+ AS.setItem("busAndTrain", JSON.stringify(d));
+ });
+ });
+ }, []);
+
return (
-
-
-
+
+ ,
+ tabBarIcon: initIcon("barchart", "AntDesign"),
}}
- />
-
+ {(props) => (
+
+ )}
+
+ ,
+ tabBarIcon: initIcon("ios-radio", "Ionicons"),
}}
- />
-
+ {(props) => (
+
+ )}
+
+ ,
+ tabBarIcon: initIcon("md-train", "Ionicons"),
}}
- />
+ >
+ {(props) => }
+
);
}
-const top = () => (
-
-
-
-
-
-
-
-);
-function menuPage() {
+
+const initIcon = (name, type) => {
+ switch (type) {
+ case "Ionicons":
+ return ({ focused, color, size }) => (
+
+ );
+ case "AntDesign":
+ return ({ focused, color, size }) => (
+
+ );
+ }
+};
+
+const Top = ({
+ navigation,
+ favoriteStation,
+ setFavoriteStation,
+ busAndTrainData,
+}) => {
+ const webview = useRef();
+
+ //地図用
+ const [mapsStationData, setMapsStationData] = useState(undefined);
+
+ useEffect(() => {
+ getStationList2().then(setMapsStationData);
+ }, []);
+
+ useEffect(() => {
+ const unsubscribe = navigation.addListener("tabLongPress", (e) => {
+ navigation.navigate("favoriteList");
+ });
+
+ return unsubscribe;
+ }, [navigation]);
+
return (
-
+ >
+ {(props) => (
+
+ )}
+
+
+ {(props) => }
+
+
+ {(props) => }
+
+
+ {(props) => }
+
+
+ {(props) => (
+
+ )}
+
+
+ {(props) => (
+
+ )}
+
+
+ );
+};
+function MenuPage({
+ navigation,
+ favoriteStation,
+ setFavoriteStation,
+ busAndTrainData,
+}) {
+ useEffect(() => {
+ const unsubscribe = navigation.addListener("tabPress", (e) => {
+ AS.getItem("favoriteStation")
+ .then((d) => {
+ const returnData = JSON.parse(d);
+ if (favoriteStation.toString() != d) {
+ setFavoriteStation(returnData);
+ }
+ })
+ .catch((d) => console.log(d));
+ });
+
+ return unsubscribe;
+ }, [navigation]);
+ return (
+
+
+ {(props) => (
+
+ )}
+
+
+ {(props) => }
+
+ >
+ {(props) => }
+
);
}
diff --git a/Apps.js b/Apps.js
index fbb2fec..2a2f59e 100644
--- a/Apps.js
+++ b/Apps.js
@@ -19,23 +19,21 @@ import { getStationList2 } from "./lib/getStationList2";
import StatusbarDetect from './StatusbarDetect';
var Status = StatusbarDetect(); */
-export default function Apps(props) {
- const {
- navigation: { navigate },
- } = props;
+export default function Apps({
+ navigation,
+ webview,
+ favoriteStation,
+ setFavoriteStation,
+ busAndTrainData,
+}) {
+ const { navigate } = navigation;
var urlcache = "";
- const webview = useRef();
+
//画面表示関連
const [iconSetting, setIconSetting] = useState(undefined);
const [mapSwitch, setMapSwitch] = useState(undefined);
const [stationMenu, setStationMenu] = useState(undefined);
- //地図用
- const [mapsStationData, setMapsStationData] = useState(undefined);
- useEffect(() => {
- getStationList2().then(setMapsStationData);
- }, []);
-
//駅情報画面用
const StationBoardAcSR = useRef(null);
const [stationBoardData, setStationBoardData] = useState(undefined);
@@ -187,9 +185,7 @@ export default function Apps(props) {
onTouchMove={() => StationBoardAcSR.current?.hide()}
/>
- navigate("trainMenu", { webview, stationData: mapsStationData })
- }
+ onPress={() => navigate("trainMenu", { webview })}
top={Platform.OS == "ios" ? Constants.statusBarHeight : 0}
mapSwitch={mapSwitch == "true" ? "flex" : "none"}
/>
@@ -202,6 +198,9 @@ export default function Apps(props) {
StationBoardAcSR={StationBoardAcSR}
currentStation={stationBoardData}
originalStationList={originalStationList}
+ favoriteStation={favoriteStation}
+ setFavoriteStation={setFavoriteStation}
+ busAndTrainData={busAndTrainData}
/>
);
diff --git a/app.json b/app.json
index 8c86182..ae9fb4d 100644
--- a/app.json
+++ b/app.json
@@ -3,8 +3,11 @@
"name": "JR四国運行状況",
"slug": "jrshikoku",
"privacy": "public",
- "platforms": ["ios", "android"],
- "version": "4.4",
+ "platforms": [
+ "ios",
+ "android"
+ ],
+ "version": "4.5",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
@@ -15,9 +18,11 @@
"updates": {
"fallbackToCacheTimeout": 0
},
- "assetBundlePatterns": ["**/*"],
+ "assetBundlePatterns": [
+ "**/*"
+ ],
"ios": {
- "buildNumber": "23",
+ "buildNumber": "25",
"supportsTablet": true,
"bundleIdentifier": "jrshikokuinfo.xprocess.hrkn",
"config": {
@@ -26,14 +31,21 @@
},
"android": {
"package": "jrshikokuinfo.xprocess.hrkn",
- "versionCode": 16,
- "permissions": ["ACCESS_FINE_LOCATION"],
+ "versionCode": 17,
+ "permissions": [
+ "ACCESS_FINE_LOCATION"
+ ],
"googleServicesFile": "./google-services.json",
"config": {
"googleMaps": {
"apiKey": "AIzaSyAmFb-Yj033bXZWlSzNrfq_0jc1PgRrWcE"
}
}
+ },
+ "extra": {
+ "eas": {
+ "projectId": "398abf60-57a7-11e9-970c-8f04356d08bf"
+ }
}
}
}
diff --git a/assets/939-star.json b/assets/939-star.json
new file mode 100644
index 0000000..86c7b8e
--- /dev/null
+++ b/assets/939-star.json
@@ -0,0 +1 @@
+{"v":"4.11.1","fr":29.9700012207031,"ip":0,"op":60.0000024438501,"w":1000,"h":1000,"nm":"コンポ 1","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"シェイプレイヤー 8","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[503.281,325.035,0],"e":[503.281,175.035,0],"to":[0,-25,0],"ti":[0,25,0]},{"t":5.00000020365417}],"ix":2},"a":{"a":0,"k":[3.281,-284.965,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":0,"s":[100,0,100],"e":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":5,"s":[100,100,100],"e":[100,0,100]},{"t":10.0000004073083}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[5,100],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"長方形パス 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.881533933153,0.904577038335,0.933333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.914888090246,0.938708436255,0.953431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0.781,-234.965],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"長方形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0}]},{"id":"comp_1","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"シェイプレイヤー 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[550.289,280.289,0],"ix":2},"a":{"a":0,"k":[50.289,-219.711,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[36.578,36.578],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.984359681373,0.862484501857,0.179983415791,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.241335191914,0.688379504634,0.964690563725,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[2.148,-72.766],"e":[50.289,-219.711],"to":[8.0234375,-24.4908847808838],"ti":[-8.0234375,24.4908847808838]},{"t":12.00000048877}],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0"],"t":6,"s":[100,100],"e":[0,0]},{"t":13.0000005295009}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":1,"k":[{"i":{"x":[0.08],"y":[0.997]},"o":{"x":[0.333],"y":[0]},"n":["0p08_0p997_0p333_0"],"t":0,"s":[0],"e":[100]},{"t":12.00000048877}],"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"シェイプレイヤー 6","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.105],"y":[0.995]},"o":{"x":[0.333],"y":[0]},"n":["0p105_0p995_0p333_0"],"t":6,"s":[0],"e":[100]},{"t":16.0000006516934}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.167,"y":0},"n":"0p833_1_0p167_0","t":6,"s":[504,444,0],"e":[603.945,197.945,0],"to":[16.6575527191162,-41.0091133117676,0],"ti":[-16.6575527191162,41.0091133117676,0]},{"t":16.0000006516934}],"ix":2},"a":{"a":0,"k":[103.945,-302.055,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.94,0.94,0.667],"y":[0.654,0.654,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p94_0p654_0p333_0","0p94_0p654_0p333_0","0p667_1_0p333_0"],"t":12,"s":[100,100,100],"e":[0,0,100]},{"t":17.0000006924242}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[51.891,51.891],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.984359681373,0.862484501857,0.179983415791,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.964690563725,0.241335191914,0.46671890558,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[103.945,-302.055],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"シェイプレイヤー 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-3.535,30.465,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":13,"s":[0,0,100],"e":[100,100,100]},{"t":21.0000008553475}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[522.93,522.93],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.477606799556,0.833195465686,0.49607256721,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":18,"s":[30],"e":[0]},{"t":27.0000010997325}],"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.869255514706,0.866526345646,0.851612106024,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-0.004,34.074],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"シェイプレイヤー 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-3.535,30.465,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":10,"s":[0,0,100],"e":[100,100,100]},{"t":18.000000733155}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[622.93,622.93],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.836412377451,0.289413063199,0.437022579418,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":15,"s":[30],"e":[0]},{"t":24.00000097754}],"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.869255514706,0.866526345646,0.851612106024,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-0.004,34.074],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":4.00000016292334,"op":904.000036820675,"st":4.00000016292334,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"シェイプレイヤー 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-3.535,30.465,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":7,"s":[0,0,100],"e":[100,100,100]},{"t":15.0000006109625}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[722.93,722.93],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.328786573223,0.565331313189,0.860523897059,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":12,"s":[30],"e":[0]},{"t":21.0000008553475}],"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.869255514706,0.866526345646,0.851612106024,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-0.004,34.074],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1.00000004073083,"op":901.000036698482,"st":1.00000004073083,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"シェイプレイヤー 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-194,-151,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.453,0.453,0.667],"y":[1.938,1.938,1]},"o":{"x":[0.245,0.245,0.333],"y":[0.387,0.387,0]},"n":["0p453_1p938_0p245_0p387","0p453_1p938_0p245_0p387","0p667_1_0p333_0"],"t":13,"s":[0,0,100],"e":[102.07,102.07,100]},{"t":24.00000097754}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":5,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":0,"ix":5},"ir":{"a":0,"k":100,"ix":6},"is":{"a":0,"k":15,"ix":8},"or":{"a":0,"k":200,"ix":7},"os":{"a":0,"k":15,"ix":9},"ix":1,"nm":"多角形パス 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.962239583333,0.881815053902,0.442323632334,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-194,-126],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"多角形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"シェイプレイヤー 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-194,-151,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":5,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":0,"ix":5},"ir":{"a":0,"k":100,"ix":6},"is":{"a":0,"k":15,"ix":8},"or":{"a":0,"k":200,"ix":7},"os":{"a":0,"k":15,"ix":9},"ix":1,"nm":"多角形パス 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.869255514706,0.866526345646,0.851612106024,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-194,-126],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"多角形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-315,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":7,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-270,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":14.0000005702317,"op":914.000037227983,"st":14.0000005702317,"bm":0},{"ddd":0,"ind":8,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-225,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":9,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-180,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":14.0000005702317,"op":914.000037227983,"st":14.0000005702317,"bm":0},{"ddd":0,"ind":10,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-135,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":11,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-90,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":14.0000005702317,"op":914.000037227983,"st":14.0000005702317,"bm":0},{"ddd":0,"ind":12,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-45,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":13,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":14.0000005702317,"op":914.000037227983,"st":14.0000005702317,"bm":0},{"ddd":0,"ind":14,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-315,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":15,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-315,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":16,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-270,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":17,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-225,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":10.0000004073083,"op":910.00003706506,"st":10.0000004073083,"bm":0},{"ddd":0,"ind":18,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-225,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":19,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-180,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":20,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-135,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":10.0000004073083,"op":910.00003706506,"st":10.0000004073083,"bm":0},{"ddd":0,"ind":21,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-135,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":22,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-90,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":23,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-45,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":10.0000004073083,"op":910.00003706506,"st":10.0000004073083,"bm":0},{"ddd":0,"ind":24,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-45,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":25,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0}]}
\ No newline at end of file
diff --git a/assets/originData/lineColorList.js b/assets/originData/lineColorList.js
new file mode 100644
index 0000000..4358c9b
--- /dev/null
+++ b/assets/originData/lineColorList.js
@@ -0,0 +1,11 @@
+export default {
+ Y: "#F5AC13",
+ U: "#F5AC13",
+ S: "#9AA7D7",
+ D: "#DC4586",
+ K: "#DC4586",
+ B: "#366481",
+ N: "#881F61",
+ T: "#87CA3B",
+ M: "#0071be",
+};
diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js
index 6d1ccd0..237db26 100644
--- a/components/ActionSheetComponents/StationDeteilView.js
+++ b/components/ActionSheetComponents/StationDeteilView.js
@@ -1,13 +1,45 @@
-import React from "react";
-import { View, Linking } from "react-native";
+import React, { useState, useEffect } from "react";
+import {
+ StatusBar,
+ View,
+ LayoutAnimation,
+ ScrollView,
+ Linking,
+ Text,
+ TouchableOpacity,
+} from "react-native";
import { FontAwesome, Foundation, Ionicons } from "@expo/vector-icons";
import ActionSheet from "react-native-actions-sheet";
import Sign from "../../components/駅名表/Sign";
+import { useInterval } from "../../lib/useInterval";
import { TicketBox } from "../atom/TicketBox";
+import {
+ widthPercentageToDP as wp,
+ heightPercentageToDP as hp,
+} from "react-native-responsive-screen";
+import lineColorList from "../../assets/originData/lineColorList";
export const StationDeteilView = (props) => {
- const { StationBoardAcSR, currentStation, originalStationList } = props;
+ const {
+ StationBoardAcSR,
+ currentStation,
+ originalStationList,
+ favoriteStation,
+ setFavoriteStation,
+ busAndTrainData,
+ } = props;
+ const [trainBus, setTrainBus] = useState();
+ useEffect(() => {
+ if (!currentStation) return () => {};
+ const data = busAndTrainData.filter((d) => {
+ return d.name === currentStation[0].Station_JP;
+ });
+ if (data.length == 0) {
+ setTrainBus();
+ }
+ setTrainBus(data[0]);
+ }, [currentStation]);
return (
{
{currentStation && (
- Linking.openURL(currentStation[0].StationTimeTable)}
- />
+
+ Linking.openURL(currentStation[0].StationTimeTable)}
+ />
+
)}
+ {currentStation &&
+ currentStation.map((d) => (
+
+ ))}
{currentStation && (
{!currentStation[0].JrHpUrl || (
@@ -79,7 +129,17 @@ export const StationDeteilView = (props) => {
Linking.openURL(currentStation[0].StationMap)
}
>
- GoogleMap
+ Map
+
+ )}
+ {!trainBus || (
+ }
+ flex={1}
+ onPressButton={() => Linking.openURL(trainBus.address)}
+ >
+ 平行バス
)}
@@ -89,3 +149,226 @@ export const StationDeteilView = (props) => {
);
};
+
+const StationName = (props) => {
+ const { stringData, ss } = props;
+ return (
+
+ {stringData.Station_JP}
+ {stringData.Station_EN}
+
+ );
+};
+
+const NexPreStationLine = ({
+ currentStation,
+ originalStationList,
+ oP,
+ favoriteStation,
+ setFavoriteStation,
+}) => {
+ const [preStation, setPreStation] = useState();
+ const [nexStation, setNexStation] = useState();
+ const [lineName, setLineName] = useState();
+
+ useEffect(() => {
+ getPreNextStation(currentStation);
+ }, [currentStation]);
+
+ useEffect(() => {
+ if (!currentStation) return () => {};
+ getPreNextStation(currentStation);
+ }, []);
+ const getPreNextStation = (now) => {
+ const lineList = [
+ "予讃線(高松-松山間)[Y]",
+ "予讃線(松山-宇和島間)[U]",
+ "予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]",
+ "土讃線(多度津-高知間)[D]",
+ "土讃線(高知-窪川間)[K]",
+ "高徳線(高松-徳島間)[T]",
+ "徳島線(徳島-阿波池田)[B]",
+ "鳴門線(池谷-鳴門間)[N]",
+ "瀬戸大橋線(宇多津-児島間)[M]",
+ ];
+ let returnData;
+ lineList.forEach((d) => {
+ let cache = originalStationList[d].findIndex(
+ (data) => data.StationNumber == now.StationNumber
+ );
+ if (cache != -1) {
+ returnData = [
+ originalStationList[d][cache - 1],
+ originalStationList[d][cache + 1],
+ d,
+ ];
+ }
+ });
+ setPreStation(returnData[0]);
+ setNexStation(returnData[1]);
+ setLineName(returnData[2]);
+ };
+ return (
+
+
+ {preStation ? (
+ <>
+ ◀
+ {preStation.StationNumber ? (
+
+
+
+ {preStation.StationNumber}
+
+
+
+ ) : (
+ <>>
+ )}
+
+ >
+ ) : (
+ <>>
+ )}
+
+
+
+ {lineName &&
+ lineName
+ .split("(")
+ .map((d, index) => (index == 1 ? "(" + d : d))
+ .join("\n")}
+
+
+ {nexStation ? (
+ <>
+
+ {nexStation.StationNumber ? (
+
+
+
+ {nexStation.StationNumber}
+
+
+
+ ) : (
+ <>>
+ )}
+ ▶
+ >
+ ) : (
+ <>>
+ )}
+
+
+ );
+};
+
+const styleSheet = {
+ 外枠: {
+ width: wp("80%"),
+ height: (wp("80%") / 20) * 9,
+ borderColor: "#2E94BB",
+ borderWidth: 1,
+ backgroundColor: "white",
+ },
+ 下帯: {
+ position: "absolute",
+ bottom: "0%",
+ left: "0%",
+ width: "100%",
+ height: "30%",
+ backgroundColor: "#2E94BB",
+ },
+ JRStyle: {
+ position: "absolute",
+ top: "2%",
+ left: "2%",
+ fontWeight: "bold",
+ fontSize: parseInt("30%"),
+ color: "#2E94BB",
+ },
+ stationNameAreaOverWrap: {
+ position: "absolute",
+ top: "10%",
+ alignContent: "center",
+ flexDirection: "row",
+ },
+ Station_JP: {
+ fontWeight: "bold",
+ fontSize: parseInt("40%"),
+ color: "#005170",
+ },
+ Station_EN: {
+ fontWeight: "bold",
+ fontSize: parseInt("15%"),
+ color: "#005170",
+ },
+ 下帯内容: {
+ position: "absolute",
+ bottom: "0%",
+ height: "30%",
+ width: "100%",
+ alignItems: "center",
+ flexDirection: "column",
+ },
+ 下枠フレーム: {
+ flex: 1,
+ flexDirection: "row",
+ alignContent: "center",
+ height: wp("10%"),
+ },
+ 下枠左右マーク: {
+ fontWeight: "bold",
+ fontSize: parseInt("20%"),
+ color: "white",
+ paddingHorizontal: 10,
+ textAlignVertical: "center",
+ },
+ 下枠駅ナンバー: {
+ alignContent: "center",
+ alignItems: "center",
+ width: wp("8%"),
+ height: wp("8%"),
+ margin: wp("1%"),
+ borderColor: "white",
+ borderWidth: parseInt("2%"),
+ borderRadius: parseInt("100%"),
+ },
+ 下枠駅名: {
+ fontWeight: "bold",
+ fontSize: parseInt("15%"),
+ color: "white",
+ flex: 1,
+ paddingHorizontal: 0,
+ marginVertical: 0,
+ textAlignVertical: "center",
+ },
+};
diff --git a/components/FavoriteList.js b/components/FavoriteList.js
new file mode 100644
index 0000000..422ca4c
--- /dev/null
+++ b/components/FavoriteList.js
@@ -0,0 +1,111 @@
+import React, { Component, useRef, useState, useEffect } from "react";
+import { View, Text, TouchableOpacity, ScrollView } from "react-native";
+import { WebView } from "react-native-webview";
+import { ListItem } from "native-base";
+import Icon from "react-native-vector-icons/Entypo";
+import StatusbarDetect from "../StatusbarDetect";
+import { AS } from "../storageControl";
+import { news } from "../config/newsUpdate";
+import { getStationList, lineList } from "../lib/getStationList";
+var Status = StatusbarDetect();
+export default function FavoriteList({
+ navigation,
+ webview,
+ stationData,
+ favoriteStation,
+ setFavoriteStation,
+}) {
+ const { navigate } = navigation;
+
+ return (
+
+
+ 位置情報クイック移動メニュー
+
+
+ {favoriteStation
+ .filter((d) => d[0].StationMap)
+ .map((currentStation) => {
+ return (
+ {
+ const getStationLine = (now) => {
+ const returnData = Object.keys(stationData).filter((d) => {
+ const cache = stationData[d].findIndex(
+ (data) => data.Station_JP == now.Station_JP
+ );
+ return cache != -1;
+ });
+ return returnData[0];
+ };
+ const lineName = getStationLine(currentStation[0]);
+
+ webview.current?.injectJavaScript(
+ `MoveDisplayStation('${lineName}_${currentStation[0].MyStation}_${currentStation[0].Station_JP}')`
+ );
+ navigate("Apps");
+ }}
+ >
+
+ {currentStation
+ .map((d) => d.StationNumber)
+ .filter((d) => d !== null)
+ .join("/")}
+
+
+ {currentStation[0].Station_JP}
+
+
+
+ 移動する
+
+
+
+ );
+ })}
+
+
+ お気に入り登録した駅のうち、位置情報システムで移動可能な駅が表示されています。タップすることで位置情報システムの当該の駅に移動します。
+
+ navigation.goBack()}
+ >
+
+
+ 閉じる
+
+
+
+
+ );
+}
diff --git a/components/settings.js b/components/settings.js
index e91a431..e37edcd 100644
--- a/components/settings.js
+++ b/components/settings.js
@@ -102,7 +102,7 @@ export default function Setting(props) {
textAlignVertical: "center",
}}
>
- 内部バージョン: 4.4.2.9
+ 内部バージョン: 4.5 beta-2
diff --git a/components/trainMenu.js b/components/trainMenu.js
index 4c9d001..ed6af21 100644
--- a/components/trainMenu.js
+++ b/components/trainMenu.js
@@ -2,11 +2,10 @@ import React, { useRef } from "react";
import { View, Text, TouchableOpacity, Linking } from "react-native";
import MapView, { Marker } from "react-native-maps";
import { MaterialCommunityIcons } from "@expo/vector-icons";
-export default function trainMenu({
- route: {
- params: { webview, stationData },
- },
+export default function TrainMenu({
navigation: { navigate },
+ webview,
+ stationData,
}) {
const mapRef = useRef();
return (
@@ -67,12 +66,7 @@ export default function trainMenu({
backgroundColor={"#EA4752"}
icon="star"
flex={1}
- onPressButton={() =>
- /* Linking.openURL(
- "https://www.jr-shikoku.co.jp/01_trainbus/jikoku/sp/#mainprice-box"
- ) */
- alert("お気に入り駅登録機能は現在開発中です!レイアウト募集中!")
- }
+ onPressButton={() => navigate("favoriteList")}
>
お気に入り
@@ -99,9 +93,7 @@ export default function trainMenu({
borderRadius: 5,
alignItems: "center",
}}
- onPress={() => {
- navigate("Apps");
- }}
+ onPress={() => navigate("Apps")}
>
diff --git a/components/発車時刻表/LED_vidion.js b/components/発車時刻表/LED_vidion.js
index 9d52ca9..af069ef 100644
--- a/components/発車時刻表/LED_vidion.js
+++ b/components/発車時刻表/LED_vidion.js
@@ -138,7 +138,6 @@ export default function LED_vision(props) {
});
return { train: d, time: a.time, lastStation: a.lastStation };
});
- console.log(returnData);
return returnData.sort((a, b) => {
switch (true) {
case parseInt(a.time.split(":")[0]) < parseInt(b.time.split(":")[0]):
@@ -280,7 +279,7 @@ const Footer = ({
setFinalSwitch,
}) => {
return (
-
+
{
6 ? 15 : 20,
+ fontSize: trainName.length > 6 ? parseInt("13%") : parseInt("18%"),
color: getTrainType.color,
fontWeight: "bold",
}}
@@ -422,7 +421,8 @@ const LastStation = ({ d }) => {
4 ? 15 : 20,
+ fontSize:
+ d.lastStation.length > 4 ? parseInt("13%") : parseInt("18%"),
color: "white",
fontWeight: "bold",
}}
@@ -437,7 +437,7 @@ const DependTime = ({ d }) => {
{
{status}
@@ -512,7 +513,7 @@ const Description = ({ train }) => {
{
+ const isFavorite = favoriteStation.filter((d) => {
+ const compare = JSON.stringify(d);
+ const current = JSON.stringify(currentStation);
+ if (compare === current) {
+ return true;
+ } else {
+ return false;
+ }
+ });
+ setTestButtonStatus(isFavorite.length != 0);
+ }, [favoriteStation, currentStation]);
useInterval(() => {
if (currentStation.length == 1) {
setNexPrePosition(0);
return () => {};
}
- LayoutAnimation.easeInEaseOut();
setNexPrePosition(
nexPrePosition + 1 == currentStation.length ? 0 : nexPrePosition + 1
);
@@ -43,15 +64,15 @@ export default function Sign(props) {
}, [nexPrePosition]);
const getPreNextStation = (now) => {
const lineList = [
- "予讃線",
- "松宇線",
- "伊予灘線",
- "土讃線",
- "窪川線",
- "高徳線",
- "徳島線",
- "鳴門線",
- "瀬戸大橋線",
+ "予讃線(高松-松山間)[Y]",
+ "予讃線(松山-宇和島間)[U]",
+ "予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]",
+ "土讃線(多度津-高知間)[D]",
+ "土讃線(高知-窪川間)[K]",
+ "高徳線(高松-徳島間)[T]",
+ "徳島線(徳島-阿波池田)[B]",
+ "鳴門線(池谷-鳴門間)[N]",
+ "瀬戸大橋線(宇多津-児島間)[M]",
];
let returnData;
lineList.forEach((d) => {
@@ -68,10 +89,45 @@ export default function Sign(props) {
setPreStation(returnData[0]);
setNexStation(returnData[1]);
};
+ const lottieRef = useRef();
return (
+ {
+ if (testButtonStatus) {
+ const otherData = favoriteStation.filter((d) => {
+ const compare = JSON.stringify(d);
+ const current = JSON.stringify(currentStation);
+ if (compare !== current) {
+ return true;
+ } else {
+ return false;
+ }
+ });
+ AS.setItem("favoriteStation", JSON.stringify(otherData));
+ setFavoriteStation(otherData);
+ } else {
+ let ret = favoriteStation;
+ ret.push(currentStation);
+ AS.setItem("favoriteStation", JSON.stringify(ret));
+ setFavoriteStation(ret);
+ }
+ setTestButtonStatus(!testButtonStatus);
+ }}
+ >
+
+
+
JR
@@ -81,14 +137,45 @@ export default function Sign(props) {
);
}
+const LottieDelayView = ({
+ progress,
+ speed,
+ style,
+ source,
+ lottieRef,
+ loop,
+}) => {
+ const [progressState, setProgressState] = useState(undefined);
+ useEffect(() => {
+ if (progress == 0) {
+ lottieRef.current.play(progressState !== undefined ? 35 : 7, 7);
+ } else {
+ lottieRef.current.play(progressState !== undefined ? 7 : 35, 35);
+ }
+ }, [progress]);
+ return (
+ {
+ console.log("finish");
+ setProgressState(progress);
+ }}
+ />
+ );
+};
const NexPreStationLine = ({ nexStation, preStation }) => {
return (
- {preStation && (
+ {preStation ? (
<>
◀
- {preStation.StationNumber && (
+ {preStation.StationNumber ? (
{
+ ) : (
+ <>>
)}
>
+ ) : (
+ <>>
)}
- {nexStation && (
+ {nexStation ? (
<>
- {nexStation.StationNumber && (
+ {nexStation.StationNumber ? (
@@ -124,9 +215,13 @@ const NexPreStationLine = ({ nexStation, preStation }) => {
+ ) : (
+ <>>
)}
▶
>
+ ) : (
+ <>>
)}
@@ -199,8 +294,6 @@ const styleSheet = {
height: (wp("80%") / 20) * 9,
borderColor: "#2E94BB",
borderWidth: 1,
- margin: 10,
- marginHorizontal: wp("10%"),
backgroundColor: "white",
},
下帯: {
@@ -247,6 +340,7 @@ const styleSheet = {
flex: 1,
flexDirection: "row",
alignContent: "center",
+ alignItems: "center",
},
下枠左右マーク: {
fontWeight: "bold",
diff --git a/eas.json b/eas.json
index 533961a..2ae0c41 100644
--- a/eas.json
+++ b/eas.json
@@ -15,6 +15,12 @@
},
"production": {
"releaseChannel": "aliexpress"
+ },
+ "beta4.5": {
+ "releaseChannel": "base"
+ },
+ "production4.5": {
+ "releaseChannel": "buyma"
}
},
"submit": {
diff --git a/lib/getStationList.js b/lib/getStationList.js
index d2a4280..077751b 100644
--- a/lib/getStationList.js
+++ b/lib/getStationList.js
@@ -19,15 +19,15 @@ import train_lang from "../assets/originData/train_lang";
let status = undefined;
export const lineList = [
- "予讃線",
- "松宇線",
- "伊予灘線",
- "土讃線",
- "窪川線",
- "高徳線",
- "徳島線",
- "鳴門線",
- "瀬戸大橋線",
+ "予讃線(高松-松山間)[Y]",
+ "予讃線(松山-宇和島間)[U]",
+ "予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]",
+ "土讃線(多度津-高知間)[D]",
+ "土讃線(高知-窪川間)[K]",
+ "高徳線(高松-徳島間)[T]",
+ "徳島線(徳島-阿波池田)[B]",
+ "鳴門線(池谷-鳴門間)[N]",
+ "瀬戸大橋線(宇多津-児島間)[M]",
];
export const getStationList = async (props) => {
@@ -53,15 +53,15 @@ export const getStationList = async (props) => {
]).then((values) => {
let stationList = {};
[
- stationList.予讃線,
- stationList.松宇線,
- stationList.伊予灘線,
- stationList.土讃線,
- stationList.窪川線,
- stationList.高徳線,
- stationList.徳島線,
- stationList.鳴門線,
- stationList.瀬戸大橋線,
+ stationList["予讃線(高松-松山間)[Y]"],
+ stationList["予讃線(松山-宇和島間)[U]"],
+ stationList["予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]"],
+ stationList["土讃線(多度津-高知間)[D]"],
+ stationList["土讃線(高知-窪川間)[K]"],
+ stationList["高徳線(高松-徳島間)[T]"],
+ stationList["徳島線(徳島-阿波池田)[B]"],
+ stationList["鳴門線(池谷-鳴門間)[N]"],
+ stationList["瀬戸大橋線(宇多津-児島間)[M]"],
stationList.駅間リスト,
stationList.日英対応表,
] = values;
@@ -115,52 +115,55 @@ export const getStationList = async (props) => {
return data;
});
};
- stationList.予讃線 = addStationPosition(
- concatBetweenStations(stationList.予讃線),
+ stationList["予讃線(高松-松山間)[Y]"] = addStationPosition(
+ concatBetweenStations(stationList["予讃線(高松-松山間)[Y]"]),
予讃線,
stationList.日英対応表
);
- stationList.松宇線 = addStationPosition(
- concatBetweenStations(stationList.松宇線),
+ stationList["予讃線(松山-宇和島間)[U]"] = addStationPosition(
+ concatBetweenStations(stationList["予讃線(松山-宇和島間)[U]"]),
予讃線,
stationList.日英対応表
);
- stationList.伊予灘線 = addStationPosition(
- concatBetweenStations(stationList.伊予灘線),
- 予讃線,
- stationList.日英対応表
- );
- stationList.土讃線 = addStationPosition(
- concatBetweenStations(stationList.土讃線),
+ stationList["予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]"] =
+ addStationPosition(
+ concatBetweenStations(
+ stationList["予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]"]
+ ),
+ 予讃線,
+ stationList.日英対応表
+ );
+ stationList["土讃線(多度津-高知間)[D]"] = addStationPosition(
+ concatBetweenStations(stationList["土讃線(多度津-高知間)[D]"]),
土讃線,
stationList.日英対応表
);
- stationList.窪川線 = addStationPosition(
- concatBetweenStations(stationList.窪川線),
+ stationList["土讃線(高知-窪川間)[K]"] = addStationPosition(
+ concatBetweenStations(stationList["土讃線(高知-窪川間)[K]"]),
土讃線,
stationList.日英対応表
);
- stationList.高徳線 = addStationPosition(
- concatBetweenStations(stationList.高徳線),
+ stationList["高徳線(高松-徳島間)[T]"] = addStationPosition(
+ concatBetweenStations(stationList["高徳線(高松-徳島間)[T]"]),
高徳線,
stationList.日英対応表
);
- stationList.鳴門線 = addStationPosition(
- concatBetweenStations(stationList.鳴門線),
+ stationList["鳴門線(池谷-鳴門間)[N]"] = addStationPosition(
+ concatBetweenStations(stationList["鳴門線(池谷-鳴門間)[N]"]),
鳴門線,
stationList.日英対応表
);
const tokushimaCurrent = addStationPosition(
- concatBetweenStations(stationList.徳島線),
+ concatBetweenStations(stationList["徳島線(徳島-阿波池田)[B]"]),
徳島線,
stationList.日英対応表
);
- stationList.徳島線 = [
+ stationList["徳島線(徳島-阿波池田)[B]"] = [
tokushimaCurrent[tokushimaCurrent.length - 1],
...tokushimaCurrent,
];
- stationList.徳島線.pop();
- stationList.瀬戸大橋線 = [
+ stationList["徳島線(徳島-阿波池田)[B]"].pop();
+ stationList["瀬戸大橋線(宇多津-児島間)[M]"] = [
{
Station_JP: "坂出",
Station_EN: "Sakaide",
diff --git a/menu.js b/menu.js
index fe31a17..6653032 100644
--- a/menu.js
+++ b/menu.js
@@ -1,12 +1,13 @@
import React, { useRef, useState, useEffect } from "react";
+import Carousel from "react-native-snap-carousel";
import {
Platform,
View,
- LayoutAnimation,
ScrollView,
Linking,
Text,
TouchableOpacity,
+ ToastAndroid,
} from "react-native";
import Constants from "expo-constants";
import { ListItem } from "native-base";
@@ -38,44 +39,29 @@ import useInterval from "./lib/useInterval";
export default function Menu(props) {
const {
navigation: { navigate },
+ favoriteStation,
+ setFavoriteStation,
+ busAndTrainData,
} = props;
const JRSTraInfoEXAcSR = useRef(null);
const StationBoardAcSR = useRef(null);
const navigation = useNavigation();
//位置情報
- const [location, setLocation] = useState(null);
const [locationStatus, setLocationStatus] = useState(null);
useEffect(() => {
Location.requestForegroundPermissionsAsync().then((data) => {
setLocationStatus(data.status);
});
}, []);
- useEffect(() => {
- if (locationStatus !== "granted") return () => {};
- getCurrentPosition();
- }, [locationStatus]);
const getCurrentPosition = () => {
+ if (locationStatus !== "granted") return () => {};
Location.getCurrentPositionAsync({}).then((location) =>
- setLocation(location)
+ makeCurrentStation(location)
);
};
-
- useInterval(() => {
- if (locationStatus !== "granted") return () => {};
- getCurrentPosition();
- }, 5000);
-
- const [originalStationList, setOriginalStationList] = useState();
- useEffect(() => {
- getStationList().then(setOriginalStationList);
- }, []);
-
- const [stationName, setStationName] = useState(undefined);
- const [currentStation, setCurrentStation] = useState(undefined);
- useEffect(() => {
- if (!location) return () => {};
+ const makeCurrentStation = (location) => {
if (!originalStationList) return () => {};
const findStationEachLine = (selectLine) => {
const searchArea = 0.0015;
@@ -101,7 +87,6 @@ export default function Menu(props) {
pre.push(...current);
return pre;
}, []);
- LayoutAnimation.easeInEaseOut();
if (returnDataBase.length) {
let currentStation = currentStation == undefined ? [] : currentStation;
if (currentStation.toString() != returnDataBase.toString()) {
@@ -109,14 +94,23 @@ export default function Menu(props) {
}
} else {
setCurrentStation(undefined);
- StationBoardAcSR.current?.hide();
}
- }, [location, originalStationList]);
+ };
+
+ useEffect(getCurrentPosition, [locationStatus]);
+ useInterval(getCurrentPosition, 5000);
+
+ const [currentStation, setCurrentStation] = useState(undefined); //第三要素
+
+ const [originalStationList, setOriginalStationList] = useState(); // 第一要素
+ useEffect(() => getStationList().then(setOriginalStationList), []);
const [count, setCount] = useState(0);
const [delayData, setDelayData] = useState(undefined);
const [getTime, setGetTime] = useState(new Date());
const [loadingDelayData, setLoadingDelayData] = useState(true);
+ const carouselRef = useRef();
+ const [selectedCurrentStation, setSelectedCurrentStation] = useState(0);
useEffect(() => {
fetch(
@@ -124,11 +118,32 @@ export default function Menu(props) {
)
.then((response) => response.text())
.then((data) => setDelayData(data !== "" ? data.split("^") : null))
- .then(LayoutAnimation.easeInEaseOut)
.then(() => setGetTime(new Date()))
.finally(() => setLoadingDelayData(false));
}, [loadingDelayData]);
-
+ const allStationData = [currentStation, ...favoriteStation].filter(
+ (d) => d != undefined
+ );
+ console.log(allStationData);
+ useEffect(() => {
+ if (allStationData.length == 0) {
+ setSelectedCurrentStation(0);
+ return;
+ }
+ console.log(allStationData[selectedCurrentStation]);
+ if (allStationData[selectedCurrentStation] == undefined) {
+ const count = selectedCurrentStation - 1;
+ setSelectedCurrentStation(count);
+ }
+ }, [selectedCurrentStation, currentStation, favoriteStation]);
+ useEffect(() => {
+ if (!carouselRef.current) return;
+ console.log(carouselRef.current);
+ if (carouselRef.current?._itemToSnapTo != selectedCurrentStation) {
+ carouselRef.current.snapToItem(0);
+ carouselRef.current.snapToItem(selectedCurrentStation);
+ }
+ }, [selectedCurrentStation]);
return (
-
-
- Linking.openURL(
- "https://www.jr-shikoku.co.jp/02_information/suspension/sp/"
- )
- }
- >
-
- 新型コロナウイルスに関するお知らせ
-
-
- 列車の運行計画・混雑状況・感染症対策への取り組み
-
-
- {currentStation && (
- <>
-
-
- >
+
+ {originalStationList && allStationData.length != 0 && (
+ {
+ setSelectedCurrentStation(d);
+ }}
+ renderItem={({ item, index }) => {
+ return (
+
+
+
+ );
+ }}
+ />
)}
+ {allStationData.length != 0 &&
+ originalStationList &&
+ allStationData[selectedCurrentStation] && (
+
+ )}
-
-
- }
- flex={1}
- onPressButton={() =>
- Linking.openURL("https://www.jr-eki.com/ticket/brand")
- }
- >
- トクトク切符
-
- }
- flex={1}
- onPressButton={() =>
- Linking.openURL(
- "https://www.jr-shikoku.co.jp/01_trainbus/event_train/sp/"
- )
- }
- >
- 観光列車
-
- }
- flex={1}
- onPressButton={() =>
- Linking.openURL("https://www.jr-eki.com/tour/brand")
- }
- >
- 旅行ツアー
-
-
-
- Linking.openURL("https://www.jr-eki.com/smart-eki/index.html")
- }
- >
-
- スマートえきちゃん
-
-
- JR四国のチケットレススマホアプリです。
-
-
-
- Linking.openURL(
- "https://www.jr-shikoku.co.jp/sp/index.html#menu-box"
- )
- }
- >
-
- 臨時列車などのお知らせ
-
-
- 区間縮小・計画運休・イベント・季節臨時列車など
-
-
-
- Linking.openURL("https://www.jr-shikoku.co.jp/03_news/press/")
- }
- >
-
- ニュースリリース
-
-
- 公式プレス記事はこちら
-
-
-
- Linking.openURL("https://www.jr-shikoku.co.jp/teiki/")
- }
- >
-
- 定期運賃計算
-
-
- 通常/学生/快て〜き等はこちら
-
-
-
- Linking.openURL("https://www.jr-shikoku.co.jp/04_company/group/sp/")
- }
- >
-
- JR四国のお店・サービス
-
-
- JR四国グループの施設をご案内
-
-
-
- Linking.openURL("https://www.jr-odekake.net/smt/")}
- >
-
- 時刻・運賃計算
-
-
- (マイ・ダイヤ)
-
-
-
- マイ・ダイヤはJR西日本提供のサービスです。
-
-
- Linking.openURL("tel:0570-00-4592")}
- >
-
- JR四国案内センター
-
-
- 0570-00-4592
- (8:00~20:00 年中無休)
- (通話料がかかります)
-
-
-
-
-
-
- JR四国公式Twitter一族
-
-
-
- {((data) =>
- data.map((d) => (
- Linking.openURL(d.url)}>
- {d.name}
-
-
-
- )))([
- {
- url: "https://twitter.com/JRshikoku_eigyo",
- name: "JR四国営業部【公式】",
- },
- {
- url: "https://twitter.com/JRshikoku_tokyo",
- name: "JR四国 東京営業情報【公式】",
- },
- {
- url: "https://twitter.com/JRshikoku_osaka",
- name: "JR四国 大阪営業部【公式】",
- },
- {
- url: "https://twitter.com/jr_shikoku_info",
- name: "JR四国列車運行情報【公式】",
- },
- {
- url: "https://twitter.com/Smile_Eki_Chan",
- name: "すまいるえきちゃん♡JR四国【公式】",
- },
- {
- url: "https://twitter.com/jrs_matsuyama",
- name: "JR四国 松山駅 【公式】",
- },
- {
- url: "https://twitter.com/jrshikoku_kochi",
- name: "JR四国 高知駅【公式】",
- },
- {
- url: "https://twitter.com/jr_tokust",
- name: "JR四国 徳島駅【公式】",
- },
- {
- url: "https://twitter.com/jrshikoku_uwjm",
- name: "JR四国 宇和島駅【公式】",
- },
- {
- url: "https://twitter.com/JRshikoku_wkoch",
- name: "JR四国 ワープ高知支店【公式】",
- },
- {
- url: "https://twitter.com/jrshikoku_nihaw",
- name: "JR四国 ワープ新居浜営業所【公式】",
- },
- {
- url: "https://twitter.com/Yoakemonogatari",
- name: "志国土佐 時代の夜明けのものがたり【公式】",
- },
- ])}
-
-
-
- このアプリについて
-
-
- このアプリはXprocess(HARUKIN)が製作しているJR四国の完全非公式アシストアプリケーションです。このアプリに関することでのJR四国公式へ問合せすることはお控えください。以下のTwitterよりお願いします。
-
-
- Linking.openURL("https://twitter.com/Xprocess_main")
- }
- >
-
- XprocessのTwitter
-
-
- 制作運営のTwitterです。
-
-
- navigate("setting")}
- >
-
- アプリの設定
-
-
- アプリの設定画面を表示します。
-
-
- {/*
- */}
+
+
{
size={30}
style={{ margin: 5 }}
onPress={() => {
- LayoutAnimation.easeInEaseOut();
setLoadingDelayData(true);
}}
/>
@@ -634,3 +393,311 @@ const JRSTraInfoBox = (props) => {
);
};
+
+const FixedContentTop = (props) => {
+ return (
+ <>
+
+
+ Linking.openURL(
+ "https://www.jr-shikoku.co.jp/02_information/suspension/sp/"
+ )
+ }
+ >
+
+ 新型コロナウイルスに関するお知らせ
+
+
+ 列車の運行計画・混雑状況・感染症対策への取り組み
+
+
+ >
+ );
+};
+const FixedContentBottom = (props) => {
+ return (
+ <>
+ {props.children}
+
+
+ }
+ flex={1}
+ onPressButton={() =>
+ Linking.openURL("https://www.jr-eki.com/ticket/brand")
+ }
+ >
+ トクトク切符
+
+ }
+ flex={1}
+ onPressButton={() =>
+ Linking.openURL(
+ "https://www.jr-shikoku.co.jp/01_trainbus/event_train/sp/"
+ )
+ }
+ >
+ 観光列車
+
+ }
+ flex={1}
+ onPressButton={() =>
+ Linking.openURL("https://www.jr-eki.com/tour/brand")
+ }
+ >
+ 旅行ツアー
+
+
+
+ Linking.openURL("https://www.jr-eki.com/smart-eki/index.html")
+ }
+ >
+
+ スマートえきちゃん
+
+
+ JR四国のチケットレススマホアプリです。
+
+
+
+ Linking.openURL("https://www.jr-shikoku.co.jp/sp/index.html#menu-box")
+ }
+ >
+
+ 臨時列車などのお知らせ
+
+
+ 区間縮小・計画運休・イベント・季節臨時列車など
+
+
+
+ Linking.openURL("https://www.jr-shikoku.co.jp/03_news/press/")
+ }
+ >
+
+ ニュースリリース
+
+
+ 公式プレス記事はこちら
+
+
+
+ Linking.openURL("https://www.jr-shikoku.co.jp/teiki/")
+ }
+ >
+
+ 定期運賃計算
+
+
+ 通常/学生/快て〜き等はこちら
+
+
+
+ Linking.openURL("https://www.jr-shikoku.co.jp/04_company/group/sp/")
+ }
+ >
+
+ JR四国のお店・サービス
+
+
+ JR四国グループの施設をご案内
+
+
+
+ Linking.openURL("https://www.jr-odekake.net/smt/")}
+ >
+
+ 時刻・運賃計算
+
+
+ (マイ・ダイヤ)
+
+
+
+ マイ・ダイヤはJR西日本提供のサービスです。
+
+
+ Linking.openURL("tel:0570-00-4592")}
+ >
+
+ JR四国案内センター
+
+
+ 0570-00-4592
+ (8:00~20:00 年中無休)
+ (通話料がかかります)
+
+
+
+
+
+
+ JR四国公式Twitter一族
+
+
+
+ {((data) =>
+ data.map((d) => (
+ Linking.openURL(d.url)}>
+ {d.name}
+
+
+
+ )))([
+ {
+ url: "https://twitter.com/JRshikoku_eigyo",
+ name: "JR四国営業部【公式】",
+ },
+ {
+ url: "https://twitter.com/JRshikoku_tokyo",
+ name: "JR四国 東京営業情報【公式】",
+ },
+ {
+ url: "https://twitter.com/JRshikoku_osaka",
+ name: "JR四国 大阪営業部【公式】",
+ },
+ {
+ url: "https://twitter.com/jr_shikoku_info",
+ name: "JR四国列車運行情報【公式】",
+ },
+ {
+ url: "https://twitter.com/Smile_Eki_Chan",
+ name: "すまいるえきちゃん♡JR四国【公式】",
+ },
+ {
+ url: "https://twitter.com/jrs_matsuyama",
+ name: "JR四国 松山駅 【公式】",
+ },
+ {
+ url: "https://twitter.com/jrshikoku_kochi",
+ name: "JR四国 高知駅【公式】",
+ },
+ {
+ url: "https://twitter.com/jr_tokust",
+ name: "JR四国 徳島駅【公式】",
+ },
+ {
+ url: "https://twitter.com/jrshikoku_uwjm",
+ name: "JR四国 宇和島駅【公式】",
+ },
+ {
+ url: "https://twitter.com/JRshikoku_wkoch",
+ name: "JR四国 ワープ高知支店【公式】",
+ },
+ {
+ url: "https://twitter.com/jrshikoku_nihaw",
+ name: "JR四国 ワープ新居浜営業所【公式】",
+ },
+ {
+ url: "https://twitter.com/Yoakemonogatari",
+ name: "志国土佐 時代の夜明けのものがたり【公式】",
+ },
+ ])}
+
+
+
+ このアプリについて
+
+
+ このアプリはXprocess(HARUKIN)が製作しているJR四国の完全非公式アシストアプリケーションです。このアプリに関することでのJR四国公式へ問合せすることはお控えください。以下のTwitterよりお願いします。
+
+
+ Linking.openURL("https://twitter.com/Xprocess_main")
+ }
+ >
+
+ XprocessのTwitter
+
+
+ 制作運営のTwitterです。
+
+
+ props.navigate("setting")}
+ >
+
+ アプリの設定
+
+
+ アプリの設定画面を表示します。
+
+
+ {/*
+ */}
+ >
+ );
+};
diff --git a/package.json b/package.json
index e2f03d7..5da9120 100644
--- a/package.json
+++ b/package.json
@@ -36,6 +36,7 @@
"react-native-router-flux": "^4.3.1",
"react-native-safe-area-context": "4.5.0",
"react-native-screens": "~3.20.0",
+ "react-native-snap-carousel": "^3.9.1",
"react-native-storage": "^1.0.1",
"react-native-svg": "13.4.0",
"react-native-svg-uri": "^1.2.3",
diff --git a/trainbaseview.js b/trainbaseview.js
index 793bf9d..7486fd9 100644
--- a/trainbaseview.js
+++ b/trainbaseview.js
@@ -12,7 +12,6 @@ import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
export default function TrainBase({ route, navigation }) {
const { info, from } = route.params;
const { navigate } = navigation;
- console.log(info);
const webview = useRef();
const jss = `document.getElementById('Footer').style.display = 'none';
${
diff --git a/yarn.lock b/yarn.lock
index eb4b9b5..25d85d1 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3614,6 +3614,11 @@ core-js@3.6.5:
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a"
integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==
+core-js@^1.0.0:
+ version "1.2.7"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
+ integrity sha512-ZiPp9pZlgxpWRu0M+YWbm6+aQ84XEfH1JRXvfOc/fILWI0VKhLC2LX13X1NYq4fULzLMq7Hfh43CSo2/aIaUPA==
+
core-js@^2.4.0:
version "2.6.12"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
@@ -4386,6 +4391,19 @@ fbjs-css-vars@^1.0.0:
resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8"
integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==
+fbjs@^0.8.4:
+ version "0.8.18"
+ resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.18.tgz#9835e0addb9aca2eff53295cd79ca1cfc7c9662a"
+ integrity sha512-EQaWFK+fEPSoibjNy8IxUtaFOMXcWsY0JaVrQoZR9zC8N2Ygf9iDITPWjUTVIax95b6I742JFLqASHfsag/vKA==
+ dependencies:
+ core-js "^1.0.0"
+ isomorphic-fetch "^2.1.1"
+ loose-envify "^1.0.0"
+ object-assign "^4.1.0"
+ promise "^7.1.1"
+ setimmediate "^1.0.5"
+ ua-parser-js "^0.7.30"
+
fbjs@^3.0.0:
version "3.0.4"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.4.tgz#e1871c6bd3083bac71ff2da868ad5067d37716c6"
@@ -5408,6 +5426,14 @@ isobject@^3.0.0, isobject@^3.0.1:
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==
+isomorphic-fetch@^2.1.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
+ integrity sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA==
+ dependencies:
+ node-fetch "^1.0.1"
+ whatwg-fetch ">=0.10.0"
+
isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
@@ -6834,6 +6860,14 @@ node-fetch@2.6.7:
dependencies:
whatwg-url "^5.0.0"
+node-fetch@^1.0.1:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
+ integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==
+ dependencies:
+ encoding "^0.1.11"
+ is-stream "^1.0.1"
+
node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7:
version "2.6.9"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6"
@@ -7644,7 +7678,7 @@ promzard@^0.3.0:
dependencies:
read "1"
-prop-types@*, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2:
+prop-types@*, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
@@ -7806,6 +7840,14 @@ rc@~1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
+react-addons-shallow-compare@15.6.2:
+ version "15.6.2"
+ resolved "https://registry.yarnpkg.com/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.2.tgz#198a00b91fc37623db64a28fd17b596ba362702f"
+ integrity sha512-yAV9tOObmKPiohqne1jiMcx6kDjfz7GeL8K9KHgI+HvDsbrRv148uyUzrPc6GwepZnQcJ59Q3lp1ghrkyPwtjg==
+ dependencies:
+ fbjs "^0.8.4"
+ object-assign "^4.1.0"
+
react-devtools-core@^4.26.1:
version "4.27.2"
resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.27.2.tgz#d20fc57e258c656eedabafc2c851d38b33583148"
@@ -7997,6 +8039,14 @@ react-native-size-matters@^0.3.1:
resolved "https://registry.yarnpkg.com/react-native-size-matters/-/react-native-size-matters-0.3.1.tgz#24d0cfc335a2c730f6d58bd7b43ea5a41be4b49f"
integrity sha512-mKOfBLIBFBcs9br1rlZDvxD5+mAl8Gfr5CounwJtxI6Z82rGrMO+Kgl9EIg3RMVf3G855a85YVqHJL2f5EDRlw==
+react-native-snap-carousel@^3.9.1:
+ version "3.9.1"
+ resolved "https://registry.yarnpkg.com/react-native-snap-carousel/-/react-native-snap-carousel-3.9.1.tgz#6fd9bd8839546c2c6043a41d2035afbc6fe0443e"
+ integrity sha512-xWEGusacIgK1YaDXLi7Gao2+ISLoGPVEBR8fcMf4tOOJQufutlNwkoLu0l6B8Qgsrre0nTxoVZikRgGRDWlLaQ==
+ dependencies:
+ prop-types "^15.6.1"
+ react-addons-shallow-compare "15.6.2"
+
react-native-storage@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/react-native-storage/-/react-native-storage-1.0.1.tgz#2c493875ff76ec301987c951a8302f3a54381241"
@@ -9644,7 +9694,7 @@ whatwg-fetch@2.0.4:
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"
integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng==
-whatwg-fetch@^3.0.0:
+whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0:
version "3.6.2"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c"
integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA==