画面整備

This commit is contained in:
harukin-expo-dev-env
2025-01-09 07:13:42 +00:00
parent 54e76a86f3
commit b867a788e2
4 changed files with 217 additions and 24 deletions

View File

@@ -12,11 +12,19 @@ import * as Updates from "expo-updates";
import { useWindowDimensions } from "react-native";
import { ListItem } from "native-base";
import { SwitchArea } from "../atom/SwitchArea";
import { useNotification } from "../../stateBox/useNotifications";
const versionCode = "5.5.1";
export const SettingTopPage = ({ navigate, testNFC,startPage,setStartPage, updateAndReload }) => {
export const SettingTopPage = ({
navigate,
testNFC,
startPage,
setStartPage,
updateAndReload,
}) => {
const { width } = useWindowDimensions();
const { expoPushToken } = useNotification();
return (
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
<View style={{ backgroundColor: "#0099CC", flexDirection: "row" }}>
@@ -102,18 +110,18 @@ export const SettingTopPage = ({ navigate, testNFC,startPage,setStartPage, updat
<View style={{ flex: 1, borderTopWidth: 1, borderColor: "gray" }}>
<SwitchArea
str="起動時に表示する画面"
bool={startPage}
setBool={setStartPage}
falseImage={require("../../assets/configuration/showSetting0.jpg")}
trueImage={require("../../assets/configuration/showSetting1.jpg")}
falseText={"リンクメニュー"}
trueText={"列車位置情報"}
/><ListItem
str="起動時に表示する画面"
bool={startPage}
setBool={setStartPage}
falseImage={require("../../assets/configuration/showSetting0.jpg")}
trueImage={require("../../assets/configuration/showSetting1.jpg")}
falseText={"リンクメニュー"}
trueText={"列車位置情報"}
/>
<ListItem
style={{ flexDirection: "row" }}
onPress={() => navigate("FavoriteSettings")}
>
<Text
style={{
fontSize: 20,
@@ -138,6 +146,35 @@ export const SettingTopPage = ({ navigate, testNFC,startPage,setStartPage, updat
{">"}
</Text>
</ListItem>
<ListItem
style={{ flexDirection: "row" }}
onPress={() => navigate("NotificationSettings")}
disabled={expoPushToken == ""}
>
<Text
style={{
fontSize: 20,
alignItems: "center",
alignContent: "center",
textAlign: "center",
textAlignVertical: "center",
}}
>
通知設定{expoPushToken == "" ? "(通知設定をオンにしてください)" : "(β)"}
</Text>
<View style={{ flex: 1 }} />
<Text
style={{
fontSize: 20,
alignItems: "center",
alignContent: "center",
textAlign: "center",
textAlignVertical: "center",
}}
>
{">"}
</Text>
</ListItem>
<ListItem
style={{ flexDirection: "row" }}
onPress={() => navigate("LayoutSettings")}