Merge commit '49a9d45fd7598db4d867f73f1452f5a76b8d2c8a' into patch/5.0.x

This commit is contained in:
harukin-expo-dev-env 2024-03-12 16:35:02 +00:00
commit 6ba26f778a

104
Apps.js
View File

@ -338,16 +338,108 @@ export default function Apps({ navigation, webview, stationData }) {
top={Platform.OS == "ios" ? Constants.statusBarHeight : 0} top={Platform.OS == "ios" ? Constants.statusBarHeight : 0}
/> />
)} )}
<ReloadButton {mapSwitch == "true" ? (
onPress={() => webview.current.reload()} <ReloadButton
top={Platform.OS == "ios" ? Constants.statusBarHeight : 0} onPress={() => Updates.reloadAsync()}
right={isLandscape && trainInfo.trainNum ? (width / 100) * 40 : 0} top={Platform.OS == "ios" ? Constants.statusBarHeight : 0}
LoadError={LoadError} right={isLandscape && trainInfo.trainNum ? (width / 100) * 40 : 0}
/> LoadError={LoadError}
/>
) : (
<NewMenu
webview={webview}
isLandscape={isLandscape}
LoadError={LoadError}
mapSwitch={mapSwitch}
/>
)}
</View> </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 MapsButton = ({ onPress, top, mapSwitch }) => {
const styles = { const styles = {
touch: { touch: {