From 2040d829fe479ca64e2f378156591d253a805e8e Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Sun, 29 Jan 2023 04:07:41 +0900 Subject: [PATCH 01/30] =?UTF-8?q?=E3=81=8A=E6=B0=97=E3=81=AB=E5=85=A5?= =?UTF-8?q?=E3=82=8A=E6=A9=9F=E8=83=BD=E3=82=92=E5=AE=9F=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/939-star.json | 1 + components/駅名表/Sign.js | 64 ++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 assets/939-star.json diff --git a/assets/939-star.json b/assets/939-star.json new file mode 100644 index 0000000..86c7b8e --- /dev/null +++ b/assets/939-star.json @@ -0,0 +1 @@ +{"v":"4.11.1","fr":29.9700012207031,"ip":0,"op":60.0000024438501,"w":1000,"h":1000,"nm":"コンポ 1","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"シェイプレイヤー 8","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[503.281,325.035,0],"e":[503.281,175.035,0],"to":[0,-25,0],"ti":[0,25,0]},{"t":5.00000020365417}],"ix":2},"a":{"a":0,"k":[3.281,-284.965,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":0,"s":[100,0,100],"e":[100,100,100]},{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":5,"s":[100,100,100],"e":[100,0,100]},{"t":10.0000004073083}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"a":0,"k":[5,100],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"r":{"a":0,"k":0,"ix":4},"nm":"長方形パス 1","mn":"ADBE Vector Shape - Rect","hd":false},{"ty":"st","c":{"a":0,"k":[0.881533933153,0.904577038335,0.933333333333,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.914888090246,0.938708436255,0.953431372549,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0.781,-234.965],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"長方形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0}]},{"id":"comp_1","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"シェイプレイヤー 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[550.289,280.289,0],"ix":2},"a":{"a":0,"k":[50.289,-219.711,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[36.578,36.578],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.984359681373,0.862484501857,0.179983415791,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.241335191914,0.688379504634,0.964690563725,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[2.148,-72.766],"e":[50.289,-219.711],"to":[8.0234375,-24.4908847808838],"ti":[-8.0234375,24.4908847808838]},{"t":12.00000048877}],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667],"y":[1,1]},"o":{"x":[0.333,0.333],"y":[0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0"],"t":6,"s":[100,100],"e":[0,0]},{"t":13.0000005295009}],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":1,"k":[{"i":{"x":[0.08],"y":[0.997]},"o":{"x":[0.333],"y":[0]},"n":["0p08_0p997_0p333_0"],"t":0,"s":[0],"e":[100]},{"t":12.00000048877}],"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"シェイプレイヤー 6","sr":1,"ks":{"o":{"a":1,"k":[{"i":{"x":[0.105],"y":[0.995]},"o":{"x":[0.333],"y":[0]},"n":["0p105_0p995_0p333_0"],"t":6,"s":[0],"e":[100]},{"t":16.0000006516934}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.167,"y":0},"n":"0p833_1_0p167_0","t":6,"s":[504,444,0],"e":[603.945,197.945,0],"to":[16.6575527191162,-41.0091133117676,0],"ti":[-16.6575527191162,41.0091133117676,0]},{"t":16.0000006516934}],"ix":2},"a":{"a":0,"k":[103.945,-302.055,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.94,0.94,0.667],"y":[0.654,0.654,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p94_0p654_0p333_0","0p94_0p654_0p333_0","0p667_1_0p333_0"],"t":12,"s":[100,100,100],"e":[0,0,100]},{"t":17.0000006924242}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[51.891,51.891],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.984359681373,0.862484501857,0.179983415791,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.964690563725,0.241335191914,0.46671890558,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[103.945,-302.055],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"シェイプレイヤー 7","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-3.535,30.465,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":13,"s":[0,0,100],"e":[100,100,100]},{"t":21.0000008553475}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[522.93,522.93],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.477606799556,0.833195465686,0.49607256721,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":18,"s":[30],"e":[0]},{"t":27.0000010997325}],"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.869255514706,0.866526345646,0.851612106024,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-0.004,34.074],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"シェイプレイヤー 6","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-3.535,30.465,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":10,"s":[0,0,100],"e":[100,100,100]},{"t":18.000000733155}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[622.93,622.93],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.836412377451,0.289413063199,0.437022579418,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":15,"s":[30],"e":[0]},{"t":24.00000097754}],"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.869255514706,0.866526345646,0.851612106024,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-0.004,34.074],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":4.00000016292334,"op":904.000036820675,"st":4.00000016292334,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"シェイプレイヤー 5","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-3.535,30.465,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.667,0.667,0.667],"y":[1,1,1]},"o":{"x":[0.333,0.333,0.333],"y":[0,0,0]},"n":["0p667_1_0p333_0","0p667_1_0p333_0","0p667_1_0p333_0"],"t":7,"s":[0,0,100],"e":[100,100,100]},{"t":15.0000006109625}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[722.93,722.93],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"楕円形パス 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.328786573223,0.565331313189,0.860523897059,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"n":["0p667_1_0p333_0"],"t":12,"s":[30],"e":[0]},{"t":21.0000008553475}],"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.869255514706,0.866526345646,0.851612106024,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-0.004,34.074],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"楕円形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":1.00000004073083,"op":901.000036698482,"st":1.00000004073083,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"シェイプレイヤー 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-194,-151,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.453,0.453,0.667],"y":[1.938,1.938,1]},"o":{"x":[0.245,0.245,0.333],"y":[0.387,0.387,0]},"n":["0p453_1p938_0p245_0p387","0p453_1p938_0p245_0p387","0p667_1_0p333_0"],"t":13,"s":[0,0,100],"e":[102.07,102.07,100]},{"t":24.00000097754}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":5,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":0,"ix":5},"ir":{"a":0,"k":100,"ix":6},"is":{"a":0,"k":15,"ix":8},"or":{"a":0,"k":200,"ix":7},"os":{"a":0,"k":15,"ix":9},"ix":1,"nm":"多角形パス 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.962239583333,0.881815053902,0.442323632334,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-194,-126],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"多角形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"シェイプレイヤー 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[-194,-151,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":1,"d":1,"pt":{"a":0,"k":5,"ix":3},"p":{"a":0,"k":[0,0],"ix":4},"r":{"a":0,"k":0,"ix":5},"ir":{"a":0,"k":100,"ix":6},"is":{"a":0,"k":15,"ix":8},"or":{"a":0,"k":200,"ix":7},"os":{"a":0,"k":15,"ix":9},"ix":1,"nm":"多角形パス 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"線 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.869255514706,0.866526345646,0.851612106024,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"塗り 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-194,-126],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"トランスフォーム"}],"nm":"多角形 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":900.000036657751,"st":0,"bm":0},{"ddd":0,"ind":6,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-315,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":7,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-270,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":14.0000005702317,"op":914.000037227983,"st":14.0000005702317,"bm":0},{"ddd":0,"ind":8,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-225,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":9,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-180,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":14.0000005702317,"op":914.000037227983,"st":14.0000005702317,"bm":0},{"ddd":0,"ind":10,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-135,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":11,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-90,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":14.0000005702317,"op":914.000037227983,"st":14.0000005702317,"bm":0},{"ddd":0,"ind":12,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-45,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":13,"ty":0,"nm":"シェイプレイヤー 8 コンポジション 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":14.0000005702317,"op":914.000037227983,"st":14.0000005702317,"bm":0},{"ddd":0,"ind":14,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-315,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":12.00000048877,"op":912.000037146522,"st":12.00000048877,"bm":0},{"ddd":0,"ind":15,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-315,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":16,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-270,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":17,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-225,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":10.0000004073083,"op":910.00003706506,"st":10.0000004073083,"bm":0},{"ddd":0,"ind":18,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-225,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":19,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-180,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":20,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-135,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":10.0000004073083,"op":910.00003706506,"st":10.0000004073083,"bm":0},{"ddd":0,"ind":21,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-135,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":22,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-90,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":23,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-45,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":10.0000004073083,"op":910.00003706506,"st":10.0000004073083,"bm":0},{"ddd":0,"ind":24,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-45,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0},{"ddd":0,"ind":25,"ty":0,"nm":"プリコンポジション 1","refId":"comp_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[500,500,0],"ix":2},"a":{"a":0,"k":[500,500,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"w":1000,"h":1000,"ip":7.00000028511585,"op":907.000036942867,"st":7.00000028511585,"bm":0}]} \ No newline at end of file diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index f5efd11..20bcbbd 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -12,7 +12,9 @@ import { widthPercentageToDP as wp, heightPercentageToDP as hp, } from "react-native-responsive-screen"; +import LottieView from "lottie-react-native"; import { useInterval } from "../../lib/useInterval"; +import { AS } from "../../storageControl"; export default function Sign(props) { const { currentStation, originalStationList, oP } = props; @@ -20,6 +22,32 @@ export default function Sign(props) { const [preStation, setPreStation] = useState(); const [nexStation, setNexStation] = useState(); + const [testButtonStatus, setTestButtonStatus] = useState(false); + const [favoriteStation, setFavoriteStation] = useState([]); + + useEffect(() => { + AS.getItem("favoriteStation") + .then((d) => { + console.log(d); + const returnData = JSON.parse(d); + console.log(returnData); + setFavoriteStation(returnData); + }) + .catch((d) => console.log(d)); + }, []); + useEffect(() => { + const isFavorite = favoriteStation.filter((d) => { + const compare = JSON.stringify(d); + const current = JSON.stringify(currentStation); + if (compare === current) { + return true; + } else { + return false; + } + }); + console.log(isFavorite.length); + setTestButtonStatus(isFavorite.length != 0); + }, [favoriteStation]); useInterval(() => { if (currentStation.length == 1) { @@ -68,10 +96,46 @@ export default function Sign(props) { setPreStation(returnData[0]); setNexStation(returnData[1]); }; + const lottieRef = useRef(); return ( + { + if (testButtonStatus) { + lottieRef.current.play(35, 7); + const otherData = favoriteStation.filter((d) => { + const compare = JSON.stringify(d); + const current = JSON.stringify(currentStation); + if (compare !== current) { + return true; + } else { + return false; + } + }); + AS.setItem("favoriteStation", JSON.stringify(otherData)); + } else { + lottieRef.current.play(7, 35); + let ret = favoriteStation; + console.log(currentStation); + ret.push(currentStation); + AS.setItem("favoriteStation", JSON.stringify(ret)); + } + setTestButtonStatus(!testButtonStatus); + }} + > + + + JR From c996b31dad836bed1994d4f25997f75b61cb661c Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Sun, 29 Jan 2023 06:37:52 +0900 Subject: [PATCH 02/30] =?UTF-8?q?=E3=81=B5=E3=81=81=E3=81=BC=E3=82=8A?= =?UTF-8?q?=E3=81=99=E3=81=A8=E3=82=92=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 6 ++ components/FavoriteList.js | 115 +++++++++++++++++++++++++++++++++++++ components/trainMenu.js | 5 +- 3 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 components/FavoriteList.js diff --git a/App.js b/App.js index 8a4557c..74cbb29 100644 --- a/App.js +++ b/App.js @@ -16,6 +16,7 @@ import menu from "./menu"; import News from "./components/news.js"; import Setting from "./components/settings.js"; import trainMenu from "./components/trainMenu.js"; +import FavoriteList from "./components/FavoriteList.js"; const Stack = createStackNavigator(); const Tab = createBottomTabNavigator(); if (Platform.OS === "android") { @@ -95,6 +96,11 @@ const top = () => ( /> + ); function menuPage() { diff --git a/components/FavoriteList.js b/components/FavoriteList.js new file mode 100644 index 0000000..4f52447 --- /dev/null +++ b/components/FavoriteList.js @@ -0,0 +1,115 @@ +import React, { Component, useRef, useState, useEffect } from "react"; +import { View, Text, TouchableOpacity, ScrollView } from "react-native"; +import { WebView } from "react-native-webview"; +import { ListItem } from "native-base"; +import Icon from "react-native-vector-icons/Entypo"; +import StatusbarDetect from "../StatusbarDetect"; +import { AS } from "../storageControl"; +import { news } from "../config/newsUpdate"; +import { getStationList, lineList } from "../lib/getStationList"; +var Status = StatusbarDetect(); +export default function FavoriteList(props) { + const { + route: { + params: { webview, stationData }, + }, + navigation: { navigate }, + } = props; + + const [favoriteStation, setFavoriteStation] = useState([]); + + useEffect(() => { + AS.getItem("favoriteStation") + .then((d) => { + console.log(d); + const returnData = JSON.parse(d); + console.log(returnData); + setFavoriteStation(returnData); + }) + .catch((d) => console.log(d)); + }, []); + + return ( + + + {favoriteStation + .filter((d) => d[0].StationMap) + .map((currentStation) => { + console.log(currentStation); + return ( + { + const getStationLine = (now) => { + const returnData = Object.keys(stationData).filter((d) => { + const cache = stationData[d].findIndex( + (data) => data.Station_JP == now.Station_JP + ); + return cache != -1; + }); + return returnData[0]; + }; + const lineName = getStationLine(currentStation[0]); + + webview.current?.injectJavaScript( + `MoveDisplayStation('${lineName}_${currentStation[0].MyStation}_${currentStation[0].Station_JP}')` + ); + navigate("Apps"); + }} + > + + {currentStation + .map((d) => d.StationNumber) + .filter((d) => d !== null) + .join("/")} + + + {currentStation[0].Station_JP} + + + + 移動する + + + + ); + })} + + + お気に入り登録した駅のうち、位置情報システムで移動可能な駅が表示されています。タップすることで位置情報システムの当該の駅に移動します。 + + { + navigate("trainMenu"); + }} + > + + + 閉じる + + + + + ); +} diff --git a/components/trainMenu.js b/components/trainMenu.js index 4c9d001..5921c1d 100644 --- a/components/trainMenu.js +++ b/components/trainMenu.js @@ -68,10 +68,7 @@ export default function trainMenu({ icon="star" flex={1} onPressButton={() => - /* Linking.openURL( - "https://www.jr-shikoku.co.jp/01_trainbus/jikoku/sp/#mainprice-box" - ) */ - alert("お気に入り駅登録機能は現在開発中です!レイアウト募集中!") + navigate("favoriteList", { webview, stationData }) } > お気に入り From d475b5c8a482f75b748ce57d65e0685a92677e7a Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Sun, 29 Jan 2023 07:59:06 +0900 Subject: [PATCH 03/30] =?UTF-8?q?beta=E5=90=91=E3=81=91=E3=81=ABeas?= =?UTF-8?q?=E3=81=AE=E8=A8=AD=E5=AE=9A=E6=9B=B8=E3=81=8D=E8=BE=BC=E3=81=BF?= =?UTF-8?q?/4.5=20beta-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 2 +- components/settings.js | 2 +- components/駅名表/Sign.js | 2 +- eas.json | 6 ++++++ package.json | 1 + yarn.lock | 36 +++++++++++++++++++++++++++++++++++- 6 files changed, 45 insertions(+), 4 deletions(-) diff --git a/app.json b/app.json index 8c86182..12af92c 100644 --- a/app.json +++ b/app.json @@ -4,7 +4,7 @@ "slug": "jrshikoku", "privacy": "public", "platforms": ["ios", "android"], - "version": "4.4", + "version": "4.5", "orientation": "portrait", "icon": "./assets/icon.png", "splash": { diff --git a/components/settings.js b/components/settings.js index bcbe08d..197dbc4 100644 --- a/components/settings.js +++ b/components/settings.js @@ -102,7 +102,7 @@ export default function Setting(props) { textAlignVertical: "center", }} > - 内部バージョン: 4.4.2.8 + 内部バージョン: 4.5 beta-1 diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index 20bcbbd..0e5a5c3 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -47,7 +47,7 @@ export default function Sign(props) { }); console.log(isFavorite.length); setTestButtonStatus(isFavorite.length != 0); - }, [favoriteStation]); + }, [favoriteStation, currentStation]); useInterval(() => { if (currentStation.length == 1) { diff --git a/eas.json b/eas.json index 533961a..2ae0c41 100644 --- a/eas.json +++ b/eas.json @@ -15,6 +15,12 @@ }, "production": { "releaseChannel": "aliexpress" + }, + "beta4.5": { + "releaseChannel": "base" + }, + "production4.5": { + "releaseChannel": "buyma" } }, "submit": { diff --git a/package.json b/package.json index 049a2e8..3215fb0 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "react-native-router-flux": "^4.3.1", "react-native-safe-area-context": "4.2.4", "react-native-screens": "~3.11.1", + "react-native-snap-carousel": "^3.9.1", "react-native-storage": "^1.0.1", "react-native-svg": "12.3.0", "react-native-svg-uri": "^1.2.3", diff --git a/yarn.lock b/yarn.lock index ed6de1b..7491092 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5167,6 +5167,19 @@ fbjs-css-vars@^1.0.0: resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8" integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== +fbjs@^0.8.4: + version "0.8.18" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.18.tgz#9835e0addb9aca2eff53295cd79ca1cfc7c9662a" + integrity sha512-EQaWFK+fEPSoibjNy8IxUtaFOMXcWsY0JaVrQoZR9zC8N2Ygf9iDITPWjUTVIax95b6I742JFLqASHfsag/vKA== + dependencies: + core-js "^1.0.0" + isomorphic-fetch "^2.1.1" + loose-envify "^1.0.0" + object-assign "^4.1.0" + promise "^7.1.1" + setimmediate "^1.0.5" + ua-parser-js "^0.7.30" + fbjs@^0.8.9: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" @@ -8399,7 +8412,7 @@ promzard@^0.3.0: dependencies: read "1" -prop-types@*: +prop-types@*, prop-types@^15.6.1: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -8549,6 +8562,14 @@ rc@~1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" +react-addons-shallow-compare@15.6.2: + version "15.6.2" + resolved "https://registry.yarnpkg.com/react-addons-shallow-compare/-/react-addons-shallow-compare-15.6.2.tgz#198a00b91fc37623db64a28fd17b596ba362702f" + integrity sha512-yAV9tOObmKPiohqne1jiMcx6kDjfz7GeL8K9KHgI+HvDsbrRv148uyUzrPc6GwepZnQcJ59Q3lp1ghrkyPwtjg== + dependencies: + fbjs "^0.8.4" + object-assign "^4.1.0" + react-devtools-core@^4.23.0: version "4.24.7" resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-4.24.7.tgz#43df22e6d244ed8286fd3ff16a80813998fe82a0" @@ -8741,6 +8762,14 @@ react-native-size-matters@^0.3.1: resolved "https://registry.yarnpkg.com/react-native-size-matters/-/react-native-size-matters-0.3.1.tgz#24d0cfc335a2c730f6d58bd7b43ea5a41be4b49f" integrity sha512-mKOfBLIBFBcs9br1rlZDvxD5+mAl8Gfr5CounwJtxI6Z82rGrMO+Kgl9EIg3RMVf3G855a85YVqHJL2f5EDRlw== +react-native-snap-carousel@^3.9.1: + version "3.9.1" + resolved "https://registry.yarnpkg.com/react-native-snap-carousel/-/react-native-snap-carousel-3.9.1.tgz#6fd9bd8839546c2c6043a41d2035afbc6fe0443e" + integrity sha512-xWEGusacIgK1YaDXLi7Gao2+ISLoGPVEBR8fcMf4tOOJQufutlNwkoLu0l6B8Qgsrre0nTxoVZikRgGRDWlLaQ== + dependencies: + prop-types "^15.6.1" + react-addons-shallow-compare "15.6.2" + react-native-storage@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/react-native-storage/-/react-native-storage-1.0.1.tgz#2c493875ff76ec301987c951a8302f3a54381241" @@ -10192,6 +10221,11 @@ ua-parser-js@^0.7.18: resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.21.tgz#853cf9ce93f642f67174273cc34565ae6f308777" integrity sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ== +ua-parser-js@^0.7.30: + version "0.7.33" + resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532" + integrity sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw== + uglify-es@^3.1.9: version "3.3.9" resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677" From f993577e340096b0071dd3fb5a7e3ce5aabb8fed Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Sun, 29 Jan 2023 08:57:31 +0900 Subject: [PATCH 04/30] =?UTF-8?q?=E6=A4=9C=E7=9F=A5=E6=97=A5=E6=9C=AC?= =?UTF-8?q?=E8=AA=9E=E6=9D=A1=E4=BB=B6=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/発車時刻表/LED_vidion.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/発車時刻表/LED_vidion.js b/components/発車時刻表/LED_vidion.js index 17fc581..4458f22 100644 --- a/components/発車時刻表/LED_vidion.js +++ b/components/発車時刻表/LED_vidion.js @@ -124,10 +124,11 @@ export default function LED_vision(props) { const returnData = Object.keys(stationDiagram).map((d) => { let a = {}; stationDiagram[d].split("#").forEach((data) => { + console.log(data); if (data.match("着")) { a.lastStation = data.split(",着,")[0]; } - if (data.match(station.Station_JP)) { + if (data.split(",")[0] === station.Station_JP) { if (data.match(",発,")) { a.time = data.split(",発,")[1]; } else { @@ -451,6 +452,7 @@ const StatusAndDelay = ({ currentTrain, d, props, trainDescriptionSwitch }) => { const [status, setStatus] = useState(""); useEffect(() => { const current = currentTrain.filter((a) => a.num == d.train)[0]; + if (!current) return () => {}; const delay = current.delay; switch (true) { case delay === "入線": From f5e4947c3bad839fb6022904e77da03e03c24dca Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Mon, 30 Jan 2023 00:04:18 +0900 Subject: [PATCH 05/30] =?UTF-8?q?navigation=E3=81=AE=E5=88=B6=E5=BE=A1?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E5=A4=9A=E5=B0=91=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 112 +++++++++++++++++++++++----------------- Apps.js | 8 ++- components/trainMenu.js | 2 +- 3 files changed, 70 insertions(+), 52 deletions(-) diff --git a/App.js b/App.js index 74cbb29..73761d3 100644 --- a/App.js +++ b/App.js @@ -10,12 +10,12 @@ import { Platform, UIManager } from "react-native"; import { UpdateAsync } from "./UpdateAsync.js"; import Apps from "./Apps"; import tndView from "./ndView"; -import trainbase from "./trainbaseview"; -import howto from "./howto"; +import TrainBase from "./trainbaseview"; +import HowTo from "./howto"; import menu from "./menu"; import News from "./components/news.js"; import Setting from "./components/settings.js"; -import trainMenu from "./components/trainMenu.js"; +import TrainMenu from "./components/trainMenu.js"; import FavoriteList from "./components/FavoriteList.js"; const Stack = createStackNavigator(); const Tab = createBottomTabNavigator(); @@ -25,14 +25,14 @@ if (Platform.OS === "android") { } } export default function App() { - const navigationRef = useRef(); useEffect(() => { UpdateAsync(); }, []); + return ( - + - , }} /> - , }} /> - ); } -const top = () => ( - - - - - - - - -); +const top = ({ navigation }) => { + useEffect(() => { + const unsubscribe = navigation.addListener("tabLongPress", (e) => { + alert("longPress!"); + navigation.navigate("favoriteList", { webview, stationData }); + }); + + return unsubscribe; + }, [navigation]); + + const webview = useRef(); + return ( + + + {(props) => } + + + {(props) => } + + + {(props) => } + + + {(props) => } + + + {(props) => } + + + {(props) => } + + + ); +}; function menuPage() { return ( @@ -118,7 +138,7 @@ function menuPage() { Date: Mon, 30 Jan 2023 01:18:53 +0900 Subject: [PATCH 06/30] =?UTF-8?q?=E3=82=BF=E3=83=96=E3=83=90=E3=83=BC?= =?UTF-8?q?=E3=81=AE=E3=83=AD=E3=83=B3=E3=82=B0=E6=8A=BC=E3=81=97=E5=AE=9F?= =?UTF-8?q?=E8=A3=85=E3=81=AB=E4=BC=B4=E3=81=86navigation=E6=89=8B?= =?UTF-8?q?=E6=B3=95=E3=81=AE=E5=A4=89=E6=9B=B4=E3=81=A8=E3=81=B5=E3=81=81?= =?UTF-8?q?=E3=81=BC=E7=94=BB=E9=9D=A2=E3=81=B8=E3=81=AE=E3=82=AF=E3=82=A4?= =?UTF-8?q?=E3=83=83=E3=82=AF=E3=82=A2=E3=82=AF=E3=82=BB=E3=82=B9=E6=A9=9F?= =?UTF-8?q?=E8=83=BD=E6=95=B4=E5=82=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 30 ++++++++++++++++++++++++------ Apps.js | 10 +--------- components/FavoriteList.js | 25 ++++++++++++++----------- components/trainMenu.js | 13 ++++--------- 4 files changed, 43 insertions(+), 35 deletions(-) diff --git a/App.js b/App.js index 73761d3..04675dc 100644 --- a/App.js +++ b/App.js @@ -1,4 +1,4 @@ -import React, { useEffect, useRef } from "react"; +import React, { useEffect, useRef, useState } from "react"; import { NavigationContainer } from "@react-navigation/native"; import { createStackNavigator, @@ -8,6 +8,7 @@ import { createBottomTabNavigator } from "@react-navigation/bottom-tabs"; import { AntDesign, Ionicons } from "@expo/vector-icons"; import { Platform, UIManager } from "react-native"; import { UpdateAsync } from "./UpdateAsync.js"; +import { getStationList2 } from "./lib/getStationList2"; import Apps from "./Apps"; import tndView from "./ndView"; import TrainBase from "./trainbaseview"; @@ -67,16 +68,21 @@ export default function App() { ); } const top = ({ navigation }) => { + const webview = useRef(); + + //地図用 + const [mapsStationData, setMapsStationData] = useState(undefined); + useEffect(() => { + getStationList2().then(setMapsStationData); + }, []); useEffect(() => { const unsubscribe = navigation.addListener("tabLongPress", (e) => { - alert("longPress!"); - navigation.navigate("favoriteList", { webview, stationData }); + navigation.navigate("favoriteList"); }); return unsubscribe; }, [navigation]); - const webview = useRef(); return ( { {(props) => } - {(props) => } + {(props) => ( + + )} - {(props) => } + {(props) => ( + + )} ); diff --git a/Apps.js b/Apps.js index 2fb1502..25d1446 100644 --- a/Apps.js +++ b/Apps.js @@ -28,12 +28,6 @@ export default function Apps({ navigation, webview }) { const [mapSwitch, setMapSwitch] = useState(undefined); const [stationMenu, setStationMenu] = useState(undefined); - //地図用 - const [mapsStationData, setMapsStationData] = useState(undefined); - useEffect(() => { - getStationList2().then(setMapsStationData); - }, []); - //駅情報画面用 const StationBoardAcSR = useRef(null); const [stationBoardData, setStationBoardData] = useState(undefined); @@ -185,9 +179,7 @@ export default function Apps({ navigation, webview }) { onTouchMove={() => StationBoardAcSR.current?.hide()} /> - navigate("trainMenu", { webview, stationData: mapsStationData }) - } + onPress={() => navigate("trainMenu", { webview })} top={Platform.OS == "ios" ? Constants.statusBarHeight : 0} mapSwitch={mapSwitch == "true" ? "flex" : "none"} /> diff --git a/components/FavoriteList.js b/components/FavoriteList.js index 4f52447..daf7d5d 100644 --- a/components/FavoriteList.js +++ b/components/FavoriteList.js @@ -8,14 +8,8 @@ import { AS } from "../storageControl"; import { news } from "../config/newsUpdate"; import { getStationList, lineList } from "../lib/getStationList"; var Status = StatusbarDetect(); -export default function FavoriteList(props) { - const { - route: { - params: { webview, stationData }, - }, - navigation: { navigate }, - } = props; - +export default function FavoriteList({ navigation, webview, stationData }) { + const { navigate } = navigation; const [favoriteStation, setFavoriteStation] = useState([]); useEffect(() => { @@ -31,6 +25,17 @@ export default function FavoriteList(props) { return ( + + 位置情報クイック移動メニュー + {favoriteStation .filter((d) => d[0].StationMap) @@ -100,9 +105,7 @@ export default function FavoriteList(props) { borderRadius: 5, alignItems: "center", }} - onPress={() => { - navigate("trainMenu"); - }} + onPress={() => navigation.goBack()} > diff --git a/components/trainMenu.js b/components/trainMenu.js index 85bcf6d..ed6af21 100644 --- a/components/trainMenu.js +++ b/components/trainMenu.js @@ -3,10 +3,9 @@ import { View, Text, TouchableOpacity, Linking } from "react-native"; import MapView, { Marker } from "react-native-maps"; import { MaterialCommunityIcons } from "@expo/vector-icons"; export default function TrainMenu({ - route: { - params: { webview, stationData }, - }, navigation: { navigate }, + webview, + stationData, }) { const mapRef = useRef(); return ( @@ -67,9 +66,7 @@ export default function TrainMenu({ backgroundColor={"#EA4752"} icon="star" flex={1} - onPressButton={() => - navigate("favoriteList", { webview, stationData }) - } + onPressButton={() => navigate("favoriteList")} > お気に入り @@ -96,9 +93,7 @@ export default function TrainMenu({ borderRadius: 5, alignItems: "center", }} - onPress={() => { - navigate("Apps"); - }} + onPress={() => navigate("Apps")} > From 556b04e3b09e11458860263d9b89a679c094f3fc Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Mon, 30 Jan 2023 02:51:57 +0900 Subject: [PATCH 07/30] =?UTF-8?q?=E3=82=A2=E3=82=A4=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E5=87=A6=E7=90=86=E7=94=A8function=E5=88=86=E9=9B=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/App.js b/App.js index 04675dc..d17f794 100644 --- a/App.js +++ b/App.js @@ -35,12 +35,12 @@ export default function App() { , + tabBarIcon: initIcon("barchart", "AntDesign"), }} /> , + tabBarIcon: initIcon("ios-radio", "Ionicons"), }} /> , + tabBarIcon: initIcon("md-train", "Ionicons"), }} /> ); } -const top = ({ navigation }) => { + +const initIcon = (name, type, props) => { + switch (type) { + case "Ionicons": + return ({ focused, color, size }) => ( + + ); + case "AntDesign": + return ({ focused, color, size }) => ( + + ); + } +}; + +const Top = ({ navigation }) => { const webview = useRef(); //地図用 const [mapsStationData, setMapsStationData] = useState(undefined); + useEffect(() => { getStationList2().then(setMapsStationData); }, []); + useEffect(() => { const unsubscribe = navigation.addListener("tabLongPress", (e) => { navigation.navigate("favoriteList"); From 746c996cba22de5e0db7af0340c2cc7b65946923 Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Mon, 30 Jan 2023 03:02:00 +0900 Subject: [PATCH 08/30] =?UTF-8?q?=E5=85=A8=E3=82=B3=E3=83=B3=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88=E3=82=92component=E3=81=8B?= =?UTF-8?q?=E3=82=89child=E3=81=B8=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/App.js b/App.js index d17f794..58bf0f5 100644 --- a/App.js +++ b/App.js @@ -10,10 +10,10 @@ import { Platform, UIManager } from "react-native"; import { UpdateAsync } from "./UpdateAsync.js"; import { getStationList2 } from "./lib/getStationList2"; import Apps from "./Apps"; -import tndView from "./ndView"; +import TNDView from "./ndView"; import TrainBase from "./trainbaseview"; import HowTo from "./howto"; -import menu from "./menu"; +import Menu from "./menu"; import News from "./components/news.js"; import Setting from "./components/settings.js"; import TrainMenu from "./components/trainMenu.js"; @@ -35,40 +35,43 @@ export default function App() { + > + {(props) => } + + > + {(props) => } + + > + {(props) => } + ); } -const initIcon = (name, type, props) => { +const initIcon = (name, type) => { switch (type) { case "Ionicons": return ({ focused, color, size }) => ( @@ -161,22 +164,24 @@ const Top = ({ navigation }) => { ); }; -function menuPage() { +function MenuPage() { return ( - + > + {(props) => } + + + {(props) => } + + > + {(props) => } + ); } From 7dc72ef433745388e6a31b06b1811e972896ae27 Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Mon, 30 Jan 2023 03:32:30 +0900 Subject: [PATCH 09/30] =?UTF-8?q?=E3=81=B5=E3=81=81=E3=81=BCstate=E3=82=92?= =?UTF-8?q?=E3=83=88=E3=83=83=E3=83=97=E9=9A=8E=E5=B1=A4=E3=81=AB=E7=A7=BB?= =?UTF-8?q?=E5=8B=95=E3=81=97=E5=90=84=E3=82=B3=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=8D=E3=83=B3=E3=83=88=E3=81=A7=E5=85=B1=E6=9C=89=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 52 ++++++++++++++++--- Apps.js | 9 +++- .../StationDeteilView.js | 10 +++- components/FavoriteList.js | 20 +++---- components/駅名表/Sign.js | 21 ++++---- menu.js | 6 +++ 6 files changed, 84 insertions(+), 34 deletions(-) diff --git a/App.js b/App.js index 58bf0f5..bfa3ca2 100644 --- a/App.js +++ b/App.js @@ -9,6 +9,7 @@ import { AntDesign, Ionicons } from "@expo/vector-icons"; import { Platform, UIManager } from "react-native"; import { UpdateAsync } from "./UpdateAsync.js"; import { getStationList2 } from "./lib/getStationList2"; +import { AS } from "./storageControl"; import Apps from "./Apps"; import TNDView from "./ndView"; import TrainBase from "./trainbaseview"; @@ -29,6 +30,16 @@ export default function App() { useEffect(() => { UpdateAsync(); }, []); + const [favoriteStation, setFavoriteStation] = useState([]); + + useEffect(() => { + AS.getItem("favoriteStation") + .then((d) => { + const returnData = JSON.parse(d); + setFavoriteStation(returnData); + }) + .catch((d) => console.log(d)); + }, []); return ( @@ -42,7 +53,13 @@ export default function App() { tabBarIcon: initIcon("barchart", "AntDesign"), }} > - {(props) => } + {(props) => ( + + )} - {(props) => } + {(props) => ( + + )} { } }; -const Top = ({ navigation }) => { +const Top = ({ navigation, favoriteStation, setFavoriteStation }) => { const webview = useRef(); //地図用 @@ -116,7 +139,14 @@ const Top = ({ navigation }) => { headerTransparent: true, }} > - {(props) => } + {(props) => ( + + )} { ...TransitionPresets.SlideFromRightIOS, }} > - {(props) => } + {(props) => } { {...props} webview={webview} stationData={mapsStationData} + favoriteStation={favoriteStation} + setFavoriteStation={setFavoriteStation} /> )} ); }; -function MenuPage() { +function MenuPage({ favoriteStation, setFavoriteStation }) { return ( - {(props) => } + {(props) => ( + + )} {(props) => } diff --git a/Apps.js b/Apps.js index 25d1446..5f7ed77 100644 --- a/Apps.js +++ b/Apps.js @@ -19,7 +19,12 @@ import { getStationList2 } from "./lib/getStationList2"; import StatusbarDetect from './StatusbarDetect'; var Status = StatusbarDetect(); */ -export default function Apps({ navigation, webview }) { +export default function Apps({ + navigation, + webview, + favoriteStation, + setFavoriteStation, +}) { const { navigate } = navigation; var urlcache = ""; @@ -192,6 +197,8 @@ export default function Apps({ navigation, webview }) { StationBoardAcSR={StationBoardAcSR} currentStation={stationBoardData} originalStationList={originalStationList} + favoriteStation={favoriteStation} + setFavoriteStation={setFavoriteStation} /> ); diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js index 6d1ccd0..bc0fafa 100644 --- a/components/ActionSheetComponents/StationDeteilView.js +++ b/components/ActionSheetComponents/StationDeteilView.js @@ -7,7 +7,13 @@ import Sign from "../../components/駅名表/Sign"; import { TicketBox } from "../atom/TicketBox"; export const StationDeteilView = (props) => { - const { StationBoardAcSR, currentStation, originalStationList } = props; + const { + StationBoardAcSR, + currentStation, + originalStationList, + favoriteStation, + setFavoriteStation, + } = props; return ( { Linking.openURL(currentStation[0].StationTimeTable)} /> )} diff --git a/components/FavoriteList.js b/components/FavoriteList.js index daf7d5d..3b946a2 100644 --- a/components/FavoriteList.js +++ b/components/FavoriteList.js @@ -8,20 +8,14 @@ import { AS } from "../storageControl"; import { news } from "../config/newsUpdate"; import { getStationList, lineList } from "../lib/getStationList"; var Status = StatusbarDetect(); -export default function FavoriteList({ navigation, webview, stationData }) { +export default function FavoriteList({ + navigation, + webview, + stationData, + favoriteStation, + setFavoriteStation, +}) { const { navigate } = navigation; - const [favoriteStation, setFavoriteStation] = useState([]); - - useEffect(() => { - AS.getItem("favoriteStation") - .then((d) => { - console.log(d); - const returnData = JSON.parse(d); - console.log(returnData); - setFavoriteStation(returnData); - }) - .catch((d) => console.log(d)); - }, []); return ( diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index 0e5a5c3..8c1fc1f 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -17,24 +17,19 @@ import { useInterval } from "../../lib/useInterval"; import { AS } from "../../storageControl"; export default function Sign(props) { - const { currentStation, originalStationList, oP } = props; + const { + currentStation, + originalStationList, + oP, + favoriteStation, + setFavoriteStation, + } = props; const [nexPrePosition, setNexPrePosition] = useState(0); const [preStation, setPreStation] = useState(); const [nexStation, setNexStation] = useState(); const [testButtonStatus, setTestButtonStatus] = useState(false); - const [favoriteStation, setFavoriteStation] = useState([]); - useEffect(() => { - AS.getItem("favoriteStation") - .then((d) => { - console.log(d); - const returnData = JSON.parse(d); - console.log(returnData); - setFavoriteStation(returnData); - }) - .catch((d) => console.log(d)); - }, []); useEffect(() => { const isFavorite = favoriteStation.filter((d) => { const compare = JSON.stringify(d); @@ -116,12 +111,14 @@ export default function Sign(props) { } }); AS.setItem("favoriteStation", JSON.stringify(otherData)); + setFavoriteStation(otherData); } else { lottieRef.current.play(7, 35); let ret = favoriteStation; console.log(currentStation); ret.push(currentStation); AS.setItem("favoriteStation", JSON.stringify(ret)); + setFavoriteStation(ret); } setTestButtonStatus(!testButtonStatus); }} diff --git a/menu.js b/menu.js index fe31a17..6deeb0a 100644 --- a/menu.js +++ b/menu.js @@ -38,6 +38,8 @@ import useInterval from "./lib/useInterval"; export default function Menu(props) { const { navigation: { navigate }, + favoriteStation, + setFavoriteStation, } = props; const JRSTraInfoEXAcSR = useRef(null); const StationBoardAcSR = useRef(null); @@ -162,6 +164,8 @@ export default function Menu(props) { @@ -458,6 +462,8 @@ export default function Menu(props) { StationBoardAcSR={StationBoardAcSR} currentStation={currentStation} originalStationList={originalStationList} + favoriteStation={favoriteStation} + setFavoriteStation={setFavoriteStation} /> Date: Wed, 1 Feb 2023 15:25:33 +0900 Subject: [PATCH 10/30] =?UTF-8?q?=E3=81=B5=E3=81=81=E3=81=BC=E9=A7=85?= =?UTF-8?q?=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4(=E7=8F=BE=E5=9C=A8=E5=9C=B0?= =?UTF-8?q?=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 6 +++ .../StationDeteilView.js | 25 ++++++++---- components/駅名表/Sign.js | 3 -- menu.js | 39 +++++++++++++------ 4 files changed, 52 insertions(+), 21 deletions(-) diff --git a/App.js b/App.js index bfa3ca2..0163eba 100644 --- a/App.js +++ b/App.js @@ -19,6 +19,12 @@ import News from "./components/news.js"; import Setting from "./components/settings.js"; import TrainMenu from "./components/trainMenu.js"; import FavoriteList from "./components/FavoriteList.js"; +import { LogBox } from "react-native"; + +LogBox.ignoreLogs([ + "ViewPropTypes will be removed", + "ColorPropType will be removed", +]); const Stack = createStackNavigator(); const Tab = createBottomTabNavigator(); if (Platform.OS === "android") { diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js index bc0fafa..3b1b05c 100644 --- a/components/ActionSheetComponents/StationDeteilView.js +++ b/components/ActionSheetComponents/StationDeteilView.js @@ -5,6 +5,10 @@ import ActionSheet from "react-native-actions-sheet"; import Sign from "../../components/駅名表/Sign"; import { TicketBox } from "../atom/TicketBox"; +import { + widthPercentageToDP as wp, + heightPercentageToDP as hp, +} from "react-native-responsive-screen"; export const StationDeteilView = (props) => { const { @@ -44,13 +48,20 @@ export const StationDeteilView = (props) => { {currentStation && ( - Linking.openURL(currentStation[0].StationTimeTable)} - /> + + Linking.openURL(currentStation[0].StationTimeTable)} + /> + )} {currentStation && ( diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index 8c1fc1f..3d0484c 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -40,7 +40,6 @@ export default function Sign(props) { return false; } }); - console.log(isFavorite.length); setTestButtonStatus(isFavorite.length != 0); }, [favoriteStation, currentStation]); @@ -260,8 +259,6 @@ const styleSheet = { height: (wp("80%") / 20) * 9, borderColor: "#2E94BB", borderWidth: 1, - margin: 10, - marginHorizontal: wp("10%"), backgroundColor: "white", }, 下帯: { diff --git a/menu.js b/menu.js index 6deeb0a..0789af4 100644 --- a/menu.js +++ b/menu.js @@ -1,4 +1,5 @@ import React, { useRef, useState, useEffect } from "react"; +import Carousel from "react-native-snap-carousel"; import { Platform, View, @@ -119,6 +120,9 @@ export default function Menu(props) { const [delayData, setDelayData] = useState(undefined); const [getTime, setGetTime] = useState(new Date()); const [loadingDelayData, setLoadingDelayData] = useState(true); + const carouselRef = useRef(); + const scrollRef = useRef(); + const [isScroll, setIsScroll] = useState(true); useEffect(() => { fetch( @@ -141,7 +145,7 @@ export default function Menu(props) { > - + + { + return ( + + + + ); + }} + /> {currentStation && ( - <> - - - + )} Date: Wed, 1 Feb 2023 16:57:49 +0900 Subject: [PATCH 11/30] =?UTF-8?q?=E9=81=B8=E6=8A=9E=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=81=9F=E9=A7=85=E5=90=8D=E6=9D=BF=E3=82=92=E5=88=A9=E7=94=A8?= =?UTF-8?q?=E3=81=97=E3=81=9FLED=E8=A1=A8=E7=A4=BA=E3=81=A8=E9=81=B8?= =?UTF-8?q?=E6=8A=9E=E7=94=BB=E9=9D=A2=E3=81=AE=E6=95=B4=E5=82=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.js | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/menu.js b/menu.js index 0789af4..5a30294 100644 --- a/menu.js +++ b/menu.js @@ -74,6 +74,14 @@ export default function Menu(props) { useEffect(() => { getStationList().then(setOriginalStationList); }, []); + const [locationAndFavorite, setLocationAndFavorite] = useState([]); + useEffect(() => { + if (!favoriteStation) return () => {}; + const data = favoriteStation.filter((d) => + JSON.stringify(d) === JSON.stringify(currentStation) ? false : true + ); + setLocationAndFavorite(data); + }, [currentStation, favoriteStation]); const [stationName, setStationName] = useState(undefined); const [currentStation, setCurrentStation] = useState(undefined); @@ -123,6 +131,7 @@ export default function Menu(props) { const carouselRef = useRef(); const scrollRef = useRef(); const [isScroll, setIsScroll] = useState(true); + const [selectedCurrentStation, setSelectedCurrentStation] = useState(0); useEffect(() => { fetch( @@ -166,11 +175,20 @@ export default function Menu(props) { { + setSelectedCurrentStation(d); + }} renderItem={({ item, index }) => { return ( @@ -185,8 +203,16 @@ export default function Menu(props) { ); }} /> - {currentStation && ( - + {(currentStation || originalStationList) && ( + )} Date: Wed, 1 Feb 2023 20:46:03 +0900 Subject: [PATCH 12/30] =?UTF-8?q?=E6=9C=80=E5=8F=B3=E7=AB=AF=E3=81=AE?= =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92=E6=B6=88=E5=8E=BB=E3=81=97?= =?UTF-8?q?=E3=81=9F=E5=A0=B4=E5=90=88=E3=81=AB=E3=82=AF=E3=83=A9=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A5=E3=81=99=E3=82=8B=E3=83=90=E3=82=B0=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/menu.js b/menu.js index 5a30294..8e7c7f8 100644 --- a/menu.js +++ b/menu.js @@ -74,6 +74,7 @@ export default function Menu(props) { useEffect(() => { getStationList().then(setOriginalStationList); }, []); + const [locationAndFavorite, setLocationAndFavorite] = useState([]); useEffect(() => { if (!favoriteStation) return () => {}; @@ -83,6 +84,13 @@ export default function Menu(props) { setLocationAndFavorite(data); }, [currentStation, favoriteStation]); + useEffect(() => { + if (!(selectedCurrentStation < favoriteStation.length)) { + setSelectedCurrentStation(favoriteStation.length - 1); + carouselRef.current.snapToItem(favoriteStation.length - 1); + } + }, [favoriteStation]); + const [stationName, setStationName] = useState(undefined); const [currentStation, setCurrentStation] = useState(undefined); useEffect(() => { From 5867ad3aa84cd835850b997e8d3937f19b0912e7 Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Wed, 1 Feb 2023 21:49:57 +0900 Subject: [PATCH 13/30] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E3=82=BF?= =?UTF-8?q?=E3=82=A4=E3=83=9F=E3=83=B3=E3=82=B0=E3=81=A7=E9=A7=85=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=81=8C=E6=B6=88=E5=8E=BB=E3=81=95=E3=82=8C=E3=82=8B?= =?UTF-8?q?=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.js | 1 - 1 file changed, 1 deletion(-) diff --git a/menu.js b/menu.js index 8e7c7f8..e8de24d 100644 --- a/menu.js +++ b/menu.js @@ -128,7 +128,6 @@ export default function Menu(props) { } } else { setCurrentStation(undefined); - StationBoardAcSR.current?.hide(); } }, [location, originalStationList]); From c2ca832b804afb3b5817afece0c98b4e9e504020 Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Sun, 5 Feb 2023 04:56:24 +0900 Subject: [PATCH 14/30] =?UTF-8?q?=E9=A7=85=E5=90=8D=E6=A8=99=E3=81=AB?= =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AA=E8=A6=81=E7=B4=A0=E3=81=8C=E6=AE=8B?= =?UTF-8?q?=E3=82=8B=E3=83=90=E3=82=B0=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/駅名表/Sign.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index 3d0484c..71f7ae7 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -145,10 +145,10 @@ const NexPreStationLine = ({ nexStation, preStation }) => { return ( - {preStation && ( + {preStation ? ( <> - {preStation.StationNumber && ( + {preStation.StationNumber ? ( { + ) : ( + <> )} + ) : ( + <> )} - {nexStation && ( + {nexStation ? ( <> - {nexStation.StationNumber && ( + {nexStation.StationNumber ? ( @@ -184,9 +188,13 @@ const NexPreStationLine = ({ nexStation, preStation }) => { + ) : ( + <> )} + ) : ( + <> )} From 369ae557c762da992601a62bcf439baf9f2c413f Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Sun, 5 Feb 2023 17:07:57 +0900 Subject: [PATCH 15/30] =?UTF-8?q?=E9=A7=85=E3=83=AA=E3=82=B9=E3=83=88?= =?UTF-8?q?=E3=81=AE=E7=AE=A1=E7=90=86=E3=81=AB=E6=83=85=E5=A0=B1=E3=82=92?= =?UTF-8?q?=E8=BF=BD=E5=8A=A0/DetailView=E5=81=B4=E3=81=AB=E8=B7=AF?= =?UTF-8?q?=E7=B7=9A=E6=A6=82=E8=A6=81=E8=A1=A8=E7=A4=BA=E6=A9=9F=E8=83=BD?= =?UTF-8?q?=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StationDeteilView.js | 240 +++++++++++++++++- components/駅名表/Sign.js | 18 +- lib/getStationList.js | 81 +++--- 3 files changed, 289 insertions(+), 50 deletions(-) diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js index 3b1b05c..ec03f35 100644 --- a/components/ActionSheetComponents/StationDeteilView.js +++ b/components/ActionSheetComponents/StationDeteilView.js @@ -1,8 +1,17 @@ -import React from "react"; -import { View, Linking } from "react-native"; +import React, { useState, useEffect } from "react"; +import { + StatusBar, + View, + LayoutAnimation, + ScrollView, + Linking, + Text, + TouchableOpacity, +} from "react-native"; import { FontAwesome, Foundation, Ionicons } from "@expo/vector-icons"; import ActionSheet from "react-native-actions-sheet"; import Sign from "../../components/駅名表/Sign"; +import { useInterval } from "../../lib/useInterval"; import { TicketBox } from "../atom/TicketBox"; import { @@ -63,6 +72,15 @@ export const StationDeteilView = (props) => { /> )} + {currentStation && + currentStation.map((d) => ( + + ))} {currentStation && ( {!currentStation[0].JrHpUrl || ( @@ -108,3 +126,221 @@ export const StationDeteilView = (props) => { ); }; + +const StationName = (props) => { + const { stringData, ss } = props; + return ( + + {stringData.Station_JP} + {stringData.Station_EN} + + ); +}; + +const NexPreStationLine = ({ + currentStation, + originalStationList, + oP, + favoriteStation, + setFavoriteStation, +}) => { + const [preStation, setPreStation] = useState(); + const [nexStation, setNexStation] = useState(); + const [lineName, setLineName] = useState(); + + useEffect(() => { + getPreNextStation(currentStation); + }, [currentStation]); + + useEffect(() => { + if (!currentStation) return () => {}; + getPreNextStation(currentStation); + }, []); + const getPreNextStation = (now) => { + const lineList = [ + "予讃線(高松-松山間)[Y]", + "予讃線(松山-宇和島間)[U]", + "予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]", + "土讃線(多度津-高知間)[D]", + "土讃線(高知-窪川間)[K]", + "高徳線(高松-徳島間)[T]", + "徳島線(徳島-阿波池田)[B]", + "鳴門線(池谷-鳴門間)[N]", + "瀬戸大橋線(宇多津-児島間)[M]", + ]; + let returnData; + lineList.forEach((d) => { + let cache = originalStationList[d].findIndex( + (data) => data.StationNumber == now.StationNumber + ); + if (cache != -1) { + returnData = [ + originalStationList[d][cache - 1], + originalStationList[d][cache + 1], + d, + ]; + } + }); + setPreStation(returnData[0]); + setNexStation(returnData[1]); + setLineName(returnData[2]); + }; + return ( + + + {preStation ? ( + <> + + {preStation.StationNumber ? ( + + + + {preStation.StationNumber} + + + + ) : ( + <> + )} + + + ) : ( + <> + )} + + + + {lineName && + lineName + .split("(") + .map((d, index) => (index == 1 ? "(" + d : d)) + .join("\n")} + + + {nexStation ? ( + <> + + {nexStation.StationNumber ? ( + + + + {nexStation.StationNumber} + + + + ) : ( + <> + )} + + + ) : ( + <> + )} + + + ); +}; + +const styleSheet = { + 外枠: { + width: wp("80%"), + height: (wp("80%") / 20) * 9, + borderColor: "#2E94BB", + borderWidth: 1, + backgroundColor: "white", + }, + 下帯: { + position: "absolute", + bottom: "0%", + left: "0%", + width: "100%", + height: "30%", + backgroundColor: "#2E94BB", + }, + JRStyle: { + position: "absolute", + top: "2%", + left: "2%", + fontWeight: "bold", + fontSize: parseInt("30%"), + color: "#2E94BB", + }, + stationNameAreaOverWrap: { + position: "absolute", + top: "10%", + alignContent: "center", + flexDirection: "row", + }, + Station_JP: { + fontWeight: "bold", + fontSize: parseInt("40%"), + color: "#005170", + }, + Station_EN: { + fontWeight: "bold", + fontSize: parseInt("15%"), + color: "#005170", + }, + 下帯内容: { + position: "absolute", + bottom: "0%", + height: "30%", + width: "100%", + alignItems: "center", + flexDirection: "column", + }, + 下枠フレーム: { + flex: 1, + flexDirection: "row", + alignContent: "center", + }, + 下枠左右マーク: { + fontWeight: "bold", + fontSize: parseInt("20%"), + color: "white", + paddingHorizontal: 10, + textAlignVertical: "center", + }, + 下枠駅ナンバー: { + alignContent: "center", + alignItems: "center", + width: wp("8%"), + height: wp("8%"), + margin: wp("1%"), + borderColor: "white", + borderWidth: parseInt("2%"), + borderRadius: parseInt("100%"), + }, + 下枠駅名: { + fontWeight: "bold", + fontSize: parseInt("15%"), + color: "white", + flex: 1, + textAlignVertical: "center", + }, +}; diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index 71f7ae7..af44437 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -65,15 +65,15 @@ export default function Sign(props) { }, [nexPrePosition]); const getPreNextStation = (now) => { const lineList = [ - "予讃線", - "松宇線", - "伊予灘線", - "土讃線", - "窪川線", - "高徳線", - "徳島線", - "鳴門線", - "瀬戸大橋線", + "予讃線(高松-松山間)[Y]", + "予讃線(松山-宇和島間)[U]", + "予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]", + "土讃線(多度津-高知間)[D]", + "土讃線(高知-窪川間)[K]", + "高徳線(高松-徳島間)[T]", + "徳島線(徳島-阿波池田)[B]", + "鳴門線(池谷-鳴門間)[N]", + "瀬戸大橋線(宇多津-児島間)[M]", ]; let returnData; lineList.forEach((d) => { diff --git a/lib/getStationList.js b/lib/getStationList.js index d2a4280..077751b 100644 --- a/lib/getStationList.js +++ b/lib/getStationList.js @@ -19,15 +19,15 @@ import train_lang from "../assets/originData/train_lang"; let status = undefined; export const lineList = [ - "予讃線", - "松宇線", - "伊予灘線", - "土讃線", - "窪川線", - "高徳線", - "徳島線", - "鳴門線", - "瀬戸大橋線", + "予讃線(高松-松山間)[Y]", + "予讃線(松山-宇和島間)[U]", + "予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]", + "土讃線(多度津-高知間)[D]", + "土讃線(高知-窪川間)[K]", + "高徳線(高松-徳島間)[T]", + "徳島線(徳島-阿波池田)[B]", + "鳴門線(池谷-鳴門間)[N]", + "瀬戸大橋線(宇多津-児島間)[M]", ]; export const getStationList = async (props) => { @@ -53,15 +53,15 @@ export const getStationList = async (props) => { ]).then((values) => { let stationList = {}; [ - stationList.予讃線, - stationList.松宇線, - stationList.伊予灘線, - stationList.土讃線, - stationList.窪川線, - stationList.高徳線, - stationList.徳島線, - stationList.鳴門線, - stationList.瀬戸大橋線, + stationList["予讃線(高松-松山間)[Y]"], + stationList["予讃線(松山-宇和島間)[U]"], + stationList["予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]"], + stationList["土讃線(多度津-高知間)[D]"], + stationList["土讃線(高知-窪川間)[K]"], + stationList["高徳線(高松-徳島間)[T]"], + stationList["徳島線(徳島-阿波池田)[B]"], + stationList["鳴門線(池谷-鳴門間)[N]"], + stationList["瀬戸大橋線(宇多津-児島間)[M]"], stationList.駅間リスト, stationList.日英対応表, ] = values; @@ -115,52 +115,55 @@ export const getStationList = async (props) => { return data; }); }; - stationList.予讃線 = addStationPosition( - concatBetweenStations(stationList.予讃線), + stationList["予讃線(高松-松山間)[Y]"] = addStationPosition( + concatBetweenStations(stationList["予讃線(高松-松山間)[Y]"]), 予讃線, stationList.日英対応表 ); - stationList.松宇線 = addStationPosition( - concatBetweenStations(stationList.松宇線), + stationList["予讃線(松山-宇和島間)[U]"] = addStationPosition( + concatBetweenStations(stationList["予讃線(松山-宇和島間)[U]"]), 予讃線, stationList.日英対応表 ); - stationList.伊予灘線 = addStationPosition( - concatBetweenStations(stationList.伊予灘線), - 予讃線, - stationList.日英対応表 - ); - stationList.土讃線 = addStationPosition( - concatBetweenStations(stationList.土讃線), + stationList["予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]"] = + addStationPosition( + concatBetweenStations( + stationList["予讃線/愛ある伊予灘線(向井原-伊予大洲間)[S]"] + ), + 予讃線, + stationList.日英対応表 + ); + stationList["土讃線(多度津-高知間)[D]"] = addStationPosition( + concatBetweenStations(stationList["土讃線(多度津-高知間)[D]"]), 土讃線, stationList.日英対応表 ); - stationList.窪川線 = addStationPosition( - concatBetweenStations(stationList.窪川線), + stationList["土讃線(高知-窪川間)[K]"] = addStationPosition( + concatBetweenStations(stationList["土讃線(高知-窪川間)[K]"]), 土讃線, stationList.日英対応表 ); - stationList.高徳線 = addStationPosition( - concatBetweenStations(stationList.高徳線), + stationList["高徳線(高松-徳島間)[T]"] = addStationPosition( + concatBetweenStations(stationList["高徳線(高松-徳島間)[T]"]), 高徳線, stationList.日英対応表 ); - stationList.鳴門線 = addStationPosition( - concatBetweenStations(stationList.鳴門線), + stationList["鳴門線(池谷-鳴門間)[N]"] = addStationPosition( + concatBetweenStations(stationList["鳴門線(池谷-鳴門間)[N]"]), 鳴門線, stationList.日英対応表 ); const tokushimaCurrent = addStationPosition( - concatBetweenStations(stationList.徳島線), + concatBetweenStations(stationList["徳島線(徳島-阿波池田)[B]"]), 徳島線, stationList.日英対応表 ); - stationList.徳島線 = [ + stationList["徳島線(徳島-阿波池田)[B]"] = [ tokushimaCurrent[tokushimaCurrent.length - 1], ...tokushimaCurrent, ]; - stationList.徳島線.pop(); - stationList.瀬戸大橋線 = [ + stationList["徳島線(徳島-阿波池田)[B]"].pop(); + stationList["瀬戸大橋線(宇多津-児島間)[M]"] = [ { Station_JP: "坂出", Station_EN: "Sakaide", From 815734eb07186bf15c58a3befd9b190fd2839170 Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Mon, 6 Feb 2023 03:14:08 +0900 Subject: [PATCH 16/30] =?UTF-8?q?=E8=B7=AF=E7=B7=9A=E8=89=B2=E3=81=AE?= =?UTF-8?q?=E5=AE=9A=E7=BE=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/originData/lineColorList.js | 11 +++++++++++ components/ActionSheetComponents/StationDeteilView.js | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 assets/originData/lineColorList.js diff --git a/assets/originData/lineColorList.js b/assets/originData/lineColorList.js new file mode 100644 index 0000000..4358c9b --- /dev/null +++ b/assets/originData/lineColorList.js @@ -0,0 +1,11 @@ +export default { + Y: "#F5AC13", + U: "#F5AC13", + S: "#9AA7D7", + D: "#DC4586", + K: "#DC4586", + B: "#366481", + N: "#881F61", + T: "#87CA3B", + M: "#0071be", +}; diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js index ec03f35..8cce2f4 100644 --- a/components/ActionSheetComponents/StationDeteilView.js +++ b/components/ActionSheetComponents/StationDeteilView.js @@ -18,6 +18,7 @@ import { widthPercentageToDP as wp, heightPercentageToDP as hp, } from "react-native-responsive-screen"; +import lineColorList from "../../assets/originData/lineColorList"; export const StationDeteilView = (props) => { const { @@ -189,7 +190,9 @@ const NexPreStationLine = ({ Date: Mon, 6 Feb 2023 03:22:02 +0900 Subject: [PATCH 17/30] =?UTF-8?q?=E3=83=90=E3=82=B9=E3=81=AE=E3=81=82?= =?UTF-8?q?=E3=82=8B=E9=A7=85=E3=81=A7=E3=83=87=E3=83=BC=E3=82=BF=E3=82=92?= =?UTF-8?q?=E5=87=BA=E3=81=99=E3=83=9C=E3=82=BF=E3=83=B3=E3=82=92=E8=A8=AD?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 31 +++++++++++++++++-- Apps.js | 2 ++ assets/originData/lineColorList.js | 11 +++++++ .../StationDeteilView.js | 27 ++++++++++++++-- menu.js | 2 ++ 5 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 assets/originData/lineColorList.js diff --git a/App.js b/App.js index 0163eba..31effa5 100644 --- a/App.js +++ b/App.js @@ -46,6 +46,24 @@ export default function App() { }) .catch((d) => console.log(d)); }, []); + const [busAndTrainData, setBusAndTrainData] = useState([]); + useEffect(() => { + AS.getItem("busAndTrain") + .then((d) => { + const returnData = JSON.parse(d); + setBusAndTrainData(returnData); + }) + .catch((d) => { + fetch( + "https://script.google.com/macros/s/AKfycbw0UW6ZeCDgUYFRP0zxpc_Oqfy-91dBdbWv-cM8n3narKp14IyCd2wy5HW7taXcW7E/exec" + ) + .then((d) => d.json()) + .then((d) => { + setBusAndTrainData(d); + AS.setItem("busAndTrain", JSON.stringify(d)); + }); + }); + }, []); return ( @@ -64,6 +82,7 @@ export default function App() { {...props} favoriteStation={favoriteStation} setFavoriteStation={setFavoriteStation} + busAndTrainData={busAndTrainData} /> )} @@ -81,6 +100,7 @@ export default function App() { {...props} favoriteStation={favoriteStation} setFavoriteStation={setFavoriteStation} + busAndTrainData={busAndTrainData} /> )} @@ -117,7 +137,12 @@ const initIcon = (name, type) => { } }; -const Top = ({ navigation, favoriteStation, setFavoriteStation }) => { +const Top = ({ + navigation, + favoriteStation, + setFavoriteStation, + busAndTrainData, +}) => { const webview = useRef(); //地図用 @@ -151,6 +176,7 @@ const Top = ({ navigation, favoriteStation, setFavoriteStation }) => { webview={webview} favoriteStation={favoriteStation} setFavoriteStation={setFavoriteStation} + busAndTrainData={busAndTrainData} /> )} @@ -202,7 +228,7 @@ const Top = ({ navigation, favoriteStation, setFavoriteStation }) => { ); }; -function MenuPage({ favoriteStation, setFavoriteStation }) { +function MenuPage({ favoriteStation, setFavoriteStation, busAndTrainData }) { return ( )} diff --git a/Apps.js b/Apps.js index 5f7ed77..2a2f59e 100644 --- a/Apps.js +++ b/Apps.js @@ -24,6 +24,7 @@ export default function Apps({ webview, favoriteStation, setFavoriteStation, + busAndTrainData, }) { const { navigate } = navigation; var urlcache = ""; @@ -199,6 +200,7 @@ export default function Apps({ originalStationList={originalStationList} favoriteStation={favoriteStation} setFavoriteStation={setFavoriteStation} + busAndTrainData={busAndTrainData} /> ); diff --git a/assets/originData/lineColorList.js b/assets/originData/lineColorList.js new file mode 100644 index 0000000..4358c9b --- /dev/null +++ b/assets/originData/lineColorList.js @@ -0,0 +1,11 @@ +export default { + Y: "#F5AC13", + U: "#F5AC13", + S: "#9AA7D7", + D: "#DC4586", + K: "#DC4586", + B: "#366481", + N: "#881F61", + T: "#87CA3B", + M: "#0071be", +}; diff --git a/components/ActionSheetComponents/StationDeteilView.js b/components/ActionSheetComponents/StationDeteilView.js index 3b1b05c..20a88f9 100644 --- a/components/ActionSheetComponents/StationDeteilView.js +++ b/components/ActionSheetComponents/StationDeteilView.js @@ -1,4 +1,4 @@ -import React from "react"; +import React, { useEffect, useState } from "react"; import { View, Linking } from "react-native"; import { FontAwesome, Foundation, Ionicons } from "@expo/vector-icons"; import ActionSheet from "react-native-actions-sheet"; @@ -17,7 +17,20 @@ export const StationDeteilView = (props) => { originalStationList, favoriteStation, setFavoriteStation, + busAndTrainData, } = props; + const [trainBus, setTrainBus] = useState(); + useEffect(() => { + if (!currentStation) return () => {}; + const data = busAndTrainData.filter((d) => { + return d.name === currentStation[0].Station_JP; + }); + if (data.length == 0) { + setTrainBus(); + return () => {}; + } + setTrainBus(data[0]); + }, [currentStation]); return ( { Linking.openURL(currentStation[0].StationMap) } > - GoogleMap + Map + + )} + {!trainBus || ( + } + flex={1} + onPressButton={() => Linking.openURL(trainBus.address)} + > + 平行バス )} diff --git a/menu.js b/menu.js index e8de24d..81b0173 100644 --- a/menu.js +++ b/menu.js @@ -41,6 +41,7 @@ export default function Menu(props) { navigation: { navigate }, favoriteStation, setFavoriteStation, + busAndTrainData, } = props; const JRSTraInfoEXAcSR = useRef(null); const StationBoardAcSR = useRef(null); @@ -519,6 +520,7 @@ export default function Menu(props) { originalStationList={originalStationList} favoriteStation={favoriteStation} setFavoriteStation={setFavoriteStation} + busAndTrainData={busAndTrainData} /> Date: Mon, 6 Feb 2023 11:20:43 +0900 Subject: [PATCH 18/30] ios beta publish --- app.json | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/app.json b/app.json index 12af92c..5cb5928 100644 --- a/app.json +++ b/app.json @@ -3,7 +3,10 @@ "name": "JR四国運行状況", "slug": "jrshikoku", "privacy": "public", - "platforms": ["ios", "android"], + "platforms": [ + "ios", + "android" + ], "version": "4.5", "orientation": "portrait", "icon": "./assets/icon.png", @@ -15,9 +18,11 @@ "updates": { "fallbackToCacheTimeout": 0 }, - "assetBundlePatterns": ["**/*"], + "assetBundlePatterns": [ + "**/*" + ], "ios": { - "buildNumber": "23", + "buildNumber": "24", "supportsTablet": true, "bundleIdentifier": "jrshikokuinfo.xprocess.hrkn", "config": { @@ -27,13 +32,20 @@ "android": { "package": "jrshikokuinfo.xprocess.hrkn", "versionCode": 16, - "permissions": ["ACCESS_FINE_LOCATION"], + "permissions": [ + "ACCESS_FINE_LOCATION" + ], "googleServicesFile": "./google-services.json", "config": { "googleMaps": { "apiKey": "AIzaSyAmFb-Yj033bXZWlSzNrfq_0jc1PgRrWcE" } } + }, + "extra": { + "eas": { + "projectId": "398abf60-57a7-11e9-970c-8f04356d08bf" + } } } } From 655f174321ccfe35b1631adf568f590dc6286b03 Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Mon, 6 Feb 2023 12:06:21 +0900 Subject: [PATCH 19/30] =?UTF-8?q?=E3=81=B5=E3=81=81=E3=81=BC=E3=81=8C?= =?UTF-8?q?=E7=A9=BA=E3=81=AE=E6=99=82=E3=81=AB=E3=82=AF=E3=83=A9=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A5=E3=81=97=E3=81=A6=E3=81=84=E3=81=9F=E5=95=8F?= =?UTF-8?q?=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 21 +++++++++++++++++-- .../StationDeteilView.js | 1 - menu.js | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/App.js b/App.js index 31effa5..40877ee 100644 --- a/App.js +++ b/App.js @@ -67,7 +67,7 @@ export default function App() { return ( - + ); }; -function MenuPage({ favoriteStation, setFavoriteStation, busAndTrainData }) { +function MenuPage({ + navigation, + favoriteStation, + setFavoriteStation, + busAndTrainData, +}) { + useEffect(() => { + const unsubscribe = navigation.addListener("tabPress", (e) => { + AS.getItem("favoriteStation") + .then((d) => { + const returnData = JSON.parse(d); + setFavoriteStation(returnData); + }) + .catch((d) => console.log(d)); + }); + + return unsubscribe; + }, [navigation]); return ( { }); if (data.length == 0) { setTrainBus(); - return () => {}; } setTrainBus(data[0]); }, [currentStation]); diff --git a/menu.js b/menu.js index 81b0173..8aa6e67 100644 --- a/menu.js +++ b/menu.js @@ -211,7 +211,7 @@ export default function Menu(props) { ); }} /> - {(currentStation || originalStationList) && ( + {locationAndFavorite.length != 0 && originalStationList && ( Date: Wed, 22 Feb 2023 20:03:39 +0900 Subject: [PATCH 20/30] =?UTF-8?q?ios=E3=81=A7=E3=82=82lottie=E3=82=A2?= =?UTF-8?q?=E3=83=8B=E3=83=A1=E3=81=8C=E5=8B=95=E4=BD=9C=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/駅名表/Sign.js | 37 ++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index af44437..c415cc1 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -99,7 +99,6 @@ export default function Sign(props) { style={{ position: "absolute", right: -15, top: -20 }} onPress={() => { if (testButtonStatus) { - lottieRef.current.play(35, 7); const otherData = favoriteStation.filter((d) => { const compare = JSON.stringify(d); const current = JSON.stringify(currentStation); @@ -112,7 +111,6 @@ export default function Sign(props) { AS.setItem("favoriteStation", JSON.stringify(otherData)); setFavoriteStation(otherData); } else { - lottieRef.current.play(7, 35); let ret = favoriteStation; console.log(currentStation); ret.push(currentStation); @@ -122,12 +120,12 @@ export default function Sign(props) { setTestButtonStatus(!testButtonStatus); }} > - @@ -141,6 +139,37 @@ export default function Sign(props) { ); } +const LottieDelayView = ({ + progress, + speed, + style, + source, + lottieRef, + loop, +}) => { + const [progressState, setProgressState] = useState(undefined); + useEffect(() => { + if (progress == 0) { + lottieRef.current.play(progressState !== undefined ? 35 : 7, 7); + } else { + lottieRef.current.play(progressState !== undefined ? 7 : 35, 35); + } + }, [progress]); + return ( + { + console.log("finish"); + setProgressState(progress); + }} + /> + ); +}; const NexPreStationLine = ({ nexStation, preStation }) => { return ( From 0230f5409a8d72d5da5c455fdd585df6e3e819d5 Mon Sep 17 00:00:00 2001 From: harukin-OneMix4 Date: Wed, 22 Feb 2023 20:13:16 +0900 Subject: [PATCH 21/30] =?UTF-8?q?iOS=E3=81=A7=E2=86=92=E3=81=8C=E7=9C=9F?= =?UTF-8?q?=E3=82=93=E4=B8=AD=E3=81=AB=E6=9D=A5=E3=81=AA=E3=81=8B=E3=81=A3?= =?UTF-8?q?=E3=81=9F=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/駅名表/Sign.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index c415cc1..e641f97 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -342,6 +342,7 @@ const styleSheet = { flex: 1, flexDirection: "row", alignContent: "center", + alignItems: "center", }, 下枠左右マーク: { fontWeight: "bold", From 9959fbe5c9a23a98f0c2755880420909260012eb Mon Sep 17 00:00:00 2001 From: harukin-OneMix4 Date: Wed, 22 Feb 2023 20:27:30 +0900 Subject: [PATCH 22/30] =?UTF-8?q?LED=E3=81=AE=E6=96=87=E5=AD=97=E3=82=B5?= =?UTF-8?q?=E3=82=A4=E3=82=BA=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/発車時刻表/LED_vidion.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/components/発車時刻表/LED_vidion.js b/components/発車時刻表/LED_vidion.js index 9d52ca9..e538c9b 100644 --- a/components/発車時刻表/LED_vidion.js +++ b/components/発車時刻表/LED_vidion.js @@ -404,7 +404,7 @@ const TrainName = ({ train, trainIDSwitch, d, getTrainType }) => { 6 ? 15 : 20, + fontSize: trainName.length > 6 ? parseInt("13%") : parseInt("18%"), color: getTrainType.color, fontWeight: "bold", }} @@ -422,7 +422,8 @@ const LastStation = ({ d }) => { 4 ? 15 : 20, + fontSize: + d.lastStation.length > 4 ? parseInt("13%") : parseInt("18%"), color: "white", fontWeight: "bold", }} @@ -437,7 +438,7 @@ const DependTime = ({ d }) => { { {status} @@ -512,7 +514,7 @@ const Description = ({ train }) => { Date: Wed, 22 Feb 2023 20:29:28 +0900 Subject: [PATCH 23/30] =?UTF-8?q?iOS=E3=81=AELED=E3=83=9C=E3=83=88?= =?UTF-8?q?=E3=83=A0=E6=96=87=E5=AD=97=E5=88=97=E3=81=8C=E5=A4=89=E3=81=AA?= =?UTF-8?q?=E5=A0=B4=E6=89=80=E3=81=AB=E3=81=82=E3=82=8B=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/発車時刻表/LED_vidion.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/発車時刻表/LED_vidion.js b/components/発車時刻表/LED_vidion.js index e538c9b..d25229b 100644 --- a/components/発車時刻表/LED_vidion.js +++ b/components/発車時刻表/LED_vidion.js @@ -280,7 +280,7 @@ const Footer = ({ setFinalSwitch, }) => { return ( - + Date: Thu, 2 Mar 2023 17:43:29 +0900 Subject: [PATCH 24/30] fixed yarn.lock --- yarn.lock | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8c42507..25d85d1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3614,6 +3614,11 @@ core-js@3.6.5: resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.6.5.tgz#7395dc273af37fb2e50e9bd3d9fe841285231d1a" integrity sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA== +core-js@^1.0.0: + version "1.2.7" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636" + integrity sha512-ZiPp9pZlgxpWRu0M+YWbm6+aQ84XEfH1JRXvfOc/fILWI0VKhLC2LX13X1NYq4fULzLMq7Hfh43CSo2/aIaUPA== + core-js@^2.4.0: version "2.6.12" resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" @@ -5421,6 +5426,14 @@ isobject@^3.0.0, isobject@^3.0.1: resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +isomorphic-fetch@^2.1.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9" + integrity sha512-9c4TNAKYXM5PRyVcwUZrF3W09nQ+sO7+jydgs4ZGW9dhsLG2VOlISJABombdQqQRXCwuYG3sYV/puGf5rp0qmA== + dependencies: + node-fetch "^1.0.1" + whatwg-fetch ">=0.10.0" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -6847,6 +6860,14 @@ node-fetch@2.6.7: dependencies: whatwg-url "^5.0.0" +node-fetch@^1.0.1: + version "1.7.3" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" + integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== + dependencies: + encoding "^0.1.11" + is-stream "^1.0.1" + node-fetch@^2.2.0, node-fetch@^2.6.0, node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.9" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.9.tgz#7c7f744b5cc6eb5fd404e0c7a9fec630a55657e6" @@ -7657,7 +7678,7 @@ promzard@^0.3.0: dependencies: read "1" -prop-types@*, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.2, prop-types@^15.7.2: +prop-types@*, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: version "15.8.1" resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5" integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg== @@ -9408,11 +9429,6 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -ua-parser-js@^0.7.18: - version "0.7.21" - resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.21.tgz#853cf9ce93f642f67174273cc34565ae6f308777" - integrity sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ== - ua-parser-js@^0.7.30: version "0.7.33" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532" @@ -9678,7 +9694,7 @@ whatwg-fetch@2.0.4: resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== -whatwg-fetch@^3.0.0: +whatwg-fetch@>=0.10.0, whatwg-fetch@^3.0.0: version "3.6.2" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz#dced24f37f2624ed0281725d51d0e2e3fe677f8c" integrity sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA== From 28c58ce83fc1b0c769b6fbdee56eb54c06dcc30d Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Thu, 2 Mar 2023 20:38:19 +0900 Subject: [PATCH 25/30] =?UTF-8?q?=E5=9B=BA=E5=AE=9A=E3=82=B3=E3=83=B3?= =?UTF-8?q?=E3=83=86=E3=83=B3=E3=83=84=E3=81=AE=E7=A7=BB=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.js | 606 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 308 insertions(+), 298 deletions(-) diff --git a/menu.js b/menu.js index 8aa6e67..4d7d682 100644 --- a/menu.js +++ b/menu.js @@ -162,24 +162,11 @@ export default function Menu(props) { > - - - - Linking.openURL( - "https://www.jr-shikoku.co.jp/02_information/suspension/sp/" - ) - } - > - - 新型コロナウイルスに関するお知らせ - - - 列車の運行計画・混雑状況・感染症対策への取り組み - - + - - - } - flex={1} - onPressButton={() => - Linking.openURL("https://www.jr-eki.com/ticket/brand") - } - > - トクトク切符 - - } - flex={1} - onPressButton={() => - Linking.openURL( - "https://www.jr-shikoku.co.jp/01_trainbus/event_train/sp/" - ) - } - > - 観光列車 - - } - flex={1} - onPressButton={() => - Linking.openURL("https://www.jr-eki.com/tour/brand") - } - > - 旅行ツアー - - - - Linking.openURL("https://www.jr-eki.com/smart-eki/index.html") - } - > - - スマートえきちゃん - - - JR四国のチケットレススマホアプリです。 - - - - Linking.openURL( - "https://www.jr-shikoku.co.jp/sp/index.html#menu-box" - ) - } - > - - 臨時列車などのお知らせ - - - 区間縮小・計画運休・イベント・季節臨時列車など - - - - Linking.openURL("https://www.jr-shikoku.co.jp/03_news/press/") - } - > - - ニュースリリース - - - 公式プレス記事はこちら - - - - Linking.openURL("https://www.jr-shikoku.co.jp/teiki/") - } - > - - 定期運賃計算 - - - 通常/学生/快て〜き等はこちら - - - - Linking.openURL("https://www.jr-shikoku.co.jp/04_company/group/sp/") - } - > - - JR四国のお店・サービス - - - JR四国グループの施設をご案内 - - - - Linking.openURL("https://www.jr-odekake.net/smt/")} - > - - 時刻・運賃計算 - - - (マイ・ダイヤ) - - - - マイ・ダイヤはJR西日本提供のサービスです。 - - - Linking.openURL("tel:0570-00-4592")} - > - - JR四国案内センター - - - 0570-00-4592 - (8:00~20:00 年中無休) - (通話料がかかります) - - - - - - - JR四国公式Twitter一族 - - - - {((data) => - data.map((d) => ( - Linking.openURL(d.url)}> - {d.name} - - - - )))([ - { - url: "https://twitter.com/JRshikoku_eigyo", - name: "JR四国営業部【公式】", - }, - { - url: "https://twitter.com/JRshikoku_tokyo", - name: "JR四国 東京営業情報【公式】", - }, - { - url: "https://twitter.com/JRshikoku_osaka", - name: "JR四国 大阪営業部【公式】", - }, - { - url: "https://twitter.com/jr_shikoku_info", - name: "JR四国列車運行情報【公式】", - }, - { - url: "https://twitter.com/Smile_Eki_Chan", - name: "すまいるえきちゃん♡JR四国【公式】", - }, - { - url: "https://twitter.com/jrs_matsuyama", - name: "JR四国 松山駅 【公式】", - }, - { - url: "https://twitter.com/jrshikoku_kochi", - name: "JR四国 高知駅【公式】", - }, - { - url: "https://twitter.com/jr_tokust", - name: "JR四国 徳島駅【公式】", - }, - { - url: "https://twitter.com/jrshikoku_uwjm", - name: "JR四国 宇和島駅【公式】", - }, - { - url: "https://twitter.com/JRshikoku_wkoch", - name: "JR四国 ワープ高知支店【公式】", - }, - { - url: "https://twitter.com/jrshikoku_nihaw", - name: "JR四国 ワープ新居浜営業所【公式】", - }, - { - url: "https://twitter.com/Yoakemonogatari", - name: "志国土佐 時代の夜明けのものがたり【公式】", - }, - ])} - - - - このアプリについて - - - このアプリはXprocess(HARUKIN)が製作しているJR四国の完全非公式アシストアプリケーションです。このアプリに関することでのJR四国公式へ問合せすることはお控えください。以下のTwitterよりお願いします。 - - - Linking.openURL("https://twitter.com/Xprocess_main") - } - > - - XprocessのTwitter - - - 制作運営のTwitterです。 - - - navigate("setting")} - > - - アプリの設定 - - - アプリの設定画面を表示します。 - - - {/* - */} - + { ); }; + +const FixedContent = (props) => { + return ( + + + + Linking.openURL( + "https://www.jr-shikoku.co.jp/02_information/suspension/sp/" + ) + } + > + + 新型コロナウイルスに関するお知らせ + + + 列車の運行計画・混雑状況・感染症対策への取り組み + + + {props.children} + + + } + flex={1} + onPressButton={() => + Linking.openURL("https://www.jr-eki.com/ticket/brand") + } + > + トクトク切符 + + } + flex={1} + onPressButton={() => + Linking.openURL( + "https://www.jr-shikoku.co.jp/01_trainbus/event_train/sp/" + ) + } + > + 観光列車 + + } + flex={1} + onPressButton={() => + Linking.openURL("https://www.jr-eki.com/tour/brand") + } + > + 旅行ツアー + + + + Linking.openURL("https://www.jr-eki.com/smart-eki/index.html") + } + > + + スマートえきちゃん + + + JR四国のチケットレススマホアプリです。 + + + + Linking.openURL("https://www.jr-shikoku.co.jp/sp/index.html#menu-box") + } + > + + 臨時列車などのお知らせ + + + 区間縮小・計画運休・イベント・季節臨時列車など + + + + Linking.openURL("https://www.jr-shikoku.co.jp/03_news/press/") + } + > + + ニュースリリース + + + 公式プレス記事はこちら + + + + Linking.openURL("https://www.jr-shikoku.co.jp/teiki/") + } + > + + 定期運賃計算 + + + 通常/学生/快て〜き等はこちら + + + + Linking.openURL("https://www.jr-shikoku.co.jp/04_company/group/sp/") + } + > + + JR四国のお店・サービス + + + JR四国グループの施設をご案内 + + + + Linking.openURL("https://www.jr-odekake.net/smt/")} + > + + 時刻・運賃計算 + + + (マイ・ダイヤ) + + + + マイ・ダイヤはJR西日本提供のサービスです。 + + + Linking.openURL("tel:0570-00-4592")} + > + + JR四国案内センター + + + 0570-00-4592 + (8:00~20:00 年中無休) + (通話料がかかります) + + + + + + + JR四国公式Twitter一族 + + + + {((data) => + data.map((d) => ( + Linking.openURL(d.url)}> + {d.name} + + + + )))([ + { + url: "https://twitter.com/JRshikoku_eigyo", + name: "JR四国営業部【公式】", + }, + { + url: "https://twitter.com/JRshikoku_tokyo", + name: "JR四国 東京営業情報【公式】", + }, + { + url: "https://twitter.com/JRshikoku_osaka", + name: "JR四国 大阪営業部【公式】", + }, + { + url: "https://twitter.com/jr_shikoku_info", + name: "JR四国列車運行情報【公式】", + }, + { + url: "https://twitter.com/Smile_Eki_Chan", + name: "すまいるえきちゃん♡JR四国【公式】", + }, + { + url: "https://twitter.com/jrs_matsuyama", + name: "JR四国 松山駅 【公式】", + }, + { + url: "https://twitter.com/jrshikoku_kochi", + name: "JR四国 高知駅【公式】", + }, + { + url: "https://twitter.com/jr_tokust", + name: "JR四国 徳島駅【公式】", + }, + { + url: "https://twitter.com/jrshikoku_uwjm", + name: "JR四国 宇和島駅【公式】", + }, + { + url: "https://twitter.com/JRshikoku_wkoch", + name: "JR四国 ワープ高知支店【公式】", + }, + { + url: "https://twitter.com/jrshikoku_nihaw", + name: "JR四国 ワープ新居浜営業所【公式】", + }, + { + url: "https://twitter.com/Yoakemonogatari", + name: "志国土佐 時代の夜明けのものがたり【公式】", + }, + ])} + + + + このアプリについて + + + このアプリはXprocess(HARUKIN)が製作しているJR四国の完全非公式アシストアプリケーションです。このアプリに関することでのJR四国公式へ問合せすることはお控えください。以下のTwitterよりお願いします。 + + + Linking.openURL("https://twitter.com/Xprocess_main") + } + > + + XprocessのTwitter + + + 制作運営のTwitterです。 + + + props.navigate("setting")} + > + + アプリの設定 + + + アプリの設定画面を表示します。 + + + {/* + */} + + ); +}; From 3f8a753abbd5fdde1cc4988d1e763b4dd11d12e8 Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Thu, 2 Mar 2023 21:03:35 +0900 Subject: [PATCH 26/30] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=83?= =?UTF-8?q?=E3=82=AF=E3=82=B9=E3=81=8C=E3=82=BA=E3=83=AC=E3=81=A6=E8=A1=A8?= =?UTF-8?q?=E7=A4=BA=E3=81=8C=E5=B4=A9=E3=82=8C=E3=81=A6=E3=81=84=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/menu.js b/menu.js index 4d7d682..2b706c1 100644 --- a/menu.js +++ b/menu.js @@ -87,8 +87,13 @@ export default function Menu(props) { useEffect(() => { if (!(selectedCurrentStation < favoriteStation.length)) { - setSelectedCurrentStation(favoriteStation.length - 1); - carouselRef.current.snapToItem(favoriteStation.length - 1); + if (favoriteStation.length == 0) { + setSelectedCurrentStation(0); + carouselRef.current.snapToItem(0); + } else { + setSelectedCurrentStation(favoriteStation.length - 1); + carouselRef.current.snapToItem(favoriteStation.length - 1); + } } }, [favoriteStation]); From f6a88f09e418a8ab7175a4fd1d8351e9ba8705ce Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Thu, 2 Mar 2023 21:11:57 +0900 Subject: [PATCH 27/30] 4.5-beta-2 --- app.json | 4 ++-- components/settings.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app.json b/app.json index 5cb5928..ae9fb4d 100644 --- a/app.json +++ b/app.json @@ -22,7 +22,7 @@ "**/*" ], "ios": { - "buildNumber": "24", + "buildNumber": "25", "supportsTablet": true, "bundleIdentifier": "jrshikokuinfo.xprocess.hrkn", "config": { @@ -31,7 +31,7 @@ }, "android": { "package": "jrshikokuinfo.xprocess.hrkn", - "versionCode": 16, + "versionCode": 17, "permissions": [ "ACCESS_FINE_LOCATION" ], diff --git a/components/settings.js b/components/settings.js index 197dbc4..e37edcd 100644 --- a/components/settings.js +++ b/components/settings.js @@ -102,7 +102,7 @@ export default function Setting(props) { textAlignVertical: "center", }} > - 内部バージョン: 4.5 beta-1 + 内部バージョン: 4.5 beta-2 From d627617ca0c14c9f7fec5c5e7f3e3f5d8d6f5c0a Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Fri, 3 Mar 2023 21:37:34 +0900 Subject: [PATCH 28/30] =?UTF-8?q?=E5=B4=A9=E3=82=8C=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.js | 4 +++- components/駅名表/Sign.js | 1 - menu.js | 30 +++++++++++++++--------------- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/App.js b/App.js index 40877ee..9fd49de 100644 --- a/App.js +++ b/App.js @@ -239,7 +239,9 @@ function MenuPage({ AS.getItem("favoriteStation") .then((d) => { const returnData = JSON.parse(d); - setFavoriteStation(returnData); + if (favoriteStation.toString() != d) { + setFavoriteStation(returnData); + } }) .catch((d) => console.log(d)); }); diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index e641f97..79e7b33 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -48,7 +48,6 @@ export default function Sign(props) { setNexPrePosition(0); return () => {}; } - LayoutAnimation.easeInEaseOut(); setNexPrePosition( nexPrePosition + 1 == currentStation.length ? 0 : nexPrePosition + 1 ); diff --git a/menu.js b/menu.js index 2b706c1..4563941 100644 --- a/menu.js +++ b/menu.js @@ -3,11 +3,11 @@ import Carousel from "react-native-snap-carousel"; import { Platform, View, - LayoutAnimation, ScrollView, Linking, Text, TouchableOpacity, + ToastAndroid, } from "react-native"; import Constants from "expo-constants"; import { ListItem } from "native-base"; @@ -126,7 +126,6 @@ export default function Menu(props) { pre.push(...current); return pre; }, []); - LayoutAnimation.easeInEaseOut(); if (returnDataBase.length) { let currentStation = currentStation == undefined ? [] : currentStation; if (currentStation.toString() != returnDataBase.toString()) { @@ -142,8 +141,6 @@ export default function Menu(props) { const [getTime, setGetTime] = useState(new Date()); const [loadingDelayData, setLoadingDelayData] = useState(true); const carouselRef = useRef(); - const scrollRef = useRef(); - const [isScroll, setIsScroll] = useState(true); const [selectedCurrentStation, setSelectedCurrentStation] = useState(0); useEffect(() => { @@ -152,7 +149,6 @@ export default function Menu(props) { ) .then((response) => response.text()) .then((data) => setDelayData(data !== "" ? data.split("^") : null)) - .then(LayoutAnimation.easeInEaseOut) .then(() => setGetTime(new Date())) .finally(() => setLoadingDelayData(false)); }, [loadingDelayData]); @@ -167,11 +163,8 @@ export default function Menu(props) { > - + + - + + + { size={30} style={{ margin: 5 }} onPress={() => { - LayoutAnimation.easeInEaseOut(); setLoadingDelayData(true); }} /> @@ -411,9 +405,9 @@ const JRSTraInfoBox = (props) => { ); }; -const FixedContent = (props) => { +const FixedContentTop = (props) => { return ( - + <> { 列車の運行計画・混雑状況・感染症対策への取り組み + + ); +}; +const FixedContentBottom = (props) => { + return ( + <> {props.children} @@ -709,6 +709,6 @@ const FixedContent = (props) => { height="200" source={require("./assets/トレインビジョン関係/1.svg")} /> */} - + ); }; From e9fd753a8fdfccf02573da1e00fc2aa28f903cfe Mon Sep 17 00:00:00 2001 From: harukin-DeskMini Date: Sun, 26 Mar 2023 19:29:57 +0900 Subject: [PATCH 29/30] =?UTF-8?q?=E5=B0=8F=E6=95=B4=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/FavoriteList.js | 1 - components/発車時刻表/LED_vidion.js | 1 - components/駅名表/Sign.js | 1 - menu.js | 185 +++++++++++------------ trainbaseview.js | 1 - 5 files changed, 88 insertions(+), 101 deletions(-) diff --git a/components/FavoriteList.js b/components/FavoriteList.js index 3b946a2..422ca4c 100644 --- a/components/FavoriteList.js +++ b/components/FavoriteList.js @@ -34,7 +34,6 @@ export default function FavoriteList({ {favoriteStation .filter((d) => d[0].StationMap) .map((currentStation) => { - console.log(currentStation); return ( { diff --git a/components/発車時刻表/LED_vidion.js b/components/発車時刻表/LED_vidion.js index d25229b..af069ef 100644 --- a/components/発車時刻表/LED_vidion.js +++ b/components/発車時刻表/LED_vidion.js @@ -138,7 +138,6 @@ export default function LED_vision(props) { }); return { train: d, time: a.time, lastStation: a.lastStation }; }); - console.log(returnData); return returnData.sort((a, b) => { switch (true) { case parseInt(a.time.split(":")[0]) < parseInt(b.time.split(":")[0]): diff --git a/components/駅名表/Sign.js b/components/駅名表/Sign.js index 79e7b33..7316205 100644 --- a/components/駅名表/Sign.js +++ b/components/駅名表/Sign.js @@ -111,7 +111,6 @@ export default function Sign(props) { setFavoriteStation(otherData); } else { let ret = favoriteStation; - console.log(currentStation); ret.push(currentStation); AS.setItem("favoriteStation", JSON.stringify(ret)); setFavoriteStation(ret); diff --git a/menu.js b/menu.js index 4563941..6744042 100644 --- a/menu.js +++ b/menu.js @@ -48,59 +48,20 @@ export default function Menu(props) { const navigation = useNavigation(); //位置情報 - const [location, setLocation] = useState(null); const [locationStatus, setLocationStatus] = useState(null); useEffect(() => { Location.requestForegroundPermissionsAsync().then((data) => { setLocationStatus(data.status); }); }, []); - useEffect(() => { - if (locationStatus !== "granted") return () => {}; - getCurrentPosition(); - }, [locationStatus]); const getCurrentPosition = () => { + if (locationStatus !== "granted") return () => {}; Location.getCurrentPositionAsync({}).then((location) => - setLocation(location) + makeCurrentStation(location) ); }; - - useInterval(() => { - if (locationStatus !== "granted") return () => {}; - getCurrentPosition(); - }, 5000); - - const [originalStationList, setOriginalStationList] = useState(); - useEffect(() => { - getStationList().then(setOriginalStationList); - }, []); - - const [locationAndFavorite, setLocationAndFavorite] = useState([]); - useEffect(() => { - if (!favoriteStation) return () => {}; - const data = favoriteStation.filter((d) => - JSON.stringify(d) === JSON.stringify(currentStation) ? false : true - ); - setLocationAndFavorite(data); - }, [currentStation, favoriteStation]); - - useEffect(() => { - if (!(selectedCurrentStation < favoriteStation.length)) { - if (favoriteStation.length == 0) { - setSelectedCurrentStation(0); - carouselRef.current.snapToItem(0); - } else { - setSelectedCurrentStation(favoriteStation.length - 1); - carouselRef.current.snapToItem(favoriteStation.length - 1); - } - } - }, [favoriteStation]); - - const [stationName, setStationName] = useState(undefined); - const [currentStation, setCurrentStation] = useState(undefined); - useEffect(() => { - if (!location) return () => {}; + const makeCurrentStation = (location) => { if (!originalStationList) return () => {}; const findStationEachLine = (selectLine) => { const searchArea = 0.0015; @@ -134,7 +95,15 @@ export default function Menu(props) { } else { setCurrentStation(undefined); } - }, [location, originalStationList]); + }; + + useEffect(getCurrentPosition, [locationStatus]); + useInterval(getCurrentPosition, 5000); + + const [currentStation, setCurrentStation] = useState(undefined); //第三要素 + + const [originalStationList, setOriginalStationList] = useState(); // 第一要素 + useEffect(() => getStationList().then(setOriginalStationList), []); const [count, setCount] = useState(0); const [delayData, setDelayData] = useState(undefined); @@ -152,7 +121,29 @@ export default function Menu(props) { .then(() => setGetTime(new Date())) .finally(() => setLoadingDelayData(false)); }, [loadingDelayData]); - + const allStationData = [currentStation, ...favoriteStation].filter( + (d) => d != undefined + ); + console.log(allStationData); + useEffect(() => { + if (allStationData.length == 0) { + setSelectedCurrentStation(0); + return; + } + console.log(allStationData[selectedCurrentStation]); + if (allStationData[selectedCurrentStation] == undefined) { + const count = selectedCurrentStation - 1; + setSelectedCurrentStation(count); + } + }, [selectedCurrentStation, currentStation, favoriteStation]); + useEffect(() => { + if (!carouselRef.current) return; + console.log(carouselRef.current); + if (carouselRef.current?._itemToSnapTo != selectedCurrentStation) { + carouselRef.current.snapToItem(0); + carouselRef.current.snapToItem(selectedCurrentStation); + } + }, [selectedCurrentStation]); return ( - { - setSelectedCurrentStation(d); - }} - renderItem={({ item, index }) => { - return ( - - - - ); - }} - /> - {locationAndFavorite.length != 0 && originalStationList && ( - { + setSelectedCurrentStation(d); + }} + renderItem={({ item, index }) => { + return ( + + + + ); + }} /> )} + {allStationData.length != 0 && + originalStationList && + allStationData[selectedCurrentStation] && ( + + )} - + {allStationData.length != 0 && + originalStationList && + allStationData[selectedCurrentStation] && ( + + )} Date: Sun, 26 Mar 2023 21:00:21 +0900 Subject: [PATCH 30/30] =?UTF-8?q?=E3=83=87=E3=83=BC=E3=82=BF=E3=81=8C?= =?UTF-8?q?=E7=84=A1=E3=81=84=E6=99=82=E3=81=AB=E3=82=AF=E3=83=A9=E3=83=83?= =?UTF-8?q?=E3=82=B7=E3=83=A5=E3=81=99=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- menu.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/menu.js b/menu.js index 6744042..6653032 100644 --- a/menu.js +++ b/menu.js @@ -207,20 +207,18 @@ export default function Menu(props) { - {allStationData.length != 0 && - originalStationList && - allStationData[selectedCurrentStation] && ( - - )} +