expoSDKを最新版に更新、Ver.4.0

This commit is contained in:
mukai haruki 2021-06-26 02:48:27 +09:00
parent 9442a59feb
commit 4833b57c52
7 changed files with 3216 additions and 3926 deletions

215
Apps.js
View File

@ -18,6 +18,7 @@ export default function Apps ({ navigation: { navigate } }) {
mixedContentMode={'compatibility'}
javaScriptEnabled={true}
allowsBackForwardNavigationGestures={true}
setSupportMultipleWindows={false}
onNavigationStateChange={
event =>{
console.log(event);
@ -37,96 +38,144 @@ export default function Apps ({ navigation: { navigate } }) {
}
}
}
injectedJavaScript={js}/>
onMessage={(event)=>{}}
injectedJavaScript={INJECTED_JAVASCRIPT}/>
</View>
);
}
const js = `
var observer = new MutationObserver(function(){
const INJECTED_JAVASCRIPT = `
var observer = new MutationObserver(function(){
console.log(elem);
});
const elem = document.querySelector('#modal_content');
console.log(elem);
});
const elem = document.querySelector('#modal_content');
console.log(elem);
const config = {
attributes: true,
childList: true,
characterData: true
};
observer.observe(elem, config);
document.getElementById('headerStr').style.display = 'none';
document.getElementById('modal_info').style.display = 'none';
document.getElementById('header').style.height = '50px';
document.getElementById('main').style.paddingTop = '54px';
document.querySelector('#header a').style.display = 'none';
after();
const config = {
attributes: true,
childList: true,
characterData: true
};
function after(){
try {
document.getElementById('refreshIcon').click();
var elements = document.querySelectorAll('[onclick]');
for (var index = 0; index < elements.length; index++) {
var element = elements[index];
if(element.getAttribute('onclick').indexOf('ShowTrainTimeInfo') != -1){
var test = element.getElementsByTagName("p");
var test3 = element.getAttribute('onclick').split('"');
var HTrain = "\\n試運転";
var RTrain = "\\n回送";
var STrain = "\\n臨時列車";
var WTrain = "ワンマン\\n";
var = "(海経由)";
var = "(内子経由)";
var reg1 = new RegExp(/^4[1-9]\\d\\d[DM]$/);
var reg2 = new RegExp(/^5[1-9]\\d\\d[DM]$/);
var 海1 = new RegExp(/^49[0-4]\\dD$/);
var 海2 = new RegExp(/^9[0-4]\\dD$/);
var 内1 = new RegExp(/^46\\d\\dD$/);
var 内2 = new RegExp(/^6\\d\\dD$/);
var flag=false;
test[0].innerText = test[0].innerText+test3[1];
if(reg1.test(test3[1]) || reg2.test(test3[1])){
test[0].innerText = WTrain+test[0].innerText;
flag=true;
}
if(海1.test(test3[1]) || 海2.test(test3[1])){
test[0].innerText = +(flag ? "" : "\\n")+test[0].innerText;
}
if(内1.test(test3[1]) || 内2.test(test3[1])){
test[0].innerText = +(flag ? "" : "\\n")+test[0].innerText;
}
if(test3[1].indexOf("H") != -1){
test[0].innerText = test[0].innerText+HTrain;
}
else if(test3[1].indexOf("R") != -1){
test[0].innerText = test[0].innerText+RTrain;
}
else if(test3[1].indexOf("S") != -1){
test[0].innerText = test[0].innerText+STrain;
observer.observe(elem, config);
document.getElementById('headerStr').style.display = 'none';
document.getElementById('modal_info').style.display = 'none';
document.getElementById('header').style.height = '50px';
document.getElementById('main').style.paddingTop = '54px';
document.querySelector('#header a').style.display = 'none';
after();
function after(){
try {
document.getElementById('refreshIcon').click();
var elements = document.querySelectorAll('[onclick]');
for (var index = 0; index < elements.length; index++) {
var element = elements[index];
if(element.getAttribute('onclick').indexOf('ShowTrainTimeInfo') != -1){
var test = element.getElementsByTagName("p");
var test3 = element.getAttribute('onclick').split('"');
var HTrain = "\\n試運転";
var RTrain = "\\n回送";
var STrain = "\\n臨時列車";
var WTrain = "ワンマン\\n";
var = "(海経由)";
var = "(内子経由)";
var reg1 = new RegExp(/^4[1-9]\\d\\d[DM]$/);
var reg2 = new RegExp(/^5[1-9]\\d\\d[DM]$/);
var 海1 = new RegExp(/^49[0-4]\\dD$/);
var 海2 = new RegExp(/^9[0-4]\\dD$/);
var 内1 = new RegExp(/^46\\d\\dD$/);
var 内2 = new RegExp(/^6\\d\\dD$/);
var flag=false;
var TrainType = undefined;
console.log(test3[1]);
test[0].innerText = test[0].innerText+test3[1];
if(reg1.test(test3[1]) || reg2.test(test3[1])){
test[0].innerText = WTrain+test[0].innerText;
flag=true;
}
if(海1.test(test3[1]) || 海2.test(test3[1])){
test[0].innerText = +(flag ? "" : "\\n")+test[0].innerText;
}
if(内1.test(test3[1]) || 内2.test(test3[1])){
test[0].innerText = +(flag ? "" : "\\n")+test[0].innerText;
}
if(test3[1].indexOf("H") != -1){
test[0].innerText = test[0].innerText+HTrain;
}
else if(test3[1].indexOf("R") != -1){
test[0].innerText = test[0].innerText+RTrain;
}
else if(test3[1].indexOf("S") != -1){
test[0].innerText = test[0].innerText+STrain;
}
switch(test3[1]){
case "75":
case "71":
TrainType = "東京(タ)→高松(タ)→新居浜"
break;
case "73":
TrainType = "東京(タ)→高松(タ)→松山貨物"
break;
case "3079":
TrainType = "高松(タ)→伊予三島"
break;
case "3071":
case "3077":
TrainType = "高松(タ)→新居浜"
break;
case "3073":
TrainType = "高松(タ)→松山貨物"
break;
case "70":
TrainType = "高松(タ)→東京(タ)"
break;
case "74":
TrainType = "高松(タ)→吹田(タ)"
break;
case "76":
TrainType = "高松(タ)→大阪(タ)"
break;
case "3078":
TrainType = "伊予三島→大阪(タ)"
break;
case "3070":
case "9070":
TrainType = "新居浜→東京(タ)"
break;
case "3076":
TrainType = "新居浜→大阪(タ)"
break;
case "3072":
TrainType = "松山貨物→大阪(タ)"
break;
}
if(TrainType){
test[0].innerText = TrainType+"\\n"+test[0].innerText;
}
}
}
try{
document.querySelector('#pMENU_2').style.borderStyle='solid';
document.querySelector('#pMENU_2').style.borderColor='#00d3e8';
document.querySelector('#pMENU_2').style.borderWidth='2px';
document.querySelector('#pMENU_2').style.borderRadius='10%';
document.querySelector('#pMENU_3').style.borderStyle='solid';
document.querySelector('#pMENU_3').style.borderColor='#00d3e8';
document.querySelector('#pMENU_3').style.borderWidth='2px';
document.querySelector('#pMENU_3').style.borderRadius='10%';
document.querySelectorAll('#pMENU_2 div').forEach((d)=>{
d.style.padding = '10px';
});
document.querySelectorAll('#pMENU_3 div').forEach((d)=>{
d.style.padding = '10px';
});
}catch(e){
alert("にゃー");
}
} catch (e) {
}
try{
document.querySelector('#pMENU_2').style.borderStyle='solid';
document.querySelector('#pMENU_2').style.borderColor='#00d3e8';
document.querySelector('#pMENU_2').style.borderWidth='2px';
document.querySelector('#pMENU_2').style.borderRadius='10%';
document.querySelector('#pMENU_3').style.borderStyle='solid';
document.querySelector('#pMENU_3').style.borderColor='#00d3e8';
document.querySelector('#pMENU_3').style.borderWidth='2px';
document.querySelector('#pMENU_3').style.borderRadius='10%';
document.querySelectorAll('#pMENU_2 div').forEach((d)=>{
d.style.padding = '10px';
});
document.querySelectorAll('#pMENU_3 div').forEach((d)=>{
d.style.padding = '10px';
});
}catch(e){
alert("にゃー");
}
} catch (e) {
setTimeout(after, 10000);
}
setTimeout(after, 10000);
}
`;

View File

@ -7,7 +7,7 @@
"ios",
"android"
],
"version": "3.1",
"version": "4.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
@ -22,13 +22,13 @@
"**/*"
],
"ios": {
"buildNumber": "13",
"buildNumber": "15",
"supportsTablet": true,
"bundleIdentifier": "jrshikokuinfo.xprocess.hrkn"
},
"android": {
"package": "jrshikokuinfo.xprocess.hrkn",
"versionCode": 10,
"versionCode": 11,
"permissions": [],
"googleServicesFile": "./google-services.json"
}

File diff suppressed because one or more lines are too long

BIN
assets/Header.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

292
menu.js
View File

@ -1,49 +1,281 @@
import React, { Component } from 'react';
import {StatusBar,View,ScrollView,Linking,Text } from 'react-native';
import React, { Component, useRef, useState, useEffect } from 'react';
import {StatusBar,View,LayoutAnimation,ScrollView,Linking,Text,TouchableOpacity } from 'react-native';
import Constants from 'expo-constants';
import { ListItem } from 'react-native-elements';
import { List, ListItem } from 'native-base';
import Icon from 'react-native-vector-icons/Entypo';
import StatusbarDetect from './StatusbarDetect';
var Status = StatusbarDetect();
import { useNavigation } from '@react-navigation/native';
import AutoHeightImage from 'react-native-auto-height-image';
import {widthPercentageToDP as wp, heightPercentageToDP as hp} from 'react-native-responsive-screen';
import { FontAwesome, Fontisto, Foundation, Ionicons, MaterialCommunityIcons } from '@expo/vector-icons';
import * as WebBrowser from 'expo-web-browser';
import ActionSheet from "react-native-actions-sheet";
import LottieView from 'lottie-react-native';
export default function(props) {
const navigation = useNavigation();
return <Menu {...props} navigation={navigation} />;
}
export class Menu extends React.Component {
constructor(props){
super(props);
this.state={
count:0,
}
export function Menu(props) {
const actionSheetRef = useRef(null);
const _handlePressButtonAsync = async (link) => {
let result = await WebBrowser.openBrowserAsync(link);
};
const LottieRef = useRef(null);
const LottieRef2 = useRef(null);
const [count,setCount] =useState(0);
const [delayData,setDelayData] = useState(undefined);
const [getTime,setGetTime] = useState(new Date());
const [loadingDelayData,setLoadingDelayData] = useState(true);
delayData === undefined ? doFetch() : null;
function doFetch(){
fetch("https://script.google.com/macros/s/AKfycbyKxch7z7l8e07LXulRHqxjVoIiB13kcgvoToLE-rqlxLmLSKdlmqz0FI1F2EuA7Zfg/exec")
.then(response => response.text())
.then(data => {if(data != ""){setDelayData(data.split("^"))}else setDelayData(null)})
.then(data => LayoutAnimation.easeInEaseOut())
.then(()=>setGetTime(new Date()))
.finally(()=>setLoadingDelayData(false));
}
render() {
const { navigation } = this.props;
useEffect(()=>{
try{
LottieRef?.current.play();
LottieRef2?.current.play();
}catch(e){}
})
const { navigation } = props;
return (
<View style={{height:"100%",paddingTop: Constants.statusBarHeight,}}>
<View style={{height:"100%",paddingTop: Constants.statusBarHeight,backgroundColor:"white"}}>
{Status}
<View style={{alignItems:"center"}}>
<TouchableOpacity onPress={()=>Linking.openURL("https://www.jr-shikoku.co.jp")}>
<AutoHeightImage source={require("./assets/Header.png")} resizeMode='contain' width={wp("100%")}/>
</TouchableOpacity>
</View>
<ScrollView>
<Text>JR四国</Text>
<ListItem title={"JR四国サイトトップ"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="globe" size={20} />} onPress={()=>Linking.openURL("https://www.jr-shikoku.co.jp")}/>
<ListItem title={"コロナウイルスに関するお知らせ"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="new" size={20} />} onPress={()=>Linking.openURL("http://www.jr-shikoku.co.jp/02_information/suspension/index.html")}/>
<ListItem title={"駅/鉄道情報"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="map" size={20} />} onPress={()=>Linking.openURL("https://www.jr-shikoku.co.jp/01_trainbus/sp/")}/>
<ListItem title={"列車空席案内(サイバーステーション)"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="browser" size={20} />} onPress={()=>Linking.openURL("http://www.jr.cyberstation.ne.jp/")}/>
<ListItem title={"JR四国 東京営業情報【公式】"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="twitter" size={20} />} onPress={()=>Linking.openURL("https://twitter.com/JRshikoku_tokyo")}/>
<ListItem title={"JR四国運行情報Twitter"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="twitter" size={20} />} onPress={()=>Linking.openURL("https://twitter.com/jr_shikoku_info")}/>
<ListItem title={"JR四国いそうろう妖精 すまいるえきちゃん♡【公式】"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="twitter" size={20} />} onPress={()=>Linking.openURL("https://twitter.com/Smile_Eki_Chan")}/>
<ListItem title={"JR四国デザインPT♡"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="twitter" size={20} />} onPress={()=>Linking.openURL("https://twitter.com/JR_Shikoku_DPT")}/>
<ListItem title={"JR四国デザインPT弐号◇"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="twitter" size={20} />} onPress={()=>Linking.openURL("https://twitter.com/PT2nd_Yuki")}/>
<View style={{flexDirection:"row"}}>
<TouchableOpacity style={{flex:1,backgroundColor:"#F89038",padding:10,alignItems:"center",margin:2}} onPress={()=>_handlePressButtonAsync("https://www.jr-shikoku.co.jp/01_trainbus/sp/")}>
<MaterialCommunityIcons name="train-car" color="white" size={50}/>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>鉄道情報</Text>
</TouchableOpacity>
<TouchableOpacity style={{flex:1,backgroundColor:"#EA4752",padding:10,alignItems:"center",margin:2}} onPress={()=>_handlePressButtonAsync("https://www.jr-shikoku.co.jp/01_trainbus/jikoku/sp/#mainprice-box")}>
<MaterialCommunityIcons name="google-spreadsheet" color="white" size={50}/>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>運賃表</Text>
</TouchableOpacity>
<TouchableOpacity style={{flex:1,backgroundColor:"#91C31F",padding:10,alignItems:"center",margin:2}} onPress={()=>_handlePressButtonAsync("https://www.jr-shikoku.co.jp/e5489/")}>
<MaterialCommunityIcons name="clipboard-list-outline" color="white" size={50}/>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>予約(e5489)</Text>
</TouchableOpacity>
</View>
<TouchableOpacity style={{flex:1,backgroundColor:"#0099CC",padding:10,height:70,alignItems:"center",alignContent:"center",margin:2}} onPress={()=>_handlePressButtonAsync("https://www.jr-shikoku.co.jp/02_information/suspension/sp/")}>
<View style={{flex:1}} />
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>新型コロナウイルスに関するお知らせ</Text>
<Text style={{color:"white",fontSize:18}}>列車の運行計画混雑状況感染症対策への取り組み</Text>
<View style={{flex:1}} />
</TouchableOpacity>
<TouchableOpacity /* onPress={()=>alert("まだうごかないよ〜♡ごめんね!!")} */ onPress={() => {actionSheetRef.current?.setModalVisible()}}>
<View style={{backgroundColor:"#0099CC",borderRadius:5,margin:5,borderColor:"black",borderWidth:2,overflow:"hidden"}}>
<ScrollView scrollEnabled={false} style={{backgroundColor:"#0099CC",borderRadius:5,maxHeight:300,}}>
<View style={{padding:10,flexDirection:"row",alignItems:"center"}}>
<Text style={{fontSize:30,fontWeight:"bold",color:"white"}}>列車遅延速報EX</Text>
<View style={{flex:1}} />
{/* <TouchableOpacity style={{padding:10,backgroundColor:"white",alignContent:"center"}} onPress={() => {doFetch()}}>
<Text style={{fontSize:20,fontWeight:"bold",color:"#0099CC"}}>最新の情報へ更新</Text>
</TouchableOpacity> */}
<Text style={{fontSize:30,fontWeight:"bold",color:"white"}}>{getTime ? getTime.toLocaleTimeString('ja-JP').split(":")[0]+":"+getTime.toLocaleTimeString('ja-JP').split(":")[1]: NaN}</Text>
<Ionicons name="reload" color="white" size={30} style={{margin:5}} onPress={() => {LayoutAnimation.easeInEaseOut(),setLoadingDelayData(true),doFetch()}}/>
</View>
<View style={{padding:10,backgroundColor:"white",borderBottomLeftRadius:5,borderBottomRightRadius:5}}>
{loadingDelayData ?
<View style={{alignItems:"center"}}>
<LottieView ref={LottieRef} style={{ width: 150, height: 150, backgroundColor: '#fff',}} source={require('./assets/51690-loading-diamonds.json')}/>
</View>
: delayData ? delayData.map((d)=>{
let data = d.split(" ");
console.log(data);
return (
<View style={{flexDirection:"row"}}>
<Text style={{flex:15,fontSize:20}}>{data[0].replace("\n","")}</Text>
<Text style={{flex:5,fontSize:20}}>{data[1]}</Text>
<Text style={{flex:6,fontSize:20}}>{data[3]}</Text>
</View>
);
}) : <Text>現在5分以上の遅れはありません</Text>}
</View>
</ScrollView>
<View style={{position:"absolute",top:250,alignItems:"center",width:"100%",height:50,backgroundColor:"#007FCC88"}}>
<View style={{flex:1}}/>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>詳細を見る</Text>
<View style={{flex:1}}/>
</View>
</View>
{/* <View style={{position:"absolute",bottom:0,alignItems:"center",width:"100%",height:"100%",backgroundColor:"#007FCC88"}}>
<View style={{flex:1}}/>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>準備中...</Text>
<View style={{flex:1}}/>
</View> */}
</TouchableOpacity>
<Text>このアプリについて</Text>
<ListItem title={"広報Twitter"} roundAvatar rightIcon={<Icon name="chevron-right" size={20}/>} leftIcon={<Icon name="twitter" size={20} />} onPress={()=>{this.state.count < 10 ? (Linking.openURL("https://twitter.com/Xprocess_main"),this.setState({count: this.state.count+1})):navigation.navigate("test")}}/>
<View style={{flexDirection:"row"}}>
<TouchableOpacity style={{flex:1,backgroundColor:"#AD7FA8",borderColor:"#0099CC",padding:10,borderWidth:1,margin:2,alignItems:"center"}} onPress={()=>_handlePressButtonAsync("https://www.jr-eki.com/ticket/brand")}>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>トクトク切符</Text>
<Foundation name="ticket" color="white" size={50}/>
</TouchableOpacity>
<TouchableOpacity style={{flex:1,backgroundColor:"#8F5902",borderColor:"#0099CC",padding:10,borderWidth:1,margin:2,alignItems:"center"}} onPress={()=>_handlePressButtonAsync("https://www.jr-shikoku.co.jp/01_trainbus/event_train/sp/")}>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>観光列車</Text>
<FontAwesome name="first-order" color="white" size={50}/>
</TouchableOpacity>
<TouchableOpacity style={{flex:1,backgroundColor:"#888A85",borderColor:"#0099CC",padding:10,borderWidth:1,margin:2,alignItems:"center"}} onPress={()=>_handlePressButtonAsync("https://www.jr-eki.com/tour/brand")}>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>旅行ツアー</Text>
<Ionicons name="flag" color="white" size={50}/>
</TouchableOpacity>
</View>
<TouchableOpacity style={{flex:1,backgroundColor:"#0099CC",padding:10,height:70,alignItems:"center",alignContent:"center",margin:2}} onPress={()=>_handlePressButtonAsync("https://www.jr-shikoku.co.jp/sp/index.html#menu-box")}>
<View style={{flex:1}} />
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>臨時列車などのお知らせ</Text>
<Text style={{color:"white",fontSize:18}}>区間縮小計画運休イベント季節臨時列車など</Text>
<View style={{flex:1}} />
</TouchableOpacity>
<TouchableOpacity style={{flex:1,backgroundColor:"#0099CC",padding:10,height:70,alignItems:"center",alignContent:"center",margin:2}} onPress={()=>_handlePressButtonAsync("https://www.jr-shikoku.co.jp/03_news/press/")}>
<View style={{flex:1}} />
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>ニュースリリース</Text>
<Text style={{color:"white",fontSize:18}}>公式プレス記事はこちら</Text>
<View style={{flex:1}} />
</TouchableOpacity>
<TouchableOpacity style={{flex:1,backgroundColor:"#0099CC",padding:10,height:70,alignItems:"center",alignContent:"center",margin:2}} onPress={()=>_handlePressButtonAsync("https://www.jr-shikoku.co.jp/teiki/")}>
<View style={{flex:1}} />
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>定期運賃計算</Text>
<Text style={{color:"white",fontSize:18}}>通常/学生/快てき等はこちら</Text>
<View style={{flex:1}} />
</TouchableOpacity>
<TouchableOpacity style={{flex:1,backgroundColor:"#0099CC",padding:10,height:70,alignItems:"center",alignContent:"center",margin:2}} onPress={()=>_handlePressButtonAsync("https://www.jr-shikoku.co.jp/04_company/group/sp/")}>
<View style={{flex:1}} />
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>JR四国のお店サービス</Text>
<Text style={{color:"white",fontSize:18}}>JR四国グループの施設をご案内</Text>
<View style={{flex:1}} />
</TouchableOpacity>
<View style={{flexDirection:"row"}}>
<TouchableOpacity style={{flex:1,backgroundColor:"#729FCF",borderColor:"#0099CC",padding:10,borderWidth:1,margin:2,alignItems:"center"}} onPress={()=>_handlePressButtonAsync("https://www.jr-odekake.net/smt/")}>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>時刻運賃計算</Text>
<Text style={{color:"white",fontWeight:"bold",fontSize:18}}>(マイダイヤ)</Text>
<Foundation name="yen" color="white" size={50}/>
<Text style={{color:"white"}}>マイダイヤはJR西日本提供のサービスです</Text>
</TouchableOpacity>
<TouchableOpacity style={{flex:1,backgroundColor:"#8AE234",borderColor:"#0099CC",padding:10,borderWidth:1,margin:2,alignItems:"center"}} onPress={()=>Linking.openURL("tel:0570-00-4592")}>
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>JR四国案内センター</Text>
<Foundation name="telephone" color="white" size={50}/>
<Text style={{color:"white"}}>0570-00-4592</Text>
<Text style={{color:"white"}}>(8:00~20:00 年中無休)</Text>
<Text style={{color:"white"}}>(通話料がかかります)</Text>
</TouchableOpacity>
</View>
<View style={{backgroundColor:"#0099CC",borderRadius:10,margin:10,borderColor:"black",borderWidth:2}}>
<View style={{padding:10,flexDirection:"row",alignItems:"center"}}>
<MaterialCommunityIcons name="twitter"style={{padding:5}} color="white" size={30}/>
<Text style={{fontSize:30,fontWeight:"bold",color:"white"}}>公式Twitter一族</Text>
</View>
<View style={{padding:10,backgroundColor:"white",borderBottomLeftRadius:10,borderBottomRightRadius:10}}>
<ListItem onPress={()=>Linking.openURL("https://twitter.com/JRshikoku_tokyo")}>
<Text>JR四国 東京営業情報公式</Text>
<View style={{flex:1}}/>
<Icon name="chevron-right" size={20}/>
</ListItem>
<ListItem onPress={()=>Linking.openURL("https://twitter.com/JRshikoku_osaka")}>
<Text>JR四国 大阪営業部公式</Text>
<View style={{flex:1}}/>
<Icon name="chevron-right" size={20}/>
</ListItem>
<ListItem onPress={()=>Linking.openURL("https://twitter.com/shikoku_DC")}>
<Text>JR四国営業部 四国DC情報公式</Text>
<View style={{flex:1}}/>
<Icon name="chevron-right" size={20}/>
</ListItem>
<ListItem onPress={()=>Linking.openURL("https://twitter.com/jr_shikoku_info")}>
<Text>JR四国運行情報Twitter</Text>
<View style={{flex:1}}/>
<Icon name="chevron-right" size={20}/>
</ListItem>
<ListItem onPress={()=>Linking.openURL("https://twitter.com/Smile_Eki_Chan")}>
<Text>JR四国いそうろう妖精 すまいるえきちゃん公式</Text>
<View style={{flex:1}}/>
<Icon name="chevron-right" size={20}/>
</ListItem>
<ListItem onPress={()=>Linking.openURL("https://twitter.com/JR_Shikoku_DPT")}>
<Text>JR四国デザインPT</Text>
<View style={{flex:1}}/>
<Icon name="chevron-right" size={20}/>
</ListItem>
<ListItem onPress={()=>Linking.openURL("https://twitter.com/PT2nd_Yuki")}>
<Text>JR四国デザインPT弐号</Text>
<View style={{flex:1}}/>
<Icon name="chevron-right" size={20}/>
</ListItem>
</View>
</View>
<Text style={{fontWeight:"bold",fontSize:20}}>このアプリについて</Text>
<Text>このアプリはXprocess(HARUKIN)が製作しているJR四国の完全非公式アシストアプリケーションですこのアプリに関することでのJR四国公式へ問合せすることはお控えください以下のTwitterよりお願いします</Text>
<Text>2021/6/23 4.0公開ホーム画面を大改造しました</Text>
<TouchableOpacity style={{flex:1,backgroundColor:"#CC0000",padding:10,height:70,alignItems:"center",alignContent:"center",margin:2}} onPress={()=>{count < 10 ? (Linking.openURL("https://twitter.com/Xprocess_main"),setCount(count+1)):navigation.navigate("test")}}>
<View style={{flex:1}} />
<Text style={{color:"white",fontWeight:"bold",fontSize:20}}>XprocessのTwitter</Text>
<Text style={{color:"white",fontSize:18}}>制作運営のTwitterです</Text>
<View style={{flex:1}} />
</TouchableOpacity>
</ScrollView>
<Text>2021/4/1 >> ボタン押しにくくねと思った箇所を改善しました</Text>
<Text>バージョン3.2 最終データ更新:2021/4/1</Text>
<ActionSheet ref={actionSheetRef}gestureEnabled CustomHeaderComponent={()=>{}}>
<View style={{backgroundColor:"#0099CC",borderRadius:5,borderColor:"dark",borderWidth:1}}>
<View style={{height:26,width:"100%",}}>
<View style={{ height: 6, width: 45, borderRadius: 100, backgroundColor: "#f0f0f0", marginVertical: 10, alignSelf: "center",}} />
</View>
<View style={{padding:10,flexDirection:"row",alignItems:"center"}}>
<Text style={{fontSize:30,fontWeight:"bold",color:"white"}}>列車遅延速報EX</Text>
<View style={{flex:1}} />
{/* <TouchableOpacity style={{padding:10,backgroundColor:"white",alignContent:"center"}} onPress={() => {doFetch()}}>
<Text style={{fontSize:20,fontWeight:"bold",color:"#0099CC"}}>最新の情報へ更新</Text>
</TouchableOpacity> */}
<Text style={{fontSize:30,fontWeight:"bold",color:"white"}}>{getTime ? getTime.toLocaleTimeString('ja-JP').split(":")[0]+":"+getTime.toLocaleTimeString('ja-JP').split(":")[1]: NaN} </Text>
<Ionicons name="reload" color="white" size={30} style={{margin:5}} onPress={() => {LayoutAnimation.easeInEaseOut(),setLoadingDelayData(true),doFetch()}}/>
</View>
<ScrollView>
<View style={{padding:10,backgroundColor:"white",borderBottomLeftRadius:5,borderBottomRightRadius:5}}>
{loadingDelayData ?
<View style={{alignItems:"center"}}>
<LottieView ref={LottieRef2} style={{ width: 150, height: 150, backgroundColor: '#fff',}} source={require('./assets/51690-loading-diamonds.json')}/>
</View>
: delayData ? delayData.map((d)=>{
let data = d.split(" ");
console.log(data);
return (
<View style={{flexDirection:"row"}}>
<Text style={{flex:15,fontSize:20}}>{data[0].replace("\n","")}</Text>
<Text style={{flex:5,fontSize:20}}>{data[1]}</Text>
<Text style={{flex:6,fontSize:20}}>{data[3]}</Text>
</View>
);
}) : <Text>現在5分以上の遅れはありません</Text>}
</View>
<View style={{padding:10}}>
<Text style={{fontSize:20,fontWeight:"bold",color:"white"}}>列車遅延情報EXについて</Text>
<Text style={{color:"white"}} >列車遅延情報をJR四国公式列車運行情報より5分毎に取得しますTwitterにて投稿している内容と同一のものとなります</Text>
</View>
<TouchableOpacity style={{padding:10,flexDirection:"row",borderColor:"white",borderWidth:1,margin:10,borderRadius:5,alignItems:"center"}} onPress={()=>Linking.openURL("https://twitter.com/JRSTrainfoEX")}>
<MaterialCommunityIcons name="twitter" color="white" size={30}/>
<View style={{flex:1}} />
<Text style={{fontSize:25,fontWeight:"bold",color:"white"}}>TwitterBOTはこちら</Text>
<View style={{flex:1}} />
<Text style={{fontSize:25,fontWeight:"bold",color:"white"}}></Text>
</TouchableOpacity>
</ScrollView>
</View>
</ActionSheet>
</View>
);
}
}

View File

@ -7,32 +7,36 @@
"eject": "expo eject"
},
"dependencies": {
"@expo/vector-icons": "^10.2.1",
"@react-native-community/masked-view": "0.1.6",
"@react-navigation/bottom-tabs": "^5.9.2",
"@react-navigation/native": "^5.7.6",
"@react-navigation/stack": "^5.9.3",
"expo": "^37.0.12",
"expo-font": "~8.1.0",
"expo-updates": "~0.2.1",
"firebase": "7.9.0",
"native-base": "^2.13.14",
"npm": "^6.14.8",
"pushy-react-native": "^1.0.15",
"react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz",
"react-native-elements": "^1.2.7",
"react-native-gesture-handler": "~1.6.0",
"react-native-reanimated": "~1.7.0",
"react-native-responsive-screen": "^1.4.1",
"react-native-router-flux": "^4.0.6",
"react-native-safe-area-context": "0.7.3",
"react-native-screens": "~2.2.0",
"react-native-vector-icons": "^6.7.0",
"react-native-webview": "8.1.1"
"@expo/vector-icons": "^12.0.0",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/bottom-tabs": "^5.11.11",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.5",
"expo": "^41.0.0",
"expo-font": "~9.1.0",
"expo-updates": "~0.5.4",
"expo-web-browser": "~9.1.0",
"firebase": "8.2.3",
"lottie-react-native": "3.5.0",
"native-base": "^2.15.2",
"npm": "^7.18.1",
"pushy-react-native": "^1.0.18",
"react": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
"react-native-actions-sheet": "^0.4.9",
"react-native-auto-height-image": "^3.2.4",
"react-native-elements": "^3.4.2",
"react-native-gesture-handler": "~1.10.2",
"react-native-reanimated": "~2.1.0",
"react-native-responsive-screen": "^1.4.2",
"react-native-router-flux": "^4.3.1",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.0.0",
"react-native-vector-icons": "^8.1.0",
"react-native-webview": "11.2.3"
},
"devDependencies": {
"babel-preset-expo": "^8.3.0"
"babel-preset-expo": "8.3.0"
},
"private": true
}

6576
yarn.lock

File diff suppressed because it is too large Load Diff