diff --git a/app.json b/app.json index 1d77d1d..0126b84 100644 --- a/app.json +++ b/app.json @@ -1,79 +1,13 @@ { "expo": { - "name": "JR四国運行状況", + "name": "JR四国非公式", "slug": "jrshikoku", "platforms": ["ios", "android"], - "plugins": [ - "expo-localization", - [ - "expo-video", - { - "supportsBackgroundPlayback": true, - "supportsPictureInPicture": true - } - ], - [ - "react-native-android-widget", - { - "widgets": [ - { - "name": "JR_shikoku_train_info", - "label": "JR四国列車遅延速報EX", - "minWidth": "70dp", - "minHeight": "50dp", - "description": "JR四国列車遅延速報EXのウィジェットです。30分ごとに自動更新します。タッチすると強制更新します。", - "previewImage": "./assets/icon.png", - "updatePeriodMillis": 1800000, - "resizeMode": "horizontal|vertical" - } - ] - } - ], - "expo-font", - [ - "expo-screen-orientation", - { - "initialOrientation": "DEFAULT" - } - ], - [ - "expo-location", - { - "locationWhenInUsePermission": "この位置情報は、リンク画面で現在地側近の駅情報を取得するのに使用されます。" - } - ], - [ - "expo-alternate-app-icons", - [ - { - "name": "EF65", - "ios": { - "light":"./assets/icons/ef65_rp0.png", - "dark":"./assets/icons/ef65_rp0.png", - "tinted":"./assets/icons/ef65_rp0.png" - }, - "android": { - "foregroundImage": "./assets/icons/ef65_rp0.png", - "backgroundColor": "#001413" - } - }, - { - "name": "8000NN", - "ios": "./assets/icons/s8000nn.png", - "android": { - "foregroundImage": "./assets/icons/s8000nn.png", - "backgroundColor": "#001413" - } - } - ] - ] - ], "version": "6.0", "orientation": "default", - "icon": "./assets/icons/s8000nn.png", + "icon": "./assets/icons/s8600.png", "splash": { "image": "./assets/splash.png", - "resizeMode": "vertical", "backgroundColor": "#00b8ff" }, "updates": { @@ -82,7 +16,7 @@ }, "assetBundlePatterns": ["**/*"], "ios": { - "buildNumber": "39", + "buildNumber": "41", "supportsTablet": false, "bundleIdentifier": "jrshikokuinfo.xprocess.hrkn", "config": { @@ -103,7 +37,7 @@ }, "android": { "package": "jrshikokuinfo.xprocess.hrkn", - "versionCode": 22, + "versionCode": 23, "permissions": [ "ACCESS_FINE_LOCATION", "NFC" @@ -122,6 +56,401 @@ }, "runtimeVersion": { "policy": "sdkVersion" - } + }, + "plugins": [ + "expo-font", + "expo-localization", + [ + "expo-video", + { + "supportsBackgroundPlayback": true, + "supportsPictureInPicture": true + } + ], + [ + "expo-screen-orientation", + { + "initialOrientation": "DEFAULT" + } + ], + [ + "expo-location", + { + "locationWhenInUsePermission": "この位置情報は、リンク画面で現在地側近の駅情報を取得するのに使用されます。" + } + ], + [ + "react-native-android-widget", + { + "widgets": [ + { + "name": "JR_shikoku_train_info", + "label": "列車遅延速報EX", + "minWidth": "70dp", + "minHeight": "50dp", + "description": "JR四国列車遅延速報EXのウィジェットです。30分ごとに自動更新します。タッチすると強制更新します。", + "previewImage": "./assets/icon.png", + "updatePeriodMillis": 1800000, + "resizeMode": "horizontal|vertical" + }, + { + "name": "JR_shikoku_train_strange", + "label": "怪レい列車", + "minWidth": "70dp", + "minHeight": "50dp", + "description": "JR四国怪レい列車BOTのウィジェットです。30分ごとに自動更新します。タッチすると強制更新します。", + "previewImage": "./assets/icon.png", + "updatePeriodMillis": 1800000, + "resizeMode": "horizontal|vertical" + }, + { + "name": "JR_shikoku_info", + "label": "運行情報", + "minWidth": "70dp", + "minHeight": "50dp", + "description": "JR四国運行情報のウィジェットです。30分ごとに自動更新します。タッチすると強制更新します。", + "previewImage": "./assets/icon.png", + "updatePeriodMillis": 1800000, + "resizeMode": "horizontal|vertical" + }, + { + "name": "JR_shikoku_apps_shortcut", + "label": "クイックアクセス", + "minWidth": "70dp", + "minHeight": "50dp", + "description": "JR四国非公式アプリの各種リンクを表示するウィジェットです。", + "previewImage": "./assets/icon.png", + "updatePeriodMillis": 1800000, + "resizeMode": "horizontal|vertical" + } + ] + } + ], + [ + "expo-alternate-app-icons", + [ + { + "name": "185mrt", + "ios": "./assets/icons/185_mrt.png", + "android": { + "foregroundImage": "./assets/icons/185_mrt.png", + "backgroundColor": "#001413" + } + }, + { + "name": "32kpuuy", + "ios": "./assets/icons/32kpuuy.png", + "android": { + "foregroundImage": "./assets/icons/32kpuuy.png", + "backgroundColor": "#001413" + } + }, + { + "name": "54", + "ios": "./assets/icons/54.png", + "android": { + "foregroundImage": "./assets/icons/54.png", + "backgroundColor": "#001413" + } + }, + { + "name": "EF65", + "ios": "./assets/icons/ef65.png", + "android": { + "foregroundImage": "./assets/icons/ef65.png", + "backgroundColor": "#001413" + } + }, + { + "name": "1500", + "ios": "./assets/icons/s1500.png", + "android": { + "foregroundImage": "./assets/icons/s1500.png", + "backgroundColor": "#001413" + } + }, + { + "name": "185mm1", + "ios": "./assets/icons/s185mm1.png", + "android": { + "foregroundImage": "./assets/icons/s185mm1.png", + "backgroundColor": "#001413" + } + }, + { + "name": "185ym1", + "ios": "./assets/icons/s185ym1.png", + "android": { + "foregroundImage": "./assets/icons/s185ym1.png", + "backgroundColor": "#001413" + } + }, + { + "name": "2600", + "ios": "./assets/icons/s2600.png", + "android": { + "foregroundImage": "./assets/icons/s2600.png", + "backgroundColor": "#001413" + } + }, + { + "name": "2700apy", + "ios": "./assets/icons/s2700apy.png", + "android": { + "foregroundImage": "./assets/icons/s2700apy.png", + "backgroundColor": "#001413" + } + }, + { + "name": "6000p", + "ios": "./assets/icons/s6000p.png", + "android": { + "foregroundImage": "./assets/icons/s6000p.png", + "backgroundColor": "#001413" + } + }, + { + "name": "8000ap", + "ios": "./assets/icons/s8000ap.png", + "android": { + "foregroundImage": "./assets/icons/s8000ap.png", + "backgroundColor": "#001413" + } + }, + { + "name": "8600", + "ios": "./assets/icons/s8600.png", + "android": { + "foregroundImage": "./assets/icons/s8600.png", + "backgroundColor": "#001413" + } + }, + { + "name": "213w", + "ios": "./assets/icons/w213w.png", + "android": { + "foregroundImage": "./assets/icons/w213w.png", + "backgroundColor": "#001413" + } + }, + { + "name": "32", + "ios": "./assets/icons/32.png", + "android": { + "foregroundImage": "./assets/icons/32.png", + "backgroundColor": "#001413" + } + }, + { + "name": "32tht", + "ios": "./assets/icons/32tht.png", + "android": { + "foregroundImage": "./assets/icons/32tht.png", + "backgroundColor": "#001413" + } + }, + { + "name": "54st", + "ios": "./assets/icons/54st.png", + "android": { + "foregroundImage": "./assets/icons/54st.png", + "backgroundColor": "#001413" + } + }, + { + "name": "1000", + "ios": "./assets/icons/s1000.png", + "android": { + "foregroundImage": "./assets/icons/s1000.png", + "backgroundColor": "#001413" + } + }, + { + "name": "185iyor", + "ios": "./assets/icons/s185iyor.png", + "android": { + "foregroundImage": "./assets/icons/s185iyor.png", + "backgroundColor": "#001413" + } + }, + { + "name": "185toai", + "ios": "./assets/icons/s185to_ai.png", + "android": { + "foregroundImage": "./assets/icons/s185to_ai.png", + "backgroundColor": "#001413" + } + }, + { + "name": "2000asi", + "ios": "./assets/icons/s2000_asi.png", + "android": { + "foregroundImage": "./assets/icons/s2000_asi.png", + "backgroundColor": "#001413" + } + }, + { + "name": "N2000", + "ios": "./assets/icons/s2000n.png", + "android": { + "foregroundImage": "./assets/icons/s2000n.png", + "backgroundColor": "#001413" + } + }, + { + "name": "2700", + "ios": "./assets/icons/s2700.png", + "android": { + "foregroundImage": "./assets/icons/s2700.png", + "backgroundColor": "#001413" + } + }, + { + "name": "5001", + "ios": "./assets/icons/s5001.png", + "android": { + "foregroundImage": "./assets/icons/s5001.png", + "backgroundColor": "#001413" + } + }, + { + "name": "7000", + "ios": "./assets/icons/s7000.png", + "android": { + "foregroundImage": "./assets/icons/s7000.png", + "backgroundColor": "#001413" + } + }, + { + "name": "8000nn", + "ios": "./assets/icons/s8000nn.png", + "android": { + "foregroundImage": "./assets/icons/s8000nn.png", + "backgroundColor": "#001413" + } + }, + { + "name": "8000no", + "ios": "./assets/icons/s8000no.png", + "android": { + "foregroundImage": "./assets/icons/s8000no.png", + "backgroundColor": "#001413" + } + }, + { + "name": "9640", + "ios": "./assets/icons/tosa9640.png", + "android": { + "foregroundImage": "./assets/icons/tosa9640.png", + "backgroundColor": "#001413" + } + }, + { + "name": "285", + "ios": "./assets/icons/w285.png", + "android": { + "foregroundImage": "./assets/icons/w285.png", + "backgroundColor": "#001413" + } + }, + { + "name": "32at", + "ios": "./assets/icons/32at.png", + "android": { + "foregroundImage": "./assets/icons/32at.png", + "backgroundColor": "#001413" + } + }, + { + "name": "40", + "ios": "./assets/icons/40.png", + "android": { + "foregroundImage": "./assets/icons/40.png", + "backgroundColor": "#001413" + } + }, + { + "name": "EF210", + "ios": "./assets/icons/ef210.png", + "android": { + "foregroundImage": "./assets/icons/ef210.png", + "backgroundColor": "#001413" + } + }, + { + "name": "1200n", + "ios": "./assets/icons/s1200n.png", + "android": { + "foregroundImage": "./assets/icons/s1200n.png", + "backgroundColor": "#001413" + } + }, + { + "name": "185iyoy", + "ios": "./assets/icons/s185iyoy.png", + "android": { + "foregroundImage": "./assets/icons/s185iyoy.png", + "backgroundColor": "#001413" + } + }, + { + "name": "185tu", + "ios": "./assets/icons/s185tu.png", + "android": { + "foregroundImage": "./assets/icons/s185tu.png", + "backgroundColor": "#001413" + } + }, + { + "name": "2002a", + "ios": "./assets/icons/s2002a.png", + "android": { + "foregroundImage": "./assets/icons/s2002a.png", + "backgroundColor": "#001413" + } + }, + { + "name": "2700apr", + "ios": "./assets/icons/s2700apr.png", + "android": { + "foregroundImage": "./assets/icons/s2700apr.png", + "backgroundColor": "#001413" + } + }, + { + "name": "5001k", + "ios": "./assets/icons/s5001k.png", + "android": { + "foregroundImage": "./assets/icons/s5001k.png", + "backgroundColor": "#001413" + } + }, + { + "name": "s7200", + "ios": "./assets/icons/s7200.png", + "android": { + "foregroundImage": "./assets/icons/s7200.png", + "backgroundColor": "#001413" + } + }, + { + "name": "8000nr", + "ios": "./assets/icons/s8000nr.png", + "android": { + "foregroundImage": "./assets/icons/s8000nr.png", + "backgroundColor": "#001413" + } + }, + { + "name": "9640jgr", + "ios": "./assets/icons/tosa9640jgr.png", + "android": { + "foregroundImage": "./assets/icons/tosa9640jgr.png", + "backgroundColor": "#001413" + } + } + ] + ] + ] } } diff --git a/assets/icons/32.png b/assets/icons/32.png new file mode 100644 index 0000000..74e60db Binary files /dev/null and b/assets/icons/32.png differ diff --git a/assets/icons/32at.png b/assets/icons/32at.png new file mode 100644 index 0000000..320c98e Binary files /dev/null and b/assets/icons/32at.png differ diff --git a/assets/icons/32kpuuy.png b/assets/icons/32kpuuy.png new file mode 100644 index 0000000..aa8ce9d Binary files /dev/null and b/assets/icons/32kpuuy.png differ diff --git a/assets/icons/32tht.png b/assets/icons/32tht.png new file mode 100644 index 0000000..359181c Binary files /dev/null and b/assets/icons/32tht.png differ diff --git a/assets/icons/40.png b/assets/icons/40.png new file mode 100644 index 0000000..9235b1d Binary files /dev/null and b/assets/icons/40.png differ diff --git a/assets/icons/54.png b/assets/icons/54.png new file mode 100644 index 0000000..a948494 Binary files /dev/null and b/assets/icons/54.png differ diff --git a/assets/icons/54st.png b/assets/icons/54st.png new file mode 100644 index 0000000..24d4442 Binary files /dev/null and b/assets/icons/54st.png differ diff --git a/assets/icons/ef210.png b/assets/icons/ef210.png new file mode 100644 index 0000000..c8ae286 Binary files /dev/null and b/assets/icons/ef210.png differ diff --git a/assets/icons/ef210a.png b/assets/icons/ef210a.png deleted file mode 100644 index e1c244b..0000000 Binary files a/assets/icons/ef210a.png and /dev/null differ diff --git a/assets/icons/ef65.png b/assets/icons/ef65.png new file mode 100644 index 0000000..578cb56 Binary files /dev/null and b/assets/icons/ef65.png differ diff --git a/assets/icons/ef65_rp0.png b/assets/icons/ef65_rp0.png deleted file mode 100644 index a0b8621..0000000 Binary files a/assets/icons/ef65_rp0.png and /dev/null differ diff --git a/assets/icons/icons.ts b/assets/icons/icons.ts new file mode 100644 index 0000000..f12d0cb --- /dev/null +++ b/assets/icons/icons.ts @@ -0,0 +1,45 @@ +export default () =>{ + return [ + { "id": "32", "name": "キハ32形", "icon": require("./32.png") }, + { "id": "32kpuuy", "name": "キハ32形かっぱうようよ号", "icon": require("./32kpuuy.png") }, + { "id": "32tht", "name": "キハ32形新幹線ホビートレイン", "icon": require("./32tht.png") }, + { "id": "32at", "name": "キクハ32形アンパンマントロッコ", "icon": require("./32at.png") }, + { "id": "54", "name": "キハ54形", "icon": require("./54.png") }, + { "id": "54st", "name": "キハ54形しまんトロッコ", "icon": require("./54st.png") }, + { "id": "40", "name": "キハ40", "icon": require("./40.png") }, + { "id": "185mrt", "name": "キハ185系四国色", "icon": require("./s185_mrt.png") }, + { "id": "185tu", "name": "キハ185系剣山色", "icon": require("./s185tu.png") }, + { "id": "185iyor", "name": "キハ185系伊予灘ものがたり(赤)", "icon": require("./s185iyor.png") }, + { "id": "185iyoy", "name": "キハ185系伊予灘ものがたり(黄)", "icon": require("./s185iyoy.png") }, + { "id": "185toai", "name": "キハ185系藍よしのがわトロッコ", "icon": require("./s185to_ai.png") }, + { "id": "185mm1", "name": "キハ185系四国まんなか千年ものがたり(緑)", "icon": require("./s185mm1.png") }, + { "id": "185ym1", "name": "キハ185系時代の夜明けのものがたり(茶)", "icon": require("./s185ym1.png") }, + { "id": "1000", "name": "1000形", "icon": require("./s1000.png") }, + { "id": "1200n", "name": "1200形", "icon": require("./s1200n.png") }, + { "id": "1500", "name": "1500形", "icon": require("./s1500.png") }, + { "id": "5001", "name": "5000系(二階建て)", "icon": require("./s5001.png") }, + { "id": "5001k", "name": "5000系(平屋側)", "icon": require("./s5001k.png") }, + { "id": "6000p", "name": "6000系", "icon": require("./s6000p.png") }, + { "id": "7000", "name": "7000系", "icon": require("./s7000.png") }, + { "id": "7200", "name": "7200系", "icon": require("./s7200.png") }, + { "id": "2000asi", "name": "2000系", "icon": require("./s2000_asi.png") }, + { "id": "N2000", "name": "N2000系", "icon": require("./s2000n.png") }, + { "id": "2002a", "name": "2000系アンパンマン", "icon": require("./s2002a.png") }, + { "id": "2600", "name": "2600系" , "icon": require("./s2600.png")}, + { "id": "2700", "name": "2700系", "icon": require("./s2700.png") }, + { "id": "2700apy", "name": "2700系アンパンマン(黄)", "icon": require("./s2700apy.png") }, + { "id": "2700apr", "name": "2700系アンパンマン(赤)", "icon": require("./s2700apr.png") }, + { "id": "8000no", "name": "8000系(オレンジ)", "icon": require("./s8000no.png") }, + { "id": "8000nr", "name": "8000系(赤)", "icon": require("./s8000nr.png") }, + { "id": "8000ap", "name": "8000系アンパンマン", "icon": require("./s8000ap.png") }, + { "id": "8000nn", "name": "8000系リニューアル改", "icon": require("./s8000nn.png") }, + { "id": "8600", "name": "8600系", "icon": require("./s8600.png") }, + { "id": "9640", "name": "9640形(白)", "icon": require("./tosa9640.png") }, + { "id": "9640jgr", "name": "9640形オープンデッキ(緑)", "icon": require("./tosa9640jgr.png") }, + { "id": "285", "name": "285系サンライズ瀬戸", "icon": require("./w285.png") }, + { "id": "213w", "name": "ラ・マル・ド・ボァ", "icon": require("./w213w.png") }, + { "id": "EF65", "name": "EF65", "icon": require("./ef65.png") }, + { "id": "EF210", "name": "EF210", "icon": require("./ef210.png") }, + ] + +} \ No newline at end of file diff --git a/assets/icons/s1000.png b/assets/icons/s1000.png index 062366e..e50b432 100644 Binary files a/assets/icons/s1000.png and b/assets/icons/s1000.png differ diff --git a/assets/icons/s1200n.png b/assets/icons/s1200n.png index 6292a6f..4fa6e26 100644 Binary files a/assets/icons/s1200n.png and b/assets/icons/s1200n.png differ diff --git a/assets/icons/s1500.png b/assets/icons/s1500.png index 1195d90..a2a2619 100644 Binary files a/assets/icons/s1500.png and b/assets/icons/s1500.png differ diff --git a/assets/icons/s185_mrt.png b/assets/icons/s185_mrt.png index ac72ee3..e25eeaa 100644 Binary files a/assets/icons/s185_mrt.png and b/assets/icons/s185_mrt.png differ diff --git a/assets/icons/s185cm.png b/assets/icons/s185cm.png deleted file mode 100644 index 99f48e5..0000000 Binary files a/assets/icons/s185cm.png and /dev/null differ diff --git a/assets/icons/s185iyor.png b/assets/icons/s185iyor.png index 010f0f0..966311c 100644 Binary files a/assets/icons/s185iyor.png and b/assets/icons/s185iyor.png differ diff --git a/assets/icons/s185iyoy.png b/assets/icons/s185iyoy.png index 0884bfd..20ba4f5 100644 Binary files a/assets/icons/s185iyoy.png and b/assets/icons/s185iyoy.png differ diff --git a/assets/icons/s185mm1.png b/assets/icons/s185mm1.png index 3715242..31100f1 100644 Binary files a/assets/icons/s185mm1.png and b/assets/icons/s185mm1.png differ diff --git a/assets/icons/s185to_ai.png b/assets/icons/s185to_ai.png index 5bd4c79..775abac 100644 Binary files a/assets/icons/s185to_ai.png and b/assets/icons/s185to_ai.png differ diff --git a/assets/icons/s185tu.png b/assets/icons/s185tu.png index f60f052..a551154 100644 Binary files a/assets/icons/s185tu.png and b/assets/icons/s185tu.png differ diff --git a/assets/icons/s185ym1.png b/assets/icons/s185ym1.png index cad5e6e..57bdc53 100644 Binary files a/assets/icons/s185ym1.png and b/assets/icons/s185ym1.png differ diff --git a/assets/icons/s2000_asi.png b/assets/icons/s2000_asi.png index 9c6b2d2..1feb687 100644 Binary files a/assets/icons/s2000_asi.png and b/assets/icons/s2000_asi.png differ diff --git a/assets/icons/s2000n.png b/assets/icons/s2000n.png new file mode 100644 index 0000000..2618ae7 Binary files /dev/null and b/assets/icons/s2000n.png differ diff --git a/assets/icons/s2002a.png b/assets/icons/s2002a.png index a38e75d..a340320 100644 Binary files a/assets/icons/s2002a.png and b/assets/icons/s2002a.png differ diff --git a/assets/icons/s2600.png b/assets/icons/s2600.png index 1872d4d..3f5df52 100644 Binary files a/assets/icons/s2600.png and b/assets/icons/s2600.png differ diff --git a/assets/icons/s2700.png b/assets/icons/s2700.png index 4f41965..a39d00b 100644 Binary files a/assets/icons/s2700.png and b/assets/icons/s2700.png differ diff --git a/assets/icons/s2700apr.png b/assets/icons/s2700apr.png index c449db0..120b783 100644 Binary files a/assets/icons/s2700apr.png and b/assets/icons/s2700apr.png differ diff --git a/assets/icons/s2700apy.png b/assets/icons/s2700apy.png index d96f5e0..982d673 100644 Binary files a/assets/icons/s2700apy.png and b/assets/icons/s2700apy.png differ diff --git a/assets/icons/s32kpuy1.png b/assets/icons/s32kpuy1.png deleted file mode 100644 index f5ed85b..0000000 Binary files a/assets/icons/s32kpuy1.png and /dev/null differ diff --git a/assets/icons/s32s.png b/assets/icons/s32s.png deleted file mode 100644 index 29fe272..0000000 Binary files a/assets/icons/s32s.png and /dev/null differ diff --git a/assets/icons/s32tht.png b/assets/icons/s32tht.png deleted file mode 100644 index b47c77e..0000000 Binary files a/assets/icons/s32tht.png and /dev/null differ diff --git a/assets/icons/s32to4.png b/assets/icons/s32to4.png deleted file mode 100644 index edaa29f..0000000 Binary files a/assets/icons/s32to4.png and /dev/null differ diff --git a/assets/icons/s40.png b/assets/icons/s40.png deleted file mode 100644 index 3617934..0000000 Binary files a/assets/icons/s40.png and /dev/null differ diff --git a/assets/icons/s5001.png b/assets/icons/s5001.png index 836f28a..bc39dbc 100644 Binary files a/assets/icons/s5001.png and b/assets/icons/s5001.png differ diff --git a/assets/icons/s5001k.png b/assets/icons/s5001k.png index f5343c6..2228c90 100644 Binary files a/assets/icons/s5001k.png and b/assets/icons/s5001k.png differ diff --git a/assets/icons/s54s.png b/assets/icons/s54s.png deleted file mode 100644 index d8f0de0..0000000 Binary files a/assets/icons/s54s.png and /dev/null differ diff --git a/assets/icons/s54to0ys.png b/assets/icons/s54to0ys.png deleted file mode 100644 index 72ec596..0000000 Binary files a/assets/icons/s54to0ys.png and /dev/null differ diff --git a/assets/icons/s6000p.png b/assets/icons/s6000p.png index 911f693..c851d13 100644 Binary files a/assets/icons/s6000p.png and b/assets/icons/s6000p.png differ diff --git a/assets/icons/s7000.png b/assets/icons/s7000.png index 86ba21d..a62fe10 100644 Binary files a/assets/icons/s7000.png and b/assets/icons/s7000.png differ diff --git a/assets/icons/s7200.png b/assets/icons/s7200.png index cee1707..fee0e9c 100644 Binary files a/assets/icons/s7200.png and b/assets/icons/s7200.png differ diff --git a/assets/icons/s8000ap.png b/assets/icons/s8000ap.png index 0032d9a..e4dcb4d 100644 Binary files a/assets/icons/s8000ap.png and b/assets/icons/s8000ap.png differ diff --git a/assets/icons/s8000nn.png b/assets/icons/s8000nn.png index cb5c45a..eca24f8 100644 Binary files a/assets/icons/s8000nn.png and b/assets/icons/s8000nn.png differ diff --git a/assets/icons/s8000no.png b/assets/icons/s8000no.png index 65ad54b..8a98b9e 100644 Binary files a/assets/icons/s8000no.png and b/assets/icons/s8000no.png differ diff --git a/assets/icons/s8000nr.png b/assets/icons/s8000nr.png index 3c81970..4ffb494 100644 Binary files a/assets/icons/s8000nr.png and b/assets/icons/s8000nr.png differ diff --git a/assets/icons/s8600.png b/assets/icons/s8600.png index d569cfc..15f38e8 100644 Binary files a/assets/icons/s8600.png and b/assets/icons/s8600.png differ diff --git a/assets/icons/tosa9640.png b/assets/icons/tosa9640.png index f4d4f90..4ff12e0 100644 Binary files a/assets/icons/tosa9640.png and b/assets/icons/tosa9640.png differ diff --git a/assets/icons/tosa9640jgr.png b/assets/icons/tosa9640jgr.png index 9ad8661..639d113 100644 Binary files a/assets/icons/tosa9640jgr.png and b/assets/icons/tosa9640jgr.png differ diff --git a/assets/icons/w213w.png b/assets/icons/w213w.png index 550be92..abd0191 100644 Binary files a/assets/icons/w213w.png and b/assets/icons/w213w.png differ diff --git a/assets/icons/w285.png b/assets/icons/w285.png index 168b06b..fdfc772 100644 Binary files a/assets/icons/w285.png and b/assets/icons/w285.png differ diff --git a/components/ActionSheetComponents/EachTrainInfo.js b/components/ActionSheetComponents/EachTrainInfo.js index 450dff4..bcf35e3 100644 --- a/components/ActionSheetComponents/EachTrainInfo.js +++ b/components/ActionSheetComponents/EachTrainInfo.js @@ -8,7 +8,6 @@ export const EachTrainInfo = ({ payload }) => { return ( } ref={actionSheetRef} drawUnderStatusBar={false} diff --git a/components/ActionSheetComponents/EachTrainInfoCore.js b/components/ActionSheetComponents/EachTrainInfoCore.js index 3a2cf58..ef6b5ec 100644 --- a/components/ActionSheetComponents/EachTrainInfoCore.js +++ b/components/ActionSheetComponents/EachTrainInfoCore.js @@ -10,6 +10,7 @@ import { LayoutAnimation, } from "react-native"; import { SheetManager } from "react-native-actions-sheet"; +import { useScrollHandlers } from "react-native-actions-sheet"; import { AS } from "../../storageControl"; import trainList from "../../assets/originData/trainList"; import { lineListPair } from "../../lib/getStationList"; @@ -188,7 +189,7 @@ export const EachTrainInfoCore = ({ const count = position * 44 - 50; // 0.5秒待機してからスクロール setTimeout( - () => ScrollViewRef.current?.scrollTo({ y: count, animated: true }), + () => scrollHandlers.ref.current?.scrollTo({ y: count, animated: true }), 400 ); } @@ -219,8 +220,9 @@ export const EachTrainInfoCore = ({ const { height } = useWindowDimensions(); const { isLandscape } = useDeviceOrientationChange(); - const ScrollViewRef = useRef(); - + const scrollHandlers = actionSheetRef + ? useScrollHandlers("scrollview-1", actionSheetRef) + : null; const [trueTrainID, setTrueTrainID] = useState(); useEffect(() => { if (!data.trainNum) return; @@ -411,7 +413,7 @@ export const EachTrainInfoCore = ({ from={from} styles={styles} actionSheetRef={actionSheetRef} - ScrollViewRef={ScrollViewRef} + scrollHandlers={scrollHandlers} containerProps={{ style: { maxHeight: isLandscape ? height - 94 : (height / 100) * 70, diff --git a/components/AndroidWidget/InfoWidget.jsx b/components/AndroidWidget/InfoWidget.jsx index db3a556..98a2d7d 100644 --- a/components/AndroidWidget/InfoWidget.jsx +++ b/components/AndroidWidget/InfoWidget.jsx @@ -20,7 +20,7 @@ export const getInfoString = async () => { } return null; }); - ToastAndroid.show(`${text}`, ToastAndroid.SHORT); + //ToastAndroid.show(`${text}`, ToastAndroid.SHORT); return { time, text }; }; diff --git a/components/AndroidWidget/TraInfoEXWidget.jsx b/components/AndroidWidget/TraInfoEXWidget.jsx index 3cfc161..dd8475a 100644 --- a/components/AndroidWidget/TraInfoEXWidget.jsx +++ b/components/AndroidWidget/TraInfoEXWidget.jsx @@ -20,7 +20,7 @@ export const getDelayData = async () => { } return null; }); - ToastAndroid.show(`${delayString}`, ToastAndroid.SHORT); + //ToastAndroid.show(`${delayString}`, ToastAndroid.SHORT); return { time, delayString }; }; export function TraInfoEXWidget({ time, delayString }) { diff --git a/components/AndroidWidget/widget-task-handler.jsx b/components/AndroidWidget/widget-task-handler.jsx index 395cdc2..e6c9020 100644 --- a/components/AndroidWidget/widget-task-handler.jsx +++ b/components/AndroidWidget/widget-task-handler.jsx @@ -20,11 +20,11 @@ export async function widgetTaskHandler(props) { const WidgetName = await AS.getItem( `widgetType/${widgetInfo.widgetId}` ).catch((e) => "JR_shikoku_train_info"); - ToastAndroid.show( - `Widget Action: ${JSON.stringify(widgetInfo.widgetId)}`, - ToastAndroid.SHORT - ); - ToastAndroid.show(`Widget Name: ${WidgetName}`, ToastAndroid.SHORT); + // ToastAndroid.show( + // `Widget Action: ${JSON.stringify(widgetInfo.widgetId)}`, + // ToastAndroid.SHORT + // ); + //ToastAndroid.show(`Widget Name: ${WidgetName}`, ToastAndroid.SHORT); switch (widgetAction) { case "WIDGET_ADDED": case "WIDGET_UPDATE": diff --git a/components/DynamicHeaderScrollView.js b/components/DynamicHeaderScrollView.js index 180eae2..d4dda44 100644 --- a/components/DynamicHeaderScrollView.js +++ b/components/DynamicHeaderScrollView.js @@ -1,6 +1,6 @@ import { ScrollView, View, Animated, LayoutAnimation } from "react-native"; import React, { useEffect, useMemo, useState, useLayoutEffect } from "react"; -import { useScrollHandlers } from "react-native-actions-sheet"; +import { NativeViewGestureHandler } from "react-native-gesture-handler"; import { AS } from "../storageControl"; export const DynamicHeaderScrollView = (props) => { @@ -13,7 +13,7 @@ export const DynamicHeaderScrollView = (props) => { topStickyContent, styles, from, - ScrollViewRef, + scrollHandlers, } = props; const [headerSize, setHeaderSize] = useState("default"); useLayoutEffect(() => { @@ -53,9 +53,7 @@ export const DynamicHeaderScrollView = (props) => { const Scroll_Distance = Max_Header_Height - Min_Header_Height; - const scrollHandlers = actionSheetRef - ? useScrollHandlers("scrollview-1", actionSheetRef) - : null; + const shotHeaderStyle = { on: { @@ -110,6 +108,7 @@ export const DynamicHeaderScrollView = (props) => { const [headerVisible, setHeaderVisible] = useState(false); const onScroll = (event) => { + scrollHandlers.onScroll(event); switch (headerSize) { case "big": setHeaderVisible(false); @@ -153,26 +152,31 @@ export const DynamicHeaderScrollView = (props) => { {topStickyContent} - - - {topStickyContent && ( - - )} - {children} - + + + {topStickyContent && ( + + )} + {children} + + ); }; diff --git a/components/Settings/LauncherIconSettings.js b/components/Settings/LauncherIconSettings.js new file mode 100644 index 0000000..cc2048a --- /dev/null +++ b/components/Settings/LauncherIconSettings.js @@ -0,0 +1,147 @@ +import React, { useEffect, useState } from "react"; +import { View, Text, TouchableOpacity, ScrollView, Image } from "react-native"; +import { useNavigation } from "@react-navigation/native"; +import { CheckBox } from "react-native-elements"; +import { AS } from "../../storageControl"; +import icons from "../../assets/icons/icons"; +import app from "../../app.json"; +import { ListItem } from "native-base"; +import { + setAlternateAppIcon, + resetAppIcon, + getAppIconName, + supportsAlternateIcons, +} from "expo-alternate-app-icons"; +import { widthPercentageToDP } from "react-native-responsive-screen"; + +export const LauncherIconSettings = ({ navigate }) => { + const { goBack } = useNavigation(); + const [iconList, ] = useState(icons()); + const [currentIcon, ] = useState(getAppIconName()); + return ( + + + + + + + < 設定 + + + + + + + アイコン設定 + + + + + {currentIcon ? ( + <> + + 現在のアイコン: + {iconList.filter(({ id }) => id == currentIcon)[0].id} + + + + id == currentIcon)[0].icon + } + style={{ + width: 50, + height: 50, + padding: 30, + borderWidth: 1, + borderRadius: 10, + borderColor: "white", + margin: 10, + backgroundColor: "white", + }} + /> + JR四国非公式アプリ + + + ) : ( + <> + )} + + {iconList.map(({ name, icon, id }) => { + return ( + { + setAlternateAppIcon(id) + .then((res) => { + alert(res); + }) + .catch((err) => { + alert(err); + }); + }} + > + + {id} + + ); + })} + + + + ); +}; diff --git a/components/Settings/SettingTopPage.js b/components/Settings/SettingTopPage.js index 174e285..58326dd 100644 --- a/components/Settings/SettingTopPage.js +++ b/components/Settings/SettingTopPage.js @@ -120,106 +120,62 @@ export const SettingTopPage = ({ falseText={"リンクメニュー"} trueText={"列車位置情報"} /> - navigation.navigate("setting", { screen: "FavoriteSettings" }) } - > - - お気に入り登録の並び替え - - - - + navigation.navigate("setting", { screen: "NotificationSettings" }) } disabled={expoPushToken == ""} - > - - - 通知設定 - {expoPushToken == "" ? "(通知設定をオンにしてください)" : "(β)"} - - - - + /> - navigation.navigate("setting", { screen: "LayoutSettings" }) } - > - - レイアウト設定 - - - + /> {Platform.OS === "android" ? ( - navigation.navigate("setting", { screen: "WidgetSettings" }) } - > - - ウィジェット設定 - - - + /> ) : null} - + navigation.navigate("setting", { screen: "LauncherIconSettings" }) + } + /> + Linking.openURL( "https://nexcloud.haruk.in/sites/press-harukin/JRShikokuApps/policy" ) } - > - - プライバシーポリシー - - - + /> - Linking.openURL("https://nexcloud.haruk.in/s/2WFEN5oLPGtrRqT") } - > - - 開発情報 - - - + /> - Linking.openURL("https://twitter.com/Xprocess_main")} - > - - 運営Twitter - - - + /> {/* testNFC()}> ); }; + +const SettingList = ({ string, onPress, disabled }) => { + return ( + + + {string} + + + + ); +}; diff --git a/components/Settings/settings.js b/components/Settings/settings.js index d375630..70be4cf 100644 --- a/components/Settings/settings.js +++ b/components/Settings/settings.js @@ -23,6 +23,7 @@ import { LayoutSettings } from "./LayoutSettings"; import { FavoriteSettings } from "./FavoriteSettings"; import { WidgetSettings } from "./WidgetSettings"; import { NotificationSettings } from "./NotificationSettings"; +import { LauncherIconSettings } from "./LauncherIconSettings"; const Stack = createStackNavigator(); export default function Setting(props) { @@ -148,6 +149,18 @@ export default function Setting(props) { > {(props) => } + + {(props) => } +