From 2a70a0e34bfa29818ac917e1f5086b3668e7b693 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Wed, 31 Dec 2025 06:46:38 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=E5=88=97=E8=BB=8A=E3=81=AE=E9=80=B2?= =?UTF-8?q?=E8=A1=8C=E6=96=B9=E5=90=91=E6=83=85=E5=A0=B1=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EachTrainInfoCore/HeaderText.tsx | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/components/ActionSheetComponents/EachTrainInfoCore/HeaderText.tsx b/components/ActionSheetComponents/EachTrainInfoCore/HeaderText.tsx index 7ca88b0..6a06b84 100644 --- a/components/ActionSheetComponents/EachTrainInfoCore/HeaderText.tsx +++ b/components/ActionSheetComponents/EachTrainInfoCore/HeaderText.tsx @@ -216,13 +216,20 @@ export const HeaderText: FC = ({ size={20} color="white" style={{ marginLeft: 5 }} - onPress={() => + onPress={() => { + // 列番が奇数か偶数かで表示順を逆転 + const trainNumInt = parseInt(trainNum, 10); + const ops = todayOperation ? [...todayOperation] : []; + const displayOps = trainNumInt % 2 === 0 ? ops : ops.reverse(); + const directionText = trainNumInt % 2 === 0 + ? '←進行方向' + : '進行方向→'; alert( - `[このアイコン、列車データはコミュニティによってリアルタイム追加されています。]\n使用車両情報:\n${todayOperation - ?.map((op) => op.unit_ids) - .join("+")}\n投稿者メモ:\n${uwasa || "なし"}` - ) - } + `[このアイコン、列車データはコミュニティによってリアルタイム追加されています。]\n使用車両情報:\n${displayOps + .map((op) => op.unit_ids) + .join("+")}\n${directionText}\n投稿者メモ:\n${uwasa || "なし"}` + ); + }} /> )} From 2888c4130106afc533f89c361b6db31f84eecfa9 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Wed, 31 Dec 2025 08:57:58 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A2=97=E8=A7=A3=E7=B5=90=E3=81=AE?= =?UTF-8?q?=E6=9A=AB=E5=AE=9A=E7=9A=84=E5=AF=BE=E5=BF=9C=E3=82=92=E4=BD=9C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EachTrainInfo/DataConnectedButton.tsx | 64 ++++++++++++++ .../EachTrainInfo/DataFromButton.tsx | 36 -------- .../EachTrainInfo/EachStopList.tsx | 87 +++++++++++++------ .../EachTrainInfoCore.tsx | 16 ++-- 4 files changed, 135 insertions(+), 68 deletions(-) create mode 100644 components/ActionSheetComponents/EachTrainInfo/DataConnectedButton.tsx delete mode 100644 components/ActionSheetComponents/EachTrainInfo/DataFromButton.tsx diff --git a/components/ActionSheetComponents/EachTrainInfo/DataConnectedButton.tsx b/components/ActionSheetComponents/EachTrainInfo/DataConnectedButton.tsx new file mode 100644 index 0000000..97c5c6f --- /dev/null +++ b/components/ActionSheetComponents/EachTrainInfo/DataConnectedButton.tsx @@ -0,0 +1,64 @@ +import React, { FC } from "react"; +import { View, Text, TouchableWithoutFeedback, Alert } from "react-native"; +import { useAllTrainDiagram } from "@/stateBox/useAllTrainDiagram"; + +export const DataConnectedButton: FC<{ + i: string; + openTrainInfo: (trainNum: string) => void; +}> = ({ i, openTrainInfo }) => { + const [station, se, time] = i.split(","); + const { keyList } = useAllTrainDiagram(); + // 列番が有効かどうかをチェックする関数 + const isValidTrainNumber = (trainNum: string): boolean => { + return keyList.includes(trainNum); + }; + + return ( + { + // timeの文字列が列番として有効かを検証する + if (!isValidTrainNumber(time)) { + Alert.alert( + "列番が見つかりません", + `列番「${time}」は時刻表に存在しません。`, + [{ text: "OK" }] + ); + return; + } + + openTrainInfo(time); + }} + key={station + time} + > + + + + + {se === "連" ? "⬐" : "↳"} + + {time} + + + {se === "連" ? "連結" : "解結"} + + + + + ); +}; diff --git a/components/ActionSheetComponents/EachTrainInfo/DataFromButton.tsx b/components/ActionSheetComponents/EachTrainInfo/DataFromButton.tsx deleted file mode 100644 index 155a48a..0000000 --- a/components/ActionSheetComponents/EachTrainInfo/DataFromButton.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import React, { FC } from "react"; -import { View, Text, TouchableWithoutFeedback } from "react-native"; -import { MaterialCommunityIcons } from "@expo/vector-icons"; -import { Linking } from "react-native"; -export const DataFromButton: FC<{ i: string }> = ({ i }) => { - const [station, se, time] = i.split(","); - return ( - Linking.openURL(time)} - key={station} - > - - - {station} - - - 提供元 - - - - - - ); -}; diff --git a/components/ActionSheetComponents/EachTrainInfo/EachStopList.tsx b/components/ActionSheetComponents/EachTrainInfo/EachStopList.tsx index 5a15267..20ced97 100644 --- a/components/ActionSheetComponents/EachTrainInfo/EachStopList.tsx +++ b/components/ActionSheetComponents/EachTrainInfo/EachStopList.tsx @@ -4,11 +4,11 @@ import dayjs from "dayjs"; import lineColorList from "../../../assets/originData/lineColorList"; import { trainDataType } from "@/lib/trainPositionTextArray"; import { getStopListColors } from "./colorScheme"; -import { - isCanceledSe, - isThroughSe, +import { + isCanceledSe, + isThroughSe, isCommunitySe, - parseSeString + parseSeString, } from "@/utils/seUtils"; import type { SeTypes } from "@/types"; @@ -96,9 +96,9 @@ export const EachStopList: FC = ({ "StationNumber": "B01", }, ] */ - const StationNumbers = Stations - .filter((d) => d.StationNumber != null) - .map((d) => d.StationNumber as string); + const StationNumbers = Stations.filter((d) => d.StationNumber != null).map( + (d) => d.StationNumber as string + ); // SE文字列を表示用に変換 const [seString, seType] = parseSeString(se); @@ -106,26 +106,51 @@ export const EachStopList: FC = ({ const isThrough = isThroughSe(se); const isCanceled = isCanceledSe(se); const isCommunity = isCommunitySe(se); - const isDelayed = currentTrainData?.delay !== undefined && - currentTrainData?.delay !== "入線" && - currentTrainData?.delay > 0; - - const colors = getStopListColors(isThrough, isCommunity, isCanceled, isDelayed, isNotService); + const isDelayed = + currentTrainData?.delay !== undefined && + currentTrainData?.delay !== "入線" && + currentTrainData?.delay > 0; + + const colors = getStopListColors( + isThrough, + isCommunity, + isCanceled, + isDelayed, + isNotService + ); // 打ち消し線用の通常色(遅延していない時の色) - const normalColors = getStopListColors(isThrough, isCommunity, isCanceled, false, isNotService); + const normalColors = getStopListColors( + isThrough, + isCommunity, + isCanceled, + false, + isNotService + ); // beforeSameStationData用の色設定 // 通過系と編(コミュニティ)はbeforeのseから判定、休(運休)は現在のseから判定 let beforeTimeTextColor = colors.timeText; let beforeNormalTimeTextColor = normalColors.timeText; - + if (beforeSameStationData) { const beforeSe = beforeSameStationData[1]; const beforeIsThrough = isThroughSe(beforeSe); const beforeIsCommunity = isCommunitySe(beforeSe); // 運休判定は現在のseを使用(本体と同じ背景色なので) - const beforeColors = getStopListColors(beforeIsThrough, beforeIsCommunity, isCanceled, isDelayed, isNotService); - const beforeNormalColors = getStopListColors(beforeIsThrough, beforeIsCommunity, isCanceled, false, isNotService); + const beforeColors = getStopListColors( + beforeIsThrough, + beforeIsCommunity, + isCanceled, + isDelayed, + isNotService + ); + const beforeNormalColors = getStopListColors( + beforeIsThrough, + beforeIsCommunity, + isCanceled, + false, + isNotService + ); beforeTimeTextColor = beforeColors.timeText; beforeNormalTimeTextColor = beforeNormalColors.timeText; } @@ -136,7 +161,7 @@ export const EachStopList: FC = ({ openStationACFromEachTrainInfo && openStationACFromEachTrainInfo(station) } - key={station+se+time} + key={station + se + time} > = ({ - + {points && ( 🚊 )} - + {beforeSameStationData && ( = ({ currentTrainData={currentTrainData} se={beforeSameStationData[1]} time={beforeSameStationData[2]} - key={"before"+beforeSameStationData[2]} + key={"before" + beforeSameStationData[2]} textColor={beforeTimeTextColor} normalTextColor={beforeNormalTimeTextColor} /> @@ -209,7 +234,7 @@ export const EachStopList: FC = ({ currentTrainData={currentTrainData} se={se} time={time} - key={se+time} + key={se + time} textColor={colors.timeText} normalTextColor={normalColors.timeText} /> @@ -228,9 +253,17 @@ const TimeText: FC<{ time: string; textColor: string; normalTextColor: string; -}> = ({ isDouble, currentTrainData, se, time, isBefore=false, textColor, normalTextColor }) => { +}> = ({ + isDouble, + currentTrainData, + se, + time, + isBefore = false, + textColor, + normalTextColor, +}) => { const [seString, seType] = parseSeString(se); - + return ( {!!currentTrainData?.delay && @@ -243,7 +276,7 @@ const TimeText: FC<{ color: normalTextColor, width: 60, position: "absolute", - right: isBefore ? 125:120, + right: isBefore ? 125 : 120, textAlign: "right", textDecorationLine: "line-through", fontStyle: seType == "community" ? "italic" : "normal", @@ -325,7 +358,7 @@ const StationTimeBox: FC = (props) => { .set("hour", parseInt(time.split(":")[0])) .set("minute", parseInt(time.split(":")[1])) .add(delay == "入線" || delay == undefined ? 0 : delay, "minute"); - + return ( )} {trainDataWithThrough.map((item, index, array) => - item.split(",")[1] === "提" ? ( - + item.split(",")[1] === "連" || item.split(",")[1] === "解" ? ( + + ) : item.split(",")[1].includes(".") ? ( + <> ) : ( Date: Wed, 31 Dec 2025 09:50:22 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=E3=83=AC=E3=82=A4=E3=82=A2=E3=82=A6?= =?UTF-8?q?=E3=83=88=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EachTrainInfo/DataConnectedButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ActionSheetComponents/EachTrainInfo/DataConnectedButton.tsx b/components/ActionSheetComponents/EachTrainInfo/DataConnectedButton.tsx index 97c5c6f..f8035dd 100644 --- a/components/ActionSheetComponents/EachTrainInfo/DataConnectedButton.tsx +++ b/components/ActionSheetComponents/EachTrainInfo/DataConnectedButton.tsx @@ -46,10 +46,10 @@ export const DataConnectedButton: FC<{ position: "relative", marginHorizontal: 15, flexDirection: "row", - height: "101%", + height: "10%", }} /> - + {se === "連" ? "⬐" : "↳"} {time} From bb1ee2666e5c91819bc3330128a9636b5e2ad753 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Wed, 31 Dec 2025 09:51:57 +0000 Subject: [PATCH 4/4] 6.1.9.4 --- components/Settings/SettingTopPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/Settings/SettingTopPage.tsx b/components/Settings/SettingTopPage.tsx index a046373..9341906 100644 --- a/components/Settings/SettingTopPage.tsx +++ b/components/Settings/SettingTopPage.tsx @@ -17,7 +17,7 @@ import { SwitchArea } from "../atom/SwitchArea"; import { useNotification } from "../../stateBox/useNotifications"; import { SheetHeaderItem } from "@/components/atom/SheetHeaderItem"; -const versionCode = "6.1.9.3"; // Update this version code as needed +const versionCode = "6.1.9.4"; // Update this version code as needed export const SettingTopPage = ({ testNFC,