getTrainTypeの仕様変更に追従

This commit is contained in:
harukin-expo-dev-env
2025-09-11 16:08:03 +00:00
parent 9ab4c0a205
commit ad2d18e263
13 changed files with 251 additions and 129 deletions

View File

@@ -5,12 +5,13 @@ import { useStationList, StationProps } from "@/stateBox/useStationList";
import { FC, useEffect, useState } from "react";
import { Text, TouchableOpacity, View, Image } from "react-native";
import { customTrainDataDetector } from "../../custom-train-data";
import { getStringConfig, typeID } from "@/lib/getStringConfig";
import { getStringConfig } from "@/lib/getStringConfig";
import { getTrainType } from "@/lib/getTrainType";
import { trainPosition } from "@/lib/trainPositionTextArray";
import { StationNumberMaker } from "../../駅名表/StationNumberMaker";
import { lineListPair, stationIDPair } from "@/lib/getStationList";
import { findReversalPoints } from "@/lib/eachTrainInfoCoreLib/findReversalPoints";
import { trainTypeID } from "@/lib/CommonTypes";
type props = {
trainID: string;
@@ -70,7 +71,7 @@ export const FixedTrain: FC<props> = ({ trainID }) => {
isWanman: boolean;
trainName: string;
trainNumDistance: number;
type: typeID;
type: trainTypeID;
viaData: string;
info?: string;
uwasa?: string;
@@ -235,6 +236,7 @@ export const FixedTrain: FC<props> = ({ trainID }) => {
station.length > 0
? lineColorList[station[0]?.StationNumber.slice(0, 1)]
: "black";
const customTrainType = getTrainType({ type: customData.type, whiteMode: true });
return (
<TouchableOpacity
style={{ flex: 1, flexDirection: "row", backgroundColor: "black" }}
@@ -248,7 +250,7 @@ export const FixedTrain: FC<props> = ({ trainID }) => {
<View style={{ flex: 1, flexDirection: "row" }}>
<View
style={{
backgroundColor: getTrainType(customData.type, true).color,
backgroundColor: customTrainType.color,
flexDirection: "row",
alignContent: "center",
alignSelf: "center",
@@ -296,9 +298,9 @@ export const FixedTrain: FC<props> = ({ trainID }) => {
</View>
<View
style={{
backgroundColor: getTrainType(customData.type, true).color,
backgroundColor: customTrainType.color,
width: 10,
borderLeftColor: getTrainType(customData.type, true).color,
borderLeftColor: customTrainType.color,
borderTopColor: lineColor,
borderBottomColor: lineColor,
borderTopWidth: 14,