Merge commit '49a9d45fd7598db4d867f73f1452f5a76b8d2c8a' into patch/5.0.x
This commit is contained in:
commit
6ba26f778a
104
Apps.js
104
Apps.js
@ -338,16 +338,108 @@ export default function Apps({ navigation, webview, stationData }) {
|
||||
top={Platform.OS == "ios" ? Constants.statusBarHeight : 0}
|
||||
/>
|
||||
)}
|
||||
<ReloadButton
|
||||
onPress={() => webview.current.reload()}
|
||||
top={Platform.OS == "ios" ? Constants.statusBarHeight : 0}
|
||||
right={isLandscape && trainInfo.trainNum ? (width / 100) * 40 : 0}
|
||||
LoadError={LoadError}
|
||||
/>
|
||||
{mapSwitch == "true" ? (
|
||||
<ReloadButton
|
||||
onPress={() => Updates.reloadAsync()}
|
||||
top={Platform.OS == "ios" ? Constants.statusBarHeight : 0}
|
||||
right={isLandscape && trainInfo.trainNum ? (width / 100) * 40 : 0}
|
||||
LoadError={LoadError}
|
||||
/>
|
||||
) : (
|
||||
<NewMenu
|
||||
webview={webview}
|
||||
isLandscape={isLandscape}
|
||||
LoadError={LoadError}
|
||||
mapSwitch={mapSwitch}
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
const NewMenu = ({ webview, LoadError }) => {
|
||||
const { width } = useWindowDimensions();
|
||||
return (
|
||||
<View
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
width: 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>
|
||||
);
|
||||
};
|
||||
const MapsButton = ({ onPress, top, mapSwitch }) => {
|
||||
const styles = {
|
||||
touch: {
|
||||
|
Loading…
Reference in New Issue
Block a user