Skip to content
Merged

canary #5710

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ android {
dimension "environment"
applicationId "me.tinykitten.trainlcd.dev"
versionNameSuffix "-dev"
versionCode 100000353
versionCode 100000354
versionName "10.3.1"
}
prod {
dimension "environment"
versionCode 100000353
versionCode 100000354
versionName "10.3.1"
}
}
Expand Down
5 changes: 3 additions & 2 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default ({ config }: ConfigContext) => ({
},
},
ios: {
buildNumber: '2566',
buildNumber: '2567',
bundleIdentifier:
process.env.EAS_BUILD_PROFILE === 'production'
? 'me.tinykitten.trainlcd'
Expand All @@ -70,7 +70,7 @@ export default ({ config }: ConfigContext) => ({
? 'me.tinykitten.trainlcd'
: 'me.tinykitten.trainlcd.dev',
permissions: [],
versionCode: 100000353,
versionCode: 100000354,
},
owner: 'trainlcd',
});
Expand Down Expand Up @@ -129,5 +129,6 @@ export default ({ config }: ConfigContext) => ({






36 changes: 18 additions & 18 deletions ios/TrainLCD.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2419,7 +2419,7 @@
CODE_SIGN_ENTITLEMENTS = ProdTrainLCD.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = E6R2G33Z36;
INFOPLIST_FILE = TrainLCD/Schemes/Prod/Info.plist;
Expand Down Expand Up @@ -2458,7 +2458,7 @@
CODE_SIGN_ENTITLEMENTS = ProdTrainLCD.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEVELOPMENT_TEAM = E6R2G33Z36;
INFOPLIST_FILE = TrainLCD/Schemes/Prod/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = TrainLCD;
Expand Down Expand Up @@ -2517,7 +2517,7 @@
CODE_SIGN_ENTITLEMENTS = TrainLCD/trainlcd.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
CXX = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -2623,7 +2623,7 @@
CODE_SIGN_ENTITLEMENTS = TrainLCD/trainlcd.entitlements;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
CXX = "$(REACT_NATIVE_PATH)/scripts/xcode/ccache-clang++.sh";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand Down Expand Up @@ -2702,7 +2702,7 @@
CODE_SIGN_ENTITLEMENTS = CanaryTrainLCD.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = E6R2G33Z36;
INFOPLIST_FILE = TrainLCD/Schemes/Dev/Info.plist;
Expand Down Expand Up @@ -2741,7 +2741,7 @@
CODE_SIGN_ENTITLEMENTS = CanaryTrainLCD.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = E6R2G33Z36;
INFOPLIST_FILE = TrainLCD/Schemes/Dev/Info.plist;
Expand Down Expand Up @@ -2952,7 +2952,7 @@
CODE_SIGN_ENTITLEMENTS = RideSessionActivity/CanaryRideSessionActivity.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = E6R2G33Z36;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -3003,7 +3003,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = E6R2G33Z36;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -3054,7 +3054,7 @@
CODE_SIGN_ENTITLEMENTS = WatchWidget/ProdWatchWidget.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = E6R2G33Z36;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand Down Expand Up @@ -3112,7 +3112,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = E6R2G33Z36;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand Down Expand Up @@ -3163,7 +3163,7 @@
CODE_SIGN_ENTITLEMENTS = WatchWidget/CanaryWatchWidget.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = E6R2G33Z36;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand Down Expand Up @@ -3220,7 +3220,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = E6R2G33Z36;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
Expand Down Expand Up @@ -3268,7 +3268,7 @@
CODE_SIGN_ENTITLEMENTS = RideSessionActivity/ProdRideSessionActivity.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = E6R2G33Z36;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -3319,7 +3319,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = E6R2G33Z36;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -3538,7 +3538,7 @@
CODE_SIGN_ENTITLEMENTS = ProdAppClip/ProdAppClip.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = E6R2G33Z36;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
Expand Down Expand Up @@ -3594,7 +3594,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = E6R2G33Z36;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
Expand Down Expand Up @@ -3644,7 +3644,7 @@
CODE_SIGN_ENTITLEMENTS = CanaryAppClip/CanaryAppClip.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = E6R2G33Z36;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
Expand Down Expand Up @@ -3702,7 +3702,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 2566;
CURRENT_PROJECT_VERSION = 2567;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = E6R2G33Z36;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
Expand Down
8 changes: 8 additions & 0 deletions src/components/LineBoardEast.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ jest.mock('~/hooks', () => ({
useTransferLinesFromStation: jest.fn(() => []),
}));

jest.mock('~/hooks/useAfterNextStation', () => ({
useAfterNextStation: jest.fn(() => undefined),
}));

jest.mock('~/hooks/useNextStation', () => ({
useNextStation: jest.fn(() => undefined),
}));

jest.mock('~/hooks/useScale', () => ({
useScale: jest.fn(() => ({ widthScale: jest.fn((val) => val) })),
}));
Expand Down
44 changes: 44 additions & 0 deletions src/components/LineBoardEast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import {
useInterval,
useTransferLinesFromStation,
} from '~/hooks';
import { useAfterNextStation } from '~/hooks/useAfterNextStation';
import { useNextStation } from '~/hooks/useNextStation';
import { useScale } from '~/hooks/useScale';
import { isEnAtom } from '~/store/selectors/isEn';
import lineState from '../store/atoms/line';
Expand All @@ -17,6 +19,7 @@ import isTablet from '../utils/isTablet';
import { BarTerminalEast } from './BarTerminalEast';
import { BarTerminalOdakyu } from './BarTerminalOdakyu';
import { type ChevronColor, ChevronTY } from './ChevronTY';
import { Heading } from './Heading';
import {
EmptyStationNameCell,
LineDot,
Expand Down Expand Up @@ -45,6 +48,17 @@ const localStyles = StyleSheet.create({
alignItems: 'center',
overflow: 'visible',
},
nextStopBanner: {
position: 'absolute',
bottom: 0,
left: '12.5%',
right: '12.5%',
},
nextStopBannerText: {
color: '#212121',
fontWeight: 'bold',
textAlign: 'center',
},
});

const NumberingIconView: React.FC<{ station: Station }> = ({ station }) => {
Expand Down Expand Up @@ -446,6 +460,8 @@ const LineBoardEast: React.FC<Props> = ({
);
const { selectedLine } = useAtomValue(lineState);
const currentLine = useCurrentLine();
const nextStation = useNextStation();
const afterNextStation = useAfterNextStation();

const dim = useWindowDimensions();

Expand All @@ -454,6 +470,21 @@ const LineBoardEast: React.FC<Props> = ({
[currentLine, selectedLine]
);

const hasPassStation = useMemo(
() => stations.some((s) => getIsPass(s)),
[stations]
);

const showNextStopBanner = useMemo(
() =>
isOdakyu &&
isTablet &&
hasPassStation &&
!!nextStation?.name &&
!!afterNextStation?.name,
[isOdakyu, hasPassStation, nextStation?.name, afterNextStation?.name]
);

const intervalStep = useCallback(
() =>
setChevronColor((prev) =>
Expand Down Expand Up @@ -523,6 +554,19 @@ const LineBoardEast: React.FC<Props> = ({
]}
>
{stationsWithEmpty.map(stationNameCellForMap)}
{showNextStopBanner ? (
<LinearGradient
colors={['white', '#ccc', '#ccc', 'white']}
start={[0, 1]}
end={[1, 0]}
locations={[0, 0.1, 0.9, 1]}
style={localStyles.nextStopBanner}
>
<Heading style={localStyles.nextStopBannerText}>
{`${nextStation?.name}のつぎは${afterNextStation?.name}にとまります`}
</Heading>
</LinearGradient>
) : null}
</View>
);
};
Expand Down
Loading