Compare commits
No commits in common. "29be052bf69049eabf6f81db94ffd32a06e5bbdb" and "2fb7d97d332a2d31832d4c3d00ebf5524711f93d" have entirely different histories.
29be052bf6
...
2fb7d97d33
8
app.json
8
app.json
@ -7,7 +7,7 @@
|
|||||||
"android",
|
"android",
|
||||||
"web"
|
"web"
|
||||||
],
|
],
|
||||||
"version": "6.0.1",
|
"version": "6.0",
|
||||||
"orientation": "default",
|
"orientation": "default",
|
||||||
"icon": "./assets/icons/s8600.png",
|
"icon": "./assets/icons/s8600.png",
|
||||||
"splash": {
|
"splash": {
|
||||||
@ -22,7 +22,7 @@
|
|||||||
"**/*"
|
"**/*"
|
||||||
],
|
],
|
||||||
"ios": {
|
"ios": {
|
||||||
"buildNumber": "47",
|
"buildNumber": "46",
|
||||||
"supportsTablet": false,
|
"supportsTablet": false,
|
||||||
"bundleIdentifier": "jrshikokuinfo.xprocess.hrkn",
|
"bundleIdentifier": "jrshikokuinfo.xprocess.hrkn",
|
||||||
"config": {
|
"config": {
|
||||||
@ -44,7 +44,7 @@
|
|||||||
},
|
},
|
||||||
"android": {
|
"android": {
|
||||||
"package": "jrshikokuinfo.xprocess.hrkn",
|
"package": "jrshikokuinfo.xprocess.hrkn",
|
||||||
"versionCode": 28,
|
"versionCode": 27,
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"ACCESS_FINE_LOCATION",
|
"ACCESS_FINE_LOCATION",
|
||||||
"NFC",
|
"NFC",
|
||||||
@ -300,7 +300,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "7200",
|
"name": "s7200",
|
||||||
"ios": "./assets/icons/s7200.png",
|
"ios": "./assets/icons/s7200.png",
|
||||||
"android": {
|
"android": {
|
||||||
"foregroundImage": "./assets/icons/s7200.png",
|
"foregroundImage": "./assets/icons/s7200.png",
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { FC, useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import { View, Text, ScrollView } from "react-native";
|
import { View, Text, ScrollView } from "react-native";
|
||||||
|
|
||||||
import Icon from "react-native-vector-icons/Entypo";
|
import Icon from "react-native-vector-icons/Entypo";
|
||||||
@ -8,7 +8,7 @@ import { useNavigation } from "@react-navigation/native";
|
|||||||
import { useTrainMenu } from "../stateBox/useTrainMenu";
|
import { useTrainMenu } from "../stateBox/useTrainMenu";
|
||||||
import { FavoriteListItem } from "./atom/FavoriteListItem";
|
import { FavoriteListItem } from "./atom/FavoriteListItem";
|
||||||
import { BigButton } from "./atom/BigButton";
|
import { BigButton } from "./atom/BigButton";
|
||||||
export const FavoriteList: FC = () => {
|
export default function FavoriteList() {
|
||||||
const { favoriteStation } = useFavoriteStation();
|
const { favoriteStation } = useFavoriteStation();
|
||||||
const { webview } = useCurrentTrain();
|
const { webview } = useCurrentTrain();
|
||||||
const { navigate, addListener, goBack, canGoBack } = useNavigation();
|
const { navigate, addListener, goBack, canGoBack } = useNavigation();
|
||||||
@ -92,4 +92,4 @@ export const FavoriteList: FC = () => {
|
|||||||
<BigButton onPress={() => goBack()} string="閉じる" />
|
<BigButton onPress={() => goBack()} string="閉じる" />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
}
|
@ -4,17 +4,51 @@ import { useNavigation } from "@react-navigation/native";
|
|||||||
import { useFavoriteStation } from "../../stateBox/useFavoriteStation";
|
import { useFavoriteStation } from "../../stateBox/useFavoriteStation";
|
||||||
import { CheckBox } from "react-native-elements";
|
import { CheckBox } from "react-native-elements";
|
||||||
import { FavoriteSettingsItem } from "./FavoliteSettings/FavoiliteSettingsItem";
|
import { FavoriteSettingsItem } from "./FavoliteSettings/FavoiliteSettingsItem";
|
||||||
import { SheetHeaderItem } from "@/components/atom/SheetHeaderItem";
|
|
||||||
|
|
||||||
export const FavoriteSettings = () => {
|
export const FavoriteSettings = () => {
|
||||||
const { favoriteStation, setFavoriteStation } = useFavoriteStation();
|
const { favoriteStation, setFavoriteStation } = useFavoriteStation();
|
||||||
const { goBack } = useNavigation();
|
const { goBack } = useNavigation();
|
||||||
return (
|
return (
|
||||||
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
||||||
<SheetHeaderItem
|
<View style={{ backgroundColor: "#0099CC", flexDirection: "row" }}>
|
||||||
title="お気に入り設定"
|
<View style={{ flex: 1 }}>
|
||||||
LeftItem={{ title: "< 設定", onPress: goBack }}
|
<TouchableOpacity
|
||||||
/>
|
onPress={goBack}
|
||||||
|
style={{
|
||||||
|
flexDirection: "column",
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "left",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
< 設定
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
お気に入り設定
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }}></View>
|
||||||
|
</View>
|
||||||
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
||||||
{favoriteStation.map((currentStation, index, array) => (
|
{favoriteStation.map((currentStation, index, array) => (
|
||||||
<FavoriteSettingsItem
|
<FavoriteSettingsItem
|
||||||
|
@ -14,7 +14,6 @@ import { AS } from "../../storageControl";
|
|||||||
import icons from "../../assets/icons/icons";
|
import icons from "../../assets/icons/icons";
|
||||||
import { setAlternateAppIcon, getAppIconName } from "expo-alternate-app-icons";
|
import { setAlternateAppIcon, getAppIconName } from "expo-alternate-app-icons";
|
||||||
import { widthPercentageToDP } from "react-native-responsive-screen";
|
import { widthPercentageToDP } from "react-native-responsive-screen";
|
||||||
import { SheetHeaderItem } from "../atom/SheetHeaderItem";
|
|
||||||
|
|
||||||
export const LauncherIconSettings = ({ navigate }) => {
|
export const LauncherIconSettings = ({ navigate }) => {
|
||||||
const { goBack } = useNavigation();
|
const { goBack } = useNavigation();
|
||||||
@ -22,7 +21,45 @@ export const LauncherIconSettings = ({ navigate }) => {
|
|||||||
const [currentIcon] = useState(getAppIconName());
|
const [currentIcon] = useState(getAppIconName());
|
||||||
return (
|
return (
|
||||||
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
||||||
<SheetHeaderItem title="アイコン設定" LeftItem={{ title: "< 設定", onPress: goBack }} />
|
<View style={{ backgroundColor: "#0099CC", flexDirection: "row" }}>
|
||||||
|
<View style={{ flex: 1 }}>
|
||||||
|
<TouchableOpacity
|
||||||
|
onPress={goBack}
|
||||||
|
style={{
|
||||||
|
flexDirection: "column",
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "left",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
< 設定
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
アイコン設定
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }}></View>
|
||||||
|
</View>
|
||||||
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
||||||
{currentIcon ? (
|
{currentIcon ? (
|
||||||
<>
|
<>
|
||||||
|
@ -4,7 +4,6 @@ import { useNavigation } from "@react-navigation/native";
|
|||||||
import { SwitchArea } from "../atom/SwitchArea";
|
import { SwitchArea } from "../atom/SwitchArea";
|
||||||
import { CheckBox } from "react-native-elements";
|
import { CheckBox } from "react-native-elements";
|
||||||
import { TripleSwitchArea } from "../atom/TripleSwitchArea";
|
import { TripleSwitchArea } from "../atom/TripleSwitchArea";
|
||||||
import { SheetHeaderItem } from "../atom/SheetHeaderItem";
|
|
||||||
|
|
||||||
export const LayoutSettings = ({
|
export const LayoutSettings = ({
|
||||||
navigate,
|
navigate,
|
||||||
@ -26,7 +25,45 @@ export const LayoutSettings = ({
|
|||||||
const { goBack } = useNavigation();
|
const { goBack } = useNavigation();
|
||||||
return (
|
return (
|
||||||
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
||||||
<SheetHeaderItem title="レイアウト設定" LeftItem={{ title: "< 設定", onPress: goBack }} />
|
<View style={{ backgroundColor: "#0099CC", flexDirection: "row" }}>
|
||||||
|
<View style={{ flex: 1 }}>
|
||||||
|
<TouchableOpacity
|
||||||
|
onPress={goBack}
|
||||||
|
style={{
|
||||||
|
flexDirection: "column",
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "left",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
< 設定
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
レイアウト設定
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }}></View>
|
||||||
|
</View>
|
||||||
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
||||||
<View style={{ flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
<SwitchArea
|
<SwitchArea
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { View, Text, TouchableOpacity, ScrollView } from "react-native";
|
import { View, Text, TouchableOpacity, ScrollView } from "react-native";
|
||||||
import * as Clipboard from "expo-clipboard";
|
import * as Clipboard from 'expo-clipboard';
|
||||||
|
|
||||||
import { CheckBox } from "react-native-elements";
|
import { CheckBox } from "react-native-elements";
|
||||||
import { AS } from "../../storageControl";
|
import { AS } from "../../storageControl";
|
||||||
import { useNotification } from "../../stateBox/useNotifications";
|
import { useNotification } from "../../stateBox/useNotifications";
|
||||||
import { useNavigation } from "@react-navigation/native";
|
import { useNavigation } from "@react-navigation/native";
|
||||||
import { SheetHeaderItem } from "../atom/SheetHeaderItem";
|
|
||||||
|
|
||||||
export const NotificationSettings = () => {
|
export const NotificationSettings = () => {
|
||||||
const { expoPushToken } = useNotification();
|
const { expoPushToken } = useNotification();
|
||||||
@ -20,36 +19,92 @@ export const NotificationSettings = () => {
|
|||||||
AS.getItem("strangeTrain").then(setStrangeTrain);
|
AS.getItem("strangeTrain").then(setStrangeTrain);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const setRegister = () => {
|
|
||||||
fetch(
|
|
||||||
"https://n8n.haruk.in/webhook/jr-shikoku-notification-configurations",
|
|
||||||
{
|
|
||||||
method: "POST",
|
|
||||||
headers: {
|
|
||||||
"Content-Type": "application/json",
|
|
||||||
},
|
|
||||||
body: JSON.stringify({
|
|
||||||
token: expoPushToken,
|
|
||||||
traInfoEX,
|
|
||||||
informations,
|
|
||||||
strangeTrain,
|
|
||||||
}),
|
|
||||||
}
|
|
||||||
).then(() => {
|
|
||||||
Promise.all([
|
|
||||||
AS.setItem("traInfoEX", traInfoEX.toString()),
|
|
||||||
AS.setItem("informations", informations.toString()),
|
|
||||||
AS.setItem("strangeTrain", strangeTrain.toString()),
|
|
||||||
]).then(() => alert("通知の設定を保存、登録しました"));
|
|
||||||
});
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
||||||
<SheetHeaderItem
|
<View style={{ backgroundColor: "#0099CC", flexDirection: "row" }}>
|
||||||
title="通知設定(β)"
|
<View style={{ flex: 1 }}>
|
||||||
LeftItem={{ title: "< 設定", onPress: goBack }}
|
<TouchableOpacity
|
||||||
RightItem={{ title: "登録実行", onPress: setRegister }}
|
onPress={goBack}
|
||||||
/>
|
style={{
|
||||||
|
flexDirection: "column",
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "left",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
< 設定
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
通知設定(β)
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }}>
|
||||||
|
<TouchableOpacity
|
||||||
|
onPress={() => {
|
||||||
|
fetch(
|
||||||
|
"https://n8n.haruk.in/webhook/jr-shikoku-notification-configurations",
|
||||||
|
{
|
||||||
|
method: "POST",
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "application/json",
|
||||||
|
},
|
||||||
|
body: JSON.stringify({
|
||||||
|
token: expoPushToken,
|
||||||
|
traInfoEX,
|
||||||
|
informations,
|
||||||
|
strangeTrain,
|
||||||
|
}),
|
||||||
|
}
|
||||||
|
).then(() => {
|
||||||
|
Promise.all([
|
||||||
|
AS.setItem("traInfoEX", traInfoEX.toString()),
|
||||||
|
AS.setItem("informations", informations.toString()),
|
||||||
|
AS.setItem("strangeTrain", strangeTrain.toString()),
|
||||||
|
]).then(() => alert("通知の設定を保存、登録しました"));
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
flexDirection: "column",
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "right",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
color: "pink",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
登録実行
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
||||||
<SimpleSwitch
|
<SimpleSwitch
|
||||||
bool={traInfoEX}
|
bool={traInfoEX}
|
||||||
|
@ -15,7 +15,6 @@ import { ListItem } from "@rneui/themed";
|
|||||||
import TouchableScale from "react-native-touchable-scale";
|
import TouchableScale from "react-native-touchable-scale";
|
||||||
import { SwitchArea } from "../atom/SwitchArea";
|
import { SwitchArea } from "../atom/SwitchArea";
|
||||||
import { useNotification } from "../../stateBox/useNotifications";
|
import { useNotification } from "../../stateBox/useNotifications";
|
||||||
import { SheetHeaderItem } from "@/components/atom/SheetHeaderItem";
|
|
||||||
|
|
||||||
const versionCode = "6.0";
|
const versionCode = "6.0";
|
||||||
|
|
||||||
@ -30,10 +29,45 @@ export const SettingTopPage = ({
|
|||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
return (
|
return (
|
||||||
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
||||||
<SheetHeaderItem title="アプリの設定画面" LeftItem={{
|
<View style={{ backgroundColor: "#0099CC", flexDirection: "row" }}>
|
||||||
title: "閉じる",
|
<View style={{ flex: 1 }}>
|
||||||
onPress: () => navigation.goBack(),
|
<TouchableOpacity
|
||||||
}} />
|
onPress={() => navigation.goBack()}
|
||||||
|
style={{
|
||||||
|
flexDirection: "column",
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "left",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
閉じる
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
アプリの設定画面
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }}></View>
|
||||||
|
</View>
|
||||||
<ScrollView style={{ flex: 1, backgroundColor: "#f8f8fc" }}>
|
<ScrollView style={{ flex: 1, backgroundColor: "#f8f8fc" }}>
|
||||||
<View style={{ height: 300, padding: 10 }}>
|
<View style={{ height: 300, padding: 10 }}>
|
||||||
<View style={{ flex: 1 }} />
|
<View style={{ flex: 1 }} />
|
||||||
|
@ -8,7 +8,6 @@ import { getInfoString } from "../AndroidWidget/InfoWidget";
|
|||||||
import { AS } from "../../storageControl";
|
import { AS } from "../../storageControl";
|
||||||
import { nameToWidget } from "../AndroidWidget/widget-task-handler";
|
import { nameToWidget } from "../AndroidWidget/widget-task-handler";
|
||||||
import { ListItem } from "native-base";
|
import { ListItem } from "native-base";
|
||||||
import { SheetHeaderItem } from "../atom/SheetHeaderItem";
|
|
||||||
|
|
||||||
export const WidgetSettings = ({ navigate }) => {
|
export const WidgetSettings = ({ navigate }) => {
|
||||||
const { JR_shikoku_train_info, Info_Widget } = nameToWidget;
|
const { JR_shikoku_train_info, Info_Widget } = nameToWidget;
|
||||||
@ -42,10 +41,45 @@ export const WidgetSettings = ({ navigate }) => {
|
|||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
<View style={{ height: "100%", backgroundColor: "#0099CC" }}>
|
||||||
<SheetHeaderItem
|
<View style={{ backgroundColor: "#0099CC", flexDirection: "row" }}>
|
||||||
title="ウィジェット設定"
|
<View style={{ flex: 1 }}>
|
||||||
LeftItem={{ title: "< 設定", onPress: goBack }}
|
<TouchableOpacity
|
||||||
/>
|
onPress={goBack}
|
||||||
|
style={{
|
||||||
|
flexDirection: "column",
|
||||||
|
flex: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "left",
|
||||||
|
textAlignVertical: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
< 設定
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }} />
|
||||||
|
</TouchableOpacity>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: "bold",
|
||||||
|
textAlign: "center",
|
||||||
|
color: "white",
|
||||||
|
padding: 10,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
ウィジェット設定
|
||||||
|
</Text>
|
||||||
|
<View style={{ flex: 1 }}></View>
|
||||||
|
</View>
|
||||||
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
<ScrollView style={{ flex: 1, backgroundColor: "white" }}>
|
||||||
<View style={{ alignContent: "center", alignItems: "center" }}>
|
<View style={{ alignContent: "center", alignItems: "center" }}>
|
||||||
<View
|
<View
|
||||||
|
@ -1,17 +1,8 @@
|
|||||||
import React, { FC } from "react";
|
import React from "react";
|
||||||
import { View, Text, TouchableOpacity } from "react-native";
|
import { View, Text, TouchableOpacity } from "react-native";
|
||||||
import lineColorList from "../../assets/originData/lineColorList";
|
import lineColorList from "../../assets/originData/lineColorList";
|
||||||
|
|
||||||
|
export const FavoriteListItem = ({ currentStation, children, onPress }) => {
|
||||||
type Props = {
|
|
||||||
currentStation: {
|
|
||||||
Station_JP: string;
|
|
||||||
StationNumber: string;
|
|
||||||
}[];
|
|
||||||
onPress: () => void;
|
|
||||||
children: React.ReactNode;
|
|
||||||
}
|
|
||||||
export const FavoriteListItem:FC<Props> = ({ currentStation, children, onPress }) => {
|
|
||||||
const lineIDs = [];
|
const lineIDs = [];
|
||||||
const EachIDs = [];
|
const EachIDs = [];
|
||||||
currentStation.forEach((d) => {
|
currentStation.forEach((d) => {
|
@ -1,48 +0,0 @@
|
|||||||
import React, { FC } from "react";
|
|
||||||
import { View, Text, TouchableOpacity, TextStyle } from "react-native";
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
LeftItem?: SideItemProps;
|
|
||||||
RightItem?: SideItemProps;
|
|
||||||
title: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
const textStyle: TextStyle = {
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: "bold",
|
|
||||||
color: "white",
|
|
||||||
padding: 10,
|
|
||||||
textAlignVertical: "center",
|
|
||||||
};
|
|
||||||
export const SheetHeaderItem: FC<Props> = (props) => {
|
|
||||||
const { LeftItem, RightItem, title } = props;
|
|
||||||
return (
|
|
||||||
<View style={{ backgroundColor: "#0099CC", flexDirection: "row" }}>
|
|
||||||
<View style={{ flex: 1 }}>
|
|
||||||
{LeftItem ? <SideItem {...LeftItem} position="left" /> : <></>}
|
|
||||||
</View>
|
|
||||||
<Text style={{ textAlign: "center",...textStyle }}>{title}</Text>
|
|
||||||
<View style={{ flex: 1 }}>
|
|
||||||
{RightItem ? <SideItem {...RightItem} position="right" /> : <></>}
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
type SideItemProps = {
|
|
||||||
onPress: () => void;
|
|
||||||
title: string;
|
|
||||||
position: "left" | "right";
|
|
||||||
};
|
|
||||||
const SideItem: FC<SideItemProps> = ({ onPress, title, position }) => {
|
|
||||||
return (
|
|
||||||
<TouchableOpacity
|
|
||||||
onPress={onPress}
|
|
||||||
style={{ flexDirection: "column", flex: 1 }}
|
|
||||||
>
|
|
||||||
<View style={{ flex: 1 }} />
|
|
||||||
<Text style={{ textAlign: position, ...textStyle }}>{title}</Text>
|
|
||||||
<View style={{ flex: 1 }} />
|
|
||||||
</TouchableOpacity>
|
|
||||||
);
|
|
||||||
};
|
|
Loading…
Reference in New Issue
Block a user