Compare commits

...

6 Commits

Author SHA1 Message Date
harukin-DeskMini
5ec8081a84 smile忘れを追加 2023-03-30 07:52:58 +09:00
harukin-DeskMini
7e67ac198d Merge commit 'bca2b300d3a4a35360f451fc78428dba50278119' into feature/ap2023 2023-03-30 03:26:06 +09:00
harukin-DeskMini
d2800f4d51 駅名標にえきちゃんを追加 2023-03-30 02:33:52 +09:00
harukin-DeskMini
fd90b82a0e アイコン変更 2023-03-27 08:01:24 +09:00
harukin-DeskMini
673cb6eecf 暴走えきちゃん復活 2023-03-27 07:10:41 +09:00
harukin-DeskMini
fef3367599 Merge commit '47d84777e2a26235d5442a68ae3b6bcb07f580cb' into feature/ap2023 2023-03-27 07:04:44 +09:00
5 changed files with 57 additions and 2 deletions

BIN
assets/素材.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

BIN
assets/素材2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
assets/素材3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -12,6 +12,7 @@ import {
widthPercentageToDP as wp,
heightPercentageToDP as hp,
} from "react-native-responsive-screen";
import AutoHeightImage from "react-native-auto-height-image";
import LottieView from "lottie-react-native";
import { useInterval } from "../../lib/useInterval";
import { AS } from "../../storageControl";
@ -57,6 +58,29 @@ export default function Sign(props) {
setNexPrePosition(0);
getPreNextStation(currentStation[0]);
}, [currentStation]);
const [smileUrl, setSmileUrl] = useState(undefined);
useEffect(() => {
const smile = currentStation[0].JrHpUrl.replace("/index.html", "/");
const stationSplit = smile.split("/");
const smileName = stationSplit[stationSplit.length - 2];
if (smileName == "takamatsu") {
setSmileUrl(smile + "/images/illustration.png");
} else if (smileName == "iyomishima") {
setSmileUrl(smile + "/images/iyo-mishima_smile.png");
} else if (smileName == "iyosaijo") {
setSmileUrl(smile + "/images/iyo-saijo_smile.png");
} else if (smileName == "nyugawa") {
setSmileUrl(smile + "/images/newgawa_smile.png");
} else if (smileName == "iyohojo") {
setSmileUrl(smile + "/images/iyo-hojo_smile.png");
} else if (smileName == "iyozu") {
setSmileUrl(smile + "/images/iyo-ozu_smile.png");
} else if (smileName == "oboke") {
setSmileUrl(smile + "/images/ooboke_smile.png");
} else {
setSmileUrl(smile + "images/" + smileName + "_smile.png");
}
}, [currentStation]);
useEffect(() => {
if (!currentStation[nexPrePosition]) return () => {};
@ -92,10 +116,18 @@ export default function Sign(props) {
const lottieRef = useRef();
return (
<TouchableOpacity style={styleSheet.外枠} onPress={oP}>
<AutoHeightImage
source={{
uri: smileUrl,
}}
resizeMode="contain"
width={wp("30%")}
style={{ position: "absolute", bottom: "30%" }}
/>
<StationNumberMaker currentStation={currentStation} />
<StationNameArea currentStation={currentStation} />
<TouchableOpacity
style={{ position: "absolute", right: -15, top: -20 }}
style={{ position: "absolute", right: -15, top: -13 }}
onPress={() => {
if (testButtonStatus) {
const otherData = favoriteStation.filter((d) => {
@ -118,7 +150,7 @@ export default function Sign(props) {
setTestButtonStatus(!testButtonStatus);
}}
>
<LottieDelayView
<LottieDelayViews
progress={testButtonStatus ? 1 : 0}
speed={1.4}
style={{ width: 80, height: 80 }}
@ -137,6 +169,26 @@ export default function Sign(props) {
);
}
const LottieDelayViews = ({
progress,
speed,
style,
source,
lottieRef,
loop,
}) => {
return (
<AutoHeightImage
source={
progress == 0
? require("../../assets/素材2.png")
: require("../../assets/素材3.png")
}
resizeMode="contain"
width={style.width}
/>
);
};
const LottieDelayView = ({
progress,
speed,

View File

@ -461,6 +461,9 @@ break;
default:
break;
}
//2023AP
setStationIcon(element.getElementsByTagName("img")[0],'https://nexcloud.haruk.in/s/4zcJWFmiAq3iqPS/preview');
`
: ``;