差分調整5
This commit is contained in:
parent
b6aa8ee686
commit
c131da6d3c
48
components/Apps/LandscapeBackButton.tsx
Normal file
48
components/Apps/LandscapeBackButton.tsx
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import React, { FC } from "react";
|
||||||
|
import {
|
||||||
|
View,
|
||||||
|
TouchableOpacity,
|
||||||
|
TouchableOpacityProps,
|
||||||
|
TextStyle,
|
||||||
|
} from "react-native";
|
||||||
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
|
export const LandscapeBackButton: FC<{
|
||||||
|
onPress: () => void;
|
||||||
|
}> = ({ onPress }) => {
|
||||||
|
type stylesType = {
|
||||||
|
touch: TouchableOpacityProps["style"];
|
||||||
|
text: TextStyle;
|
||||||
|
};
|
||||||
|
const styles: stylesType = {
|
||||||
|
touch: {
|
||||||
|
position: "absolute",
|
||||||
|
left: 10,
|
||||||
|
width: 50,
|
||||||
|
height: 50,
|
||||||
|
backgroundColor: "#0099CC",
|
||||||
|
borderColor: "white",
|
||||||
|
borderStyle: "solid",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderRadius: 50,
|
||||||
|
alignContent: "center",
|
||||||
|
alignSelf: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
display: "flex",
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
textAlign: "center",
|
||||||
|
width: "auto",
|
||||||
|
height: "auto",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
fontWeight: "bold",
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<TouchableOpacity onPress={onPress} style={styles.touch}>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Ionicons name="arrow-back" color="white" size={30} />
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
);
|
||||||
|
};
|
57
components/Apps/MapsButton.tsx
Normal file
57
components/Apps/MapsButton.tsx
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
import React, { FC } from "react";
|
||||||
|
import {
|
||||||
|
View,
|
||||||
|
Text,
|
||||||
|
TouchableOpacity,
|
||||||
|
Platform,
|
||||||
|
TouchableOpacityProps,
|
||||||
|
TextStyle,
|
||||||
|
} from "react-native";
|
||||||
|
import Constants from "expo-constants";
|
||||||
|
|
||||||
|
const top = Platform.OS == "ios" ? Constants.statusBarHeight : 0;
|
||||||
|
type MapsButtonProps = {
|
||||||
|
onPress: () => void;
|
||||||
|
mapSwitch: string;
|
||||||
|
};
|
||||||
|
type stylesType = {
|
||||||
|
touch: TouchableOpacityProps["style"];
|
||||||
|
text: TextStyle;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const MapsButton: FC<MapsButtonProps> = ({ onPress, mapSwitch }) => {
|
||||||
|
const styles: stylesType = {
|
||||||
|
touch: {
|
||||||
|
position: "absolute",
|
||||||
|
top,
|
||||||
|
left: 10,
|
||||||
|
width: 50,
|
||||||
|
height: 50,
|
||||||
|
backgroundColor: "#0099CC",
|
||||||
|
borderColor: "white",
|
||||||
|
borderStyle: "solid",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderRadius: 50,
|
||||||
|
alignContent: "center",
|
||||||
|
alignSelf: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
display: mapSwitch == "true" ? "flex" : "none",
|
||||||
|
},
|
||||||
|
text: {
|
||||||
|
textAlign: "center",
|
||||||
|
width: "auto",
|
||||||
|
height: "auto",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
fontWeight: "bold",
|
||||||
|
color: "white",
|
||||||
|
fontSize: 20,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<TouchableOpacity onPress={onPress} style={styles.touch}>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Text style={styles.text}>≡</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
);
|
||||||
|
};
|
92
components/Apps/NewMenu.tsx
Normal file
92
components/Apps/NewMenu.tsx
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { View, Text, TouchableOpacity, useWindowDimensions, Platform } from "react-native";
|
||||||
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
|
import * as Updates from "expo-updates";
|
||||||
|
import Constants from "expo-constants";
|
||||||
|
import { useCurrentTrain } from "../../stateBox/useCurrentTrain";
|
||||||
|
|
||||||
|
const top = Platform.OS == "ios" ? Constants.statusBarHeight : 0;
|
||||||
|
export const NewMenu = ({ LoadError }) => {
|
||||||
|
const { webview } = useCurrentTrain();
|
||||||
|
const { width } = useWindowDimensions();
|
||||||
|
return (
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
top,
|
||||||
|
width,
|
||||||
|
height: 54,
|
||||||
|
backgroundColor: "#0099CC",
|
||||||
|
borderColor: "white",
|
||||||
|
borderStyle: "solid",
|
||||||
|
borderWidth: 1,
|
||||||
|
alignContent: "center",
|
||||||
|
alignSelf: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
flexDirection: "row",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<TouchableOpacity
|
||||||
|
activeOpacity={1}
|
||||||
|
style={{
|
||||||
|
flex: 1,
|
||||||
|
height: 54,
|
||||||
|
backgroundColor: "#0099CC",
|
||||||
|
borderColor: "white",
|
||||||
|
borderStyle: "solid",
|
||||||
|
borderWidth: 1,
|
||||||
|
borderRightWidth: 0,
|
||||||
|
alignContent: "center",
|
||||||
|
alignSelf: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
flexDirection: "row",
|
||||||
|
}}
|
||||||
|
onPress={() => {
|
||||||
|
webview.current?.injectJavaScript(`AccordionClassEvent()`);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<>
|
||||||
|
<View
|
||||||
|
style={{
|
||||||
|
width: 54,
|
||||||
|
height: 54,
|
||||||
|
backgroundColor: "#0099CC",
|
||||||
|
borderColor: "white",
|
||||||
|
borderStyle: "solid",
|
||||||
|
borderWidth: 1,
|
||||||
|
alignContent: "center",
|
||||||
|
alignSelf: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Ionicons name="menu" color="white" size={30} />
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</View>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Text style={{ color: "white", fontSize: 20 }}>メニュー</Text>
|
||||||
|
<View style={{ flex: 1 }}></View>
|
||||||
|
</>
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
<TouchableOpacity
|
||||||
|
onPress={() => Updates.reloadAsync()}
|
||||||
|
style={{
|
||||||
|
width: 54,
|
||||||
|
height: 54,
|
||||||
|
backgroundColor: LoadError ? "red" : "#0099CC",
|
||||||
|
borderColor: "white",
|
||||||
|
borderStyle: "solid",
|
||||||
|
borderWidth: 1,
|
||||||
|
alignContent: "center",
|
||||||
|
alignSelf: "center",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Ionicons name="reload" color="white" size={30} />
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
59
components/Apps/ReloadButton.tsx
Normal file
59
components/Apps/ReloadButton.tsx
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import React, { FC } from "react";
|
||||||
|
import {
|
||||||
|
View,
|
||||||
|
TouchableOpacity,
|
||||||
|
Platform,
|
||||||
|
TouchableOpacityProps,
|
||||||
|
TextStyle,
|
||||||
|
} from "react-native";
|
||||||
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
|
import Constants from "expo-constants";
|
||||||
|
import { useTrainMenu } from "../../stateBox/useTrainMenu";
|
||||||
|
const top = Platform.OS == "ios" ? Constants.statusBarHeight : 0;
|
||||||
|
|
||||||
|
type stylesType = {
|
||||||
|
touch: TouchableOpacityProps["style"];
|
||||||
|
text: TextStyle;
|
||||||
|
};
|
||||||
|
type ReloadButton = {
|
||||||
|
onPress: () => void;
|
||||||
|
right: number;
|
||||||
|
mapSwitch: any;
|
||||||
|
LoadError?: boolean;
|
||||||
|
|
||||||
|
}
|
||||||
|
export const ReloadButton:FC<ReloadButton> = ({ onPress, mapSwitch, LoadError = false, right }) => {
|
||||||
|
const styles: stylesType = {
|
||||||
|
touch: {
|
||||||
|
position: "absolute",
|
||||||
|
top,
|
||||||
|
right: 10 + right,
|
||||||
|
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",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<TouchableOpacity onPress={onPress} style={styles.touch}>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Ionicons name="reload" color="white" size={30} />
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
);
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user