diff --git a/components/Menu/FixedContentBottom.js b/components/Menu/FixedContentBottom.js
new file mode 100644
index 0000000..f7c2bc0
--- /dev/null
+++ b/components/Menu/FixedContentBottom.js
@@ -0,0 +1,314 @@
+import { Linking, Text, View, TouchableOpacity } from "react-native";
+import {
+ Foundation,
+ FontAwesome,
+ Ionicons,
+ MaterialCommunityIcons,
+} from "@expo/vector-icons";
+import Icon from "react-native-vector-icons/Entypo";
+import { TextBox } from "../atom/TextBox";
+import { TicketBox } from "../atom/TicketBox";
+import { ListItem } from "native-base";
+
+export 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一族
+
+
+
+ {[
+ {
+ url: "https://twitter.com/jr_shikoku_info",
+ name: "JR四国列車運行情報",
+ },
+
+ {
+ 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/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_wkama",
+ name: "JR四国 ワープ高松支店【公式】",
+ },
+ {
+ url: "https://twitter.com/JRshikoku_wkoch",
+ name: "JR四国 ワープ高知支店【公式】",
+ },
+ {
+ url: "https://twitter.com/Yoakemonogatari",
+ name: "志国土佐 時代の夜明けのものがたり【公式】",
+ },
+ {
+ url: "https://twitter.com/Smile_Eki_Chan",
+ name: "すまいるえきちゃん♡JR四国【公式】",
+ },
+ {
+ url: "https://twitter.com/sper_ponchan",
+ name: "しこくたぬきのぽんちゃん 【四国家サポーターズクラブ】",
+ },
+ ].map((d) => (
+ Linking.openURL(d.url)}>
+ {d.name}
+
+
+
+ ))}
+
+
+ 上級者向け機能
+ props.navigate("AllTrainIDList")}
+ >
+
+ 列番探索
+
+
+ データベースに存在する全列車のダイヤを探索
+
+
+
+ このアプリについて
+
+
+ このアプリはXprocess(HARUKIN)が製作しているJR四国の完全非公式アシストアプリケーションです。このアプリに関することでのJR四国公式へ問合せすることはお控えください。以下のTwitterよりお願いします。
+
+
+
+ Linking.openURL("https://twitter.com/Xprocess_main")
+ }
+ >
+
+ XprocessのTwitter
+
+
+ 制作運営のTwitterです。
+
+
+ props.navigate("setting")}
+ >
+
+ アプリの設定
+
+
+ アプリの設定画面を表示します。
+
+
+ {/*
+ */}
+ >
+ );
+};
diff --git a/components/Menu/TitleBar.js b/components/Menu/TitleBar.js
new file mode 100644
index 0000000..e8672a6
--- /dev/null
+++ b/components/Menu/TitleBar.js
@@ -0,0 +1,19 @@
+import { View, TouchableOpacity, Linking } from "react-native";
+import AutoHeightImage from "react-native-auto-height-image";
+import { widthPercentageToDP as wp } from "react-native-responsive-screen";
+
+export const TitleBar = () => {
+ return (
+
+ Linking.openURL("https://www.jr-shikoku.co.jp")}
+ >
+
+
+
+ );
+};
diff --git a/menu.js b/menu.js
index 89a87f9..1606d78 100644
--- a/menu.js
+++ b/menu.js
@@ -1,4 +1,4 @@
-import React, { useRef, useState, useEffect, useLayoutEffect } from "react";
+import React, { useRef, useState, useEffect } from "react";
import Carousel from "react-native-snap-carousel";
import {
Platform,
@@ -9,28 +9,20 @@ import {
TouchableOpacity,
} from "react-native";
import Constants from "expo-constants";
-import { ListItem } from "native-base";
-import Icon from "react-native-vector-icons/Entypo";
import * as Location from "expo-location";
import StatusbarDetect from "./StatusbarDetect";
-import AutoHeightImage from "react-native-auto-height-image";
import { widthPercentageToDP as wp } from "react-native-responsive-screen";
-import {
- FontAwesome,
- Foundation,
- Ionicons,
- MaterialCommunityIcons,
-} from "@expo/vector-icons";
+import { Ionicons } from "@expo/vector-icons";
import LottieView from "lottie-react-native";
import { parseAllTrainDiagram } from "./lib/parseAllTrainDiagram";
import trainList from "./assets/originData/trainList";
import LED_vision from "./components/発車時刻表/LED_vidion";
import Sign from "./components/駅名表/Sign";
+import { TitleBar } from "./components/Menu/TitleBar";
+import { FixedContentBottom } from "./components/Menu/FixedContentBottom";
import { UsefulBox } from "./components/atom/UsefulBox";
-import { TicketBox } from "./components/atom/TicketBox";
-import { TextBox } from "./components/atom/TextBox";
import { getStationList, lineList } from "./lib/getStationList";
import useInterval from "./lib/useInterval";
import { HeaderConfig } from "./lib/HeaderConfig";
@@ -146,30 +138,6 @@ export default function Menu({ getCurrentTrain }) {
setTrainDiagram(trainList);
});
}, []);
-
- const openStationACFromEachTrainInfo = () => {
- // EachTrainInfoAsSR.current?.hide();
- // const findStationEachLine = (selectLine) => {
- // let NearStation = selectLine.filter((d) => d.Station_JP == stationName);
- // 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);
- // sleep(30, function () {
- // StationBoardAcSR.current?.show();
- // });
- // } else {
- // setStationBoardData(undefined);
- // StationBoardAcSR.current?.hide();
- // }
- };
return (
-
+
{originalStationList.length != 0 && allStationData.length != 0 && (
{}}
/>
)}
@@ -252,22 +220,6 @@ export default function Menu({ getCurrentTrain }) {
);
}
-const TitleBar = () => {
- return (
-
- Linking.openURL("https://www.jr-shikoku.co.jp")}
- >
-
-
-
- );
-};
-
const TopMenuButton = () => {
const buttonList = [
{
@@ -416,313 +368,3 @@ const JRSTraInfoBox = () => {
);
};
-
-const FixedContentTop = () => {
- return (
- <>
-
- >
- );
-};
-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一族
-
-
-
- {[
- {
- url: "https://twitter.com/jr_shikoku_info",
- name: "JR四国列車運行情報",
- },
-
- {
- 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/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_wkama",
- name: "JR四国 ワープ高松支店【公式】",
- },
- {
- url: "https://twitter.com/JRshikoku_wkoch",
- name: "JR四国 ワープ高知支店【公式】",
- },
- {
- url: "https://twitter.com/Yoakemonogatari",
- name: "志国土佐 時代の夜明けのものがたり【公式】",
- },
- {
- url: "https://twitter.com/Smile_Eki_Chan",
- name: "すまいるえきちゃん♡JR四国【公式】",
- },
- {
- url: "https://twitter.com/sper_ponchan",
- name: "しこくたぬきのぽんちゃん 【四国家サポーターズクラブ】",
- },
- ].map((d) => (
- Linking.openURL(d.url)}>
- {d.name}
-
-
-
- ))}
-
-
- 上級者向け機能
- props.navigate("AllTrainIDList")}
- >
-
- 列番探索
-
-
- データベースに存在する全列車のダイヤを探索
-
-
-
- このアプリについて
-
-
- このアプリはXprocess(HARUKIN)が製作しているJR四国の完全非公式アシストアプリケーションです。このアプリに関することでのJR四国公式へ問合せすることはお控えください。以下のTwitterよりお願いします。
-
-
-
- Linking.openURL("https://twitter.com/Xprocess_main")
- }
- >
-
- XprocessのTwitter
-
-
- 制作運営のTwitterです。
-
-
- props.navigate("setting")}
- >
-
- アプリの設定
-
-
- アプリの設定画面を表示します。
-
-
- {/*
- */}
- >
- );
-};
diff --git a/ndView.js b/ndView.js
index 0010ba7..a492387 100644
--- a/ndView.js
+++ b/ndView.js
@@ -5,7 +5,10 @@ import Constants from "expo-constants";
import { Ionicons } from "@expo/vector-icons";
export default function tndView() {
const webview = useRef();
- const [LoadError, setLoadError] = useState(false);
+ const jsa = `
+ document.querySelector('.sitettl').style.display = 'none';
+ document.querySelector('.attention').style.display = 'none';
+ `;
return (
{
- //webViewの再読み込みを行う
- this.webView.reload();
- }}
+ onError={() => this.webView?.reload()}
/>
webview.current.reload()}
+ onPress={() => webview.current?.reload()}
top={Platform.OS == "ios" ? Constants.statusBarHeight : 0}
- LoadError={LoadError}
/>
);
}
-const jsa = `
-document.querySelector('.sitettl').style.display = 'none';
-document.querySelector('.attention').style.display = 'none';
-`;
const ReloadButton = ({ onPress, top, mapSwitch, LoadError = false }) => {
const styles = {
- touch: {
- position: "absolute",
- top,
- right: 10,
- width: 50,
- height: 50,
- backgroundColor: LoadError ? "red" : "#0099CC",
- borderColor: "white",
- borderStyle: "solid",
- borderWidth: 1,
- borderRadius: 50,
- alignContent: "center",
- alignSelf: "center",
- alignItems: "center",
- display: mapSwitch,
- },
- text: {
- textAlign: "center",
- width: "auto",
- height: "auto",
- textAlignVertical: "center",
- fontWeight: "bold",
- color: "white",
- },
+ position: "absolute",
+ top,
+ right: 10,
+ width: 50,
+ height: 50,
+ backgroundColor: LoadError ? "red" : "#0099CC",
+ borderColor: "white",
+ borderStyle: "solid",
+ borderWidth: 1,
+ borderRadius: 50,
+ alignContent: "center",
+ alignSelf: "center",
+ alignItems: "center",
+ display: mapSwitch,
};
return (
-
+