Merge commit '0fdcee6f1729c2e1a8c934c1e6f17395c462cf8d' into develop
This commit is contained in:
commit
7d7fab7bf3
@ -1,8 +1,8 @@
|
|||||||
import React from "react";
|
import React, { FC } from "react";
|
||||||
import { View, Text, TouchableWithoutFeedback } from "react-native";
|
import { View, Text, TouchableWithoutFeedback } from "react-native";
|
||||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||||
import { Linking } from "react-native";
|
import { Linking } from "react-native";
|
||||||
export const DataFromButton = ({ i }) => {
|
export const DataFromButton: FC<{ i: string }> = ({ i }) => {
|
||||||
const [station, se, time] = i.split(",");
|
const [station, se, time] = i.split(",");
|
||||||
return (
|
return (
|
||||||
<TouchableWithoutFeedback
|
<TouchableWithoutFeedback
|
@ -1,17 +1,17 @@
|
|||||||
import React from "react";
|
import React, { CSSProperties, FC } from "react";
|
||||||
import { View, Text } from "react-native";
|
import { View, Text, StyleProp, TextStyle, ViewStyle } from "react-native";
|
||||||
|
|
||||||
export const StateBox = ({ text, title, style, mode }) => (
|
type stateBox = {
|
||||||
|
text: string;
|
||||||
|
title: string;
|
||||||
|
style?: ViewStyle;
|
||||||
|
mode?: number;
|
||||||
|
};
|
||||||
|
export const StateBox: FC<stateBox> = ({ text, title, style, mode }) => (
|
||||||
<View style={{ ...(mode == 2 ? boxStyle2 : boxStyle), ...style }}>
|
<View style={{ ...(mode == 2 ? boxStyle2 : boxStyle), ...style }}>
|
||||||
<Text style={{ fontSize: 12, color: "#0099CC" }}>{title}</Text>
|
<Text style={{ fontSize: 12, color: "#0099CC" }}>{title}</Text>
|
||||||
<View style={{ flex: 1 }} />
|
<View style={{ flex: 1 }} />
|
||||||
<View
|
<View style={{ flexDirection: mode == 2 ? "row" : "column" }}>
|
||||||
style={{
|
|
||||||
color: "#0099CC",
|
|
||||||
textAlign: "right",
|
|
||||||
flexDirection: mode == 2 ? "row" : "column",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{text?.match("~") ? (
|
{text?.match("~") ? (
|
||||||
<>
|
<>
|
||||||
<Text style={mode == 2 ? boxTextStyle2 : boxTextStyle}>
|
<Text style={mode == 2 ? boxTextStyle2 : boxTextStyle}>
|
||||||
@ -30,27 +30,27 @@ export const StateBox = ({ text, title, style, mode }) => (
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
const boxStyle = {
|
const boxStyle: ViewStyle = {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: "white",
|
backgroundColor: "white",
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
padding: 10,
|
padding: 10,
|
||||||
margin: 10,
|
margin: 10,
|
||||||
};
|
};
|
||||||
const boxStyle2 = {
|
const boxStyle2: ViewStyle = {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
backgroundColor: "white",
|
backgroundColor: "white",
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
padding: 5,
|
padding: 5,
|
||||||
margin: 5,
|
margin: 5,
|
||||||
};
|
};
|
||||||
const boxTextStyle2 = {
|
const boxTextStyle2: TextStyle = {
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
color: "#0099CC",
|
color: "#0099CC",
|
||||||
textAlign: "right",
|
textAlign: "right",
|
||||||
};
|
};
|
||||||
|
|
||||||
const boxTextStyle = {
|
const boxTextStyle: TextStyle = {
|
||||||
fontSize: 25,
|
fontSize: 25,
|
||||||
color: "#0099CC",
|
color: "#0099CC",
|
||||||
textAlign: "right",
|
textAlign: "right",
|
@ -7,7 +7,7 @@ import koutoku from "../assets/originData/koutoku";
|
|||||||
import tokushima from "../assets/originData/tokushima";
|
import tokushima from "../assets/originData/tokushima";
|
||||||
import naruto from "../assets/originData/naruto";
|
import naruto from "../assets/originData/naruto";
|
||||||
import seto from "../assets/originData/seto";
|
import seto from "../assets/originData/seto";
|
||||||
export const getStationList2 = async (props) => {
|
export const getStationList2 = async () => {
|
||||||
return {
|
return {
|
||||||
yosan,
|
yosan,
|
||||||
uwajima,
|
uwajima,
|
@ -1,7 +1,7 @@
|
|||||||
type getTrainDelayStatus = (
|
type getTrainDelayStatus = (
|
||||||
current: { delay: string; Pos: string },
|
current: { delay: number | "入線" | string; Pos: string },
|
||||||
Station_JP: string
|
Station_JP: string
|
||||||
) => string;
|
) => string | number;
|
||||||
export const getTrainDelayStatus: getTrainDelayStatus = (
|
export const getTrainDelayStatus: getTrainDelayStatus = (
|
||||||
current,
|
current,
|
||||||
Station_JP
|
Station_JP
|
||||||
@ -17,7 +17,7 @@ export const getTrainDelayStatus: getTrainDelayStatus = (
|
|||||||
}
|
}
|
||||||
case Number.isNaN(delay):
|
case Number.isNaN(delay):
|
||||||
return delay;
|
return delay;
|
||||||
case delay === "0":
|
case delay === 0:
|
||||||
return "定刻通り";
|
return "定刻通り";
|
||||||
default:
|
default:
|
||||||
return delay + "分遅れ";
|
return delay + "分遅れ";
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
import { getJRF } from "../components/custom-train-data";
|
import { getJRF } from "../components/custom-train-data";
|
||||||
|
|
||||||
export const injectJavascriptData = (
|
type InjectJavascriptData = (
|
||||||
|
a: string,
|
||||||
|
b: string,
|
||||||
|
c: string,
|
||||||
|
d: string
|
||||||
|
) => string;
|
||||||
|
export const injectJavascriptData: InjectJavascriptData = (
|
||||||
mapSwitch,
|
mapSwitch,
|
||||||
iconSetting,
|
iconSetting,
|
||||||
stationMenu,
|
stationMenu,
|
Loading…
Reference in New Issue
Block a user