From 8d10fbf998b7b1e477693368d880a25dbdc04f30 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Tue, 15 Jul 2025 15:15:04 +0000 Subject: [PATCH 1/5] =?UTF-8?q?=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/webViewInjectjavascript.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/webViewInjectjavascript.ts b/lib/webViewInjectjavascript.ts index a7f920e..502efd8 100644 --- a/lib/webViewInjectjavascript.ts +++ b/lib/webViewInjectjavascript.ts @@ -73,7 +73,8 @@ export const injectJavascriptData: InjectJavascriptData = ( const trainIcon = ` const setStationIcon = (setIconElem,img,hasProblem) =>{ const position = setIconElem.getAttribute("style").includes("left"); - setIconElem.insertAdjacentHTML('beforebegin', ""); + const marginData = ${uiSetting === "tokyo" ? `"5px"`: `"2px"`} + setIconElem.insertAdjacentHTML('beforebegin', ""); setIconElem.remove(); } @@ -1052,7 +1053,7 @@ export const injectJavascriptData: InjectJavascriptData = ( return undefined; } } - const nameReplace = (列車名データ,列番データ,行き先情報,hasProblem) =>{ + const nameReplace = (列車名データ,列番データ,行き先情報,hasProblem,isLeft) =>{ let isWanman = false; let trainName = ""; let trainType = ""; @@ -1344,14 +1345,9 @@ export const injectJavascriptData: InjectJavascriptData = ( } const gradient = getColors.length > 1 ? "linear-gradient(130deg, " + getColors[0] + " 0%, "+ getColors[0]+"50%, "+ getColors[1]+"50%, " + getColors[1] + " 100%)" : getColors[0]; - 行き先情報.insertAdjacentHTML('beforebegin', "

" + TrainNumber + (JRF ? "":"レ") + "

"); - 行き先情報.insertAdjacentHTML('beforebegin', "

" + (isWanman ? "ワンマン " : "") + "

"); - 行き先情報.insertAdjacentHTML('beforebegin', "

" + viaData + "

"); - 行き先情報.insertAdjacentHTML('beforebegin', "

" + trainName + "

"); - 行き先情報.insertAdjacentHTML('beforebegin', "

" + (ToData ? ToData + "行" : ToData) + "

"); - 行き先情報.insertAdjacentHTML('beforebegin', "

" + trainType + "

"); - 行き先情報.insertAdjacentHTML('beforebegin', "

" + (hasProblem ? "‼️停止中‼️" : "") + "

"); - `: ` + + 行き先情報.insertAdjacentHTML('beforebegin', "

" + TrainNumber + (JRF ? "":"レ") + "

" + (isWanman ? "ワンマン " : "") + "

" + viaData + "

" + trainName + "

" + (ToData ? ToData + "行" : ToData) + "

" + trainType + "

" + (hasProblem ? "‼️停止中‼️" : "") + "

"); +`: ` 行き先情報.insertAdjacentHTML('beforebegin', "

" + returnText1 + "

"); 行き先情報.insertAdjacentHTML('beforebegin', "

" + (ToData ? ToData + "行 " : ToData) + "

" + TrainNumber + (JRF ? "":"レ") + "

"); 行き先情報.insertAdjacentHTML('beforebegin', "

" + (hasProblem ? "‼️停止中‼️" : "") + "

"); @@ -1373,7 +1369,7 @@ const setNewTrainItem = (element,hasProblem)=>{ }else if(JRFTemp){ element.style.borderColor = 'rgba(0, 134, 158, 0.8)'; }else{ - element.style.borderColor = 'white'; + element.style.borderColor = 'black'; } element.style.borderWidth = '2px'; element.style.borderStyle = 'solid'; @@ -1486,6 +1482,9 @@ const setStrings = () =>{ var 行き先情報 = element.getElementsByTagName("p")[0]; ${uiSetting === "tokyo" ? ` + element.querySelector("img").insertAdjacentHTML('beforebegin',"
"); + element.querySelector("img").insertAdjacentHTML('afterend',"
"); + element.querySelector("img").style.padding = '5px'; element.style.position = 'relative'; if(element.getElementsByTagName("p")[1] != undefined){ element.getElementsByTagName("p")[1].innerText = element.getElementsByTagName("p")[1].innerText.replace("(","").replace(")",""); @@ -1506,6 +1505,7 @@ const setStrings = () =>{ element.getElementsByTagName("p")[1].style.top = '0px'; } }`: ``} + const isLeft = element.getAttribute("style").includes("left"); var 列番データ = element.getAttribute('offclick').split('"')[1]; var 列車名データ = element.getAttribute('offclick').split('"')[3]; const trainData = trainPositionDatas.filter(e=>!(e.Pos && e.Pos.includes("予告窓"))).find(e => e.TrainNum == 列番データ); @@ -1530,7 +1530,7 @@ const setStrings = () =>{ } } ` : ""} - nameReplace(列車名データ,列番データ,行き先情報,hasProblem); + nameReplace(列車名データ,列番データ,行き先情報,hasProblem,isLeft); ${uiSetting === "tokyo" ? `setNewTrainItem(element,hasProblem);`: ``} } try{ From f75582ee53df0e63b5c8c87f7fb7b77b46523d69 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Wed, 16 Jul 2025 23:46:26 +0000 Subject: [PATCH 2/5] =?UTF-8?q?menu=E3=81=AE=E3=83=AC=E3=82=A4=E3=82=A2?= =?UTF-8?q?=E3=82=A6=E3=83=88=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Menu/RailScope/SearchUnitBox.tsx | 42 +++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/components/Menu/RailScope/SearchUnitBox.tsx b/components/Menu/RailScope/SearchUnitBox.tsx index 1a7af13..2e7741c 100644 --- a/components/Menu/RailScope/SearchUnitBox.tsx +++ b/components/Menu/RailScope/SearchUnitBox.tsx @@ -50,26 +50,10 @@ export const SearchUnitBox = ({ flexDirection: "column", display: "flex", flex: 1, + alignContent: "center", + justifyContent: "flex-end", }} > - - {}} - onChange={(ret) => setInput(ret.nativeEvent.text)} - value={input} - style={{ flex: 1 }} - /> - { @@ -87,6 +71,26 @@ export const SearchUnitBox = ({ style={{ marginRight: 10 }} /> + + {}} + onChange={(ret) => setInput(ret.nativeEvent.text)} + value={input} + style={{ flex: 1 }} + /> + + + {!input && {Object.keys(lineList_LineWebID).map((d) => ( ))} - + } )} From 326cd60733885d8a30f8d96ca5f068b4367c0327 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Thu, 17 Jul 2025 10:27:43 +0000 Subject: [PATCH 3/5] =?UTF-8?q?css=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/webViewInjectjavascript.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/webViewInjectjavascript.ts b/lib/webViewInjectjavascript.ts index 502efd8..9ac40b7 100644 --- a/lib/webViewInjectjavascript.ts +++ b/lib/webViewInjectjavascript.ts @@ -1346,7 +1346,7 @@ export const injectJavascriptData: InjectJavascriptData = ( const gradient = getColors.length > 1 ? "linear-gradient(130deg, " + getColors[0] + " 0%, "+ getColors[0]+"50%, "+ getColors[1]+"50%, " + getColors[1] + " 100%)" : getColors[0]; - 行き先情報.insertAdjacentHTML('beforebegin', "

" + TrainNumber + (JRF ? "":"レ") + "

" + (isWanman ? "ワンマン " : "") + "

" + viaData + "

" + trainName + "

" + (ToData ? ToData + "行" : ToData) + "

" + trainType + "

" + (hasProblem ? "‼️停止中‼️" : "") + "

"); + 行き先情報.insertAdjacentHTML('beforebegin', "

" + TrainNumber + (JRF ? "":"レ") + "

" + (isWanman ? "ワンマン " : "") + "

" + viaData + "

" + trainName + "

" + (ToData ? ToData + "行" : ToData) + "

" + trainType + "

" + (hasProblem ? "‼️停止中‼️" : "") + "

"); `: ` 行き先情報.insertAdjacentHTML('beforebegin', "

" + returnText1 + "

"); 行き先情報.insertAdjacentHTML('beforebegin', "

" + (ToData ? ToData + "行 " : ToData) + "

" + TrainNumber + (JRF ? "":"レ") + "

"); @@ -1406,12 +1406,12 @@ const setNewTrainItem = (element,hasProblem)=>{ element.addEventListener('touchend', () => element.style.transform = 'scale(1)'); if(element.getAttribute("style").includes("left")){ // borderを使って五角形を生成 下り - element.style.borderRadius = '10% 10% 40% 40%'; + element.style.borderRadius = '30px 30px 120px 120px'; element.style.flexDirection = 'column-reverse'; } else if(element.getAttribute("style").includes("right")){ // borderを使って五角形を生成 上り - element.style.borderRadius = '40% 40% 10% 10%'; + element.style.borderRadius = '120px 120px 30px 30px'; element.style.flexDirection = 'column'; } From 0c10bcc339ac69e5d7c993a3a3d072b57dcf5a51 Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Fri, 18 Jul 2025 15:18:33 +0000 Subject: [PATCH 4/5] =?UTF-8?q?=E6=96=B0=E5=9E=8BCSS=E3=81=AE=E5=BD=A2?= =?UTF-8?q?=E6=85=8B=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/webViewInjectjavascript.ts | 101 +++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 44 deletions(-) diff --git a/lib/webViewInjectjavascript.ts b/lib/webViewInjectjavascript.ts index 9ac40b7..088bd84 100644 --- a/lib/webViewInjectjavascript.ts +++ b/lib/webViewInjectjavascript.ts @@ -1421,57 +1421,70 @@ const setStrings = () =>{ try { const elements = document.querySelectorAll('#disp > div > div > div[onclick]'); const setNewTrainItemUI = ()=>{ - const elementBaseBase = document.querySelectorAll('[id^="stationBlock"]'); - elementBaseBase.forEach(e=>{ //それぞれの駅ブロック横一列 + const aaa = (x2,pos) => { + x2.style.display = 'flex'; + x2.style.flexDirection = 'row'; + if(pos == "right"){ + x2.style.alignItems = 'flex-start'; + x2.style.justifyContent = 'flex-start'; + }else if(pos == "left"){ + x2.style.alignItems = 'flex-end'; + x2.style.justifyContent = 'flex-end'; + } + x2.style.flexWrap = 'wrap'; + x2.style.width = '100%'; + x2.style.height = "100%"; + + } + const aaa2 = (x2) => { + x2.style.display = 'flex'; + x2.style.flexDirection = 'row'; + x2.style.alignItems = 'center'; + x2.style.justifyContent = 'center'; + x2.style.flexWrap = 'wrap'; + x2.style.width = '100%'; + x2.style.height = "unset"; + const x3 = x2.querySelectorAll(":scope > div"); + x3.forEach(i=>{ + i.style.position = "unset"; + i.style.display = "flex"; + i.style.flexDirection = "column"; + i.style.flex = "1"; + i.style.backgroundColor = "#00000000"; + i.querySelectorAll(":scope > *").forEach(j=>{ + j.style.width = "100%"; + j.style.textAlign = "center"; + j.style.margin = "5px"; + j.style.padding = "5px"; + }); + }); + } + const layoutBase = (e)=>{ e.style.display = 'flex'; e.style.height = "unset"; e.style.flexDirection = 'row'; - //e.style.alignItems = "left"; e.style.justifyContent = 'center'; - const x = e.querySelectorAll(':scope > div');//配下のdiv要素を選択 - //x[0] 登りブロック x[2] 下りブロック x[1] 駅ブロック - const aaa = (x2,pos) => { - x2.style.display = 'flex'; - x2.style.flexDirection = 'row'; - if(pos == "right"){ - x2.style.alignItems = 'flex-start'; - x2.style.justifyContent = 'flex-start'; - }else if(pos == "left"){ - x2.style.alignItems = 'flex-end'; - x2.style.justifyContent = 'flex-end'; - } - x2.style.flexWrap = 'wrap'; - x2.style.width = '100%'; - x2.style.height = "100%"; - - } - const aaa2 = (x2) => { - x2.style.display = 'flex'; - x2.style.flexDirection = 'row'; - x2.style.alignItems = 'center'; - x2.style.justifyContent = 'center'; - x2.style.flexWrap = 'wrap'; - x2.style.width = '100%'; - x2.style.height = "unset"; - const x3 = x2.querySelectorAll(":scope > div"); - x3.forEach(i=>{ - i.style.position = "unset"; - i.style.display = "flex"; - i.style.flexDirection = "column"; - i.style.flex = "1"; - i.style.backgroundColor = "#00000000"; - i.querySelectorAll(":scope > *").forEach(j=>{ - j.style.width = "100%"; - j.style.textAlign = "center"; - j.style.margin = "5px"; - j.style.padding = "5px"; - }); - }); - } + } + const elementBaseBase = document.querySelectorAll('[id^="stationBlock"]'); + const elementNotBase = document.querySelectorAll('#disp > [id*="~"]'); + elementNotBase.forEach(e=>{ + layoutBase(e); + const x = e.querySelectorAll(':scope > [id^="Up"], :scope > [id^="Id"], :scope > [id^="Down"]');//配下のdiv要素を選択 + aaa(x[0],"left"); + aaa2(x[1]); + aaa(x[2],"right"); + const upTrainCrossBarElement = e.querySelector(':scope > [id="upTrainCrossBar"]'); + if (upTrainCrossBarElement) { + upTrainCrossBarElement.style.left = '0px'; + } + }); + elementBaseBase.forEach(e=>{ //それぞれの駅ブロック横一列 + layoutBase(e); + const x = e.querySelectorAll(':scope > div');//配下のdiv要素を選択 + //x[0] 登りブロック x[2] 下りブロック x[1] 駅ブロック aaa(x[0],"left"); aaa2(x[1]); aaa(x[2],"right"); - }); } From acd5d0bb882139379fe5e409f3b7f291a7a14dcf Mon Sep 17 00:00:00 2001 From: harukin-expo-dev-env Date: Fri, 18 Jul 2025 15:34:00 +0000 Subject: [PATCH 5/5] =?UTF-8?q?=E6=A4=9C=E7=B4=A2=E5=89=8A=E9=99=A4?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Menu/RailScope/SearchUnitBox.tsx | 99 +++++++++++++-------- 1 file changed, 62 insertions(+), 37 deletions(-) diff --git a/components/Menu/RailScope/SearchUnitBox.tsx b/components/Menu/RailScope/SearchUnitBox.tsx index 2e7741c..01cf4be 100644 --- a/components/Menu/RailScope/SearchUnitBox.tsx +++ b/components/Menu/RailScope/SearchUnitBox.tsx @@ -79,6 +79,9 @@ export const SearchUnitBox = ({ paddingRight: 10, paddingLeft: 10, flex: 1, + flexDirection: "row", + alignItems: "center", + justifyContent: "center", }} > + {input && ( + setInput("") } + style={{ + padding: 3, + borderRadius: 15, + backgroundColor: "lightgray", + }} + > + + + )} - {!input && - {Object.keys(lineList_LineWebID).map((d) => ( - { - const id = stationIDPair[lineList_LineWebID[d]]; - const s = isSearchMode == id ? undefined : id; - if (!s) return; - setisSearchMode(s); - }} - key={stationIDPair[lineList_LineWebID[d]]} - > - + {Object.keys(lineList_LineWebID).map((d) => ( + { + const id = stationIDPair[lineList_LineWebID[d]]; + const s = isSearchMode == id ? undefined : id; + if (!s) return; + setisSearchMode(s); + }} + key={stationIDPair[lineList_LineWebID[d]]} > - {stationIDPair[lineList_LineWebID[d]]} - - - ))} - } + + {stationIDPair[lineList_LineWebID[d]]} + + + ))} + + )} )}