Showing
127 changed files
with
3378 additions
and
686 deletions
... | @@ -3,4 +3,7 @@ | ... | @@ -3,4 +3,7 @@ |
3 | <component name="JavaScriptSettings"> | 3 | <component name="JavaScriptSettings"> |
4 | <option name="languageLevel" value="JSX" /> | 4 | <option name="languageLevel" value="JSX" /> |
5 | </component> | 5 | </component> |
6 | + <component name="ProjectPlainTextFileTypeManager"> | ||
7 | + <file url="file://$PROJECT_DIR$/render_server_react_native/components/CardComponent.js" /> | ||
8 | + </component> | ||
6 | </project> | 9 | </project> |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | <project version="4"> | 2 | <project version="4"> |
3 | <component name="VcsDirectoryMappings"> | 3 | <component name="VcsDirectoryMappings"> |
4 | - <mapping directory="$PROJECT_DIR$/.." vcs="Git" /> | ||
5 | <mapping directory="$PROJECT_DIR$/locationTest/expo-location-example" vcs="Git" /> | 4 | <mapping directory="$PROJECT_DIR$/locationTest/expo-location-example" vcs="Git" /> |
6 | <mapping directory="$PROJECT_DIR$/my-project" vcs="Git" /> | 5 | <mapping directory="$PROJECT_DIR$/my-project" vcs="Git" /> |
7 | <mapping directory="$PROJECT_DIR$/render_server_react_native" vcs="Git" /> | 6 | <mapping directory="$PROJECT_DIR$/render_server_react_native" vcs="Git" /> | ... | ... |
code/.idea/webServers.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<project version="4"> | ||
3 | + <component name="WebServers"> | ||
4 | + <option name="servers"> | ||
5 | + <webServer id="1b403629-1b05-48f5-aa8c-1b92f496c1d2" name="2019-BigData" url="http://133.186.211.42"> | ||
6 | + <fileTransfer host="133.186.211.42" port="22" accessType="SFTP"> | ||
7 | + <advancedOptions> | ||
8 | + <advancedOptions dataProtectionLevel="Private" passiveMode="true" shareSSLContext="true" /> | ||
9 | + </advancedOptions> | ||
10 | + <option name="port" value="22" /> | ||
11 | + </fileTransfer> | ||
12 | + </webServer> | ||
13 | + </option> | ||
14 | + </component> | ||
15 | +</project> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -2,14 +2,57 @@ | ... | @@ -2,14 +2,57 @@ |
2 | <project version="4"> | 2 | <project version="4"> |
3 | <component name="ChangeListManager"> | 3 | <component name="ChangeListManager"> |
4 | <list default="true" id="940f1aa2-9848-4abc-bd75-a3db12d9e8e1" name="Default Changelist" comment=""> | 4 | <list default="true" id="940f1aa2-9848-4abc-bd75-a3db12d9e8e1" name="Default Changelist" comment=""> |
5 | - <change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" /> | 5 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/AppStyles.js" afterDir="false" /> |
6 | - <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> | 6 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/AuthContext.js" afterDir="false" /> |
7 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/assets/icons/Nike-Logo.html" afterDir="false" /> | ||
8 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/assets/icons/google-marker.png" afterDir="false" /> | ||
9 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/assets/nike.png" afterDir="false" /> | ||
10 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/assets/search.html" afterDir="false" /> | ||
11 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/assets/userFile/file2.jpg" afterDir="false" /> | ||
12 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/assets/userFile/userVelocity.json" afterDir="false" /> | ||
13 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/components/BusPathComponent.js" afterDir="false" /> | ||
14 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/components/DateTimePickerComponent.js" afterDir="false" /> | ||
15 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/components/GoPathSummary.js" afterDir="false" /> | ||
16 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/components/LanePathComponent.js" afterDir="false" /> | ||
17 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/components/LoginComponent.js" afterDir="false" /> | ||
18 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/components/MyProfileComponent.js" afterDir="false" /> | ||
19 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/components/SignUpComponent.js" afterDir="false" /> | ||
20 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/components/StartAndFinishLocationComponent.js" afterDir="false" /> | ||
21 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/components/WalkPathComponent.js" afterDir="false" /> | ||
22 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/constants/layout.js" afterDir="false" /> | ||
23 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/navigations/SelectOrTakePhotoStackNavigation.js" afterDir="false" /> | ||
24 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/navigations/SelectOrTakePhotoTabNavigation.js" afterDir="false" /> | ||
25 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/navigations/SetLocationStackNavigation.js" afterDir="false" /> | ||
26 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/navigations/SetLocationTabNavigation.js" afterDir="false" /> | ||
27 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/navigations/TabNavigation.js" afterDir="false" /> | ||
28 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/reducers/index.js" afterDir="false" /> | ||
29 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/reducers/location.js" afterDir="false" /> | ||
30 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/reducers/user.js" afterDir="false" /> | ||
31 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/sagas/index.js" afterDir="false" /> | ||
32 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/sagas/location.js" afterDir="false" /> | ||
33 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/sagas/user.js" afterDir="false" /> | ||
34 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/Gallery.js" afterDir="false" /> | ||
35 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/GoPathDetail.js" afterDir="false" /> | ||
36 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/LocationTimeSet.js" afterDir="false" /> | ||
37 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/Login.js" afterDir="false" /> | ||
38 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/Main.js" afterDir="false" /> | ||
39 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/MainImage.js" afterDir="false" /> | ||
40 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/Maps.js" afterDir="false" /> | ||
41 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/OptRoutePath.js" afterDir="false" /> | ||
42 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/Profile.js" afterDir="false" /> | ||
43 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/SignUp.js" afterDir="false" /> | ||
44 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/TakePhoto.js" afterDir="false" /> | ||
45 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/screens/UploadPhoto.js" afterDir="false" /> | ||
46 | + <change afterPath="$PROJECT_DIR$/render_server_react_native/store.js" afterDir="false" /> | ||
7 | </list> | 47 | </list> |
8 | <option name="SHOW_DIALOG" value="false" /> | 48 | <option name="SHOW_DIALOG" value="false" /> |
9 | <option name="HIGHLIGHT_CONFLICTS" value="true" /> | 49 | <option name="HIGHLIGHT_CONFLICTS" value="true" /> |
10 | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> | 50 | <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> |
11 | <option name="LAST_RESOLUTION" value="IGNORE" /> | 51 | <option name="LAST_RESOLUTION" value="IGNORE" /> |
12 | </component> | 52 | </component> |
53 | + <component name="FavoritesManager"> | ||
54 | + <favorites_list name="code" /> | ||
55 | + </component> | ||
13 | <component name="FileTemplateManagerImpl"> | 56 | <component name="FileTemplateManagerImpl"> |
14 | <option name="RECENT_TEMPLATES"> | 57 | <option name="RECENT_TEMPLATES"> |
15 | <list> | 58 | <list> |
... | @@ -18,7 +61,7 @@ | ... | @@ -18,7 +61,7 @@ |
18 | </option> | 61 | </option> |
19 | </component> | 62 | </component> |
20 | <component name="Git.Settings"> | 63 | <component name="Git.Settings"> |
21 | - <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." /> | 64 | + <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/render_server_react_native" /> |
22 | </component> | 65 | </component> |
23 | <component name="ProjectId" id="1baLVrrFUlmMeeq9EFLzndP0zML" /> | 66 | <component name="ProjectId" id="1baLVrrFUlmMeeq9EFLzndP0zML" /> |
24 | <component name="ProjectLevelVcsManager" settingsEditedManually="true"> | 67 | <component name="ProjectLevelVcsManager" settingsEditedManually="true"> |
... | @@ -32,16 +75,27 @@ | ... | @@ -32,16 +75,27 @@ |
32 | <component name="PropertiesComponent"> | 75 | <component name="PropertiesComponent"> |
33 | <property name="ASKED_ADD_EXTERNAL_FILES" value="true" /> | 76 | <property name="ASKED_ADD_EXTERNAL_FILES" value="true" /> |
34 | <property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> | 77 | <property name="RunOnceActivity.ShowReadmeOnStart" value="true" /> |
35 | - <property name="WebServerToolWindowFactoryState" value="false" /> | 78 | + <property name="WebServerToolWindowFactoryState" value="true" /> |
36 | - <property name="last_opened_file_path" value="$PROJECT_DIR$" /> | 79 | + <property name="WebServerToolWindowPanel.toolwindow.highlight.mappings" value="true" /> |
80 | + <property name="WebServerToolWindowPanel.toolwindow.highlight.symlinks" value="true" /> | ||
81 | + <property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" /> | ||
82 | + <property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" /> | ||
83 | + <property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" /> | ||
84 | + <property name="last_opened_file_path" value="$PROJECT_DIR$/render_server_react_native/assets/userFile" /> | ||
37 | <property name="nodejs_package_manager_path" value="npm" /> | 85 | <property name="nodejs_package_manager_path" value="npm" /> |
38 | </component> | 86 | </component> |
39 | <component name="RecentsManager"> | 87 | <component name="RecentsManager"> |
88 | + <key name="MoveFile.RECENT_KEYS"> | ||
89 | + <recent name="$PROJECT_DIR$/render_server_react_native" /> | ||
90 | + <recent name="$PROJECT_DIR$/render_server_react_native/navigations" /> | ||
91 | + <recent name="$PROJECT_DIR$/render_server_react_native/components" /> | ||
92 | + </key> | ||
40 | <key name="CopyFile.RECENT_KEYS"> | 93 | <key name="CopyFile.RECENT_KEYS"> |
94 | + <recent name="$PROJECT_DIR$/render_server_react_native/assets/userFile" /> | ||
95 | + <recent name="$PROJECT_DIR$/render_server_react_native" /> | ||
96 | + <recent name="$PROJECT_DIR$/render_server_react_native/screens" /> | ||
97 | + <recent name="$PROJECT_DIR$/render_server_react_native/components" /> | ||
41 | <recent name="$PROJECT_DIR$/user_and_post_server" /> | 98 | <recent name="$PROJECT_DIR$/user_and_post_server" /> |
42 | - <recent name="$PROJECT_DIR$" /> | ||
43 | - <recent name="$PROJECT_DIR$/my-project/sagas" /> | ||
44 | - <recent name="$PROJECT_DIR$/my-project/reducers" /> | ||
45 | </key> | 99 | </key> |
46 | </component> | 100 | </component> |
47 | <component name="SvnConfiguration"> | 101 | <component name="SvnConfiguration"> |
... | @@ -70,21 +124,67 @@ | ... | @@ -70,21 +124,67 @@ |
70 | <workItem from="1590305558438" duration="34000" /> | 124 | <workItem from="1590305558438" duration="34000" /> |
71 | <workItem from="1590392477108" duration="7362000" /> | 125 | <workItem from="1590392477108" duration="7362000" /> |
72 | <workItem from="1590405423629" duration="8216000" /> | 126 | <workItem from="1590405423629" duration="8216000" /> |
73 | - <workItem from="1590918384429" duration="996000" /> | 127 | + <workItem from="1590427383874" duration="208000" /> |
128 | + <workItem from="1590472694480" duration="1558000" /> | ||
129 | + <workItem from="1590510616633" duration="2347000" /> | ||
130 | + <workItem from="1590561746816" duration="2332000" /> | ||
131 | + <workItem from="1590649191412" duration="121000" /> | ||
132 | + <workItem from="1590667953682" duration="5117000" /> | ||
133 | + <workItem from="1590847459903" duration="309000" /> | ||
134 | + <workItem from="1590857450778" duration="161000" /> | ||
135 | + <workItem from="1590938910580" duration="4993000" /> | ||
136 | + <workItem from="1591036634686" duration="2717000" /> | ||
137 | + <workItem from="1591042905280" duration="3848000" /> | ||
138 | + <workItem from="1591241250822" duration="1506000" /> | ||
139 | + <workItem from="1591243317314" duration="1000" /> | ||
140 | + <workItem from="1591257776111" duration="2611000" /> | ||
141 | + <workItem from="1591347046562" duration="4809000" /> | ||
142 | + <workItem from="1591365203105" duration="1624000" /> | ||
143 | + <workItem from="1591368704614" duration="2067000" /> | ||
144 | + <workItem from="1591371675134" duration="1958000" /> | ||
145 | + <workItem from="1591399909349" duration="755000" /> | ||
146 | + <workItem from="1591424440663" duration="3921000" /> | ||
147 | + <workItem from="1591452959431" duration="5762000" /> | ||
148 | + <workItem from="1591498815349" duration="8719000" /> | ||
149 | + <workItem from="1591763504251" duration="1207000" /> | ||
150 | + <workItem from="1591768189989" duration="16032000" /> | ||
151 | + <workItem from="1591807888950" duration="205000" /> | ||
152 | + <workItem from="1591810687526" duration="2491000" /> | ||
153 | + <workItem from="1591814852707" duration="850000" /> | ||
154 | + <workItem from="1592023711264" duration="7962000" /> | ||
155 | + <workItem from="1592034078601" duration="2771000" /> | ||
156 | + <workItem from="1592043154434" duration="5000" /> | ||
157 | + <workItem from="1592120155930" duration="19951000" /> | ||
158 | + <workItem from="1592294228904" duration="12060000" /> | ||
159 | + <workItem from="1592423933838" duration="20743000" /> | ||
160 | + <workItem from="1592460562052" duration="9046000" /> | ||
161 | + <workItem from="1592493681837" duration="17090000" /> | ||
162 | + <workItem from="1592515725392" duration="2907000" /> | ||
163 | + <workItem from="1592528808951" duration="135000" /> | ||
164 | + <workItem from="1592536638207" duration="5384000" /> | ||
165 | + <workItem from="1592659198314" duration="162000" /> | ||
166 | + <workItem from="1592659457606" duration="137000" /> | ||
74 | </task> | 167 | </task> |
75 | <servers /> | 168 | <servers /> |
76 | </component> | 169 | </component> |
77 | <component name="TypeScriptGeneratedFilesManager"> | 170 | <component name="TypeScriptGeneratedFilesManager"> |
78 | <option name="version" value="1" /> | 171 | <option name="version" value="1" /> |
79 | </component> | 172 | </component> |
173 | + <component name="UnknownFeatures"> | ||
174 | + <option featureType="com.intellij.fileTypeFactory" implementationName="*.csv" /> | ||
175 | + </component> | ||
80 | <component name="VcsManagerConfiguration"> | 176 | <component name="VcsManagerConfiguration"> |
81 | <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> | 177 | <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> |
82 | </component> | 178 | </component> |
83 | <component name="WindowStateProjectService"> | 179 | <component name="WindowStateProjectService"> |
84 | - <state x="368" y="125" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1590082196823"> | 180 | + <state x="399" y="127" key="#Deployment" timestamp="1591366165652"> |
85 | <screen x="0" y="23" width="1440" height="877" /> | 181 | <screen x="0" y="23" width="1440" height="877" /> |
86 | </state> | 182 | </state> |
87 | - <state x="368" y="125" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.23.1440.877@0.23.1440.877" timestamp="1590082196823" /> | 183 | + <state x="399" y="127" key="#Deployment/0.23.1440.877@0.23.1440.877" timestamp="1591366165652" /> |
184 | + <state x="368" y="125" key="#com.intellij.execution.impl.EditConfigurationsDialog" timestamp="1591815112224"> | ||
185 | + <screen x="0" y="23" width="1440" height="877" /> | ||
186 | + </state> | ||
187 | + <state x="368" y="125" key="#com.intellij.execution.impl.EditConfigurationsDialog/0.23.1440.877@0.23.1440.877" timestamp="1591815112224" /> | ||
88 | <state x="710" y="271" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1588881921466"> | 188 | <state x="710" y="271" key="#com.intellij.fileTypes.FileTypeChooser" timestamp="1588881921466"> |
89 | <screen x="0" y="23" width="1440" height="877" /> | 189 | <screen x="0" y="23" width="1440" height="877" /> |
90 | </state> | 190 | </state> |
... | @@ -105,10 +205,14 @@ | ... | @@ -105,10 +205,14 @@ |
105 | <screen x="0" y="23" width="1440" height="877" /> | 205 | <screen x="0" y="23" width="1440" height="877" /> |
106 | </state> | 206 | </state> |
107 | <state width="784" height="229" key="GridCell.Tab.0.right/0.23.1440.877@0.23.1440.877" timestamp="1588878772213" /> | 207 | <state width="784" height="229" key="GridCell.Tab.0.right/0.23.1440.877@0.23.1440.877" timestamp="1588878772213" /> |
108 | - <state x="702" y="213" width="670" height="676" key="search.everywhere.popup" timestamp="1588882527475"> | 208 | + <state x="585" y="23" width="552" height="758" key="dock-window-1" timestamp="1592127183020"> |
209 | + <screen x="0" y="23" width="1440" height="877" /> | ||
210 | + </state> | ||
211 | + <state x="585" y="23" width="552" height="758" key="dock-window-1/0.23.1440.877@0.23.1440.877" timestamp="1592127183020" /> | ||
212 | + <state x="702" y="213" width="670" height="676" key="search.everywhere.popup" timestamp="1592465069777"> | ||
109 | <screen x="0" y="23" width="1440" height="877" /> | 213 | <screen x="0" y="23" width="1440" height="877" /> |
110 | </state> | 214 | </state> |
111 | - <state x="702" y="213" width="670" height="676" key="search.everywhere.popup/0.23.1440.877@0.23.1440.877" timestamp="1588882527475" /> | 215 | + <state x="702" y="213" width="670" height="676" key="search.everywhere.popup/0.23.1440.877@0.23.1440.877" timestamp="1592465069777" /> |
112 | <state x="767" y="383" key="vcs.readOnlyHandler.ReadOnlyStatusDialog" timestamp="1588882053803"> | 216 | <state x="767" y="383" key="vcs.readOnlyHandler.ReadOnlyStatusDialog" timestamp="1588882053803"> |
113 | <screen x="0" y="23" width="1440" height="877" /> | 217 | <screen x="0" y="23" width="1440" height="877" /> |
114 | </state> | 218 | </state> | ... | ... |
code/backend/.env
deleted
100644 → 0
code/backend/.gitignore
deleted
100644 → 0
1 | -node_modules/ |
code/backend/crawling.js
deleted
100644 → 0
1 | -function printSearchType(result) { | ||
2 | - if (result.result.searchType == 0) { | ||
3 | - console.log("도시내 이동"); | ||
4 | - } else if (result.result.searchType == 1) { | ||
5 | - console.log("도시간 직통"); | ||
6 | - } else { | ||
7 | - console.log("도시간 환승"); | ||
8 | - } | ||
9 | -} | ||
10 | - | ||
11 | -function printBusCount(result) { | ||
12 | - console.log("버스 결과 개수:", result.result.busCount); | ||
13 | -} | ||
14 | - | ||
15 | -function printSubwayCount(result) { | ||
16 | - console.log("지하철 결과 개수 :", result.result.subwayCount); | ||
17 | -} | ||
18 | - | ||
19 | -function printSubwayBusCount(result) { | ||
20 | - console.log("버스 + 지하철 결과 개수 : ", result.result.subwayBusCount); | ||
21 | -} | ||
22 | - | ||
23 | -function printPointDistance(result) { | ||
24 | - console.log("출발점-도착점 직선 거리 :", result.pointDistance); | ||
25 | -} | ||
26 | - | ||
27 | -function printPathType(info) { | ||
28 | - if (info.pathType == 1) { | ||
29 | - console.log("지하철"); | ||
30 | - } else if (info.pathType == 2) { | ||
31 | - console.log("버스"); | ||
32 | - } else if (info.pathType == 3) { | ||
33 | - console.log("지하철 + 버스"); | ||
34 | - } | ||
35 | -} | ||
36 | - | ||
37 | -function printTrafficDistance(info) { | ||
38 | - console.log("대중교통 이동거리: ", info.trafficDistance); | ||
39 | -} | ||
40 | - | ||
41 | -function printTotalWalk(info) { | ||
42 | - console.log("도보 이동거리 : ", info.totalWalk); | ||
43 | -} | ||
44 | - | ||
45 | -function printTotalTime(info) { | ||
46 | - console.log("총 소요시간 : ", info.totalTime); | ||
47 | -} | ||
48 | - | ||
49 | -function printBusTransitCount(info) { | ||
50 | - console.log("버스 환승 :", info.busTransitCount, "회"); | ||
51 | -} | ||
52 | - | ||
53 | -function printSubwayTransitCount(info) { | ||
54 | - console.log("지하철 환승 :", info.subwayTransit, "회"); | ||
55 | -} | ||
56 | - | ||
57 | -function printFirstStartStation(info) { | ||
58 | - console.log("최초 출발 역(정류소) : ", info.firstStartStation); | ||
59 | -} | ||
60 | - | ||
61 | -function printLastEndStation(info) { | ||
62 | - console.log("최종 도착 역(정류소) : ", info.lastEndStation); | ||
63 | -} | ||
64 | - | ||
65 | -function printBusStationCount(info) { | ||
66 | - console.log(info.busStationCount, "개 정류소 이동"); | ||
67 | -} | ||
68 | - | ||
69 | -function printSubwayStationCount(info) { | ||
70 | - console.log(info.subwayStationCount, "개 역 이동"); | ||
71 | -} | ||
72 | - | ||
73 | -function printPath(path) { | ||
74 | - printPathType(path); | ||
75 | - printTrafficDistance(path); | ||
76 | - printTotalWalk(path); | ||
77 | - printTotalTime(path); | ||
78 | - printBusTransitCount(path); | ||
79 | - printSubwayTransitCount(path); | ||
80 | - printFirstStartStation(path); | ||
81 | - printLastEndStation(path); | ||
82 | - if (path.pathType == 1) { | ||
83 | - printSubwayStationCount(path); | ||
84 | - } else if (path.pathType == 2) { | ||
85 | - printBusStationCount(path); | ||
86 | - } else { | ||
87 | - printBusStationCount(path); | ||
88 | - printSubwayStationCount(path); | ||
89 | - | ||
90 | - } | ||
91 | -} | ||
92 | - | ||
93 | -function printSubPath(subPath) { | ||
94 | - if (subPath.trafficType == 1) { | ||
95 | - console.log("지하철이용"); | ||
96 | - console.log("이동거리 : ", subPath.distance); | ||
97 | - console.log("이동 소요시간 : ", subPath.sectionTime); | ||
98 | - console.log(subPath.stationCount, "개의 역 이동"); | ||
99 | - console.log(subPath.startName, "에서 승차"); | ||
100 | - //startX | ||
101 | - //startY | ||
102 | - console.log("승차역 id : ", subPath.startID); | ||
103 | - console.log(subPath.endName, "에서 하차"); | ||
104 | - //endX | ||
105 | - //endY | ||
106 | - console.log("하차역 id : ", subPath.endID); | ||
107 | - printSubwayLane(subPath); | ||
108 | - printPassStopList(subPath); | ||
109 | - } else if (subPath.trafficType == 2) { | ||
110 | - console.log("버스 이용"); | ||
111 | - console.log("이동거리 : ", subPath.distance); | ||
112 | - console.log("이동 소요시간 : ", subPath.sectionTime); | ||
113 | - console.log("이동 정거장수 :", subPath.stationCount); | ||
114 | - console.log(subPath.startName, "에서 승차"); | ||
115 | - console.log("승차 정류쟝 id : ", subPath.startID); | ||
116 | - console.log(subPath.endName, "에서 하차"); | ||
117 | - console.log("하차 정류장 id : ", subPath.endID); | ||
118 | - printBusLane(subPath); | ||
119 | - printPassStopList(subPath); | ||
120 | - | ||
121 | - } else { | ||
122 | - console.log("도보 이용"); | ||
123 | - console.log("이동 거리 : ", subPath.distance); | ||
124 | - console.log("이동 소요시간 : ", subPath.sectionTime); | ||
125 | - } | ||
126 | -} | ||
127 | - | ||
128 | -function printBusNumber(lane) { | ||
129 | - console.log("버스 번호 : ", lane.busNo); | ||
130 | - | ||
131 | -} | ||
132 | - | ||
133 | -function printBusID(lane) { | ||
134 | - console.log("버스 id : ", lane.busID); | ||
135 | -} | ||
136 | - | ||
137 | -function printBusLane(subPath) { | ||
138 | - console.log("===========Bus=lane============"); | ||
139 | - console.log(subPath.lane.length, "개의 버스 이용가능"); | ||
140 | - for (var i = 0; i < subPath.lane.length; i++) { | ||
141 | - console.log(i + 1, "번째 버스") | ||
142 | - printBusNumber(subPath.lane[i]); | ||
143 | - printBusID(subPath.lane[i]); | ||
144 | - console.log("-------------------------"); | ||
145 | - } | ||
146 | -} | ||
147 | - | ||
148 | -function printSubwayLane(subPath) { | ||
149 | - console.log("===========Subway=lane============"); | ||
150 | - console.log(subPath.lane.length, "개의 지하철 이용가능"); | ||
151 | - for (var i = 0; i < subPath.lane.length; i++) { | ||
152 | - console.log(i + 1, "번째 지하철") | ||
153 | - console.log(subPath.lane[i]); | ||
154 | - console.log("-------------------------"); | ||
155 | - } | ||
156 | -} | ||
157 | - | ||
158 | -function printStations(station) { | ||
159 | - console.log(" || "); | ||
160 | - console.log(station.index, "번째 정류쟝"); | ||
161 | - console.log("정류쟝 id:", station.stationID);//=======>>>>>>실시간 API가져오기!!! | ||
162 | - console.log(station.stationName); | ||
163 | - console.log(" || "); | ||
164 | -} | ||
165 | - | ||
166 | -function printPassStopList(subPath) { | ||
167 | - console.log("=====경로 확인======="); | ||
168 | - for (var i = 0; i < subPath.passStopList.stations.length; i++) { | ||
169 | - printStations(subPath.passStopList.stations[i]); | ||
170 | - } | ||
171 | - | ||
172 | -} | ||
173 | - | ||
174 | -function printTotalCount(result) { | ||
175 | - console.log(result.totalCount, "개의 경로 존재"); | ||
176 | -} | ||
177 | - | ||
178 | -function printTrainCount(result) { | ||
179 | - console.log("============기 차 이 용=================") | ||
180 | - console.log("기차 탐색 결과 개수 : ", result.trainRequest.count); | ||
181 | -} | ||
182 | - | ||
183 | -function printOBJ(obj) { | ||
184 | - console.log("출발역 :", obj.startSTN, ",id :", obj.startID); | ||
185 | - //obj.SX | ||
186 | - //obj.SY | ||
187 | - console.log("도착역 :", obj.endSTN, ", id :", obj.endID); | ||
188 | - //obj.EX | ||
189 | - //obj.EY | ||
190 | - console.log(obj.trainType); | ||
191 | - //obj.trainCode | ||
192 | - //obj.mapOBJ | ||
193 | - console.log("소요 시간 :", obj.time); | ||
194 | - console.log("요금 :", obj.payment); | ||
195 | -} | ||
196 | - | ||
197 | -function printExBusCount(result) { | ||
198 | - console.log("==========고 속 버 스 이 용===========") | ||
199 | - console.log("고속 버스 탐색 결과 개수 : ", result.exBusRequest.count); | ||
200 | -} | ||
201 | - | ||
202 | -function printOutBusCount(result) { | ||
203 | - console.log("==========시 외 버 스 이 용===========") | ||
204 | - console.log("시외 버스 탐색 결과 개수 : ", result.outBusRequest.count); | ||
205 | -} | ||
206 | - | ||
207 | -function searchPubTransPathAJAX() { | ||
208 | - console.log('hihihihih'); | ||
209 | - var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; | ||
210 | - | ||
211 | - var xhr = new XMLHttpRequest(); | ||
212 | - //var url = "https://api.odsay.com/v1/api/searchPubTransPath?SX=126.9027279&SY=37.5349277&EX=126.9145430&EY=37.5499421&apiKey=xGDjn0UBwQ%2FazbcOasoxEs4gIcLqCBEgCFMT%2BJeVKcI"; | ||
213 | - var SX = 127.077001; //경희대학교 우정원 x좌표 | ||
214 | - var SY = 37.246214;//경희대학교 우정원 y좌표 | ||
215 | - var EX = 126.999472;//영통역 x좌표 | ||
216 | - var EY = 37.266670;//영통역 y좌표 | ||
217 | - var apiKey = "%2B6RMVoSKSHcru1NjEu194wRELD7wnalJG7JDY0mc2AE"; | ||
218 | - var url = "https://api.odsay.com/v1/api/searchPubTransPath?SX=" + SX + "&SY=" + SY + "&EX=" + EX + "&EY=" + EY + "&apiKey=" + apiKey; | ||
219 | - xhr.open("GET", url, true); | ||
220 | - xhr.send(); | ||
221 | - xhr.onreadystatechange = function () { | ||
222 | - | ||
223 | - if (xhr.readyState == 4 && xhr.status == 200) { | ||
224 | - var result = JSON.parse(xhr.responseText); | ||
225 | - //console.log(xhr.responseText); | ||
226 | - | ||
227 | - if (result.result.searchType == 0) { //한 도시내에서 이동 | ||
228 | - | ||
229 | - var totalPathSummary = new Object();//json 객체로 저장 | ||
230 | - totalPathSummary.searchType = result.result.searchType; | ||
231 | - totalPathSummary.busCount = result.result.busCount; | ||
232 | - totalPathSummary.subwayCount = result.result.subwayCount; | ||
233 | - totalPathSummary.pointDistance = result.result.pointDistance; | ||
234 | - | ||
235 | - totalPathSummary = JSON.stringify(totalPathSummary); | ||
236 | - //console.log(totalPathSummary); | ||
237 | - | ||
238 | - console.log("도시내 이동"); | ||
239 | - printBusCount(result); | ||
240 | - printSubwayCount(result); | ||
241 | - printSubwayBusCount(result); | ||
242 | - printPointDistance(result); | ||
243 | - | ||
244 | - | ||
245 | - var pathList = new Array(); | ||
246 | - | ||
247 | - for (var i = 0; i < result.result.path.length; i++) { | ||
248 | - console.log("-----------------new 경로------------------------------"); | ||
249 | - console.log(i + 1, "번째 경로"); | ||
250 | - | ||
251 | - var path = new Object(); | ||
252 | - path.pathType = result.result.path[i].pathType; | ||
253 | - path.info = result.result.path[i].info; | ||
254 | - path.subPathList = new Array(); | ||
255 | - printPath(result.result.path[i].info); | ||
256 | - | ||
257 | - | ||
258 | - for (var j = 0; j < result.result.path[i].subPath.length; j++) { | ||
259 | - console.log("---------------"); | ||
260 | - var subPath = new Object(); | ||
261 | - subPath = result.result.path[i].subPath; | ||
262 | - path.subPathList.push(subPath); | ||
263 | - printSubPath(result.result.path[i].subPath[j]); | ||
264 | - } | ||
265 | - pathList.push(path); | ||
266 | - console.log("--------------------경로 끝---------------------------"); | ||
267 | - | ||
268 | - | ||
269 | - } | ||
270 | - pathList = JSON.stringify(pathList); | ||
271 | - //console.log(pathList); | ||
272 | - | ||
273 | - } else if (result.result.searchType == 1) {//도시간 이동 | ||
274 | - //console.log(result.result); | ||
275 | - console.log("도시 간 이동"); | ||
276 | - var totalPathSummary = new Object(); | ||
277 | - totalPathSummary.startCityName = result.result.startCityName; | ||
278 | - totalPathSummary.startCID = result.result.startCID; | ||
279 | - totalPathSummary.endCityName = result.result.endCityName; | ||
280 | - totalPathSummary.endCID = result.result.endCID; | ||
281 | - totalPathSummary.pointDistance = result.result.pointDistance; | ||
282 | - totalPathSummary.totalCount = result.result.totalCount; | ||
283 | - | ||
284 | - totalPathSummary = JSON.stringify(totalPathSummary); | ||
285 | - //console.log(totalPathSummary); | ||
286 | - m | ||
287 | - console.log("출발 도시:", result.result.startCityName); | ||
288 | - console.log("도착 도시:", result.result.endCityName); | ||
289 | - printPointDistance(result.result); | ||
290 | - printTotalCount(result.result); | ||
291 | - printTrainCount(result.result);//기차 이용 | ||
292 | - | ||
293 | - var trainList = new Array();//기차이용 | ||
294 | - | ||
295 | - for (var i = 0; i < result.result.trainRequest.count; i++) { | ||
296 | - var OBJ = new Object(); | ||
297 | - OBJ = result.result.trainRequest.OBJ[i]; | ||
298 | - OBJList.push(OBJ); | ||
299 | - console.log("============", i + 1, "============"); | ||
300 | - printOBJ(result.result.trainRequest.OBJ[i]); | ||
301 | - } | ||
302 | - trainList = JSON.stringify(trainList); | ||
303 | - | ||
304 | - var exBusList = new Array(); | ||
305 | - printExBusCount(result.result); //고속버스 이용 | ||
306 | - for (var i = 0; i < result.result.exBusRequest.count; i++) { | ||
307 | - var OBJ = new Object(); | ||
308 | - OBJ = result.result.exBusRequest.OBJ[i]; | ||
309 | - OBJList.push(OBJ); | ||
310 | - console.log("============", i + 1, "============"); | ||
311 | - printOBJ(result.result.exBusRequest.OBJ[i]); | ||
312 | - } | ||
313 | - exBusList = JSON.stringify(exBusList); | ||
314 | - | ||
315 | - var outBusList = new Array(); | ||
316 | - printOutBusCount(result.result);//시외 버스 이용 | ||
317 | - for (var i = 0; i < result.result.outBusRequest.count; i++) { | ||
318 | - var OBJ = new Object(); | ||
319 | - OBJ = result.result.outBusRequest.OBJ[i]; | ||
320 | - outBusList.push(OBJ); | ||
321 | - console.log("============", i + 1, "============"); | ||
322 | - printOBJ(result.result.outBusRequest.OBJ[i]); | ||
323 | - } | ||
324 | - outBusList = JSON.stringify(outBusList); | ||
325 | - } | ||
326 | - } | ||
327 | - }; | ||
328 | -} | ||
329 | - | ||
330 | -module.exports = {searchPubTransPathAJAX}; |
1 | -import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | -import {View, Text, Button, TextInput, TouchableOpacity, StyleSheet} from 'react-native'; | ||
3 | -import {useDispatch, useSelector} from "react-redux"; | ||
4 | -import {LOG_IN_REQUEST, LOG_OUT_REQUEST} from "../reducers/user"; | ||
5 | -import {MaterialCommunityIcons} from "@expo/vector-icons"; | ||
6 | -import {useNavigation} from '@react-navigation/native'; | ||
7 | -import LoadingComponent from "../components/LoadingComponent"; | ||
8 | - | ||
9 | -const MyProfileComponent = () => { | ||
10 | - const navigation = useNavigation(); | ||
11 | - const [loading, setLoading] = useState(true); | ||
12 | - | ||
13 | - const {me} = useSelector(state => state.user); | ||
14 | - const {isLoggingIn} = useSelector(state => state.user); | ||
15 | - | ||
16 | - const dispatch = useDispatch(); | ||
17 | - const onLogout = async () => { | ||
18 | - await dispatch({ | ||
19 | - type: LOG_OUT_REQUEST | ||
20 | - }); | ||
21 | - console.log('onLogout'); | ||
22 | - }; | ||
23 | - return ( | ||
24 | - <View> | ||
25 | - <View style={styles.containerStyle}> | ||
26 | - <Text style={styles.TextStyle}>마이페이지</Text> | ||
27 | - <Text style={styles.TextStyle}>{me.email}</Text> | ||
28 | - <Text style={styles.TextStyle}>{me.nickName}</Text> | ||
29 | - <TouchableOpacity onPress={onLogout}> | ||
30 | - <MaterialCommunityIcons color={'green'} name={'logout'} size={30}/> | ||
31 | - </TouchableOpacity> | ||
32 | - </View> | ||
33 | - </View> | ||
34 | - ) | ||
35 | -}; | ||
36 | - | ||
37 | -const styles = StyleSheet.create({ | ||
38 | - containerStyle: { | ||
39 | - marginTop: 10, | ||
40 | - alignItems: 'center', | ||
41 | - justifyContent: 'center', | ||
42 | - }, | ||
43 | - TextStyle: { | ||
44 | - width: 200, | ||
45 | - height: 44, | ||
46 | - padding: 10, | ||
47 | - borderWidth: 1, | ||
48 | - borderColor: '#778899', | ||
49 | - marginBottom: 10, | ||
50 | - } | ||
51 | -}); | ||
52 | - | ||
53 | -export default MyProfileComponent; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
code/frontend/env.js
deleted
100644 → 0
code/frontend/reducers/location.js
deleted
100644 → 0
1 | -export const initialState = { | ||
2 | - startLocation: null, | ||
3 | - finishLocation: null, | ||
4 | - | ||
5 | - settingLocation: false, | ||
6 | - | ||
7 | - info: '', | ||
8 | -}; | ||
9 | - | ||
10 | -export const SET_LOC_REQUEST = 'SET_LOC_REQUEST'; | ||
11 | -export const SET_LOC_SUCCESS = 'SET_LOC_SUCCESS'; | ||
12 | -export const SET_LOC_FAILURE = 'SET_LOC_FAILURE'; | ||
13 | - | ||
14 | -export default (state = initialState, action) => { | ||
15 | - switch (action.type) { | ||
16 | - | ||
17 | - case SET_LOC_REQUEST: { | ||
18 | - return { | ||
19 | - ...state, | ||
20 | - settingLocation: true, | ||
21 | - } | ||
22 | - } | ||
23 | - | ||
24 | - case SET_LOC_SUCCESS: { | ||
25 | - const {startLocation, finishLocation} = action.data; | ||
26 | - return { | ||
27 | - ...state, | ||
28 | - startLocation, | ||
29 | - finishLocation, | ||
30 | - isLoggingIn: false, | ||
31 | - }; | ||
32 | - } | ||
33 | - | ||
34 | - case SET_LOC_FAILURE: { | ||
35 | - const {info} = action.data; | ||
36 | - return { | ||
37 | - ...state, | ||
38 | - settingLocation: false, | ||
39 | - info, | ||
40 | - } | ||
41 | - } | ||
42 | - | ||
43 | - default: { | ||
44 | - return { | ||
45 | - ...state, | ||
46 | - }; | ||
47 | - } | ||
48 | - } | ||
49 | -}; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
code/frontend/sagas/location.js
deleted
100644 → 0
1 | -import {all, call, fork, delay, put, takeEvery, takeLatest} from 'redux-saga/effects'; | ||
2 | -import axios from 'axios'; | ||
3 | -import {coordAPIKEY} from '../env'; | ||
4 | -import { | ||
5 | - SET_LOC_REQUEST, | ||
6 | - SET_LOC_SUCCESS, | ||
7 | - SET_LOC_FAILURE, | ||
8 | -} from "../reducers/location"; | ||
9 | - | ||
10 | -function setLocationAPI(data) { | ||
11 | - const {startTextLocation, finishTextLocation} = data; | ||
12 | - console.log(startTextLocation, finishTextLocation); | ||
13 | - const startRes = axios.get(`http://api.vworld.kr/req/address?service=address&request=getcoord&version=2.0&crs=epsg:4326&address=${startTextLocation}&refine=true&simple=false&format=xml&type=road&key=${coordAPIKEY}`); | ||
14 | - const finishRes = axios.get(`http://api.vworld.kr/req/address?service=address&request=getcoord&version=2.0&crs=epsg:4326&address=${finishTextLocation}&refine=true&simple=false&format=xml&type=road&key=${coordAPIKEY}`); | ||
15 | - | ||
16 | - return {startRes, finishRes}; | ||
17 | -} | ||
18 | - | ||
19 | - | ||
20 | -function* setLocation(action) { | ||
21 | - try { | ||
22 | - console.log('saga의 setLocation', action.data); | ||
23 | - const res = yield call(setLocationAPI, action.data); | ||
24 | - console.log(res.startRes, res.finishRes); | ||
25 | - const {result} = res.startRes; | ||
26 | - console.log(result); | ||
27 | - } catch (e) { | ||
28 | - console.error(e); | ||
29 | - } | ||
30 | -}; | ||
31 | - | ||
32 | -function* watchSetLocation() { | ||
33 | - console.log('watchSetLocation'); | ||
34 | - yield takeLatest(SET_LOC_REQUEST, setLocation); | ||
35 | -} | ||
36 | - | ||
37 | -export default function* locationSaga() { | ||
38 | - yield all([ | ||
39 | - fork(watchSetLocation), | ||
40 | - ]); | ||
41 | -}; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
code/frontend/screens/Login.js
deleted
100644 → 0
1 | -import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | -import {View, Text, Button, TextInput, TouchableOpacity} from 'react-native'; | ||
3 | -import {useDispatch, useSelector} from "react-redux"; | ||
4 | -import {LOG_IN_REQUEST, LOG_OUT_REQUEST} from "../reducers/user"; | ||
5 | -import {MaterialCommunityIcons} from "@expo/vector-icons"; | ||
6 | -import styled from "styled-components"; | ||
7 | -import {useNavigation} from '@react-navigation/native'; | ||
8 | -import LoadingComponent from "../components/LoadingComponent"; | ||
9 | -import MyProfileComponent from "../components/MyProfileComponent"; | ||
10 | -import LoginComponent from "../components/LoginComponent"; | ||
11 | - | ||
12 | -const Login = () => { | ||
13 | - const navigation = useNavigation(); | ||
14 | - const [loading, setLoading] = useState(true); | ||
15 | - | ||
16 | - const {me} = useSelector(state => state.user); | ||
17 | - const {isLoggingIn} = useSelector(state => state.user); | ||
18 | - | ||
19 | - | ||
20 | - useEffect(() => { | ||
21 | - setLoading(false); | ||
22 | - }, [me]); | ||
23 | - | ||
24 | - return ( | ||
25 | - <View> | ||
26 | - {me ? | ||
27 | - <MyProfileComponent/> | ||
28 | - : | ||
29 | - <LoginComponent/> | ||
30 | - } | ||
31 | - </View> | ||
32 | - ) | ||
33 | -}; | ||
34 | - | ||
35 | -export default Login; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
code/frontend/screens/Maps.js
deleted
100644 → 0
1 | -import React, {useState, useEffect} from 'react'; | ||
2 | -import MapView, {Marker} from 'react-native-maps'; | ||
3 | -import {StyleSheet, Text, View, Dimensions} from 'react-native'; | ||
4 | -import screen from '../constants/layout'; | ||
5 | -import StartAndFinishLocationComponent from "../components/CurrentUserLocationComponent"; | ||
6 | - | ||
7 | - | ||
8 | -const Maps = () => { | ||
9 | - const [initialRegion, setInitialRegion] = useState( | ||
10 | - { | ||
11 | - latitude: 37.56647, | ||
12 | - longitude: 126.977963, | ||
13 | - latitudeDelta: 0.3922, | ||
14 | - longitudeDelta: 0.3421 | ||
15 | - }); | ||
16 | - | ||
17 | - return ( | ||
18 | - <View style={styles.container}> | ||
19 | - <Text style={styles.textStyle}>Current User Location</Text> | ||
20 | - <StartAndFinishLocationComponent/> | ||
21 | - <MapView | ||
22 | - style={styles.mapStyle} | ||
23 | - initialRegion={initialRegion} | ||
24 | - > | ||
25 | - <Marker | ||
26 | - coordinate={initialRegion} | ||
27 | - title="this is a marker" | ||
28 | - description="this is a marker example"> | ||
29 | - </Marker> | ||
30 | - | ||
31 | - </MapView> | ||
32 | - </View> | ||
33 | - ) | ||
34 | -}; | ||
35 | - | ||
36 | -export default Maps; | ||
37 | - | ||
38 | -const styles = StyleSheet.create({ | ||
39 | - container: { | ||
40 | - flex: 1, | ||
41 | - backgroundColor: '#fff', | ||
42 | - alignItems: 'center', | ||
43 | - }, | ||
44 | - mapStyle: { | ||
45 | - width: screen.width, | ||
46 | - height: screen.height / 2, | ||
47 | - }, | ||
48 | - textStyle: { | ||
49 | - fontWeight: 'bold', | ||
50 | - fontSize: 20, | ||
51 | - color: 'grey', | ||
52 | - marginBottom: 20, | ||
53 | - } | ||
54 | -}); |
File moved
... | @@ -9,7 +9,7 @@ import {NavigationContainer} from "@react-navigation/native"; | ... | @@ -9,7 +9,7 @@ import {NavigationContainer} from "@react-navigation/native"; |
9 | import store from './store'; | 9 | import store from './store'; |
10 | import StackNavigation from "./navigations/StackNavigation"; | 10 | import StackNavigation from "./navigations/StackNavigation"; |
11 | import {AuthProvider} from "./AuthContext"; | 11 | import {AuthProvider} from "./AuthContext"; |
12 | -import host from './env'; | 12 | +import {host} from './env'; |
13 | import axios from "axios"; | 13 | import axios from "axios"; |
14 | 14 | ||
15 | const cacheImages = (images) => { | 15 | const cacheImages = (images) => { |
... | @@ -38,6 +38,7 @@ const App = () => { | ... | @@ -38,6 +38,7 @@ const App = () => { |
38 | ); | 38 | ); |
39 | const fonts = cacheFonts([Ionicons.font]); | 39 | const fonts = cacheFonts([Ionicons.font]); |
40 | 40 | ||
41 | + // await AsyncStorage.removeItem('cookie'); | ||
41 | const cookie = await AsyncStorage.getItem('cookie'); | 42 | const cookie = await AsyncStorage.getItem('cookie'); |
42 | console.log('cookie', cookie); | 43 | console.log('cookie', cookie); |
43 | if (cookie) { | 44 | if (cookie) { |
... | @@ -66,12 +67,6 @@ const App = () => { | ... | @@ -66,12 +67,6 @@ const App = () => { |
66 | <> | 67 | <> |
67 | {isReady | 68 | {isReady |
68 | ? | 69 | ? |
69 | - // <Provider store={store}> | ||
70 | - // <NavigationContainer> | ||
71 | - // <StatusBar barstyle={'light-content'}/> | ||
72 | - // <StackNavigation/> | ||
73 | - // </NavigationContainer> | ||
74 | - // </Provider> | ||
75 | <Provider store={store}> | 70 | <Provider store={store}> |
76 | <AuthProvider user={user}> | 71 | <AuthProvider user={user}> |
77 | <NavigationContainer> | 72 | <NavigationContainer> | ... | ... |
code/render_server_react_native/AppStyles.js
0 → 100644
1 | +import { Platform, StyleSheet, Dimensions } from "react-native"; | ||
2 | + | ||
3 | +const { width, height } = Dimensions.get("window"); | ||
4 | +const SCREEN_WIDTH = width < height ? width : height; | ||
5 | +const numColumns = 2; | ||
6 | + | ||
7 | +export const AppStyles = { | ||
8 | + color: { | ||
9 | + main: "#5ea23a", | ||
10 | + text: "#696969", | ||
11 | + title: "#464646", | ||
12 | + subtitle: "#545454", | ||
13 | + categoryTitle: "#161616", | ||
14 | + tint: "#ff5a66", | ||
15 | + description: "#bbbbbb", | ||
16 | + filterTitle: "#8a8a8a", | ||
17 | + starRating: "#2bdf85", | ||
18 | + location: "#a9a9a9", | ||
19 | + white: "white", | ||
20 | + facebook: "#4267b2", | ||
21 | + grey: "grey", | ||
22 | + greenBlue: "#00aea8", | ||
23 | + placeholder: "#a0a0a0", | ||
24 | + background: "#f2f2f2", | ||
25 | + blue: "#3293fe" | ||
26 | + }, | ||
27 | + fontSize: { | ||
28 | + title: 30, | ||
29 | + content: 20, | ||
30 | + normal: 16 | ||
31 | + }, | ||
32 | + buttonWidth: { | ||
33 | + main: "70%" | ||
34 | + }, | ||
35 | + textInputWidth: { | ||
36 | + main: "80%" | ||
37 | + }, | ||
38 | + fontName: { | ||
39 | + main: "Noto Sans", | ||
40 | + bold: "Noto Sans" | ||
41 | + }, | ||
42 | + borderRadius: { | ||
43 | + main: 25, | ||
44 | + small: 5 | ||
45 | + } | ||
46 | +}; | ||
47 | + | ||
48 | +export const AppIcon = { | ||
49 | + container: { | ||
50 | + backgroundColor: "white", | ||
51 | + borderRadius: 20, | ||
52 | + padding: 8, | ||
53 | + marginRight: 10 | ||
54 | + }, | ||
55 | + style: { | ||
56 | + tintColor: AppStyles.color.tint, | ||
57 | + width: 25, | ||
58 | + height: 25 | ||
59 | + }, | ||
60 | + images: { | ||
61 | + home: require("./assets/icons/home.png"), | ||
62 | + defaultUser: require("./assets/icons/default_user.jpg"), | ||
63 | + logout: require("./assets/icons/shutdown.png") | ||
64 | + } | ||
65 | +}; | ||
66 | + | ||
67 | +export const HeaderButtonStyle = StyleSheet.create({ | ||
68 | + multi: { | ||
69 | + flexDirection: "row" | ||
70 | + }, | ||
71 | + container: { | ||
72 | + padding: 10 | ||
73 | + }, | ||
74 | + image: { | ||
75 | + justifyContent: "center", | ||
76 | + width: 35, | ||
77 | + height: 35, | ||
78 | + margin: 6 | ||
79 | + }, | ||
80 | + rightButton: { | ||
81 | + color: AppStyles.color.tint, | ||
82 | + marginRight: 10, | ||
83 | + fontWeight: "normal", | ||
84 | + fontFamily: AppStyles.fontName.main | ||
85 | + } | ||
86 | +}); | ||
87 | + | ||
88 | +export const ListStyle = StyleSheet.create({ | ||
89 | + title: { | ||
90 | + fontSize: 16, | ||
91 | + color: AppStyles.color.subtitle, | ||
92 | + fontFamily: AppStyles.fontName.bold, | ||
93 | + fontWeight: "bold" | ||
94 | + }, | ||
95 | + subtitleView: { | ||
96 | + minHeight: 55, | ||
97 | + flexDirection: "row", | ||
98 | + paddingTop: 5, | ||
99 | + marginLeft: 10 | ||
100 | + }, | ||
101 | + leftSubtitle: { | ||
102 | + flex: 2 | ||
103 | + }, | ||
104 | + avatarStyle: { | ||
105 | + height: 80, | ||
106 | + width: 80 | ||
107 | + } | ||
108 | +}); |
This diff could not be displayed because it is too large.
1.11 KB
1.6 KB
2.1 KB
825 Bytes
936 Bytes
1.07 KB
1.05 KB
1.37 KB
1.84 KB
2.21 KB
613 Bytes
1.17 KB
4.3 KB
723 Bytes
1.42 KB
7.22 KB
4 KB
824 Bytes
1.07 KB
2.39 KB
3.7 KB
1.65 KB
1.09 KB
2.35 KB
988 Bytes
619 Bytes
2.34 KB
974 Bytes
2.51 KB
13.3 KB
1.19 KB
892 Bytes
3.06 KB
1.2 KB
2.22 KB
4.14 KB
1.09 KB
973 Bytes
1.89 KB
6.29 KB
4.1 KB
This diff could not be displayed because it is too large.
148 KB
1 | +[{"index":1,"avgSpeed": 53},{"index":2,"avgSpeed":60}] | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | +import {Text, View, StyleSheet, TouchableOpacity, ScrollView} from 'react-native'; | ||
3 | +import {useDispatch, useSelector} from "react-redux"; | ||
4 | +import {useNavigation} from '@react-navigation/native'; | ||
5 | +import styled from "styled-components"; | ||
6 | +import {AntDesign, MaterialCommunityIcons} from "@expo/vector-icons"; | ||
7 | + | ||
8 | + | ||
9 | +const Banner = styled.View` | ||
10 | + flex: 1; | ||
11 | + margin-left: 15px; | ||
12 | + margin-bottom: 5px; | ||
13 | + width: 3px; | ||
14 | + height: 3px; | ||
15 | + border-radius: 20px; | ||
16 | + border: 3px solid #88c600; | ||
17 | + | ||
18 | +`; | ||
19 | + | ||
20 | +const BusPathComponent = (props) => { | ||
21 | + const navigation = useNavigation(); | ||
22 | + const [busPath, setBusPath] = useState(null); | ||
23 | + const [seeStaList, setSeeStaList] = useState(false); | ||
24 | + const {pathDetail} = props; | ||
25 | + | ||
26 | + const changeSeeStaList = () => { | ||
27 | + setSeeStaList(!seeStaList); | ||
28 | + console.log(seeStaList) | ||
29 | + }; | ||
30 | + | ||
31 | + useEffect(() => { | ||
32 | + console.log(props.pathDetail); | ||
33 | + setBusPath(props.pathDetail); | ||
34 | + }, []); | ||
35 | + | ||
36 | + return ( | ||
37 | + <ScrollView> | ||
38 | + <View style={{flexDirection: 'row', flex: 5}}> | ||
39 | + <View style={styles.pathType}> | ||
40 | + <MaterialCommunityIcons style={{flex: 1}} color={'#88c600'} name={'bus'} size={20}/> | ||
41 | + <Text style={{flex: 1, fontSize: 13}}>{pathDetail.time}분</Text> | ||
42 | + </View> | ||
43 | + <View style={{flex: 1}}> | ||
44 | + <Banner/> | ||
45 | + <Banner/> | ||
46 | + <Banner/> | ||
47 | + <Banner/> | ||
48 | + <Banner/> | ||
49 | + <Banner/> | ||
50 | + <Banner/> | ||
51 | + </View> | ||
52 | + <View style={styles.inputTile}> | ||
53 | + <Text style={styles.stationStyle}>{pathDetail.startName}</Text> | ||
54 | + <Text style={styles.idStyle}>{pathDetail.startID}</Text> | ||
55 | + {pathDetail.arrivalInfo.map((bus, index) => { | ||
56 | + return ( | ||
57 | + <View> | ||
58 | + <Text style={styles.busStyle}>{bus.busNo}</Text> | ||
59 | + {bus.msg.msg1.indexOf('undefined') !== -1 ? | ||
60 | + null | ||
61 | + : | ||
62 | + <> | ||
63 | + <Text style={styles.busSubStyle}>{bus.msg.msg1}</Text> | ||
64 | + </> | ||
65 | + } | ||
66 | + {bus.msg.msg2.indexOf('undefined') !== -1 ? | ||
67 | + null | ||
68 | + : | ||
69 | + <> | ||
70 | + <Text style={styles.busSubStyle}>{bus.msg.msg2}</Text> | ||
71 | + </> | ||
72 | + } | ||
73 | + </View> | ||
74 | + ) | ||
75 | + })} | ||
76 | + <View style={styles.stationListStyle}> | ||
77 | + <Text style={styles.cntStyle}>{pathDetail.stationCnt}개 정류소 이동</Text> | ||
78 | + <TouchableOpacity style={{flex: 1, marginTop: 17}} onPress={changeSeeStaList}> | ||
79 | + <AntDesign color={'darkgrey'} name={'caretdown'} size={15}/> | ||
80 | + </TouchableOpacity> | ||
81 | + </View> | ||
82 | + <View> | ||
83 | + {seeStaList === true ? | ||
84 | + <View> | ||
85 | + {pathDetail.stationList.map((bus, index) => { | ||
86 | + return ( | ||
87 | + <> | ||
88 | + <Text>{bus.stationName}</Text> | ||
89 | + </> | ||
90 | + ) | ||
91 | + })} | ||
92 | + </View> | ||
93 | + : | ||
94 | + null | ||
95 | + } | ||
96 | + </View> | ||
97 | + <Text style={styles.stationStyle}>{pathDetail.endName}</Text> | ||
98 | + </View> | ||
99 | + </View> | ||
100 | + </ScrollView> | ||
101 | + ); | ||
102 | +} | ||
103 | +export default BusPathComponent; | ||
104 | + | ||
105 | +const styles = StyleSheet.create({ | ||
106 | + inputTile: { | ||
107 | + marginLeft: 6, | ||
108 | + flex: 4, | ||
109 | + color: 'grey', | ||
110 | + }, | ||
111 | + inputText: { | ||
112 | + fontWeight: 'normal', | ||
113 | + fontSize: 15, | ||
114 | + }, | ||
115 | + pathType: { | ||
116 | + flexDirection: 'column', | ||
117 | + flex: 0.4, | ||
118 | + alignItems: 'center', | ||
119 | + justifyContent: 'center', | ||
120 | + marginLeft: 5, | ||
121 | + marginTop: 10, | ||
122 | + }, | ||
123 | + stationStyle: { | ||
124 | + fontWeight: 'bold', | ||
125 | + fontSize: 15, | ||
126 | + }, | ||
127 | + idStyle: { | ||
128 | + marginTop: 3, | ||
129 | + marginBottom: 20, | ||
130 | + color: 'grey', | ||
131 | + fontSize: 14 | ||
132 | + }, | ||
133 | + busStyle: { | ||
134 | + fontWeight: 'bold', | ||
135 | + fontSize: 14, | ||
136 | + color: '#88c600' | ||
137 | + }, | ||
138 | + cntStyle: { | ||
139 | + flex: 1, | ||
140 | + marginTop: 20, | ||
141 | + marginBottom: 3, | ||
142 | + color: 'grey', | ||
143 | + fontSize: 14 | ||
144 | + }, | ||
145 | + stationListStyle: { | ||
146 | + flexDirection: 'row', | ||
147 | + flex: 1, | ||
148 | + }, | ||
149 | + busSubStyle: { | ||
150 | + marginTop: 2, | ||
151 | + fontSize: 12, | ||
152 | + color: 'red', | ||
153 | + } | ||
154 | +}) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | +import {View, Text, Button, Image, TouchableOpacity, StyleSheet, Platform} from 'react-native'; | ||
3 | +import {useDispatch, useSelector} from "react-redux"; | ||
4 | +import {LOG_IN_REQUEST, LOG_OUT_REQUEST} from "../reducers/user"; | ||
5 | +import {MaterialCommunityIcons} from "@expo/vector-icons"; | ||
6 | +import {useNavigation} from '@react-navigation/native'; | ||
7 | +import DateTimePicker from '@react-native-community/datetimepicker'; | ||
8 | +import {SET_TIME_SUCCESS} from "../reducers/location"; | ||
9 | +import moment from "moment"; | ||
10 | + | ||
11 | +const DateTimePickerComponent = (props) => { | ||
12 | + const [date, setDate] = useState(new Date()); | ||
13 | + const [mode, setMode] = useState('time'); | ||
14 | + const {goToMapsClick} = props; | ||
15 | + | ||
16 | + const onChange = (event, selectedDate) => { | ||
17 | + const currentDate = selectedDate || date; | ||
18 | + console.log(currentDate); | ||
19 | + setDate(currentDate); | ||
20 | + }; | ||
21 | + | ||
22 | + // SET FINISH TIME | ||
23 | + const dispatch = useDispatch(); | ||
24 | + const onSubmit = async () => { | ||
25 | + if (!date) { | ||
26 | + return | ||
27 | + } | ||
28 | + console.log('SET_TIME_SUCCESS GO!!', date); | ||
29 | + await dispatch({ | ||
30 | + type: SET_TIME_SUCCESS, | ||
31 | + data: { | ||
32 | + date | ||
33 | + } | ||
34 | + }); | ||
35 | + }; | ||
36 | + | ||
37 | + useEffect(() => { | ||
38 | + if (goToMapsClick === true) { | ||
39 | + console.log(goToMapsClick); | ||
40 | + console.log('goToMapsClick!'); | ||
41 | + onSubmit(); | ||
42 | + } | ||
43 | + setDate(date); | ||
44 | + }, [goToMapsClick, date]); | ||
45 | + | ||
46 | + return ( | ||
47 | + <View> | ||
48 | + <DateTimePicker | ||
49 | + testID="dateTimePicker" | ||
50 | + value={date} | ||
51 | + mode={mode} | ||
52 | + is24Hour={true} | ||
53 | + display="default" | ||
54 | + onChange={onChange} | ||
55 | + style={styles.TextStyle} | ||
56 | + /> | ||
57 | + | ||
58 | + </View> | ||
59 | + ); | ||
60 | +}; | ||
61 | + | ||
62 | +const styles = StyleSheet.create({ | ||
63 | + containerStyle: { | ||
64 | + marginTop: 10, | ||
65 | + alignItems: 'center', | ||
66 | + justifyContent: 'center', | ||
67 | + }, | ||
68 | + TextStyle: { | ||
69 | + flex: 1, | ||
70 | + marginBottom: 240, | ||
71 | + } | ||
72 | +}); | ||
73 | + | ||
74 | +export default DateTimePickerComponent; | ||
75 | + |
1 | +import React, {useState, useEffect} from 'react'; | ||
2 | +import {Text, View, StyleSheet, TouchableOpacity, ScrollView} from 'react-native'; | ||
3 | +import styled from 'styled-components'; | ||
4 | +import {MaterialCommunityIcons, AntDesign} from '@expo/vector-icons'; | ||
5 | +import {useNavigation} from '@react-navigation/native'; | ||
6 | + | ||
7 | + | ||
8 | +const ShowDetail = styled.TouchableOpacity` | ||
9 | + flex: 2; | ||
10 | + position: absolute; | ||
11 | + right: 6px; | ||
12 | + bottom: 2px; | ||
13 | + width: 30px; | ||
14 | + height: 30px; | ||
15 | + border-radius: 50px; | ||
16 | +`; | ||
17 | + | ||
18 | +const Banner = styled.View` | ||
19 | + flex: 1; | ||
20 | + margin-left: 15px; | ||
21 | + margin-bottom: 5px; | ||
22 | + width: 3px; | ||
23 | + height: 3px; | ||
24 | + border-radius: 20px; | ||
25 | + border: 3px solid #273b96; | ||
26 | +`; | ||
27 | + | ||
28 | + | ||
29 | +const GoPathSummary = (props) => { | ||
30 | + const navigation = useNavigation(); | ||
31 | + const [pathSummary, setPathSummary] = useState(null); | ||
32 | + const goPathDetail = () => { | ||
33 | + navigation.navigate('GoPathDetail', {'detail': props.detail}); | ||
34 | + }; | ||
35 | + | ||
36 | + useEffect | ||
37 | + (() => { | ||
38 | + console.log(props.summary); | ||
39 | + setPathSummary(props.summary); | ||
40 | + }, []); | ||
41 | + | ||
42 | + | ||
43 | + return ( | ||
44 | + <View> | ||
45 | + {pathSummary ? | ||
46 | + <> | ||
47 | + <View style={styles.container}> | ||
48 | + | ||
49 | + <View style={styles.titleParagraph}> | ||
50 | + <Text style={styles.hourStyle}>{pathSummary.hour1}시 {pathSummary.min1}분 출발 | ||
51 | + <Text style={styles.conditionStyle}>정확</Text> | ||
52 | + </Text> | ||
53 | + <Text style={styles.hourStyle}>{pathSummary.hour2}시 {pathSummary.min2}분 출발 | ||
54 | + <Text style={styles.conditionStyle}>여유</Text> | ||
55 | + </Text> | ||
56 | + </View> | ||
57 | + <View style={{flexDirection: 'row', flex: 2, marginLeft: 70}}> | ||
58 | + <Text style={{flex: 1, fontSize: 13, fontWeight: 'bold'}}>총소요시간: {pathSummary.totalTime}</Text> | ||
59 | + <Text style={{flex: 1, fontSize: 13, fontWeight: 'bold'}}>비용: {pathSummary.payment}</Text> | ||
60 | + </View> | ||
61 | + <View style={{flexDirection: 'row', flex: 5, marginLeft: 70, marginTop: 20}}> | ||
62 | + <View style={styles.pathType}> | ||
63 | + <MaterialCommunityIcons style={{flex: 1}} color={'#273b96'} name={'train'} size={20}/> | ||
64 | + </View> | ||
65 | + <View style={styles.inputTile}> | ||
66 | + <Text style={styles.stationStyle}>{pathSummary.firstStartStation}역</Text> | ||
67 | + <Text style={styles.stationStyle}>{pathSummary.lastEndStation}역</Text> | ||
68 | + </View> | ||
69 | + </View> | ||
70 | + <View style={{position: 'absolute', right: 10}}> | ||
71 | + <ShowDetail onPress={goPathDetail}> | ||
72 | + <AntDesign color={'darkgrey'} name={'caretright'} size={32}/> | ||
73 | + </ShowDetail> | ||
74 | + </View> | ||
75 | + | ||
76 | + </View> | ||
77 | + </> | ||
78 | + : | ||
79 | + null | ||
80 | + } | ||
81 | + </View> | ||
82 | + ); | ||
83 | +} | ||
84 | + | ||
85 | +const styles = StyleSheet.create({ | ||
86 | + container: { | ||
87 | + flex: 1, | ||
88 | + flexDirection: 'column', | ||
89 | + paddingTop: 40, | ||
90 | + paddingBottom: 30, | ||
91 | + backgroundColor: '#ecf0f1', | ||
92 | + alignItems: 'center', | ||
93 | + justifyContent: 'center', | ||
94 | + borderWidth: 1, | ||
95 | + borderColor: 'darkgrey', | ||
96 | + }, | ||
97 | + paragraph: { | ||
98 | + flex: 1, | ||
99 | + fontSize: 14, | ||
100 | + fontWeight: 'bold', | ||
101 | + textAlign: 'center', | ||
102 | + color: '#34495e', | ||
103 | + }, | ||
104 | + titleParagraph: { | ||
105 | + flexDirection: 'column', | ||
106 | + flex: 1, | ||
107 | + }, | ||
108 | + inputTile: { | ||
109 | + marginLeft: 6, | ||
110 | + flex: 4, | ||
111 | + color: 'grey', | ||
112 | + }, | ||
113 | + inputText: { | ||
114 | + fontWeight: 'normal', | ||
115 | + fontSize: 15, | ||
116 | + }, | ||
117 | + pathType: { | ||
118 | + flexDirection: 'column', | ||
119 | + flex: 0.4, | ||
120 | + alignItems: 'center', | ||
121 | + justifyContent: 'center', | ||
122 | + marginLeft: 5, | ||
123 | + marginTop: 10, | ||
124 | + }, | ||
125 | + stationStyle: { | ||
126 | + fontWeight: 'bold', | ||
127 | + fontSize: 15, | ||
128 | + }, | ||
129 | + idStyle: { | ||
130 | + marginTop: 3, | ||
131 | + marginBottom: 20, | ||
132 | + color: 'grey', | ||
133 | + fontSize: 14 | ||
134 | + }, | ||
135 | + laneStyle: { | ||
136 | + fontWeight: 'bold', | ||
137 | + fontSize: 15, | ||
138 | + color: '#EBA900' | ||
139 | + }, | ||
140 | + cntStyle: { | ||
141 | + flex: 1, | ||
142 | + marginTop: 20, | ||
143 | + marginBottom: 3, | ||
144 | + color: 'grey', | ||
145 | + fontSize: 14 | ||
146 | + }, | ||
147 | + stationListStyle: { | ||
148 | + flexDirection: 'row', | ||
149 | + flex: 1, | ||
150 | + }, | ||
151 | + hourStyle: { | ||
152 | + flexDirection: 'row', | ||
153 | + flex: 1, | ||
154 | + fontSize: 18, | ||
155 | + fontWeight: 'bold', | ||
156 | + marginBottom: 20, | ||
157 | + }, | ||
158 | + conditionStyle: { | ||
159 | + paddingLeft: 10, | ||
160 | + fontSize: 15, | ||
161 | + color: 'red', | ||
162 | + } | ||
163 | +}); | ||
164 | + | ||
165 | +export default GoPathSummary; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | +import {Text, View, StyleSheet, TouchableOpacity, ScrollView} from 'react-native'; | ||
3 | +import {useDispatch, useSelector} from "react-redux"; | ||
4 | +import {useNavigation} from '@react-navigation/native'; | ||
5 | +import styled from "styled-components"; | ||
6 | +import {AntDesign, MaterialCommunityIcons} from "@expo/vector-icons"; | ||
7 | + | ||
8 | +const Banner = styled.View` | ||
9 | + flex: 1; | ||
10 | + margin-left: 15px; | ||
11 | + margin-bottom: 5px; | ||
12 | + width: 3px; | ||
13 | + height: 3px; | ||
14 | + border-radius: 20px; | ||
15 | + border: 3px solid #EBA900; | ||
16 | +`; | ||
17 | + | ||
18 | +const LanePathComponent = (props) => { | ||
19 | + const navigation = useNavigation(); | ||
20 | + const [lanePath, setLanePath] = useState(null); | ||
21 | + const [seeLaneList, setSeeLaneList] = useState(false); | ||
22 | + const {pathDetail} = props; | ||
23 | + | ||
24 | + | ||
25 | + const changeSeeLaneList = () => { | ||
26 | + setSeeLaneList(!seeLaneList); | ||
27 | + console.log(seeLaneList) | ||
28 | + }; | ||
29 | + | ||
30 | + useEffect(() => { | ||
31 | + console.log(props.pathDetail); | ||
32 | + setLanePath(props.pathDetail); | ||
33 | + }, []); | ||
34 | + | ||
35 | + return ( | ||
36 | + <ScrollView> | ||
37 | + <View style={{flexDirection: 'row', flex: 5}}> | ||
38 | + <View style={styles.pathType}> | ||
39 | + <MaterialCommunityIcons style={{flex: 1}} color={'#EBA900'} name={'train'} size={20}/> | ||
40 | + <Text style={{flex: 1, fontSize: 13}}>{pathDetail.time}분</Text> | ||
41 | + </View> | ||
42 | + <View style={{flex: 1}}> | ||
43 | + <Banner/> | ||
44 | + <Banner/> | ||
45 | + <Banner/> | ||
46 | + <Banner/> | ||
47 | + <Banner/> | ||
48 | + <Banner/> | ||
49 | + <Banner/> | ||
50 | + </View> | ||
51 | + <View style={styles.inputTile}> | ||
52 | + <Text style={styles.stationStyle}>{pathDetail.startName}역</Text> | ||
53 | + <Text style={styles.idStyle}>{pathDetail.startID}</Text> | ||
54 | + {pathDetail.laneList.map((lane, index) => { | ||
55 | + return ( | ||
56 | + <Text style={styles.laneStyle}>{lane.name}</Text> | ||
57 | + ) | ||
58 | + })} | ||
59 | + <View style={styles.stationListStyle}> | ||
60 | + <Text style={styles.cntStyle}>{pathDetail.stationCnt}개 정류소 이동</Text> | ||
61 | + <TouchableOpacity style={{flex: 1, marginTop: 17}} onPress={changeSeeLaneList}> | ||
62 | + <AntDesign color={'darkgrey'} name={'caretdown'} size={15}/> | ||
63 | + </TouchableOpacity> | ||
64 | + </View> | ||
65 | + {seeLaneList === true ? | ||
66 | + <View> | ||
67 | + {pathDetail.stationList.map((lane, index) => { | ||
68 | + return ( | ||
69 | + <Text>{lane}</Text> | ||
70 | + ) | ||
71 | + })} | ||
72 | + </View> | ||
73 | + : | ||
74 | + null | ||
75 | + } | ||
76 | + <Text style={styles.stationStyle}>{pathDetail.endName}역</Text> | ||
77 | + </View> | ||
78 | + </View> | ||
79 | + </ScrollView> | ||
80 | + ); | ||
81 | +} | ||
82 | +export default LanePathComponent; | ||
83 | + | ||
84 | +const styles = StyleSheet.create({ | ||
85 | + inputTile: { | ||
86 | + marginLeft: 6, | ||
87 | + flex: 4, | ||
88 | + color: 'grey', | ||
89 | + }, | ||
90 | + inputText: { | ||
91 | + fontWeight: 'normal', | ||
92 | + fontSize: 15, | ||
93 | + }, | ||
94 | + pathType: { | ||
95 | + flexDirection: 'column', | ||
96 | + flex: 0.4, | ||
97 | + alignItems: 'center', | ||
98 | + justifyContent: 'center', | ||
99 | + marginLeft: 5, | ||
100 | + marginTop: 10, | ||
101 | + }, | ||
102 | + stationStyle: { | ||
103 | + fontWeight: 'bold', | ||
104 | + fontSize: 15, | ||
105 | + }, | ||
106 | + idStyle: { | ||
107 | + marginTop: 3, | ||
108 | + marginBottom: 20, | ||
109 | + color: 'grey', | ||
110 | + fontSize: 14 | ||
111 | + }, | ||
112 | + laneStyle: { | ||
113 | + fontWeight: 'bold', | ||
114 | + fontSize: 15, | ||
115 | + color: '#EBA900' | ||
116 | + }, | ||
117 | + cntStyle: { | ||
118 | + flex: 1, | ||
119 | + marginTop: 20, | ||
120 | + marginBottom: 3, | ||
121 | + color: 'grey', | ||
122 | + fontSize: 14 | ||
123 | + }, | ||
124 | + stationListStyle: { | ||
125 | + flexDirection: 'row', | ||
126 | + flex: 1, | ||
127 | + } | ||
128 | +}) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -2,11 +2,9 @@ import React, {useState, useContext, useEffect, useCallback} from 'react'; | ... | @@ -2,11 +2,9 @@ import React, {useState, useContext, useEffect, useCallback} from 'react'; |
2 | import {View, Text, Button, StyleSheet, TextInput, TouchableOpacity} from 'react-native'; | 2 | import {View, Text, Button, StyleSheet, TextInput, TouchableOpacity} from 'react-native'; |
3 | import {useDispatch, useSelector} from "react-redux"; | 3 | import {useDispatch, useSelector} from "react-redux"; |
4 | import {LOG_IN_REQUEST, LOG_OUT_REQUEST} from "../reducers/user"; | 4 | import {LOG_IN_REQUEST, LOG_OUT_REQUEST} from "../reducers/user"; |
5 | -import {MaterialCommunityIcons} from "@expo/vector-icons"; | ||
6 | import styled from "styled-components"; | 5 | import styled from "styled-components"; |
7 | import {useNavigation} from '@react-navigation/native'; | 6 | import {useNavigation} from '@react-navigation/native'; |
8 | -import LoadingComponent from "../components/LoadingComponent"; | 7 | +import Profile from "../screens/Profile"; |
9 | -import SignUpComponent from "./SignUpComponent"; | ||
10 | 8 | ||
11 | 9 | ||
12 | const LoginButton = styled.TouchableOpacity` | 10 | const LoginButton = styled.TouchableOpacity` |
... | @@ -16,6 +14,20 @@ const LoginButton = styled.TouchableOpacity` | ... | @@ -16,6 +14,20 @@ const LoginButton = styled.TouchableOpacity` |
16 | height: 40px; | 14 | height: 40px; |
17 | background-color: #e6e6fa; | 15 | background-color: #e6e6fa; |
18 | border: 1px; | 16 | border: 1px; |
17 | + marginBottom: 10px; | ||
18 | + border-radius: 50px; | ||
19 | + | ||
20 | +`; | ||
21 | + | ||
22 | +const SignUpButton = styled.TouchableOpacity` | ||
23 | + align-items: center; | ||
24 | + justify-content: center; | ||
25 | + width: 60px; | ||
26 | + height: 40px; | ||
27 | + background-color: #e6e6fa; | ||
28 | + border: 1px; | ||
29 | + border-radius: 50px; | ||
30 | + | ||
19 | `; | 31 | `; |
20 | 32 | ||
21 | 33 | ||
... | @@ -49,8 +61,17 @@ const LoginComponent = () => { | ... | @@ -49,8 +61,17 @@ const LoginComponent = () => { |
49 | password | 61 | password |
50 | } | 62 | } |
51 | }); | 63 | }); |
64 | + | ||
52 | }; | 65 | }; |
66 | + const goSignUp = () => { | ||
67 | + navigation.navigate('SignUp'); | ||
68 | + } | ||
53 | 69 | ||
70 | + useEffect(() => { | ||
71 | + if (me) { | ||
72 | + navigation.navigate('Profile'); | ||
73 | + } | ||
74 | + }, [me]); | ||
54 | 75 | ||
55 | useEffect(() => { | 76 | useEffect(() => { |
56 | setLoading(false); | 77 | setLoading(false); |
... | @@ -77,17 +98,22 @@ const LoginComponent = () => { | ... | @@ -77,17 +98,22 @@ const LoginComponent = () => { |
77 | onPress={onSubmit}> | 98 | onPress={onSubmit}> |
78 | <Text style={{color: '#696969'}}>Login</Text> | 99 | <Text style={{color: '#696969'}}>Login</Text> |
79 | </LoginButton> | 100 | </LoginButton> |
101 | + <SignUpButton | ||
102 | + title={'Login'} | ||
103 | + onPress={goSignUp}> | ||
104 | + <Text style={{color: '#696969'}}>SignUp</Text> | ||
105 | + </SignUpButton> | ||
80 | </View> | 106 | </View> |
81 | ) | 107 | ) |
82 | }; | 108 | }; |
83 | 109 | ||
84 | const styles = StyleSheet.create({ | 110 | const styles = StyleSheet.create({ |
85 | containerStyle: { | 111 | containerStyle: { |
86 | - flex: 1, | 112 | + // flex: 1, |
87 | alignItems: 'center', | 113 | alignItems: 'center', |
88 | - justifyContent: 'center', | 114 | + // justifyContent: 'center', |
89 | - backgroundColor: '#ecf0f1', | 115 | + // backgroundColor: '#ecf0f1', |
90 | - marginTop: 100, | 116 | + // marginTop: 100, |
91 | }, | 117 | }, |
92 | input: { | 118 | input: { |
93 | width: 200, | 119 | width: 200, | ... | ... |
1 | +import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | +import {View, Text, Button, Image, TouchableOpacity, StyleSheet, Alert} from 'react-native'; | ||
3 | +import {useDispatch, useSelector} from "react-redux"; | ||
4 | +import {LOG_IN_REQUEST, LOG_OUT_REQUEST} from "../reducers/user"; | ||
5 | +import {MaterialCommunityIcons} from "@expo/vector-icons"; | ||
6 | +import {useNavigation} from '@react-navigation/native'; | ||
7 | +import {SET_PERVELOCITY_SUCCESS} from "../reducers/location"; | ||
8 | +import Login from "../screens/Login"; | ||
9 | +import Papa from 'papaparse'; | ||
10 | + | ||
11 | + | ||
12 | +const MyProfileComponent = () => { | ||
13 | + const navigation = useNavigation(); | ||
14 | + const [loading, setLoading] = useState(true); | ||
15 | + const [numRecord, setNumRecord] = useState(0); | ||
16 | + | ||
17 | + const {me} = useSelector(state => state.user); | ||
18 | + const {isLoggingIn} = useSelector(state => state.user); | ||
19 | + // | ||
20 | + // const downloadFile = async () => { | ||
21 | + // const uri = "https://www.mapmyfitness.com/workout/export/csv"; | ||
22 | + // let fileUri = FileSystem.documentDirectory + "userVelocity.txt"; | ||
23 | + // FileSystem.downloadAsync(uri, fileUri) | ||
24 | + // .then(({uri}) => { | ||
25 | + // saveFile(uri); | ||
26 | + // }) | ||
27 | + // .catch(error => { | ||
28 | + // console.error(error); | ||
29 | + // }) | ||
30 | + // } | ||
31 | + // | ||
32 | + // const saveFile = async (fileUri) => { | ||
33 | + // const {status} = await Permissions.askAsync(Permissions.CAMERA_ROLL); | ||
34 | + // if (status === "granted") { | ||
35 | + // const asset = await MediaLibrary.createAssetAsync(fileUri) | ||
36 | + // await MediaLibrary.createAlbumAsync("Download", asset, false) | ||
37 | + // } | ||
38 | + // } | ||
39 | + const dispatch = useDispatch(); | ||
40 | + const loadPersonalVelocity = async () => { | ||
41 | + try { | ||
42 | + | ||
43 | + const userVelocity = require('../assets/userFile/userVelocity'); | ||
44 | + var allAvgSpeed = 0; | ||
45 | + setNumRecord(userVelocity.length); | ||
46 | + userVelocity.map((i, index) => { | ||
47 | + allAvgSpeed = allAvgSpeed + i.avgSpeed; | ||
48 | + }); | ||
49 | + | ||
50 | + var personalVelocity = parseInt(allAvgSpeed / userVelocity.length); | ||
51 | + await dispatch({ | ||
52 | + type: SET_PERVELOCITY_SUCCESS, | ||
53 | + data: { | ||
54 | + personalVelocity: personalVelocity | ||
55 | + } | ||
56 | + }); | ||
57 | + | ||
58 | + Alert.alert( | ||
59 | + 'MAP 사용자 평균 속도 설정', | ||
60 | + ` 사용자 평균 속도를 설정하였습니다. `, | ||
61 | + [ | ||
62 | + { | ||
63 | + text: 'Cancel', | ||
64 | + onPress: () => console.log('Cancel Pressed'), | ||
65 | + style: 'cancel', | ||
66 | + }, | ||
67 | + {text: 'OK', onPress: () => console.log('OK Pressed')}, | ||
68 | + ], | ||
69 | + {cancelable: false} | ||
70 | + ); | ||
71 | + | ||
72 | + } catch (e) { | ||
73 | + console.log(e); | ||
74 | + } | ||
75 | + | ||
76 | + }; | ||
77 | + | ||
78 | + useEffect(() => { | ||
79 | + setNumRecord(0); | ||
80 | + }, []); | ||
81 | + | ||
82 | + useEffect(() => { | ||
83 | + console.log(numRecord) | ||
84 | + }, [numRecord]); | ||
85 | + | ||
86 | + const onLogout = async () => { | ||
87 | + await dispatch({ | ||
88 | + type: LOG_OUT_REQUEST | ||
89 | + }); | ||
90 | + console.log('onLogout'); | ||
91 | + }; | ||
92 | + return ( | ||
93 | + <View> | ||
94 | + {me ? | ||
95 | + <View> | ||
96 | + <View style={{flexDirection: 'row', paddingTop: 15}}> | ||
97 | + <View style={{flex: 1, alignItems: 'center'}}> | ||
98 | + <Image source={{url: 'https://steemitimages.com/u/anpigon/avatar'}} | ||
99 | + style={{width: 75, height: 75, borderRadius: 37.5}}/> | ||
100 | + </View> | ||
101 | + <View style={{flex: 3}}> | ||
102 | + <View style={{flexDirection: 'row', justifyContent: 'space-around', marginTop: 12}}> | ||
103 | + <View style={{alignItems: 'center'}}> | ||
104 | + <Text style={{fontSize: 15, fontWeight: 'bold'}}>{me.email}</Text> | ||
105 | + <Text style={{fontSize: 10, color: 'gray'}}>email</Text> | ||
106 | + </View> | ||
107 | + <View style={{alignItems: 'center'}}> | ||
108 | + <Text style={{fontSize: 15, fontWeight: 'bold'}}>{me.nickName}</Text> | ||
109 | + <Text style={{fontSize: 10, color: 'gray'}}>nickName</Text> | ||
110 | + </View> | ||
111 | + <View style={{alignItems: 'center'}}> | ||
112 | + <Text style={{fontSize: 15, fontWeight: 'bold'}}>{numRecord}</Text> | ||
113 | + <Text style={{fontSize: 10, color: 'gray'}}>numRecord</Text> | ||
114 | + </View> | ||
115 | + </View> | ||
116 | + <View style={{flexDirection: 'row'}}> | ||
117 | + <TouchableOpacity | ||
118 | + onPress={loadPersonalVelocity} | ||
119 | + style={{ | ||
120 | + flex: 4, | ||
121 | + marginLeft: 10, | ||
122 | + justifyContent: 'center', | ||
123 | + alignItems: 'center', | ||
124 | + borderWidth: 1, | ||
125 | + borderColor: 'black', | ||
126 | + height: 30, | ||
127 | + marginTop: 17 | ||
128 | + }}> | ||
129 | + <Text style={{fontSize: 13}}>load personal velocity</Text> | ||
130 | + </TouchableOpacity> | ||
131 | + <TouchableOpacity | ||
132 | + onPress={onLogout} | ||
133 | + style={{ | ||
134 | + borderColor: 'black', | ||
135 | + borderWidth: 1, | ||
136 | + flex: 1, | ||
137 | + marginRight: 10, | ||
138 | + marginLeft: 5, | ||
139 | + justifyContent: 'center', | ||
140 | + alignItems: 'center', | ||
141 | + height: 30, | ||
142 | + marginTop: 17 | ||
143 | + }}> | ||
144 | + <MaterialCommunityIcons color={'black'} name={'logout'} size={20}/> | ||
145 | + </TouchableOpacity> | ||
146 | + </View> | ||
147 | + </View> | ||
148 | + </View> | ||
149 | + < View style={{paddingHorizontal: 20, paddingVertical: 10}}> | ||
150 | + </View> | ||
151 | + </View> | ||
152 | + : | ||
153 | + <View style={{alignItems: 'center', justifyContent: 'center', marginTop: 200}}> | ||
154 | + <Text style={{fontSize: 30, textAlign: 'center', fontWeight: 'bold'}}>유저 정보가 없습니다.</Text> | ||
155 | + </View> | ||
156 | + } | ||
157 | + </View> | ||
158 | + ) | ||
159 | +}; | ||
160 | + | ||
161 | +const styles = StyleSheet.create({ | ||
162 | + containerStyle: { | ||
163 | + marginTop: 10, | ||
164 | + alignItems: 'center', | ||
165 | + justifyContent: 'center', | ||
166 | + }, | ||
167 | + TextStyle: { | ||
168 | + width: 200, | ||
169 | + height: 44, | ||
170 | + padding: 10, | ||
171 | + borderWidth: 1, | ||
172 | + borderColor: '#778899', | ||
173 | + marginBottom: 10, | ||
174 | + } | ||
175 | +}); | ||
176 | + | ||
177 | +export default MyProfileComponent; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | import React, {useState, useContext, useEffect, useCallback} from 'react'; | 1 | import React, {useState, useContext, useEffect, useCallback} from 'react'; |
2 | -import {View, Text, Button, TextInput, TouchableOpacity} from 'react-native'; | 2 | +import {View, Text, Button, TextInput, TouchableOpacity, StyleSheet} from 'react-native'; |
3 | import {useDispatch, useSelector} from "react-redux"; | 3 | import {useDispatch, useSelector} from "react-redux"; |
4 | import {SIGN_UP_REQUEST} from "../reducers/user"; | 4 | import {SIGN_UP_REQUEST} from "../reducers/user"; |
5 | -import {MaterialCommunityIcons} from "@expo/vector-icons"; | ||
6 | import styled from "styled-components"; | 5 | import styled from "styled-components"; |
7 | import {useNavigation} from '@react-navigation/native'; | 6 | import {useNavigation} from '@react-navigation/native'; |
8 | -import LoadingComponent from "../components/LoadingComponent"; | 7 | +import Profile from "../screens/Profile"; |
9 | 8 | ||
10 | 9 | ||
11 | const SignUpButton = styled.TouchableOpacity` | 10 | const SignUpButton = styled.TouchableOpacity` |
12 | align-items: center; | 11 | align-items: center; |
13 | justify-content: center; | 12 | justify-content: center; |
14 | width: 60px; | 13 | width: 60px; |
15 | - height: 60px; | 14 | + height: 40px; |
16 | - background-color: #ffffff; | 15 | + background-color: #e6e6fa; |
17 | border: 1px; | 16 | border: 1px; |
17 | + marginBottom: 10px; | ||
18 | + border-radius: 50px; | ||
18 | `; | 19 | `; |
19 | 20 | ||
21 | +const GoLoginButton = styled.TouchableOpacity` | ||
22 | + align-items: center; | ||
23 | + justify-content: center; | ||
24 | + width: 60px; | ||
25 | + height: 40px; | ||
26 | + background-color: #e6e6fa; | ||
27 | + border: 1px; | ||
28 | + border-radius: 50px; | ||
29 | +`; | ||
30 | + | ||
31 | + | ||
20 | const SignUpComponent = () => { | 32 | const SignUpComponent = () => { |
21 | const navigation = useNavigation(); | 33 | const navigation = useNavigation(); |
22 | const [email, setEmail] = useState(''); | 34 | const [email, setEmail] = useState(''); |
... | @@ -49,39 +61,59 @@ const SignUpComponent = () => { | ... | @@ -49,39 +61,59 @@ const SignUpComponent = () => { |
49 | password | 61 | password |
50 | } | 62 | } |
51 | }); | 63 | }); |
64 | + if (me !== null) { | ||
65 | + navigation.navigate('Profile'); | ||
66 | + } | ||
52 | }; | 67 | }; |
53 | 68 | ||
54 | return ( | 69 | return ( |
55 | - <> | 70 | + <View styles={styles.containerStyle}> |
56 | - <View> | ||
57 | - <View> | ||
58 | <TextInput | 71 | <TextInput |
59 | - style={{height: 40, marginLeft: 10}} | 72 | + style={styles.input} |
60 | placeholder="Type here to Email!" | 73 | placeholder="Type here to Email!" |
61 | onChangeText={onChangeEmail} | 74 | onChangeText={onChangeEmail} |
62 | /> | 75 | /> |
63 | - </View> | ||
64 | - <View> | ||
65 | <TextInput | 76 | <TextInput |
66 | - style={{height: 40, marginLeft: 10}} | 77 | + style={styles.input} |
67 | placeholder="Type here to nickname!" | 78 | placeholder="Type here to nickname!" |
68 | onChangeText={onChangeNickName} | 79 | onChangeText={onChangeNickName} |
69 | /> | 80 | /> |
70 | - </View> | ||
71 | - <View> | ||
72 | <TextInput | 81 | <TextInput |
73 | - style={{height: 40, marginLeft: 10}} | 82 | + style={styles.input} |
74 | placeholder="Type here to password!" | 83 | placeholder="Type here to password!" |
75 | type="password" | 84 | type="password" |
76 | onChangeText={onChangePassword} | 85 | onChangeText={onChangePassword} |
77 | /> | 86 | /> |
78 | - </View> | 87 | + <SignUpButton |
79 | - <SignUpButton title={'회원가입'} onPress={onSubmit}> | 88 | + title={'signUp'} |
80 | - <Text>회원가입</Text> | 89 | + onPress={onSubmit}> |
90 | + <Text style={{color: '#696969'}}>signUp</Text> | ||
81 | </SignUpButton> | 91 | </SignUpButton> |
92 | + <GoLoginButton | ||
93 | + title={'signUp'} | ||
94 | + onPress={onSubmit}> | ||
95 | + <Text style={{color: '#696969'}}>Login</Text> | ||
96 | + </GoLoginButton> | ||
82 | </View> | 97 | </View> |
83 | - </> | ||
84 | ) | 98 | ) |
85 | }; | 99 | }; |
86 | 100 | ||
87 | export default SignUpComponent; | 101 | export default SignUpComponent; |
102 | + | ||
103 | +const styles = StyleSheet.create({ | ||
104 | + containerStyle: { | ||
105 | + // flex: 1, | ||
106 | + alignItems: 'center', | ||
107 | + // justifyContent: 'center', | ||
108 | + // backgroundColor: '#ecf0f1', | ||
109 | + // marginTop: 100, | ||
110 | + }, | ||
111 | + input: { | ||
112 | + width: 200, | ||
113 | + height: 44, | ||
114 | + padding: 10, | ||
115 | + borderWidth: 1, | ||
116 | + borderColor: '#778899', | ||
117 | + marginBottom: 10, | ||
118 | + } | ||
119 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
1 | import React, {useState, useEffect} from 'react'; | 1 | import React, {useState, useEffect} from 'react'; |
2 | import MapView, {Marker} from 'react-native-maps'; | 2 | import MapView, {Marker} from 'react-native-maps'; |
3 | -import {StyleSheet, Text, TextInput, View, TouchableOpacity} from 'react-native'; | 3 | +import {StyleSheet, Text, TextInput, View, TouchableOpacity, Alert} from 'react-native'; |
4 | import screen from '../constants/layout'; | 4 | import screen from '../constants/layout'; |
5 | import {useSelector, useDispatch} from "react-redux"; | 5 | import {useSelector, useDispatch} from "react-redux"; |
6 | import * as Location from 'expo-location'; | 6 | import * as Location from 'expo-location'; |
7 | import {set} from "react-native-reanimated"; | 7 | import {set} from "react-native-reanimated"; |
8 | import {MaterialCommunityIcons} from "@expo/vector-icons"; | 8 | import {MaterialCommunityIcons} from "@expo/vector-icons"; |
9 | -import {SET_LOC_REQUEST} from "../reducers/location"; | 9 | +import {SET_ELOC_REQUEST, SET_LOC_REQUEST, SET_SLOC_REQUEST, SET_USER_LOC} from "../reducers/location"; |
10 | - | 10 | +import axios from 'axios'; |
11 | 11 | ||
12 | const StartAndFinishLocationComponent = () => { | 12 | const StartAndFinishLocationComponent = () => { |
13 | const [hasPermission, setHasPermission] = useState(false); | 13 | const [hasPermission, setHasPermission] = useState(false); |
14 | const [startTextLocation, setStartTextLocation] = useState(''); | 14 | const [startTextLocation, setStartTextLocation] = useState(''); |
15 | - const [finishTextLocation, setFinishTextLocation] = useState(''); | 15 | + const [endTextLocation, setEndTextLocation] = useState(''); |
16 | const [userLocation, setUserLocation] = useState(null); | 16 | const [userLocation, setUserLocation] = useState(null); |
17 | + const [errorMsg, setErrorMsg] = useState(null); | ||
17 | 18 | ||
18 | - const onChangeStartLocation = async (startTextLocation) => { | 19 | + const onChangeStartLocation = (startTextLocation) => { |
19 | setStartTextLocation(startTextLocation); | 20 | setStartTextLocation(startTextLocation); |
20 | }; | 21 | }; |
21 | 22 | ||
22 | - const onChangeFinishLocation = (finishTextLocation) => { | 23 | + const onChangeFinishLocation = (endTextLocation) => { |
23 | - setFinishTextLocation(finishTextLocation); | 24 | + setEndTextLocation(endTextLocation); |
24 | }; | 25 | }; |
25 | 26 | ||
26 | const dispatch = useDispatch(); | 27 | const dispatch = useDispatch(); |
28 | + const onSetUserLocation = async () => { | ||
29 | + const {status} = await Location.requestPermissionsAsync(); | ||
30 | + if (status !== 'granted') { | ||
31 | + setErrorMsg('Permission to access location was denied') | ||
32 | + } | ||
33 | + const location = await Location.getCurrentPositionAsync({}); | ||
34 | + setStartTextLocation('현위치'); | ||
35 | + setUserLocation(location); | ||
36 | + console.log(location); | ||
37 | + await dispatch({ | ||
38 | + type: SET_USER_LOC, | ||
39 | + data: { | ||
40 | + userLocation | ||
41 | + } | ||
42 | + }); | ||
43 | + }; | ||
44 | + | ||
27 | const setLocation = async () => { | 45 | const setLocation = async () => { |
28 | - if (!startTextLocation || !finishTextLocation) { | 46 | + if (startTextLocation && startTextLocation !== '현위치') { |
29 | - return | 47 | + console.log(startTextLocation); |
48 | + await dispatch({ | ||
49 | + type: SET_SLOC_REQUEST, | ||
50 | + data: { | ||
51 | + startTextLocation | ||
30 | } | 52 | } |
31 | - console.log(startTextLocation, finishTextLocation); | 53 | + }) |
54 | + } | ||
55 | + | ||
56 | + if (endTextLocation) { | ||
57 | + console.log(endTextLocation); | ||
32 | await dispatch({ | 58 | await dispatch({ |
33 | - type: SET_LOC_REQUEST, | 59 | + type: SET_ELOC_REQUEST, |
34 | data: { | 60 | data: { |
35 | - startTextLocation, | 61 | + endTextLocation |
36 | - finishTextLocation | ||
37 | } | 62 | } |
38 | } | 63 | } |
39 | ) | 64 | ) |
65 | + } | ||
40 | 66 | ||
67 | + Alert.alert( | ||
68 | + 'MAP ROUTE 설정', | ||
69 | + ` 출발지 ${startTextLocation}, 목적지 ${endTextLocation} 맞습니까? `, | ||
70 | + [ | ||
71 | + { | ||
72 | + text: 'Cancel', | ||
73 | + onPress: () => console.log('Cancel Pressed'), | ||
74 | + style: 'cancel', | ||
75 | + }, | ||
76 | + {text: 'OK', onPress: () => console.log('OK Pressed')}, | ||
77 | + ], | ||
78 | + {cancelable: false} | ||
79 | + ); | ||
41 | }; | 80 | }; |
42 | 81 | ||
82 | + | ||
43 | return ( | 83 | return ( |
44 | <View style={styles.container}> | 84 | <View style={styles.container}> |
45 | <View style={styles.input}> | 85 | <View style={styles.input}> |
46 | - <Text style={styles.textStyle}>출발지</Text> | 86 | + <MaterialCommunityIcons color={'red'} name={'map-marker'} size={26}/> |
47 | <TextInput | 87 | <TextInput |
48 | style={styles.inputText} | 88 | style={styles.inputText} |
49 | onChangeText={onChangeStartLocation} | 89 | onChangeText={onChangeStartLocation} |
90 | + value={startTextLocation} | ||
50 | /> | 91 | /> |
51 | - <TouchableOpacity> | 92 | + <TouchableOpacity onPress={onSetUserLocation}> |
52 | - <MaterialCommunityIcons color={'grey'} name={'map-marker'} size={30}/> | 93 | + <MaterialCommunityIcons color={'grey'} name={'crosshairs-gps'} size={30}/> |
53 | </TouchableOpacity> | 94 | </TouchableOpacity> |
54 | 95 | ||
55 | </View> | 96 | </View> |
56 | <View style={styles.input}> | 97 | <View style={styles.input}> |
57 | - <Text style={styles.textStyle}>도착지</Text> | 98 | + <MaterialCommunityIcons color={'blue'} name={'map-marker'} size={26}/> |
58 | <TextInput | 99 | <TextInput |
59 | style={styles.inputText} | 100 | style={styles.inputText} |
60 | onChangeText={onChangeFinishLocation} | 101 | onChangeText={onChangeFinishLocation} |
102 | + value={endTextLocation} | ||
61 | /> | 103 | /> |
62 | </View> | 104 | </View> |
63 | - <View style={{flexDirection: 'row'}}> | 105 | + <View style={{flexDirection: 'row', alignItems: 'center'}}> |
64 | <TouchableOpacity style={styles.buttonStyle} onPress={setLocation}> | 106 | <TouchableOpacity style={styles.buttonStyle} onPress={setLocation}> |
65 | - <Text>MAP설정</Text> | 107 | + <Text>Map설정</Text> |
66 | - </TouchableOpacity> | ||
67 | - <TouchableOpacity style={styles.buttonStyle}> | ||
68 | - <Text>사용자최적경로검색</Text> | ||
69 | </TouchableOpacity> | 108 | </TouchableOpacity> |
70 | </View> | 109 | </View> |
71 | </View> | 110 | </View> |
... | @@ -76,20 +115,23 @@ export default StartAndFinishLocationComponent; | ... | @@ -76,20 +115,23 @@ export default StartAndFinishLocationComponent; |
76 | 115 | ||
77 | const styles = StyleSheet.create({ | 116 | const styles = StyleSheet.create({ |
78 | container: { | 117 | container: { |
118 | + alignItems: 'center', | ||
119 | + marginTop: 50, | ||
79 | marginLeft: 20, | 120 | marginLeft: 20, |
80 | marginRight: 20, | 121 | marginRight: 20, |
122 | + opacity: 0.5, | ||
81 | }, | 123 | }, |
82 | input: { | 124 | input: { |
83 | borderRadius: 10, | 125 | borderRadius: 10, |
84 | - backgroundColor: 'lightgrey', | 126 | + backgroundColor: '#f0f8ff', |
85 | paddingLeft: 10, | 127 | paddingLeft: 10, |
86 | paddingRight: 10, | 128 | paddingRight: 10, |
87 | width: 300, | 129 | width: 300, |
88 | - height: 40, | 130 | + height: 50, |
89 | alignItems: 'center', | 131 | alignItems: 'center', |
90 | flexDirection: 'row', | 132 | flexDirection: 'row', |
91 | justifyContent: 'space-between', | 133 | justifyContent: 'space-between', |
92 | - borderBottomColor: '#bbb', | 134 | + borderBottomColor: '#f0f8ff', |
93 | marginBottom: 10 | 135 | marginBottom: 10 |
94 | // borderBottomWidth: StyleSheet.hairlineWidth, | 136 | // borderBottomWidth: StyleSheet.hairlineWidth, |
95 | }, | 137 | }, |
... | @@ -102,15 +144,15 @@ const styles = StyleSheet.create({ | ... | @@ -102,15 +144,15 @@ const styles = StyleSheet.create({ |
102 | marginRight: 15, | 144 | marginRight: 15, |
103 | }, | 145 | }, |
104 | buttonStyle: { | 146 | buttonStyle: { |
105 | - flex: 1, | 147 | + flex: 0.5, |
106 | - backgroundColor: '#ecf0f1', | 148 | + backgroundColor: '#f0f8ff', |
107 | alignItems: 'center', | 149 | alignItems: 'center', |
108 | justifyContent: 'center', | 150 | justifyContent: 'center', |
109 | - width: 30, | 151 | + width: 10, |
110 | height: 30, | 152 | height: 30, |
111 | borderWidth: 1, | 153 | borderWidth: 1, |
112 | - borderColor: 'black', | 154 | + borderColor: 'grey', |
113 | - marginBottom: 20 | 155 | + marginBottom: 20, |
114 | - | 156 | + borderRadius: 30 |
115 | } | 157 | } |
116 | }); | 158 | }); | ... | ... |
1 | +import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | +import {Text, View, StyleSheet, TouchableOpacity, ScrollView, TextInput} from 'react-native'; | ||
3 | +import {useDispatch, useSelector} from "react-redux"; | ||
4 | +import {useNavigation} from '@react-navigation/native'; | ||
5 | +import styled from "styled-components"; | ||
6 | +import {MaterialCommunityIcons, AntDesign} from '@expo/vector-icons'; | ||
7 | + | ||
8 | + | ||
9 | +const Banner = styled.View` | ||
10 | + flex: 1; | ||
11 | + margin-left: 15px; | ||
12 | + margin-bottom: 5px; | ||
13 | + width: 3px; | ||
14 | + height: 3px; | ||
15 | + border-radius: 20px; | ||
16 | + border: 3px solid grey; | ||
17 | + | ||
18 | +`; | ||
19 | + | ||
20 | + | ||
21 | +const WalkPathComponent = (props) => { | ||
22 | + const navigation = useNavigation(); | ||
23 | + const [walkPath, setWalkPath] = useState(null); | ||
24 | + const {pathDetail} = props; | ||
25 | + | ||
26 | + useEffect(() => { | ||
27 | + console.log(props.pathDetail.distance); | ||
28 | + setWalkPath(props.pathDetail); | ||
29 | + }, []); | ||
30 | + | ||
31 | + return ( | ||
32 | + <ScrollView> | ||
33 | + <View style={{flexDirection: 'row', flex: 5}}> | ||
34 | + <View style={styles.pathType}> | ||
35 | + <MaterialCommunityIcons style={{flex: 1}} color={'darkgrey'} name={'walk'} size={20}/> | ||
36 | + <Text style={{flex: 1, fontSize: 13}}>{pathDetail.time}분</Text> | ||
37 | + </View> | ||
38 | + <View style={{flex: 1}}> | ||
39 | + <Banner/> | ||
40 | + <Banner/> | ||
41 | + <Banner/> | ||
42 | + <Banner/> | ||
43 | + <Banner/> | ||
44 | + <Banner/> | ||
45 | + <Banner/> | ||
46 | + </View> | ||
47 | + <View style={styles.inputTile}> | ||
48 | + <Text style={styles.inputText}> 도보 {pathDetail.distance}m 이동</Text> | ||
49 | + </View> | ||
50 | + </View> | ||
51 | + </ScrollView> | ||
52 | + ); | ||
53 | +} | ||
54 | +export default WalkPathComponent; | ||
55 | + | ||
56 | +const styles = StyleSheet.create({ | ||
57 | + inputTile: { | ||
58 | + flex: 4, | ||
59 | + justifyContent: 'center', | ||
60 | + color: 'grey', | ||
61 | + }, | ||
62 | + inputText: { | ||
63 | + fontWeight: 'normal', | ||
64 | + fontSize: 15, | ||
65 | + }, | ||
66 | + pathType: { | ||
67 | + flexDirection: 'column', | ||
68 | + flex: 0.4, | ||
69 | + alignItems: 'center', | ||
70 | + justifyContent: 'center', | ||
71 | + marginLeft: 5, | ||
72 | + marginTop: 10, | ||
73 | + } | ||
74 | +}) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | import React, {userLayoutEffect} from 'react'; | 1 | import React, {userLayoutEffect} from 'react'; |
2 | import {createStackNavigator} from "@react-navigation/stack"; | 2 | import {createStackNavigator} from "@react-navigation/stack"; |
3 | -import TabNavigation from "./TabNavigation"; | ||
4 | import SelectOrTakePhotoTabNavigation from "./SelectOrTakePhotoTabNavigation"; | 3 | import SelectOrTakePhotoTabNavigation from "./SelectOrTakePhotoTabNavigation"; |
5 | import UploadPhoto from "../screens/UploadPhoto"; | 4 | import UploadPhoto from "../screens/UploadPhoto"; |
6 | 5 | ||
7 | const Stack = createStackNavigator(); | 6 | const Stack = createStackNavigator(); |
8 | 7 | ||
9 | -const SelectOrTakePhotoStackNavigation = () =>{ | 8 | +const SelectOrTakePhotoStackNavigation = () => { |
10 | return ( | 9 | return ( |
11 | <Stack.Navigator | 10 | <Stack.Navigator |
12 | mode='card' | 11 | mode='card' |
13 | - | 12 | + screenOptions={{ |
13 | + headerShown: false | ||
14 | + }} | ||
14 | > | 15 | > |
15 | <Stack.Screen | 16 | <Stack.Screen |
16 | name='SelectOrTakePhotoTabNavigation' | 17 | name='SelectOrTakePhotoTabNavigation' | ... | ... |
1 | +import React, {userLayoutEffect} from 'react'; | ||
2 | +import {createStackNavigator} from "@react-navigation/stack"; | ||
3 | +import SetLocationTabNavigation from "./SetLocationTabNavigation"; | ||
4 | +import GoPathDetail from "../screens/GoPathDetail"; | ||
5 | +import OptRoutePath from "../screens/OptRoutePath"; | ||
6 | + | ||
7 | +const Stack = createStackNavigator(); | ||
8 | + | ||
9 | +const SetLocationStackNavigation = () => { | ||
10 | + return ( | ||
11 | + <Stack.Navigator | ||
12 | + mode='card' | ||
13 | + screenOptions={{ | ||
14 | + headerShown: false | ||
15 | + }} | ||
16 | + > | ||
17 | + <Stack.Screen | ||
18 | + name='SetLocationTabNavigation' | ||
19 | + component={SetLocationTabNavigation} | ||
20 | + /> | ||
21 | + | ||
22 | + <Stack.Screen | ||
23 | + name='GoPathDetail' | ||
24 | + component={GoPathDetail} | ||
25 | + /> | ||
26 | + | ||
27 | + </Stack.Navigator> | ||
28 | + | ||
29 | + ) | ||
30 | +}; | ||
31 | + | ||
32 | +export default SetLocationStackNavigation; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +import React, {useLayoutEffect} from 'react'; | ||
2 | +import {Ionicons} from "@expo/vector-icons"; | ||
3 | +import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; | ||
4 | +import Maps from "../screens/Maps"; | ||
5 | +import OptRoutePath from "../screens/OptRoutePath"; | ||
6 | + | ||
7 | +const Tab = createBottomTabNavigator(); | ||
8 | + | ||
9 | +const SetLocationTabNavigation = (props) => { | ||
10 | + const {navigation, route} = props; | ||
11 | + // useLayoutEffect(() => {}, [route]); | ||
12 | + | ||
13 | + return ( | ||
14 | + <Tab.Navigator | ||
15 | + tabBarOptions={{}} | ||
16 | + > | ||
17 | + <Tab.Screen | ||
18 | + name='Maps' | ||
19 | + component={Maps} | ||
20 | + /> | ||
21 | + | ||
22 | + <Tab.Screen | ||
23 | + name='OptRoutePath' | ||
24 | + component={OptRoutePath} | ||
25 | + /> | ||
26 | + | ||
27 | + </Tab.Navigator> | ||
28 | + ) | ||
29 | +}; | ||
30 | + | ||
31 | +export default SetLocationTabNavigation; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | import React from 'react'; | 1 | import React from 'react'; |
2 | import {createStackNavigator} from "@react-navigation/stack"; | 2 | import {createStackNavigator} from "@react-navigation/stack"; |
3 | import Gallery from "../screens/Gallery"; | 3 | import Gallery from "../screens/Gallery"; |
4 | +import Maps from "../screens/Maps"; | ||
4 | import Main from "../screens/Main"; | 5 | import Main from "../screens/Main"; |
5 | import TabNavigation from "./TabNavigation"; | 6 | import TabNavigation from "./TabNavigation"; |
6 | import {TouchableOpacity} from "react-native"; | 7 | import {TouchableOpacity} from "react-native"; |
7 | -// import * as WebBrowser from 'expo-web-browser'; | 8 | +import {MaterialCommunityIcons} from "@expo/vector-icons"; |
8 | -import {Ionicons} from "@expo/vector-icons"; | ||
9 | import SelectOrTakePhotoStackNavigation from "./SelectOrTakePhotoStackNavigation"; | 9 | import SelectOrTakePhotoStackNavigation from "./SelectOrTakePhotoStackNavigation"; |
10 | - | 10 | +import SetLocationStackNavigation from "./SetLocationStackNavigation"; |
11 | +import Profile from "../screens/Profile"; | ||
12 | +import Login from "../screens/Login"; | ||
13 | +import SignUp from "../screens/SignUp"; | ||
11 | 14 | ||
12 | const Stack = createStackNavigator(); | 15 | const Stack = createStackNavigator(); |
13 | // | 16 | // |
... | @@ -15,15 +18,16 @@ const Stack = createStackNavigator(); | ... | @@ -15,15 +18,16 @@ const Stack = createStackNavigator(); |
15 | // await WebBrowser.openBrowserAsync(url); | 18 | // await WebBrowser.openBrowserAsync(url); |
16 | // }; | 19 | // }; |
17 | 20 | ||
18 | -const StackNavigation = () =>{ | 21 | +const StackNavigation = () => { |
19 | return ( | 22 | return ( |
20 | <Stack.Navigator | 23 | <Stack.Navigator |
21 | mode='card' | 24 | mode='card' |
22 | - screenOptions = {{ | 25 | + screenOptions={{ |
26 | + headerTitle: 'SGGO', | ||
23 | headerRight: () => { | 27 | headerRight: () => { |
24 | return ( | 28 | return ( |
25 | - <TouchableOpacity> | 29 | + <TouchableOpacity style={{marginRight: 5}}> |
26 | - <Ionicons name={'logo-youtube'} color={'red'} size={25}/> | 30 | + <MaterialCommunityIcons color={'grey'} name={'send'} size={24}/> |
27 | </TouchableOpacity> | 31 | </TouchableOpacity> |
28 | ) | 32 | ) |
29 | } | 33 | } |
... | @@ -38,9 +42,27 @@ const StackNavigation = () =>{ | ... | @@ -38,9 +42,27 @@ const StackNavigation = () =>{ |
38 | component={SelectOrTakePhotoStackNavigation} | 42 | component={SelectOrTakePhotoStackNavigation} |
39 | /> | 43 | /> |
40 | <Stack.Screen | 44 | <Stack.Screen |
45 | + name='SetLocationStackNavigation' | ||
46 | + component={SetLocationStackNavigation} | ||
47 | + /> | ||
48 | + <Stack.Screen | ||
49 | + name='Maps' | ||
50 | + component={Maps} | ||
51 | + /> | ||
52 | + <Stack.Screen | ||
41 | name='Gallery' | 53 | name='Gallery' |
42 | component={Gallery} | 54 | component={Gallery} |
43 | /> | 55 | /> |
56 | + | ||
57 | + <Stack.Screen | ||
58 | + name='Login' | ||
59 | + component={Login} | ||
60 | + /> | ||
61 | + | ||
62 | + <Stack.Screen | ||
63 | + name='SignUp' | ||
64 | + component={SignUp} | ||
65 | + /> | ||
44 | </Stack.Navigator> | 66 | </Stack.Navigator> |
45 | ) | 67 | ) |
46 | }; | 68 | }; | ... | ... |
... | @@ -4,14 +4,11 @@ import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; | ... | @@ -4,14 +4,11 @@ import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; |
4 | import Main from "../screens/Main"; | 4 | import Main from "../screens/Main"; |
5 | import Login from "../screens/Login"; | 5 | import Login from "../screens/Login"; |
6 | import Profile from "../screens/Profile"; | 6 | import Profile from "../screens/Profile"; |
7 | +import LocationTimeSet from "../screens/LocationTimeSet"; | ||
7 | import Maps from "../screens/Maps"; | 8 | import Maps from "../screens/Maps"; |
8 | 9 | ||
9 | - | ||
10 | const Tab = createBottomTabNavigator(); | 10 | const Tab = createBottomTabNavigator(); |
11 | 11 | ||
12 | -const getHeaderName = (route) => { | ||
13 | -}; | ||
14 | - | ||
15 | const TabNavigation = (props) => { | 12 | const TabNavigation = (props) => { |
16 | const {navigation, route} = props; | 13 | const {navigation, route} = props; |
17 | // useLayoutEffect(() => {}, [route]); | 14 | // useLayoutEffect(() => {}, [route]); |
... | @@ -19,12 +16,8 @@ const TabNavigation = (props) => { | ... | @@ -19,12 +16,8 @@ const TabNavigation = (props) => { |
19 | return ( | 16 | return ( |
20 | <Tab.Navigator | 17 | <Tab.Navigator |
21 | // screenOptions = {({route})=>{}} | 18 | // screenOptions = {({route})=>{}} |
22 | - tabBarOptions = {{}} | 19 | + tabBarOptions={{}} |
23 | > | 20 | > |
24 | - <Tab.Screen | ||
25 | - name='main' | ||
26 | - component={Main} | ||
27 | - /> | ||
28 | 21 | ||
29 | <Tab.Screen | 22 | <Tab.Screen |
30 | name='login' | 23 | name='login' |
... | @@ -32,8 +25,8 @@ const TabNavigation = (props) => { | ... | @@ -32,8 +25,8 @@ const TabNavigation = (props) => { |
32 | /> | 25 | /> |
33 | 26 | ||
34 | <Tab.Screen | 27 | <Tab.Screen |
35 | - name='maps' | 28 | + name='LocationTimeSet' |
36 | - component={Maps} | 29 | + component={LocationTimeSet} |
37 | /> | 30 | /> |
38 | 31 | ||
39 | <Tab.Screen | 32 | <Tab.Screen | ... | ... |
... | @@ -1241,6 +1241,14 @@ | ... | @@ -1241,6 +1241,14 @@ |
1241 | "resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-3.0.0.tgz", | 1241 | "resolved": "https://registry.npmjs.org/@react-native-community/cli-types/-/cli-types-3.0.0.tgz", |
1242 | "integrity": "sha512-ng6Tm537E/M42GjE4TRUxQyL8sRfClcL7bQWblOCoxPZzJ2J3bdALsjeG3vDnVCIfI/R0AeFalN9KjMt0+Z/Zg==" | 1242 | "integrity": "sha512-ng6Tm537E/M42GjE4TRUxQyL8sRfClcL7bQWblOCoxPZzJ2J3bdALsjeG3vDnVCIfI/R0AeFalN9KjMt0+Z/Zg==" |
1243 | }, | 1243 | }, |
1244 | + "@react-native-community/datetimepicker": { | ||
1245 | + "version": "2.2.2", | ||
1246 | + "resolved": "https://registry.npmjs.org/@react-native-community/datetimepicker/-/datetimepicker-2.2.2.tgz", | ||
1247 | + "integrity": "sha512-J4Z1tuZQszLR+BNu+UusZlK6/S+CpI6AHzolqTdPS2tRlyVbVim3KyjXrn8trtKxQncR5LEqF9OHw9zsRfEdXA==", | ||
1248 | + "requires": { | ||
1249 | + "invariant": "^2.2.4" | ||
1250 | + } | ||
1251 | + }, | ||
1244 | "@react-native-community/masked-view": { | 1252 | "@react-native-community/masked-view": { |
1245 | "version": "0.1.6", | 1253 | "version": "0.1.6", |
1246 | "resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.6.tgz", | 1254 | "resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.6.tgz", |
... | @@ -2017,6 +2025,11 @@ | ... | @@ -2017,6 +2025,11 @@ |
2017 | "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", | 2025 | "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", |
2018 | "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" | 2026 | "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==" |
2019 | }, | 2027 | }, |
2028 | + "clamp": { | ||
2029 | + "version": "1.0.1", | ||
2030 | + "resolved": "https://registry.npmjs.org/clamp/-/clamp-1.0.1.tgz", | ||
2031 | + "integrity": "sha1-ZqDmQBGBbjcZaCj9yMjBRzEshjQ=" | ||
2032 | + }, | ||
2020 | "class-utils": { | 2033 | "class-utils": { |
2021 | "version": "0.3.6", | 2034 | "version": "0.3.6", |
2022 | "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", | 2035 | "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", |
... | @@ -2512,6 +2525,11 @@ | ... | @@ -2512,6 +2525,11 @@ |
2512 | "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.413.tgz", | 2525 | "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.413.tgz", |
2513 | "integrity": "sha512-Jm1Rrd3siqYHO3jftZwDljL2LYQafj3Kki5r+udqE58d0i91SkjItVJ5RwlJn9yko8i7MOcoidVKjQlgSdd1hg==" | 2526 | "integrity": "sha512-Jm1Rrd3siqYHO3jftZwDljL2LYQafj3Kki5r+udqE58d0i91SkjItVJ5RwlJn9yko8i7MOcoidVKjQlgSdd1hg==" |
2514 | }, | 2527 | }, |
2528 | + "emoji-regex": { | ||
2529 | + "version": "7.0.3", | ||
2530 | + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", | ||
2531 | + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" | ||
2532 | + }, | ||
2515 | "encodeurl": { | 2533 | "encodeurl": { |
2516 | "version": "1.0.2", | 2534 | "version": "1.0.2", |
2517 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", | 2535 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", |
... | @@ -2565,6 +2583,14 @@ | ... | @@ -2565,6 +2583,14 @@ |
2565 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", | 2583 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", |
2566 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" | 2584 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" |
2567 | }, | 2585 | }, |
2586 | + "eslint-config-prettier": { | ||
2587 | + "version": "6.11.0", | ||
2588 | + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", | ||
2589 | + "integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==", | ||
2590 | + "requires": { | ||
2591 | + "get-stdin": "^6.0.0" | ||
2592 | + } | ||
2593 | + }, | ||
2568 | "esprima": { | 2594 | "esprima": { |
2569 | "version": "4.0.1", | 2595 | "version": "4.0.1", |
2570 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", | 2596 | "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", |
... | @@ -3649,6 +3675,11 @@ | ... | @@ -3649,6 +3675,11 @@ |
3649 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", | 3675 | "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", |
3650 | "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" | 3676 | "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" |
3651 | }, | 3677 | }, |
3678 | + "get-stdin": { | ||
3679 | + "version": "6.0.0", | ||
3680 | + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", | ||
3681 | + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==" | ||
3682 | + }, | ||
3652 | "get-stream": { | 3683 | "get-stream": { |
3653 | "version": "4.1.0", | 3684 | "version": "4.1.0", |
3654 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", | 3685 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", |
... | @@ -3690,6 +3721,21 @@ | ... | @@ -3690,6 +3721,21 @@ |
3690 | "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", | 3721 | "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", |
3691 | "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" | 3722 | "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" |
3692 | }, | 3723 | }, |
3724 | + "has-ansi": { | ||
3725 | + "version": "2.0.0", | ||
3726 | + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", | ||
3727 | + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", | ||
3728 | + "requires": { | ||
3729 | + "ansi-regex": "^2.0.0" | ||
3730 | + }, | ||
3731 | + "dependencies": { | ||
3732 | + "ansi-regex": { | ||
3733 | + "version": "2.1.1", | ||
3734 | + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", | ||
3735 | + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" | ||
3736 | + } | ||
3737 | + } | ||
3738 | + }, | ||
3693 | "has-flag": { | 3739 | "has-flag": { |
3694 | "version": "3.0.0", | 3740 | "version": "3.0.0", |
3695 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", | 3741 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", |
... | @@ -4075,6 +4121,11 @@ | ... | @@ -4075,6 +4121,11 @@ |
4075 | "@jest/types": "^24.9.0" | 4121 | "@jest/types": "^24.9.0" |
4076 | } | 4122 | } |
4077 | }, | 4123 | }, |
4124 | + "jest-react-native": { | ||
4125 | + "version": "18.0.0", | ||
4126 | + "resolved": "https://registry.npmjs.org/jest-react-native/-/jest-react-native-18.0.0.tgz", | ||
4127 | + "integrity": "sha1-d92QnwaTJFmfInxYxhwuYhaHJro=" | ||
4128 | + }, | ||
4078 | "jest-serializer": { | 4129 | "jest-serializer": { |
4079 | "version": "24.9.0", | 4130 | "version": "24.9.0", |
4080 | "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz", | 4131 | "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-24.9.0.tgz", |
... | @@ -4934,6 +4985,11 @@ | ... | @@ -4934,6 +4985,11 @@ |
4934 | "minimist": "^1.2.5" | 4985 | "minimist": "^1.2.5" |
4935 | } | 4986 | } |
4936 | }, | 4987 | }, |
4988 | + "moment": { | ||
4989 | + "version": "2.26.0", | ||
4990 | + "resolved": "https://registry.npmjs.org/moment/-/moment-2.26.0.tgz", | ||
4991 | + "integrity": "sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw==" | ||
4992 | + }, | ||
4937 | "morgan": { | 4993 | "morgan": { |
4938 | "version": "1.10.0", | 4994 | "version": "1.10.0", |
4939 | "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", | 4995 | "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", |
... | @@ -5005,6 +5061,68 @@ | ... | @@ -5005,6 +5061,68 @@ |
5005 | "to-regex": "^3.0.1" | 5061 | "to-regex": "^3.0.1" |
5006 | } | 5062 | } |
5007 | }, | 5063 | }, |
5064 | + "native-base": { | ||
5065 | + "version": "2.13.12", | ||
5066 | + "resolved": "https://registry.npmjs.org/native-base/-/native-base-2.13.12.tgz", | ||
5067 | + "integrity": "sha512-LdKGNXisbmQ0vDHG86McZKIFTlRyo+OQdJpqmQ05Yf7CGlMbBykJZCFe9rdiee5pLq20xiChe/jXbzFdWcysrg==", | ||
5068 | + "requires": { | ||
5069 | + "blueimp-md5": "^2.5.0", | ||
5070 | + "clamp": "^1.0.1", | ||
5071 | + "color": "~3.1.2", | ||
5072 | + "create-react-class": "^15.6.3", | ||
5073 | + "eslint-config-prettier": "^6.0.0", | ||
5074 | + "fs-extra": "^2.0.0", | ||
5075 | + "jest-react-native": "^18.0.0", | ||
5076 | + "lodash": "^4.17.14", | ||
5077 | + "native-base-shoutem-theme": "0.3.1", | ||
5078 | + "opencollective-postinstall": "^2.0.2", | ||
5079 | + "print-message": "^2.1.0", | ||
5080 | + "prop-types": "^15.5.10", | ||
5081 | + "react-native-drawer": "2.5.1", | ||
5082 | + "react-native-easy-grid": "0.2.2", | ||
5083 | + "react-native-keyboard-aware-scroll-view": "0.9.1", | ||
5084 | + "react-native-vector-icons": "^6.6.0", | ||
5085 | + "react-timer-mixin": "^0.13.4", | ||
5086 | + "react-tween-state": "^0.1.5", | ||
5087 | + "tween-functions": "^1.0.1" | ||
5088 | + }, | ||
5089 | + "dependencies": { | ||
5090 | + "fs-extra": { | ||
5091 | + "version": "2.1.2", | ||
5092 | + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", | ||
5093 | + "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", | ||
5094 | + "requires": { | ||
5095 | + "graceful-fs": "^4.1.2", | ||
5096 | + "jsonfile": "^2.1.0" | ||
5097 | + } | ||
5098 | + }, | ||
5099 | + "jsonfile": { | ||
5100 | + "version": "2.4.0", | ||
5101 | + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", | ||
5102 | + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", | ||
5103 | + "requires": { | ||
5104 | + "graceful-fs": "^4.1.6" | ||
5105 | + } | ||
5106 | + } | ||
5107 | + } | ||
5108 | + }, | ||
5109 | + "native-base-shoutem-theme": { | ||
5110 | + "version": "0.3.1", | ||
5111 | + "resolved": "https://registry.npmjs.org/native-base-shoutem-theme/-/native-base-shoutem-theme-0.3.1.tgz", | ||
5112 | + "integrity": "sha512-uwEGhg6gwDuJTHuhNXRKbHtNjni1UI9qfAsVchIqfK7mQAHSNPVU1QRs9Hw6O2K/qLZaP/aJmNoZGc2h2EGSwA==", | ||
5113 | + "requires": { | ||
5114 | + "hoist-non-react-statics": "^1.0.5", | ||
5115 | + "lodash": "^4.17.14", | ||
5116 | + "prop-types": "^15.5.10" | ||
5117 | + }, | ||
5118 | + "dependencies": { | ||
5119 | + "hoist-non-react-statics": { | ||
5120 | + "version": "1.2.0", | ||
5121 | + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz", | ||
5122 | + "integrity": "sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs=" | ||
5123 | + } | ||
5124 | + } | ||
5125 | + }, | ||
5008 | "negotiator": { | 5126 | "negotiator": { |
5009 | "version": "0.6.2", | 5127 | "version": "0.6.2", |
5010 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", | 5128 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", |
... | @@ -5034,6 +5152,31 @@ | ... | @@ -5034,6 +5152,31 @@ |
5034 | "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", | 5152 | "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", |
5035 | "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=" | 5153 | "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=" |
5036 | }, | 5154 | }, |
5155 | + "node-nikerunclub": { | ||
5156 | + "version": "1.0.0", | ||
5157 | + "resolved": "https://registry.npmjs.org/node-nikerunclub/-/node-nikerunclub-1.0.0.tgz", | ||
5158 | + "integrity": "sha512-RrSHyIYADyvEiR6rSktkcfybzJ/4xFfGZHYMsqLvxX1zcTcQSuv6RXemqDhF6FEMXHFkMQeemZVjbOHEo8z/tw==", | ||
5159 | + "requires": { | ||
5160 | + "axios": "^0.18.0", | ||
5161 | + "qs": "^6.5.2" | ||
5162 | + }, | ||
5163 | + "dependencies": { | ||
5164 | + "axios": { | ||
5165 | + "version": "0.18.1", | ||
5166 | + "resolved": "https://registry.npmjs.org/axios/-/axios-0.18.1.tgz", | ||
5167 | + "integrity": "sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g==", | ||
5168 | + "requires": { | ||
5169 | + "follow-redirects": "1.5.10", | ||
5170 | + "is-buffer": "^2.0.2" | ||
5171 | + } | ||
5172 | + }, | ||
5173 | + "is-buffer": { | ||
5174 | + "version": "2.0.4", | ||
5175 | + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", | ||
5176 | + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==" | ||
5177 | + } | ||
5178 | + } | ||
5179 | + }, | ||
5037 | "node-notifier": { | 5180 | "node-notifier": { |
5038 | "version": "5.4.3", | 5181 | "version": "5.4.3", |
5039 | "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", | 5182 | "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", |
... | @@ -5232,6 +5375,11 @@ | ... | @@ -5232,6 +5375,11 @@ |
5232 | "is-wsl": "^1.1.0" | 5375 | "is-wsl": "^1.1.0" |
5233 | } | 5376 | } |
5234 | }, | 5377 | }, |
5378 | + "opencollective-postinstall": { | ||
5379 | + "version": "2.0.3", | ||
5380 | + "resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz", | ||
5381 | + "integrity": "sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==" | ||
5382 | + }, | ||
5235 | "options": { | 5383 | "options": { |
5236 | "version": "0.0.6", | 5384 | "version": "0.0.6", |
5237 | "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", | 5385 | "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", |
... | @@ -5396,6 +5544,11 @@ | ... | @@ -5396,6 +5544,11 @@ |
5396 | } | 5544 | } |
5397 | } | 5545 | } |
5398 | }, | 5546 | }, |
5547 | + "performance-now": { | ||
5548 | + "version": "2.1.0", | ||
5549 | + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", | ||
5550 | + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" | ||
5551 | + }, | ||
5399 | "pify": { | 5552 | "pify": { |
5400 | "version": "4.0.1", | 5553 | "version": "4.0.1", |
5401 | "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", | 5554 | "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", |
... | @@ -5545,6 +5698,51 @@ | ... | @@ -5545,6 +5698,51 @@ |
5545 | "ansi-styles": "^3.2.0" | 5698 | "ansi-styles": "^3.2.0" |
5546 | } | 5699 | } |
5547 | }, | 5700 | }, |
5701 | + "print-message": { | ||
5702 | + "version": "2.1.0", | ||
5703 | + "resolved": "https://registry.npmjs.org/print-message/-/print-message-2.1.0.tgz", | ||
5704 | + "integrity": "sha1-tViO0IsOG/d6x7y1y3gASvr5qJE=", | ||
5705 | + "requires": { | ||
5706 | + "chalk": "1.1.1" | ||
5707 | + }, | ||
5708 | + "dependencies": { | ||
5709 | + "ansi-regex": { | ||
5710 | + "version": "2.1.1", | ||
5711 | + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", | ||
5712 | + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" | ||
5713 | + }, | ||
5714 | + "ansi-styles": { | ||
5715 | + "version": "2.2.1", | ||
5716 | + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", | ||
5717 | + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" | ||
5718 | + }, | ||
5719 | + "chalk": { | ||
5720 | + "version": "1.1.1", | ||
5721 | + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.1.tgz", | ||
5722 | + "integrity": "sha1-UJr7ZwZudJn36zU1x3RFdyri0Bk=", | ||
5723 | + "requires": { | ||
5724 | + "ansi-styles": "^2.1.0", | ||
5725 | + "escape-string-regexp": "^1.0.2", | ||
5726 | + "has-ansi": "^2.0.0", | ||
5727 | + "strip-ansi": "^3.0.0", | ||
5728 | + "supports-color": "^2.0.0" | ||
5729 | + } | ||
5730 | + }, | ||
5731 | + "strip-ansi": { | ||
5732 | + "version": "3.0.1", | ||
5733 | + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", | ||
5734 | + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", | ||
5735 | + "requires": { | ||
5736 | + "ansi-regex": "^2.0.0" | ||
5737 | + } | ||
5738 | + }, | ||
5739 | + "supports-color": { | ||
5740 | + "version": "2.0.0", | ||
5741 | + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", | ||
5742 | + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" | ||
5743 | + } | ||
5744 | + } | ||
5745 | + }, | ||
5548 | "private": { | 5746 | "private": { |
5549 | "version": "0.1.8", | 5747 | "version": "0.1.8", |
5550 | "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", | 5748 | "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", |
... | @@ -5607,6 +5805,14 @@ | ... | @@ -5607,6 +5805,14 @@ |
5607 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", | 5805 | "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.1.1.tgz", |
5608 | "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==" | 5806 | "integrity": "sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA==" |
5609 | }, | 5807 | }, |
5808 | + "raf": { | ||
5809 | + "version": "3.4.1", | ||
5810 | + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", | ||
5811 | + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", | ||
5812 | + "requires": { | ||
5813 | + "performance-now": "^2.1.0" | ||
5814 | + } | ||
5815 | + }, | ||
5610 | "range-parser": { | 5816 | "range-parser": { |
5611 | "version": "1.2.1", | 5817 | "version": "1.2.1", |
5612 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", | 5818 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", |
... | @@ -5936,6 +6142,33 @@ | ... | @@ -5936,6 +6142,33 @@ |
5936 | } | 6142 | } |
5937 | } | 6143 | } |
5938 | }, | 6144 | }, |
6145 | + "react-native-bottom-action-sheet": { | ||
6146 | + "version": "2.0.1", | ||
6147 | + "resolved": "https://registry.npmjs.org/react-native-bottom-action-sheet/-/react-native-bottom-action-sheet-2.0.1.tgz", | ||
6148 | + "integrity": "sha512-7IUgBjYhub0OR/3vq6FybjXIURBXaoI1oYZRhRzyO/6wfad3hjh9J5ZZjtoNaXgFZfXT/94JPS1fdaBBN5t35A==" | ||
6149 | + }, | ||
6150 | + "react-native-drawer": { | ||
6151 | + "version": "2.5.1", | ||
6152 | + "resolved": "https://registry.npmjs.org/react-native-drawer/-/react-native-drawer-2.5.1.tgz", | ||
6153 | + "integrity": "sha512-cxcQNbSWy5sbGi7anSVp6EDr6JarOBMY9lbFOeLFeVYbONiudoqRKbgEsSDgSw3/LFCLvUXK5zdjXCOedeytxQ==", | ||
6154 | + "requires": { | ||
6155 | + "prop-types": "^15.5.8", | ||
6156 | + "tween-functions": "^1.0.1" | ||
6157 | + } | ||
6158 | + }, | ||
6159 | + "react-native-easy-grid": { | ||
6160 | + "version": "0.2.2", | ||
6161 | + "resolved": "https://registry.npmjs.org/react-native-easy-grid/-/react-native-easy-grid-0.2.2.tgz", | ||
6162 | + "integrity": "sha512-MlYrNIldnEMKn6TVatQN1P64GoVlwGIuz+8ncdfJ0Wq/xtzUkQwlil8Uksyp7MhKfENE09MQnGNcba6Mx3oSAA==", | ||
6163 | + "requires": { | ||
6164 | + "lodash": "^4.17.15" | ||
6165 | + } | ||
6166 | + }, | ||
6167 | + "react-native-fast-image": { | ||
6168 | + "version": "8.1.5", | ||
6169 | + "resolved": "https://registry.npmjs.org/react-native-fast-image/-/react-native-fast-image-8.1.5.tgz", | ||
6170 | + "integrity": "sha512-DoAWGLeQ2hbllummrpXH9B38OgM0TFmNYCF34F90/hdHZirqUtYHzF4QDdb/NV7ebSijHmM3mpkzct8PXtcYyg==" | ||
6171 | + }, | ||
5939 | "react-native-gesture-handler": { | 6172 | "react-native-gesture-handler": { |
5940 | "version": "1.6.1", | 6173 | "version": "1.6.1", |
5941 | "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.6.1.tgz", | 6174 | "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-1.6.1.tgz", |
... | @@ -5959,6 +6192,20 @@ | ... | @@ -5959,6 +6192,20 @@ |
5959 | "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz", | 6192 | "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz", |
5960 | "integrity": "sha512-/VbpIEp8tSNNHIvstuA3Swx610whci1Zpc9mqNkqn14DkMbw+ORviln2u0XyHG1kPvvwTNGZY6QpeFwxYaSdbQ==" | 6193 | "integrity": "sha512-/VbpIEp8tSNNHIvstuA3Swx610whci1Zpc9mqNkqn14DkMbw+ORviln2u0XyHG1kPvvwTNGZY6QpeFwxYaSdbQ==" |
5961 | }, | 6194 | }, |
6195 | + "react-native-keyboard-aware-scroll-view": { | ||
6196 | + "version": "0.9.1", | ||
6197 | + "resolved": "https://registry.npmjs.org/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.9.1.tgz", | ||
6198 | + "integrity": "sha512-tBZ8rmjELN0F6t5UBp5CW3NYmZXgVnJSzVCssv/OqG2t6kiB+OUTqxNvUP24K+HARX4H+XaW0aEJSFQkQCv6KA==", | ||
6199 | + "requires": { | ||
6200 | + "prop-types": "^15.6.2", | ||
6201 | + "react-native-iphone-x-helper": "^1.0.3" | ||
6202 | + } | ||
6203 | + }, | ||
6204 | + "react-native-maps": { | ||
6205 | + "version": "0.26.1", | ||
6206 | + "resolved": "https://registry.npmjs.org/react-native-maps/-/react-native-maps-0.26.1.tgz", | ||
6207 | + "integrity": "sha512-p4VTB8YB5ZmOmDRCUpoHZkm05amZwhIo04AJMBbB9+JAR2PNNfpo0vceoWX0Mag4wnePkdzPomeWMplr/wimTg==" | ||
6208 | + }, | ||
5962 | "react-native-reanimated": { | 6209 | "react-native-reanimated": { |
5963 | "version": "1.7.1", | 6210 | "version": "1.7.1", |
5964 | "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.7.1.tgz", | 6211 | "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-1.7.1.tgz", |
... | @@ -5980,6 +6227,127 @@ | ... | @@ -5980,6 +6227,127 @@ |
5980 | "debounce": "^1.2.0" | 6227 | "debounce": "^1.2.0" |
5981 | } | 6228 | } |
5982 | }, | 6229 | }, |
6230 | + "react-native-vector-icons": { | ||
6231 | + "version": "6.6.0", | ||
6232 | + "resolved": "https://registry.npmjs.org/react-native-vector-icons/-/react-native-vector-icons-6.6.0.tgz", | ||
6233 | + "integrity": "sha512-MImKVx8JEvVVBnaShMr7/yTX4Y062JZMupht1T+IEgbqBj4aQeQ1z2SH4VHWKNtWtppk4kz9gYyUiMWqx6tNSw==", | ||
6234 | + "requires": { | ||
6235 | + "lodash": "^4.0.0", | ||
6236 | + "prop-types": "^15.6.2", | ||
6237 | + "yargs": "^13.2.2" | ||
6238 | + }, | ||
6239 | + "dependencies": { | ||
6240 | + "cliui": { | ||
6241 | + "version": "5.0.0", | ||
6242 | + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", | ||
6243 | + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", | ||
6244 | + "requires": { | ||
6245 | + "string-width": "^3.1.0", | ||
6246 | + "strip-ansi": "^5.2.0", | ||
6247 | + "wrap-ansi": "^5.1.0" | ||
6248 | + } | ||
6249 | + }, | ||
6250 | + "find-up": { | ||
6251 | + "version": "3.0.0", | ||
6252 | + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", | ||
6253 | + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", | ||
6254 | + "requires": { | ||
6255 | + "locate-path": "^3.0.0" | ||
6256 | + } | ||
6257 | + }, | ||
6258 | + "get-caller-file": { | ||
6259 | + "version": "2.0.5", | ||
6260 | + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", | ||
6261 | + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" | ||
6262 | + }, | ||
6263 | + "locate-path": { | ||
6264 | + "version": "3.0.0", | ||
6265 | + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", | ||
6266 | + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", | ||
6267 | + "requires": { | ||
6268 | + "p-locate": "^3.0.0", | ||
6269 | + "path-exists": "^3.0.0" | ||
6270 | + } | ||
6271 | + }, | ||
6272 | + "p-limit": { | ||
6273 | + "version": "2.3.0", | ||
6274 | + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", | ||
6275 | + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", | ||
6276 | + "requires": { | ||
6277 | + "p-try": "^2.0.0" | ||
6278 | + } | ||
6279 | + }, | ||
6280 | + "p-locate": { | ||
6281 | + "version": "3.0.0", | ||
6282 | + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", | ||
6283 | + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", | ||
6284 | + "requires": { | ||
6285 | + "p-limit": "^2.0.0" | ||
6286 | + } | ||
6287 | + }, | ||
6288 | + "p-try": { | ||
6289 | + "version": "2.2.0", | ||
6290 | + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", | ||
6291 | + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" | ||
6292 | + }, | ||
6293 | + "require-main-filename": { | ||
6294 | + "version": "2.0.0", | ||
6295 | + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", | ||
6296 | + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" | ||
6297 | + }, | ||
6298 | + "string-width": { | ||
6299 | + "version": "3.1.0", | ||
6300 | + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", | ||
6301 | + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", | ||
6302 | + "requires": { | ||
6303 | + "emoji-regex": "^7.0.1", | ||
6304 | + "is-fullwidth-code-point": "^2.0.0", | ||
6305 | + "strip-ansi": "^5.1.0" | ||
6306 | + } | ||
6307 | + }, | ||
6308 | + "wrap-ansi": { | ||
6309 | + "version": "5.1.0", | ||
6310 | + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", | ||
6311 | + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", | ||
6312 | + "requires": { | ||
6313 | + "ansi-styles": "^3.2.0", | ||
6314 | + "string-width": "^3.0.0", | ||
6315 | + "strip-ansi": "^5.0.0" | ||
6316 | + } | ||
6317 | + }, | ||
6318 | + "y18n": { | ||
6319 | + "version": "4.0.0", | ||
6320 | + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", | ||
6321 | + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==" | ||
6322 | + }, | ||
6323 | + "yargs": { | ||
6324 | + "version": "13.3.2", | ||
6325 | + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", | ||
6326 | + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", | ||
6327 | + "requires": { | ||
6328 | + "cliui": "^5.0.0", | ||
6329 | + "find-up": "^3.0.0", | ||
6330 | + "get-caller-file": "^2.0.1", | ||
6331 | + "require-directory": "^2.1.1", | ||
6332 | + "require-main-filename": "^2.0.0", | ||
6333 | + "set-blocking": "^2.0.0", | ||
6334 | + "string-width": "^3.0.0", | ||
6335 | + "which-module": "^2.0.0", | ||
6336 | + "y18n": "^4.0.0", | ||
6337 | + "yargs-parser": "^13.1.2" | ||
6338 | + } | ||
6339 | + }, | ||
6340 | + "yargs-parser": { | ||
6341 | + "version": "13.1.2", | ||
6342 | + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", | ||
6343 | + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", | ||
6344 | + "requires": { | ||
6345 | + "camelcase": "^5.0.0", | ||
6346 | + "decamelize": "^1.2.0" | ||
6347 | + } | ||
6348 | + } | ||
6349 | + } | ||
6350 | + }, | ||
5983 | "react-native-view-shot": { | 6351 | "react-native-view-shot": { |
5984 | "version": "3.1.2", | 6352 | "version": "3.1.2", |
5985 | "resolved": "https://registry.npmjs.org/react-native-view-shot/-/react-native-view-shot-3.1.2.tgz", | 6353 | "resolved": "https://registry.npmjs.org/react-native-view-shot/-/react-native-view-shot-3.1.2.tgz", |
... | @@ -6024,6 +6392,15 @@ | ... | @@ -6024,6 +6392,15 @@ |
6024 | "resolved": "https://registry.npmjs.org/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz", | 6392 | "resolved": "https://registry.npmjs.org/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz", |
6025 | "integrity": "sha512-4+ow23tp/Tv7hBM5Az5/Be/eKKF7DIvJ09voz5LyHGQaqqz9WV8YMs31eFvcYQs7d451LSg7kDJV70XYN/Ug/Q==" | 6393 | "integrity": "sha512-4+ow23tp/Tv7hBM5Az5/Be/eKKF7DIvJ09voz5LyHGQaqqz9WV8YMs31eFvcYQs7d451LSg7kDJV70XYN/Ug/Q==" |
6026 | }, | 6394 | }, |
6395 | + "react-tween-state": { | ||
6396 | + "version": "0.1.5", | ||
6397 | + "resolved": "https://registry.npmjs.org/react-tween-state/-/react-tween-state-0.1.5.tgz", | ||
6398 | + "integrity": "sha1-6YsGZVHvuTy5LdG+FJlcLj3q4zk=", | ||
6399 | + "requires": { | ||
6400 | + "raf": "^3.1.0", | ||
6401 | + "tween-functions": "^1.0.1" | ||
6402 | + } | ||
6403 | + }, | ||
6027 | "read-pkg": { | 6404 | "read-pkg": { |
6028 | "version": "2.0.0", | 6405 | "version": "2.0.0", |
6029 | "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", | 6406 | "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", |
... | @@ -6932,6 +7309,11 @@ | ... | @@ -6932,6 +7309,11 @@ |
6932 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", | 7309 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", |
6933 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" | 7310 | "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" |
6934 | }, | 7311 | }, |
7312 | + "tween-functions": { | ||
7313 | + "version": "1.2.0", | ||
7314 | + "resolved": "https://registry.npmjs.org/tween-functions/-/tween-functions-1.2.0.tgz", | ||
7315 | + "integrity": "sha1-GuOlDnxguz3vd06scHrLynO7w/8=" | ||
7316 | + }, | ||
6935 | "type-fest": { | 7317 | "type-fest": { |
6936 | "version": "0.7.1", | 7318 | "version": "0.7.1", |
6937 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", | 7319 | "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", | ... | ... |
... | @@ -8,6 +8,7 @@ | ... | @@ -8,6 +8,7 @@ |
8 | "eject": "expo eject" | 8 | "eject": "expo eject" |
9 | }, | 9 | }, |
10 | "dependencies": { | 10 | "dependencies": { |
11 | + "@react-native-community/datetimepicker": "2.2.2", | ||
11 | "@react-native-community/masked-view": "0.1.6", | 12 | "@react-native-community/masked-view": "0.1.6", |
12 | "@react-navigation/bottom-tabs": "^5.4.1", | 13 | "@react-navigation/bottom-tabs": "^5.4.1", |
13 | "@react-navigation/native": "^5.3.0", | 14 | "@react-navigation/native": "^5.3.0", |
... | @@ -16,14 +17,21 @@ | ... | @@ -16,14 +17,21 @@ |
16 | "expo": "~37.0.3", | 17 | "expo": "~37.0.3", |
17 | "expo-asset": "^8.1.4", | 18 | "expo-asset": "^8.1.4", |
18 | "expo-camera": "~8.2.0", | 19 | "expo-camera": "~8.2.0", |
20 | + "expo-file-system": "~8.1.0", | ||
19 | "expo-font": "^8.1.1", | 21 | "expo-font": "^8.1.1", |
20 | "expo-location": "~8.1.0", | 22 | "expo-location": "~8.1.0", |
21 | "expo-media-library": "~8.1.0", | 23 | "expo-media-library": "~8.1.0", |
22 | "expo-permissions": "~8.1.0", | 24 | "expo-permissions": "~8.1.0", |
23 | "expo-web-browser": "^8.2.1", | 25 | "expo-web-browser": "^8.2.1", |
26 | + "moment": "^2.26.0", | ||
27 | + "native-base": "^2.13.12", | ||
28 | + "node-nikerunclub": "^1.0.0", | ||
29 | + "papaparse": "^5.2.0", | ||
24 | "react": "~16.9.0", | 30 | "react": "~16.9.0", |
25 | "react-dom": "~16.9.0", | 31 | "react-dom": "~16.9.0", |
26 | "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz", | 32 | "react-native": "https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz", |
33 | + "react-native-bottom-action-sheet": "^2.0.1", | ||
34 | + "react-native-fast-image": "^8.1.5", | ||
27 | "react-native-gesture-handler": "~1.6.0", | 35 | "react-native-gesture-handler": "~1.6.0", |
28 | "react-native-maps": "0.26.1", | 36 | "react-native-maps": "0.26.1", |
29 | "react-native-reanimated": "~1.7.0", | 37 | "react-native-reanimated": "~1.7.0", | ... | ... |
1 | +export const initialState = { | ||
2 | + startLocation: null, | ||
3 | + endLocation: null, | ||
4 | + endTime: '', | ||
5 | + | ||
6 | + optRoute: null, | ||
7 | + | ||
8 | + settingLocation: false, | ||
9 | + settingTime: false, | ||
10 | + settingOptRoute: false, | ||
11 | + settingVelocity: false, | ||
12 | + | ||
13 | + | ||
14 | + personalVelocity: 60, | ||
15 | + info: '', | ||
16 | +}; | ||
17 | + | ||
18 | +export const SET_SLOC_REQUEST = 'SET_SLOC_REQUEST'; | ||
19 | +export const SET_SLOC_SUCCESS = 'SET_SLOC_SUCCESS'; | ||
20 | +export const SET_SLOC_FAILURE = 'SET_SLOC_FAILURE'; | ||
21 | +export const SET_ELOC_REQUEST = 'SET_ELOC_REQUEST'; | ||
22 | +export const SET_ELOC_SUCCESS = 'SET_ELOC_SUCCESS'; | ||
23 | +export const SET_ELOC_FAILURE = 'SET_ELOC_FAILURE'; | ||
24 | +export const SET_USER_LOC = 'SET_USER_LOC'; | ||
25 | + | ||
26 | +export const SET_TIME_REQUEST = 'SET_TIME_REQUEST'; | ||
27 | +export const SET_TIME_SUCCESS = 'SET_TIME_SUCCESS'; | ||
28 | +export const SET_TIME_FAILURE = 'SET_TIME_FAILURE'; | ||
29 | + | ||
30 | +export const SET_OPTROUTE_REQUEST = 'SET_OPTROUTE_REQUEST'; | ||
31 | +export const SET_OPTROUTE_SUCCESS = 'SET_OPTROUTE_SUCCESS'; | ||
32 | +export const SET_OPTROUTE_FAILURE = 'SET_OPTROUTE_FAILURE'; | ||
33 | + | ||
34 | +export const SET_PERVELOCITY_REQUEST = 'SET_PERVELOCITY_REQUEST'; | ||
35 | +export const SET_PERVELOCITY_SUCCESS = 'SET_PERVELOCITY_SUCCESS'; | ||
36 | +export const SET_PERVELOCITY_FAILURE = 'SET_PERVELOCITY_FAILURE'; | ||
37 | + | ||
38 | + | ||
39 | +export default (state = initialState, action) => { | ||
40 | + switch (action.type) { | ||
41 | + | ||
42 | + case SET_SLOC_REQUEST: { | ||
43 | + return { | ||
44 | + ...state, | ||
45 | + settingLocation: true, | ||
46 | + } | ||
47 | + } | ||
48 | + | ||
49 | + case SET_SLOC_SUCCESS: { | ||
50 | + const {startLocation} = action.data; | ||
51 | + return { | ||
52 | + ...state, | ||
53 | + startLocation, | ||
54 | + isLoggingIn: false, | ||
55 | + }; | ||
56 | + } | ||
57 | + | ||
58 | + case SET_SLOC_FAILURE: { | ||
59 | + const {info} = action.data; | ||
60 | + return { | ||
61 | + ...state, | ||
62 | + settingLocation: false, | ||
63 | + info, | ||
64 | + } | ||
65 | + } | ||
66 | + | ||
67 | + | ||
68 | + case SET_ELOC_REQUEST: { | ||
69 | + return { | ||
70 | + ...state, | ||
71 | + settingLocation: true, | ||
72 | + } | ||
73 | + } | ||
74 | + | ||
75 | + case SET_ELOC_SUCCESS: { | ||
76 | + const {endLocation} = action.data; | ||
77 | + return { | ||
78 | + ...state, | ||
79 | + endLocation, | ||
80 | + isLoggingIn: false, | ||
81 | + }; | ||
82 | + } | ||
83 | + | ||
84 | + case SET_ELOC_FAILURE: { | ||
85 | + const {info} = action.data; | ||
86 | + return { | ||
87 | + ...state, | ||
88 | + settingLocation: false, | ||
89 | + info, | ||
90 | + } | ||
91 | + } | ||
92 | + | ||
93 | + case SET_USER_LOC: { | ||
94 | + var {userLocation} = action.data; | ||
95 | + userLocation = { | ||
96 | + title: '현위치', | ||
97 | + latitude: userLocation.coords.latitude, | ||
98 | + longitude: userLocation.coords.longitude, | ||
99 | + latitudeDelta: 0.0039, | ||
100 | + longitudeDelta: 0.0039, | ||
101 | + description: 'start point', | ||
102 | + | ||
103 | + }; | ||
104 | + console.log(userLocation.coords); | ||
105 | + return { | ||
106 | + ...state, | ||
107 | + startLocation: userLocation, | ||
108 | + settingLocation: false | ||
109 | + } | ||
110 | + } | ||
111 | + | ||
112 | + case SET_TIME_REQUEST: { | ||
113 | + return { | ||
114 | + ...state, | ||
115 | + settingTime: true, | ||
116 | + } | ||
117 | + } | ||
118 | + case SET_TIME_SUCCESS: { | ||
119 | + const {date} = action.data; | ||
120 | + console.log('reducer SET_TIME_SUCCESS', date); | ||
121 | + return { | ||
122 | + ...state, | ||
123 | + endTime: date, | ||
124 | + settingTime: false, | ||
125 | + } | ||
126 | + } | ||
127 | + case SET_TIME_FAILURE: { | ||
128 | + const {info} = action.data; | ||
129 | + return { | ||
130 | + ...state, | ||
131 | + settingTime: false, | ||
132 | + } | ||
133 | + } | ||
134 | + | ||
135 | + case SET_OPTROUTE_REQUEST: { | ||
136 | + return { | ||
137 | + ...state, | ||
138 | + settingOptRoute: true, | ||
139 | + } | ||
140 | + } | ||
141 | + | ||
142 | + case SET_OPTROUTE_SUCCESS: { | ||
143 | + var {optRoute} = action.data; | ||
144 | + console.log('SET_OPTROUTE_SUCCESST', optRoute); | ||
145 | + return { | ||
146 | + ...state, | ||
147 | + optRoute: optRoute, | ||
148 | + settingOptRoute: false, | ||
149 | + } | ||
150 | + } | ||
151 | + | ||
152 | + case SET_OPTROUTE_FAILURE: { | ||
153 | + const {info} = action.data; | ||
154 | + return { | ||
155 | + ...state, | ||
156 | + settingOptRoute: false, | ||
157 | + } | ||
158 | + } | ||
159 | + | ||
160 | + | ||
161 | + case SET_PERVELOCITY_REQUEST: { | ||
162 | + return { | ||
163 | + ...state, | ||
164 | + settingVelocity: true, | ||
165 | + } | ||
166 | + } | ||
167 | + | ||
168 | + case SET_PERVELOCITY_SUCCESS: { | ||
169 | + var {personalVelocity} = action.data; | ||
170 | + console.log('SET_PERVELOCITY_SUCCESS', personalVelocity); | ||
171 | + return { | ||
172 | + ...state, | ||
173 | + personalVelocity, | ||
174 | + settingVelocity: true, | ||
175 | + } | ||
176 | + } | ||
177 | + | ||
178 | + case SET_PERVELOCITY_FAILURE: { | ||
179 | + const {info} = action.data; | ||
180 | + return { | ||
181 | + ...state, | ||
182 | + settingVelocity: false, | ||
183 | + } | ||
184 | + } | ||
185 | + | ||
186 | + default: { | ||
187 | + return { | ||
188 | + ...state, | ||
189 | + }; | ||
190 | + } | ||
191 | + } | ||
192 | +}; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +import {all, call, fork, delay, put, takeEvery, takeLatest} from 'redux-saga/effects'; | ||
2 | +import axios from 'axios'; | ||
3 | +import {coordAPIKEY, host} from '../env'; | ||
4 | + | ||
5 | + | ||
6 | +import { | ||
7 | + SET_ELOC_REQUEST, | ||
8 | + SET_SLOC_REQUEST, | ||
9 | + SET_SLOC_SUCCESS, | ||
10 | + SET_ELOC_SUCCESS, | ||
11 | + SET_SLOC_FAILURE, | ||
12 | + SET_ELOC_FAILURE, | ||
13 | + SET_OPTROUTE_REQUEST, | ||
14 | + SET_OPTROUTE_SUCCESS, | ||
15 | + SET_OPTROUTE_FAILURE, | ||
16 | +} from "../reducers/location"; | ||
17 | + | ||
18 | +function setStartLocationAPI(data) { | ||
19 | + const {startTextLocation} = data; | ||
20 | + console.log(startTextLocation); | ||
21 | + return axios.get(`http://api.vworld.kr/req/address?service=address&request=getcoord&version=1.0&crs=epsg:4326&address=${startTextLocation}&refine=true&simple=false&format=json&type=road&key=${coordAPIKEY}`); | ||
22 | +} | ||
23 | + | ||
24 | +function setEndLocationAPI(data) { | ||
25 | + const {endTextLocation} = data; | ||
26 | + console.log(endTextLocation); | ||
27 | + return axios.get(`http://api.vworld.kr/req/address?service=address&request=getcoord&version=1.0&crs=epsg:4326&address=${endTextLocation}&refine=true&simple=false&format=json&type=road&key=${coordAPIKEY}`); | ||
28 | +} | ||
29 | + | ||
30 | +function setOptRouteAPI(data) { | ||
31 | + const {startLocation, endLocation, endTime, personalVelocity} = data; | ||
32 | + console.log('제발 좀 되라', startLocation, endLocation, endTime, personalVelocity); | ||
33 | + return axios.post(`http://${host}:4001/api/setOptRoute`, { | ||
34 | + startLocation, | ||
35 | + endLocation, | ||
36 | + endTime, | ||
37 | + personalVelocity | ||
38 | + }, {withCredentials: true}); | ||
39 | +} | ||
40 | + | ||
41 | +function* setStartLocation(action) { | ||
42 | + try { | ||
43 | + console.log('saga의 setLocation', action.data); | ||
44 | + let res = yield call(setStartLocationAPI, action.data); | ||
45 | + let longitude, latitude = null; | ||
46 | + | ||
47 | + if (res.data.response.status === "OK") { | ||
48 | + longitude = parseFloat(res.data.response.result.point.x); | ||
49 | + latitude = parseFloat(res.data.response.result.point.y); | ||
50 | + } | ||
51 | + // | ||
52 | + // if (res.data.status === "OK") { | ||
53 | + // latitude = res.data.results[0].geometry.location.lat; | ||
54 | + // longitude = res.data.results[0].geometry.location.lng; | ||
55 | + // console.log(latitude, longitude) | ||
56 | + // } | ||
57 | + | ||
58 | + console.log('startRes: ', longitude, latitude); | ||
59 | + | ||
60 | + yield put({ | ||
61 | + type: SET_SLOC_SUCCESS, | ||
62 | + data: { | ||
63 | + startLocation: { | ||
64 | + title: action.data.startTextLocation, | ||
65 | + description: 'start point', | ||
66 | + longitude: longitude, | ||
67 | + latitude: latitude, | ||
68 | + latitudeDelta: 1.2, | ||
69 | + longitudeDelta: 1.2 | ||
70 | + | ||
71 | + } | ||
72 | + } | ||
73 | + }) | ||
74 | + } catch (e) { | ||
75 | + console.error(e); | ||
76 | + yield put({ | ||
77 | + type: SET_SLOC_FAILURE, | ||
78 | + data: { | ||
79 | + info: e.response.data.info | ||
80 | + } | ||
81 | + }); | ||
82 | + } | ||
83 | +} | ||
84 | + | ||
85 | +function* setEndLocation(action) { | ||
86 | + try { | ||
87 | + let res = yield call(setEndLocationAPI, action.data); | ||
88 | + let longitude, latitude = null; | ||
89 | + | ||
90 | + // | ||
91 | + // if (res.data.status === "OK") { | ||
92 | + // latitude = res.data.results[0].geometry.location.lat; | ||
93 | + // longitude = res.data.results[0].geometry.location.lng; | ||
94 | + // console.log(latitude, longitude) | ||
95 | + // } | ||
96 | + | ||
97 | + if (res.data.response.status === "OK") { | ||
98 | + longitude = parseFloat(res.data.response.result.point.x); | ||
99 | + latitude = parseFloat(res.data.response.result.point.y); | ||
100 | + } | ||
101 | + | ||
102 | + console.log('finishRes: ', longitude, latitude); | ||
103 | + | ||
104 | + yield put({ | ||
105 | + type: SET_ELOC_SUCCESS, | ||
106 | + data: { | ||
107 | + endLocation: { | ||
108 | + title: action.data.endTextLocation, | ||
109 | + description: 'end point', | ||
110 | + longitude: longitude, | ||
111 | + latitude: latitude, | ||
112 | + latitudeDelta: 1.2, | ||
113 | + longitudeDelta: 1.2 | ||
114 | + } | ||
115 | + } | ||
116 | + }); | ||
117 | + } catch (e) { | ||
118 | + console.error(e); | ||
119 | + yield put({ | ||
120 | + type: SET_ELOC_FAILURE, | ||
121 | + data: { | ||
122 | + info: e.response.data.info | ||
123 | + } | ||
124 | + }) | ||
125 | + | ||
126 | + } | ||
127 | +} | ||
128 | + | ||
129 | +function* setOptRoute(action) { | ||
130 | + try { | ||
131 | + let res = yield call(setOptRouteAPI, action.data); | ||
132 | + const {optRoute} = res.data; | ||
133 | + yield put({ | ||
134 | + type: SET_OPTROUTE_SUCCESS, | ||
135 | + data: { | ||
136 | + optRoute: optRoute | ||
137 | + } | ||
138 | + }); | ||
139 | + | ||
140 | + } catch (e) { | ||
141 | + console.error(e); | ||
142 | + yield put({ | ||
143 | + type: SET_OPTROUTE_FAILURE, | ||
144 | + data: { | ||
145 | + info: e.response.data.info | ||
146 | + } | ||
147 | + }) | ||
148 | + } | ||
149 | +} | ||
150 | + | ||
151 | + | ||
152 | +function* watchSetStartLocation() { | ||
153 | + console.log('watchSetStartLocation'); | ||
154 | + yield takeLatest(SET_SLOC_REQUEST, setStartLocation); | ||
155 | +} | ||
156 | + | ||
157 | +function* watchSetEndLocation() { | ||
158 | + console.log('watchSetEndLocation'); | ||
159 | + yield takeLatest(SET_ELOC_REQUEST, setEndLocation) | ||
160 | +} | ||
161 | + | ||
162 | +function* watchSetOptRoute() { | ||
163 | + console.log('watchSetOptimalRoute'); | ||
164 | + yield takeLatest(SET_OPTROUTE_REQUEST, setOptRoute) | ||
165 | +} | ||
166 | + | ||
167 | +export default function* locationSaga() { | ||
168 | + yield all([ | ||
169 | + fork(watchSetStartLocation), | ||
170 | + fork(watchSetEndLocation), | ||
171 | + fork(watchSetOptRoute), | ||
172 | + ]); | ||
173 | +}; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | import {all, call, fork, delay, put, takeEvery, takeLatest} from 'redux-saga/effects'; | 1 | import {all, call, fork, delay, put, takeEvery, takeLatest} from 'redux-saga/effects'; |
2 | import axios from 'axios'; | 2 | import axios from 'axios'; |
3 | -import host from '../env'; | 3 | +import {host} from '../env'; |
4 | import { | 4 | import { |
5 | LOG_IN_FAILURE, | 5 | LOG_IN_FAILURE, |
6 | LOG_IN_REQUEST, | 6 | LOG_IN_REQUEST, |
... | @@ -37,9 +37,7 @@ function loginAPI(data) { | ... | @@ -37,9 +37,7 @@ function loginAPI(data) { |
37 | const {email, password} = data; | 37 | const {email, password} = data; |
38 | console.log(email, password); | 38 | console.log(email, password); |
39 | console.log(`http://${host}:4001/user/login`); | 39 | console.log(`http://${host}:4001/user/login`); |
40 | - // const res1 = axios.get(`http://${host}:4001/user/test`, { | 40 | + |
41 | - // withCredentials: true | ||
42 | - // }); | ||
43 | return axios.post(`http://${host}:4001/user/login`, { | 41 | return axios.post(`http://${host}:4001/user/login`, { |
44 | email, password | 42 | email, password |
45 | }, { | 43 | }, { | ... | ... |
1 | +import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | +import {Text, View, StyleSheet, TouchableOpacity, ScrollView, TextInput} from 'react-native'; | ||
3 | +import {useDispatch, useSelector} from "react-redux"; | ||
4 | +import {useNavigation} from '@react-navigation/native'; | ||
5 | +import WalkPathComponent from "../components/WalkPathComponent"; | ||
6 | +import BusPathComponent from "../components/BusPathComponent"; | ||
7 | +import LanePathComponent from "../components/LanePathComponent"; | ||
8 | +import {MaterialCommunityIcons} from "@expo/vector-icons"; | ||
9 | + | ||
10 | +const GoPathDetail = (props) => { | ||
11 | + const navigation = useNavigation(); | ||
12 | + const {route} = props; | ||
13 | + const {detail} = route.params; | ||
14 | + const [pathDetails, setPathDetails] = useState(null); | ||
15 | + const {startLocation, endLocation, optRoute} = useSelector(state => state.location); | ||
16 | + | ||
17 | + | ||
18 | + useEffect(() => { | ||
19 | + setPathDetails(detail); | ||
20 | + console.log(detail) | ||
21 | + }, []); | ||
22 | + | ||
23 | + | ||
24 | + return ( | ||
25 | + <ScrollView> | ||
26 | + <View style={styles.input}> | ||
27 | + <MaterialCommunityIcons color={'red'} name={'map-marker'} size={26}/> | ||
28 | + <TextInput | ||
29 | + style={styles.inputText} | ||
30 | + value={startLocation.title} | ||
31 | + /> | ||
32 | + </View> | ||
33 | + {pathDetails ? | ||
34 | + pathDetails.map((detail, index) => { | ||
35 | + if (detail.trafficType === '도보') { | ||
36 | + return ( | ||
37 | + <WalkPathComponent pathDetail={detail}/> | ||
38 | + ) | ||
39 | + } else if (detail.trafficType === '버스') { | ||
40 | + return ( | ||
41 | + <BusPathComponent pathDetail={detail}/> | ||
42 | + ) | ||
43 | + } else (detail.trafficType === '지하철') | ||
44 | + { | ||
45 | + return ( | ||
46 | + <LanePathComponent pathDetail={detail}/> | ||
47 | + ) | ||
48 | + } | ||
49 | + }) | ||
50 | + : | ||
51 | + null | ||
52 | + } | ||
53 | + <View style={styles.input}> | ||
54 | + <MaterialCommunityIcons color={'blue'} name={'map-marker'} size={26}/> | ||
55 | + <TextInput | ||
56 | + style={styles.inputText} | ||
57 | + value={endLocation.title} | ||
58 | + /> | ||
59 | + </View> | ||
60 | + </ScrollView> | ||
61 | + ); | ||
62 | +} | ||
63 | +export default GoPathDetail; | ||
64 | + | ||
65 | +const styles = StyleSheet.create({ | ||
66 | + input: { | ||
67 | + borderRadius: 20, | ||
68 | + paddingLeft: 10, | ||
69 | + paddingTop: 5, | ||
70 | + paddingRight: 10, | ||
71 | + width: 350, | ||
72 | + height: 30, | ||
73 | + alignItems: 'center', | ||
74 | + flexDirection: 'row', | ||
75 | + justifyContent: 'space-between', | ||
76 | + borderBottomColor: '#f0f8ff', | ||
77 | + marginBottom: 10, | ||
78 | + // borderBottomWidth: StyleSheet.hairlineWidth, | ||
79 | + }, | ||
80 | + inputText: { | ||
81 | + flex: 1, | ||
82 | + fontWeight: 'bold', | ||
83 | + } | ||
84 | +}) | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +import React, {useState, useEffect} from 'react'; | ||
2 | +import {View, Text, Button, StyleSheet} from 'react-native'; | ||
3 | +import StartAndFinishLocationComponent from "../components/StartAndFinishLocationComponent"; | ||
4 | +import DateTimePickerComponent from "../components/DateTimePickerComponent"; | ||
5 | +import styled from "styled-components"; | ||
6 | +import {useNavigation} from "@react-navigation/native"; | ||
7 | +import {useDispatch, useSelector} from "react-redux"; | ||
8 | +import {SET_OPTROUTE_REQUEST} from "../reducers/location"; | ||
9 | + | ||
10 | +const GoToMaps = styled.TouchableOpacity` | ||
11 | + flex: 0.5; | ||
12 | + backgroundColor: #f0f8ff; | ||
13 | + align-items: center; | ||
14 | + justify-content: center; | ||
15 | + width: 180px; | ||
16 | + height: 30px; | ||
17 | + border-radius: 30px; | ||
18 | + border-width: 1px; | ||
19 | + border-color: #a9a9a9; | ||
20 | + position: absolute; | ||
21 | + left: 55 | ||
22 | +`; | ||
23 | + | ||
24 | +const LocationTimeSet = () => { | ||
25 | + const navigation = useNavigation(); | ||
26 | + const [goToMapsClick, setGoToMapsClick] = useState(false); | ||
27 | + | ||
28 | + const {startLocation} = useSelector(state => state.location); | ||
29 | + const {endLocation} = useSelector(state => state.location); | ||
30 | + | ||
31 | + const dispatch = useDispatch(); | ||
32 | + const goToMaps = async () => { | ||
33 | + setGoToMapsClick(true); | ||
34 | + navigation.navigate('SetLocationStackNavigation'); | ||
35 | + setTimeout(() => { | ||
36 | + setGoToMapsClick(false) | ||
37 | + }, 2000) | ||
38 | + }; | ||
39 | + | ||
40 | + useEffect(() => { | ||
41 | + }, []); | ||
42 | + | ||
43 | + return ( | ||
44 | + <View> | ||
45 | + <StartAndFinishLocationComponent/> | ||
46 | + <DateTimePickerComponent goToMapsClick={goToMapsClick}/> | ||
47 | + | ||
48 | + <View style={{flexDirection: 'row', marginLeft: 50}}> | ||
49 | + <GoToMaps onPress={goToMaps}> | ||
50 | + <Text>도착 시간 설정</Text> | ||
51 | + </GoToMaps> | ||
52 | + </View> | ||
53 | + </View> | ||
54 | + ) | ||
55 | +}; | ||
56 | + | ||
57 | + | ||
58 | +const styles = StyleSheet.create({ | ||
59 | + containerStyle: { | ||
60 | + flex: 1, | ||
61 | + alignItems: 'center', | ||
62 | + justifyContent: 'center', | ||
63 | + backgroundColor: '#ecf0f1', | ||
64 | + marginTop: 100, | ||
65 | + }, | ||
66 | + input: { | ||
67 | + width: 200, | ||
68 | + height: 44, | ||
69 | + padding: 10, | ||
70 | + borderWidth: 1, | ||
71 | + borderColor: '#778899', | ||
72 | + marginBottom: 10, | ||
73 | + } | ||
74 | +}); | ||
75 | + | ||
76 | +export default LocationTimeSet; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | +import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | +import {View, Text, Image, TextInput, TouchableOpacity, StyleSheet} from 'react-native'; | ||
3 | +import {useDispatch, useSelector} from "react-redux"; | ||
4 | +import {useNavigation} from '@react-navigation/native'; | ||
5 | +import LoginComponent from "../components/LoginComponent"; | ||
6 | +import styled from "styled-components"; | ||
7 | + | ||
8 | + | ||
9 | +const Login = (props) => { | ||
10 | + const navigation = useNavigation(); | ||
11 | + const [loading, setLoading] = useState(true); | ||
12 | + const [isLogin, setIsLogin] = useState(true); | ||
13 | + | ||
14 | + const {me} = useSelector(state => state.user); | ||
15 | + const {isLoggingIn} = useSelector(state => state.user); | ||
16 | + | ||
17 | + const changeIsLogin = () => { | ||
18 | + return setIsLogin(!isLogin); | ||
19 | + } | ||
20 | + | ||
21 | + useEffect(() => { | ||
22 | + setLoading(false); | ||
23 | + }, [me]); | ||
24 | + | ||
25 | + | ||
26 | + return ( | ||
27 | + <View style={styles.changeStyle}> | ||
28 | + {me ? | ||
29 | + <View style={{flex: 2}}> | ||
30 | + <Image | ||
31 | + style={{width: 500, height: 600, flex: 1}} | ||
32 | + source={require('../assets/nike.png')} | ||
33 | + /> | ||
34 | + <TouchableOpacity | ||
35 | + title={'SGGO'} | ||
36 | + style={{flex: 1, fontSize: 100}} | ||
37 | + > | ||
38 | + </TouchableOpacity> | ||
39 | + </View> | ||
40 | + : | ||
41 | + <View style={styles.loginStyle}> | ||
42 | + <Text style={styles.inputText}>로그인</Text> | ||
43 | + <LoginComponent/> | ||
44 | + </View> | ||
45 | + } | ||
46 | + </View> | ||
47 | + ) | ||
48 | +}; | ||
49 | + | ||
50 | +export default Login; | ||
51 | + | ||
52 | +const styles = StyleSheet.create({ | ||
53 | + changeStyle: { | ||
54 | + flex: 2, | ||
55 | + alignItems: 'center', | ||
56 | + justifyContent: 'center', | ||
57 | + borderColor: 'darkgrey', | ||
58 | + }, | ||
59 | + loginStyle: { | ||
60 | + flex: 1, | ||
61 | + marginTop: 30, | ||
62 | + }, | ||
63 | + inputText: { | ||
64 | + borderColor: 'darkgrey', | ||
65 | + fontWeight: 'bold', | ||
66 | + fontSize: 20, | ||
67 | + marginBottom: 10 | ||
68 | + } | ||
69 | + | ||
70 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -29,7 +29,6 @@ const Main = () => { | ... | @@ -29,7 +29,6 @@ const Main = () => { |
29 | const navigation = useNavigation(); | 29 | const navigation = useNavigation(); |
30 | 30 | ||
31 | const goToGallery = () => { | 31 | const goToGallery = () => { |
32 | - console.log(navigation.navigate); | ||
33 | navigation.navigate('Gallery'); | 32 | navigation.navigate('Gallery'); |
34 | }; | 33 | }; |
35 | 34 | ... | ... |
1 | +import React from 'react'; | ||
2 | +import {View, Text, TouchableOpacity, Image, StyleSheet} from 'react-native'; | ||
3 | +import styled from "styled-components"; | ||
4 | +import {useNavigation} from "@react-navigation/native"; | ||
5 | +import {useSelector} from "react-redux"; | ||
6 | + | ||
7 | +const MainImage = (props) => { | ||
8 | + const navigation = useNavigation(); | ||
9 | + | ||
10 | + const {me} = useSelector(state => state.user); | ||
11 | + | ||
12 | + | ||
13 | + return ( | ||
14 | + <> | ||
15 | + <View style={styles.containerStyle}> | ||
16 | + <Text>로그인에 성공하였습니다</Text> | ||
17 | + </View> | ||
18 | + </> | ||
19 | + ) | ||
20 | +}; | ||
21 | +export default MainImage; | ||
22 | + | ||
23 | +const styles = StyleSheet.create({ | ||
24 | + containerStyle: { | ||
25 | + flex: 1, | ||
26 | + }, | ||
27 | +}); |
1 | +import React, {useState, useEffect} from 'react'; | ||
2 | +import MapView, {Marker, Polygon, AnimatedRegion} from 'react-native-maps'; | ||
3 | +import {StyleSheet, Text, TextInput, TouchableOpacity, View} from 'react-native'; | ||
4 | +import screen from '../constants/layout'; | ||
5 | +import {useDispatch, useSelector} from "react-redux"; | ||
6 | +import {useNavigation} from "@react-navigation/native"; | ||
7 | +import {AntDesign, MaterialCommunityIcons} from "@expo/vector-icons"; | ||
8 | +import {SET_OPTROUTE_REQUEST} from "../reducers/location"; | ||
9 | +import styled from "styled-components"; | ||
10 | +import OptRoutePath from "./OptRoutePath"; | ||
11 | + | ||
12 | +const GoToOptRoutePath = styled.TouchableOpacity` | ||
13 | + flex: 2; | ||
14 | + position: absolute; | ||
15 | + right: 8px; | ||
16 | + bottom: 20px; | ||
17 | + width: 30px; | ||
18 | + height: 30px; | ||
19 | + border-radius: 50px; | ||
20 | +`; | ||
21 | + | ||
22 | +const Maps = (props) => { | ||
23 | + const navigation = useNavigation(); | ||
24 | + const [region, setRegion] = useState(null); | ||
25 | + const [markers, setMarkers] = useState([]); | ||
26 | + const [pathList, setPathList] = useState([]); | ||
27 | + const {startLocation, endLocation, optRoute, endTime, personalVelocity} = useSelector(state => state.location); | ||
28 | + const onRegionChange = (region) => { | ||
29 | + setRegion(region); | ||
30 | + }; | ||
31 | + | ||
32 | + useEffect(() => { | ||
33 | + setRegion({ | ||
34 | + latitude: 37.56647, | ||
35 | + longitude: 126.977963, | ||
36 | + latitudeDelta: 1.5, | ||
37 | + longitudeDelta: 1.5 | ||
38 | + }); | ||
39 | + if (startLocation || endLocation) { | ||
40 | + setMarkers([startLocation, endLocation]); | ||
41 | + } | ||
42 | + | ||
43 | + }, []); | ||
44 | + | ||
45 | + const dispatch = useDispatch(); | ||
46 | + const goToOptRoutePath = async () => { | ||
47 | + try { | ||
48 | + console.log('set optroute request'); | ||
49 | + await dispatch({ | ||
50 | + type: SET_OPTROUTE_REQUEST, | ||
51 | + data: { | ||
52 | + startLocation, | ||
53 | + endLocation, | ||
54 | + endTime, | ||
55 | + personalVelocity | ||
56 | + } | ||
57 | + }); | ||
58 | + setTimeout(() => { | ||
59 | + if (optRoute !== null) { | ||
60 | + navigation.navigate('OptRoutePath', {optRoute: optRoute}) | ||
61 | + } | ||
62 | + }, 3000); | ||
63 | + } catch (e) { | ||
64 | + console.error(e); | ||
65 | + } | ||
66 | + }; | ||
67 | + | ||
68 | + useEffect(() => { | ||
69 | + setMarkers([startLocation, endLocation]); | ||
70 | + }, [startLocation, endLocation]); | ||
71 | + | ||
72 | + | ||
73 | + return ( | ||
74 | + <View style={styles.container}> | ||
75 | + <View style={styles.input}> | ||
76 | + <MaterialCommunityIcons color={'red'} name={'map-marker'} size={26}/> | ||
77 | + <TextInput | ||
78 | + style={styles.inputText} | ||
79 | + value={startLocation.title} | ||
80 | + /> | ||
81 | + </View> | ||
82 | + <View style={styles.input}> | ||
83 | + <MaterialCommunityIcons color={'blue'} name={'map-marker'} size={26}/> | ||
84 | + <TextInput | ||
85 | + style={styles.inputText} | ||
86 | + value={endLocation.title} | ||
87 | + /> | ||
88 | + </View> | ||
89 | + <MapView | ||
90 | + style={styles.mapStyle} | ||
91 | + initialRegion={region} | ||
92 | + onRegionChange={onRegionChange} | ||
93 | + textStyle={{color: '#bc8b00'}} | ||
94 | + showsUserLocation={true} | ||
95 | + > | ||
96 | + {markers ? | ||
97 | + markers.map((marker, index) => { | ||
98 | + return ( | ||
99 | + <MapView.Marker draggable | ||
100 | + key={index} | ||
101 | + coordinate={marker} | ||
102 | + title={marker.title} | ||
103 | + /> | ||
104 | + ) | ||
105 | + }) | ||
106 | + : | ||
107 | + null | ||
108 | + } | ||
109 | + </MapView> | ||
110 | + <GoToOptRoutePath onPress={goToOptRoutePath}> | ||
111 | + <AntDesign color={'darkgrey'} name={'caretright'} size={32}/> | ||
112 | + </GoToOptRoutePath> | ||
113 | + </View> | ||
114 | + ) | ||
115 | +}; | ||
116 | + | ||
117 | +const styles = StyleSheet.create({ | ||
118 | + container: { | ||
119 | + flex: 1, | ||
120 | + backgroundColor: '#fff', | ||
121 | + alignItems: 'center', | ||
122 | + }, | ||
123 | + mapStyle: { | ||
124 | + width: screen.width, | ||
125 | + height: screen.height, | ||
126 | + }, | ||
127 | + textStyle: { | ||
128 | + flex: 1, | ||
129 | + fontWeight: 'bold', | ||
130 | + fontSize: 20, | ||
131 | + color: 'grey', | ||
132 | + marginBottom: 20, | ||
133 | + }, | ||
134 | + input: { | ||
135 | + borderRadius: 10, | ||
136 | + backgroundColor: '#f0f8ff', | ||
137 | + paddingLeft: 10, | ||
138 | + paddingTop: 5, | ||
139 | + paddingRight: 10, | ||
140 | + width: 350, | ||
141 | + height: 30, | ||
142 | + alignItems: 'center', | ||
143 | + flexDirection: 'row', | ||
144 | + justifyContent: 'space-between', | ||
145 | + borderBottomColor: '#f0f8ff', | ||
146 | + marginBottom: 10 | ||
147 | + // borderBottomWidth: StyleSheet.hairlineWidth, | ||
148 | + }, | ||
149 | + inputText: { | ||
150 | + flex: 1, | ||
151 | + }, | ||
152 | +}); | ||
153 | + | ||
154 | +export default Maps; | ||
155 | + |
1 | +import React, {useState, useEffect} from 'react'; | ||
2 | +import {View, Text, Button, ScrollView} from 'react-native'; | ||
3 | +import {useNavigation} from '@react-navigation/native'; | ||
4 | +import {useDispatch, useSelector} from "react-redux"; | ||
5 | +import GoPathSummary from '../components/GoPathSummary'; | ||
6 | + | ||
7 | +const OptRoutePath = (props) => { | ||
8 | + const navigation = useNavigation(); | ||
9 | + const {route} = props; | ||
10 | + const {optRoute} = route.params; | ||
11 | + | ||
12 | + const [pathList, setPathList] = useState([]); | ||
13 | + const {startLocation} = useSelector(state => state.location); | ||
14 | + const {endLocation} = useSelector(state => state.location); | ||
15 | + | ||
16 | + const dispatch = useDispatch(); | ||
17 | + const setOptRouteRequest = async () => { | ||
18 | + try { | ||
19 | + console.log('set optroute request'); | ||
20 | + setTimeout(() => { | ||
21 | + if (optRoute.pathList) { | ||
22 | + for (var i = 0; i < optRoute.pathList.length; i++) { | ||
23 | + setPathList(oldPath => [...oldPath, optRoute.pathList[i]]); | ||
24 | + } | ||
25 | + } | ||
26 | + }, 3000); | ||
27 | + | ||
28 | + } catch (e) { | ||
29 | + console.error(e); | ||
30 | + } | ||
31 | + }; | ||
32 | + | ||
33 | + | ||
34 | + useEffect(() => { | ||
35 | + setOptRouteRequest(); | ||
36 | + }, []); | ||
37 | + | ||
38 | + return ( | ||
39 | + <ScrollView> | ||
40 | + {pathList ? | ||
41 | + pathList.map((path, index) => { | ||
42 | + return ( | ||
43 | + <> | ||
44 | + <GoPathSummary summary={path.info} detail={path.subPathList}/> | ||
45 | + </> | ||
46 | + ) | ||
47 | + }) | ||
48 | + : | ||
49 | + null | ||
50 | + } | ||
51 | + </ScrollView> | ||
52 | + ) | ||
53 | +}; | ||
54 | + | ||
55 | +export default OptRoutePath; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | import React from 'react'; | 1 | import React from 'react'; |
2 | import {View, Text, Button} from 'react-native'; | 2 | import {View, Text, Button} from 'react-native'; |
3 | -import SignUpComponent from "../components/SignUpComponent"; | 3 | +import MyProfileComponent from "../components/MyProfileComponent"; |
4 | 4 | ||
5 | const Profile = () => { | 5 | const Profile = () => { |
6 | const {me} = (state => state.user); | 6 | const {me} = (state => state.user); |
7 | return ( | 7 | return ( |
8 | <View> | 8 | <View> |
9 | - <SignUpComponent/> | 9 | + {!me ? |
10 | + <MyProfileComponent/> | ||
11 | + : | ||
12 | + null | ||
13 | + } | ||
10 | </View> | 14 | </View> |
11 | ) | 15 | ) |
12 | }; | 16 | }; | ... | ... |
File moved
1 | +import React, {useState, useContext, useEffect, useCallback} from 'react'; | ||
2 | +import {View, Text, Button, TextInput, TouchableOpacity, StyleSheet} from 'react-native'; | ||
3 | +import {useDispatch, useSelector} from "react-redux"; | ||
4 | +import {useNavigation} from '@react-navigation/native'; | ||
5 | +import SignUpComponent from "../components/SignUpComponent"; | ||
6 | + | ||
7 | + | ||
8 | +const SignUp = (props) => { | ||
9 | + const navigation = useNavigation(); | ||
10 | + const [loading, setLoading] = useState(true); | ||
11 | + const [isLogin, setIsLogin] = useState(true); | ||
12 | + | ||
13 | + const {me} = useSelector(state => state.user); | ||
14 | + const {isLoggingIn} = useSelector(state => state.user); | ||
15 | + | ||
16 | + const changeIsLogin = () => { | ||
17 | + return setIsLogin(!isLogin); | ||
18 | + } | ||
19 | + | ||
20 | + useEffect(() => { | ||
21 | + setLoading(false); | ||
22 | + }, [me]); | ||
23 | + | ||
24 | + return ( | ||
25 | + <View style={styles.changeStyle}> | ||
26 | + <View style={styles.loginStyle}> | ||
27 | + <Text style={styles.inputText}>회원가입</Text> | ||
28 | + <SignUpComponent/> | ||
29 | + </View> | ||
30 | + </View> | ||
31 | + ) | ||
32 | +}; | ||
33 | + | ||
34 | +export default SignUp; | ||
35 | + | ||
36 | +const styles = StyleSheet.create({ | ||
37 | + changeStyle: { | ||
38 | + flex: 2, | ||
39 | + alignItems: 'center', | ||
40 | + justifyContent: 'center', | ||
41 | + borderColor: 'darkgrey', | ||
42 | + }, | ||
43 | + loginStyle: { | ||
44 | + flex: 1, | ||
45 | + marginTop: 30, | ||
46 | + }, | ||
47 | + inputText: { | ||
48 | + borderColor: 'darkgrey', | ||
49 | + fontWeight: 'bold', | ||
50 | + fontSize: 20, | ||
51 | + marginBottom: 10 | ||
52 | + } | ||
53 | + | ||
54 | +}); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
File moved
File moved
... | @@ -1202,6 +1202,13 @@ | ... | @@ -1202,6 +1202,13 @@ |
1202 | wcwidth "^1.0.1" | 1202 | wcwidth "^1.0.1" |
1203 | ws "^1.1.0" | 1203 | ws "^1.1.0" |
1204 | 1204 | ||
1205 | +"@react-native-community/datetimepicker@2.2.2": | ||
1206 | + version "2.2.2" | ||
1207 | + resolved "https://registry.yarnpkg.com/@react-native-community/datetimepicker/-/datetimepicker-2.2.2.tgz#4c6388631179098cc5b289146e879764f79af4c1" | ||
1208 | + integrity sha512-J4Z1tuZQszLR+BNu+UusZlK6/S+CpI6AHzolqTdPS2tRlyVbVim3KyjXrn8trtKxQncR5LEqF9OHw9zsRfEdXA== | ||
1209 | + dependencies: | ||
1210 | + invariant "^2.2.4" | ||
1211 | + | ||
1205 | "@react-native-community/masked-view@0.1.6": | 1212 | "@react-native-community/masked-view@0.1.6": |
1206 | version "0.1.6" | 1213 | version "0.1.6" |
1207 | resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.6.tgz#c7f2ac187c1f25aa8c30d11baa8f4398eca3bb84" | 1214 | resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.6.tgz#c7f2ac187c1f25aa8c30d11baa8f4398eca3bb84" |
... | @@ -1477,6 +1484,11 @@ ansi-regex@^5.0.0: | ... | @@ -1477,6 +1484,11 @@ ansi-regex@^5.0.0: |
1477 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" | 1484 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" |
1478 | integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== | 1485 | integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== |
1479 | 1486 | ||
1487 | +ansi-styles@^2.1.0: | ||
1488 | + version "2.2.1" | ||
1489 | + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" | ||
1490 | + integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= | ||
1491 | + | ||
1480 | ansi-styles@^3.2.0, ansi-styles@^3.2.1: | 1492 | ansi-styles@^3.2.0, ansi-styles@^3.2.1: |
1481 | version "3.2.1" | 1493 | version "3.2.1" |
1482 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" | 1494 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" |
... | @@ -1612,6 +1624,14 @@ atob@^2.1.2: | ... | @@ -1612,6 +1624,14 @@ atob@^2.1.2: |
1612 | resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" | 1624 | resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" |
1613 | integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== | 1625 | integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== |
1614 | 1626 | ||
1627 | +axios@^0.18.0: | ||
1628 | + version "0.18.1" | ||
1629 | + resolved "https://registry.yarnpkg.com/axios/-/axios-0.18.1.tgz#ff3f0de2e7b5d180e757ad98000f1081b87bcea3" | ||
1630 | + integrity sha512-0BfJq4NSfQXd+SkFdrvFbG7addhYSBA2mQwISr46pD6E5iqkWg02RAs8vyTT/j0RTnoYmeXauBuSv1qKwR179g== | ||
1631 | + dependencies: | ||
1632 | + follow-redirects "1.5.10" | ||
1633 | + is-buffer "^2.0.2" | ||
1634 | + | ||
1615 | axios@^0.19.2: | 1635 | axios@^0.19.2: |
1616 | version "0.19.2" | 1636 | version "0.19.2" |
1617 | resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" | 1637 | resolved "https://registry.yarnpkg.com/axios/-/axios-0.19.2.tgz#3ea36c5d8818d0d5f8a8a97a6d36b86cdc00cb27" |
... | @@ -1758,6 +1778,11 @@ blueimp-md5@^2.10.0: | ... | @@ -1758,6 +1778,11 @@ blueimp-md5@^2.10.0: |
1758 | resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.13.0.tgz#07314b0c64dda0bf1733f96ce40d5af94eb28965" | 1778 | resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.13.0.tgz#07314b0c64dda0bf1733f96ce40d5af94eb28965" |
1759 | integrity sha512-lmp0m647R5e77ORduxLW5mISIDcvgJZa52vMBv5uVI3UmSWTQjkJsZVBfaFqQPw/QFogJwvY6e3Gl9nP+Loe+Q== | 1779 | integrity sha512-lmp0m647R5e77ORduxLW5mISIDcvgJZa52vMBv5uVI3UmSWTQjkJsZVBfaFqQPw/QFogJwvY6e3Gl9nP+Loe+Q== |
1760 | 1780 | ||
1781 | +blueimp-md5@^2.5.0: | ||
1782 | + version "2.16.0" | ||
1783 | + resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.16.0.tgz#9018bb805e4ee05512e0e8cbdb9305eeecbdc87c" | ||
1784 | + integrity sha512-j4nzWIqEFpLSbdhUApHRGDwfXbV8ALhqOn+FY5L6XBdKPAXU9BpGgFSbDsgqogfqPPR9R2WooseWCsfhfEC6uQ== | ||
1785 | + | ||
1761 | bplist-creator@0.0.8: | 1786 | bplist-creator@0.0.8: |
1762 | version "0.0.8" | 1787 | version "0.0.8" |
1763 | resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.8.tgz#56b2a6e79e9aec3fc33bf831d09347d73794e79c" | 1788 | resolved "https://registry.yarnpkg.com/bplist-creator/-/bplist-creator-0.0.8.tgz#56b2a6e79e9aec3fc33bf831d09347d73794e79c" |
... | @@ -1912,6 +1937,17 @@ capture-exit@^2.0.0: | ... | @@ -1912,6 +1937,17 @@ capture-exit@^2.0.0: |
1912 | dependencies: | 1937 | dependencies: |
1913 | rsvp "^4.8.4" | 1938 | rsvp "^4.8.4" |
1914 | 1939 | ||
1940 | +chalk@1.1.1: | ||
1941 | + version "1.1.1" | ||
1942 | + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.1.tgz#509afb67066e7499f7eb3535c77445772ae2d019" | ||
1943 | + integrity sha1-UJr7ZwZudJn36zU1x3RFdyri0Bk= | ||
1944 | + dependencies: | ||
1945 | + ansi-styles "^2.1.0" | ||
1946 | + escape-string-regexp "^1.0.2" | ||
1947 | + has-ansi "^2.0.0" | ||
1948 | + strip-ansi "^3.0.0" | ||
1949 | + supports-color "^2.0.0" | ||
1950 | + | ||
1915 | chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: | 1951 | chalk@^2.0.0, chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2: |
1916 | version "2.4.2" | 1952 | version "2.4.2" |
1917 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" | 1953 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" |
... | @@ -1939,6 +1975,11 @@ ci-info@^2.0.0: | ... | @@ -1939,6 +1975,11 @@ ci-info@^2.0.0: |
1939 | resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" | 1975 | resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" |
1940 | integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== | 1976 | integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== |
1941 | 1977 | ||
1978 | +clamp@^1.0.1: | ||
1979 | + version "1.0.1" | ||
1980 | + resolved "https://registry.yarnpkg.com/clamp/-/clamp-1.0.1.tgz#66a0e64011816e37196828fdc8c8c147312c8634" | ||
1981 | + integrity sha1-ZqDmQBGBbjcZaCj9yMjBRzEshjQ= | ||
1982 | + | ||
1942 | class-utils@^0.3.5: | 1983 | class-utils@^0.3.5: |
1943 | version "0.3.6" | 1984 | version "0.3.6" |
1944 | resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" | 1985 | resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" |
... | @@ -1984,6 +2025,15 @@ cliui@^4.0.0: | ... | @@ -1984,6 +2025,15 @@ cliui@^4.0.0: |
1984 | strip-ansi "^4.0.0" | 2025 | strip-ansi "^4.0.0" |
1985 | wrap-ansi "^2.0.0" | 2026 | wrap-ansi "^2.0.0" |
1986 | 2027 | ||
2028 | +cliui@^5.0.0: | ||
2029 | + version "5.0.0" | ||
2030 | + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" | ||
2031 | + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== | ||
2032 | + dependencies: | ||
2033 | + string-width "^3.1.0" | ||
2034 | + strip-ansi "^5.2.0" | ||
2035 | + wrap-ansi "^5.1.0" | ||
2036 | + | ||
1987 | clone@^1.0.2: | 2037 | clone@^1.0.2: |
1988 | version "1.0.4" | 2038 | version "1.0.4" |
1989 | resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" | 2039 | resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" |
... | @@ -2039,7 +2089,7 @@ color-support@^1.1.3: | ... | @@ -2039,7 +2089,7 @@ color-support@^1.1.3: |
2039 | resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" | 2089 | resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" |
2040 | integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== | 2090 | integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== |
2041 | 2091 | ||
2042 | -color@^3.1.2: | 2092 | +color@^3.1.2, color@~3.1.2: |
2043 | version "3.1.2" | 2093 | version "3.1.2" |
2044 | resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" | 2094 | resolved "https://registry.yarnpkg.com/color/-/color-3.1.2.tgz#68148e7f85d41ad7649c5fa8c8106f098d229e10" |
2045 | integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg== | 2095 | integrity sha512-vXTJhHebByxZn3lDvDJYw4lR5+uB3vuoHsuYA5AKuxRVn5wzzIfQKGLBmgdVRHKTJYeK5rvJcHnrd0Li49CFpg== |
... | @@ -2354,6 +2404,11 @@ electron-to-chromium@^1.3.390: | ... | @@ -2354,6 +2404,11 @@ electron-to-chromium@^1.3.390: |
2354 | resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.413.tgz#9c457a4165c7b42e59d66dff841063eb9bfe5614" | 2404 | resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.413.tgz#9c457a4165c7b42e59d66dff841063eb9bfe5614" |
2355 | integrity sha512-Jm1Rrd3siqYHO3jftZwDljL2LYQafj3Kki5r+udqE58d0i91SkjItVJ5RwlJn9yko8i7MOcoidVKjQlgSdd1hg== | 2405 | integrity sha512-Jm1Rrd3siqYHO3jftZwDljL2LYQafj3Kki5r+udqE58d0i91SkjItVJ5RwlJn9yko8i7MOcoidVKjQlgSdd1hg== |
2356 | 2406 | ||
2407 | +emoji-regex@^7.0.1: | ||
2408 | + version "7.0.3" | ||
2409 | + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" | ||
2410 | + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== | ||
2411 | + | ||
2357 | encodeurl@~1.0.2: | 2412 | encodeurl@~1.0.2: |
2358 | version "1.0.2" | 2413 | version "1.0.2" |
2359 | resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" | 2414 | resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" |
... | @@ -2398,7 +2453,7 @@ escape-html@~1.0.3: | ... | @@ -2398,7 +2453,7 @@ escape-html@~1.0.3: |
2398 | resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" | 2453 | resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" |
2399 | integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= | 2454 | integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= |
2400 | 2455 | ||
2401 | -escape-string-regexp@^1.0.5: | 2456 | +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: |
2402 | version "1.0.5" | 2457 | version "1.0.5" |
2403 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" | 2458 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" |
2404 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= | 2459 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= |
... | @@ -2408,6 +2463,13 @@ escape-string-regexp@^4.0.0: | ... | @@ -2408,6 +2463,13 @@ escape-string-regexp@^4.0.0: |
2408 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" | 2463 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" |
2409 | integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== | 2464 | integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== |
2410 | 2465 | ||
2466 | +eslint-config-prettier@^6.0.0: | ||
2467 | + version "6.11.0" | ||
2468 | + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz#f6d2238c1290d01c859a8b5c1f7d352a0b0da8b1" | ||
2469 | + integrity sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA== | ||
2470 | + dependencies: | ||
2471 | + get-stdin "^6.0.0" | ||
2472 | + | ||
2411 | esprima@^4.0.0: | 2473 | esprima@^4.0.0: |
2412 | version "4.0.1" | 2474 | version "4.0.1" |
2413 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" | 2475 | resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" |
... | @@ -2848,6 +2910,14 @@ fs-extra@^1.0.0: | ... | @@ -2848,6 +2910,14 @@ fs-extra@^1.0.0: |
2848 | jsonfile "^2.1.0" | 2910 | jsonfile "^2.1.0" |
2849 | klaw "^1.0.0" | 2911 | klaw "^1.0.0" |
2850 | 2912 | ||
2913 | +fs-extra@^2.0.0: | ||
2914 | + version "2.1.2" | ||
2915 | + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-2.1.2.tgz#046c70163cef9aad46b0e4a7fa467fb22d71de35" | ||
2916 | + integrity sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU= | ||
2917 | + dependencies: | ||
2918 | + graceful-fs "^4.1.2" | ||
2919 | + jsonfile "^2.1.0" | ||
2920 | + | ||
2851 | fs-extra@^7.0.1: | 2921 | fs-extra@^7.0.1: |
2852 | version "7.0.1" | 2922 | version "7.0.1" |
2853 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" | 2923 | resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" |
... | @@ -2885,6 +2955,16 @@ get-caller-file@^1.0.1: | ... | @@ -2885,6 +2955,16 @@ get-caller-file@^1.0.1: |
2885 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" | 2955 | resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" |
2886 | integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== | 2956 | integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== |
2887 | 2957 | ||
2958 | +get-caller-file@^2.0.1: | ||
2959 | + version "2.0.5" | ||
2960 | + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" | ||
2961 | + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== | ||
2962 | + | ||
2963 | +get-stdin@^6.0.0: | ||
2964 | + version "6.0.0" | ||
2965 | + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" | ||
2966 | + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== | ||
2967 | + | ||
2888 | get-stream@^3.0.0: | 2968 | get-stream@^3.0.0: |
2889 | version "3.0.0" | 2969 | version "3.0.0" |
2890 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" | 2970 | resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" |
... | @@ -2929,6 +3009,13 @@ growly@^1.3.0: | ... | @@ -2929,6 +3009,13 @@ growly@^1.3.0: |
2929 | resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" | 3009 | resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" |
2930 | integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= | 3010 | integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= |
2931 | 3011 | ||
3012 | +has-ansi@^2.0.0: | ||
3013 | + version "2.0.0" | ||
3014 | + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" | ||
3015 | + integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= | ||
3016 | + dependencies: | ||
3017 | + ansi-regex "^2.0.0" | ||
3018 | + | ||
2932 | has-flag@^3.0.0: | 3019 | has-flag@^3.0.0: |
2933 | version "3.0.0" | 3020 | version "3.0.0" |
2934 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" | 3021 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" |
... | @@ -2980,6 +3067,11 @@ hermes-engine@^0.2.1: | ... | @@ -2980,6 +3067,11 @@ hermes-engine@^0.2.1: |
2980 | resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.2.1.tgz#25c0f1ff852512a92cb5c5cc47cf967e1e722ea2" | 3067 | resolved "https://registry.yarnpkg.com/hermes-engine/-/hermes-engine-0.2.1.tgz#25c0f1ff852512a92cb5c5cc47cf967e1e722ea2" |
2981 | integrity sha512-eNHUQHuadDMJARpaqvlCZoK/Nitpj6oywq3vQ3wCwEsww5morX34mW5PmKWQTO7aU0ck0hgulxR+EVDlXygGxQ== | 3068 | integrity sha512-eNHUQHuadDMJARpaqvlCZoK/Nitpj6oywq3vQ3wCwEsww5morX34mW5PmKWQTO7aU0ck0hgulxR+EVDlXygGxQ== |
2982 | 3069 | ||
3070 | +hoist-non-react-statics@^1.0.5: | ||
3071 | + version "1.2.0" | ||
3072 | + resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb" | ||
3073 | + integrity sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs= | ||
3074 | + | ||
2983 | hoist-non-react-statics@^2.3.1: | 3075 | hoist-non-react-statics@^2.3.1: |
2984 | version "2.5.5" | 3076 | version "2.5.5" |
2985 | resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" | 3077 | resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" |
... | @@ -3129,6 +3221,11 @@ is-buffer@^1.1.5: | ... | @@ -3129,6 +3221,11 @@ is-buffer@^1.1.5: |
3129 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" | 3221 | resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" |
3130 | integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== | 3222 | integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== |
3131 | 3223 | ||
3224 | +is-buffer@^2.0.2: | ||
3225 | + version "2.0.4" | ||
3226 | + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.4.tgz#3e572f23c8411a5cfd9557c849e3665e0b290623" | ||
3227 | + integrity sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A== | ||
3228 | + | ||
3132 | is-ci@^2.0.0: | 3229 | is-ci@^2.0.0: |
3133 | version "2.0.0" | 3230 | version "2.0.0" |
3134 | resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" | 3231 | resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" |
... | @@ -3316,6 +3413,11 @@ jest-mock@^24.9.0: | ... | @@ -3316,6 +3413,11 @@ jest-mock@^24.9.0: |
3316 | dependencies: | 3413 | dependencies: |
3317 | "@jest/types" "^24.9.0" | 3414 | "@jest/types" "^24.9.0" |
3318 | 3415 | ||
3416 | +jest-react-native@^18.0.0: | ||
3417 | + version "18.0.0" | ||
3418 | + resolved "https://registry.yarnpkg.com/jest-react-native/-/jest-react-native-18.0.0.tgz#77dd909f069324599f227c58c61c2e62168726ba" | ||
3419 | + integrity sha1-d92QnwaTJFmfInxYxhwuYhaHJro= | ||
3420 | + | ||
3319 | jest-serializer@^24.4.0, jest-serializer@^24.9.0: | 3421 | jest-serializer@^24.4.0, jest-serializer@^24.9.0: |
3320 | version "24.9.0" | 3422 | version "24.9.0" |
3321 | resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73" | 3423 | resolved "https://registry.yarnpkg.com/jest-serializer/-/jest-serializer-24.9.0.tgz#e6d7d7ef96d31e8b9079a714754c5d5c58288e73" |
... | @@ -3535,7 +3637,7 @@ lodash.throttle@^4.1.1: | ... | @@ -3535,7 +3637,7 @@ lodash.throttle@^4.1.1: |
3535 | resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" | 3637 | resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4" |
3536 | integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= | 3638 | integrity sha1-wj6RtxAkKscMN/HhzaknTMOb8vQ= |
3537 | 3639 | ||
3538 | -lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.0: | 3640 | +lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.6.0: |
3539 | version "4.17.15" | 3641 | version "4.17.15" |
3540 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" | 3642 | resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" |
3541 | integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== | 3643 | integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== |
... | @@ -3948,6 +4050,11 @@ mkdirp@^0.5.1: | ... | @@ -3948,6 +4050,11 @@ mkdirp@^0.5.1: |
3948 | dependencies: | 4050 | dependencies: |
3949 | minimist "^1.2.5" | 4051 | minimist "^1.2.5" |
3950 | 4052 | ||
4053 | +moment@^2.26.0: | ||
4054 | + version "2.26.0" | ||
4055 | + resolved "https://registry.yarnpkg.com/moment/-/moment-2.26.0.tgz#5e1f82c6bafca6e83e808b30c8705eed0dcbd39a" | ||
4056 | + integrity sha512-oIixUO+OamkUkwjhAVE18rAMfRJNsNe/Stid/gwHSOfHrOtw9EhAY2AHvdKZ/k/MggcYELFCJz/Sn2pL8b8JMw== | ||
4057 | + | ||
3951 | morgan@^1.9.0: | 4058 | morgan@^1.9.0: |
3952 | version "1.10.0" | 4059 | version "1.10.0" |
3953 | resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.10.0.tgz#091778abc1fc47cd3509824653dae1faab6b17d7" | 4060 | resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.10.0.tgz#091778abc1fc47cd3509824653dae1faab6b17d7" |
... | @@ -4006,6 +4113,40 @@ nanomatch@^1.2.9: | ... | @@ -4006,6 +4113,40 @@ nanomatch@^1.2.9: |
4006 | snapdragon "^0.8.1" | 4113 | snapdragon "^0.8.1" |
4007 | to-regex "^3.0.1" | 4114 | to-regex "^3.0.1" |
4008 | 4115 | ||
4116 | +native-base-shoutem-theme@0.3.1: | ||
4117 | + version "0.3.1" | ||
4118 | + resolved "https://registry.yarnpkg.com/native-base-shoutem-theme/-/native-base-shoutem-theme-0.3.1.tgz#f15cbd4ca74ca1c8b6a636d297b9164a5f2b3662" | ||
4119 | + integrity sha512-uwEGhg6gwDuJTHuhNXRKbHtNjni1UI9qfAsVchIqfK7mQAHSNPVU1QRs9Hw6O2K/qLZaP/aJmNoZGc2h2EGSwA== | ||
4120 | + dependencies: | ||
4121 | + hoist-non-react-statics "^1.0.5" | ||
4122 | + lodash "^4.17.14" | ||
4123 | + prop-types "^15.5.10" | ||
4124 | + | ||
4125 | +native-base@^2.13.12: | ||
4126 | + version "2.13.12" | ||
4127 | + resolved "https://registry.yarnpkg.com/native-base/-/native-base-2.13.12.tgz#06020b46019964ddaef3a646ec07e72008018efc" | ||
4128 | + integrity sha512-LdKGNXisbmQ0vDHG86McZKIFTlRyo+OQdJpqmQ05Yf7CGlMbBykJZCFe9rdiee5pLq20xiChe/jXbzFdWcysrg== | ||
4129 | + dependencies: | ||
4130 | + blueimp-md5 "^2.5.0" | ||
4131 | + clamp "^1.0.1" | ||
4132 | + color "~3.1.2" | ||
4133 | + create-react-class "^15.6.3" | ||
4134 | + eslint-config-prettier "^6.0.0" | ||
4135 | + fs-extra "^2.0.0" | ||
4136 | + jest-react-native "^18.0.0" | ||
4137 | + lodash "^4.17.14" | ||
4138 | + native-base-shoutem-theme "0.3.1" | ||
4139 | + opencollective-postinstall "^2.0.2" | ||
4140 | + print-message "^2.1.0" | ||
4141 | + prop-types "^15.5.10" | ||
4142 | + react-native-drawer "2.5.1" | ||
4143 | + react-native-easy-grid "0.2.2" | ||
4144 | + react-native-keyboard-aware-scroll-view "0.9.1" | ||
4145 | + react-native-vector-icons "^6.6.0" | ||
4146 | + react-timer-mixin "^0.13.4" | ||
4147 | + react-tween-state "^0.1.5" | ||
4148 | + tween-functions "^1.0.1" | ||
4149 | + | ||
4009 | negotiator@0.6.2: | 4150 | negotiator@0.6.2: |
4010 | version "0.6.2" | 4151 | version "0.6.2" |
4011 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" | 4152 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" |
... | @@ -4039,6 +4180,14 @@ node-modules-regexp@^1.0.0: | ... | @@ -4039,6 +4180,14 @@ node-modules-regexp@^1.0.0: |
4039 | resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" | 4180 | resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" |
4040 | integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= | 4181 | integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= |
4041 | 4182 | ||
4183 | +node-nikerunclub@^1.0.0: | ||
4184 | + version "1.0.0" | ||
4185 | + resolved "https://registry.yarnpkg.com/node-nikerunclub/-/node-nikerunclub-1.0.0.tgz#eae5be94e4a3e7b20e7d7fbd31b4d416327dd03e" | ||
4186 | + integrity sha512-RrSHyIYADyvEiR6rSktkcfybzJ/4xFfGZHYMsqLvxX1zcTcQSuv6RXemqDhF6FEMXHFkMQeemZVjbOHEo8z/tw== | ||
4187 | + dependencies: | ||
4188 | + axios "^0.18.0" | ||
4189 | + qs "^6.5.2" | ||
4190 | + | ||
4042 | node-notifier@^5.2.1: | 4191 | node-notifier@^5.2.1: |
4043 | version "5.4.3" | 4192 | version "5.4.3" |
4044 | resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.3.tgz#cb72daf94c93904098e28b9c590fd866e464bd50" | 4193 | resolved "https://registry.yarnpkg.com/node-notifier/-/node-notifier-5.4.3.tgz#cb72daf94c93904098e28b9c590fd866e464bd50" |
... | @@ -4189,6 +4338,11 @@ open@^6.2.0: | ... | @@ -4189,6 +4338,11 @@ open@^6.2.0: |
4189 | dependencies: | 4338 | dependencies: |
4190 | is-wsl "^1.1.0" | 4339 | is-wsl "^1.1.0" |
4191 | 4340 | ||
4341 | +opencollective-postinstall@^2.0.2: | ||
4342 | + version "2.0.3" | ||
4343 | + resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259" | ||
4344 | + integrity sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q== | ||
4345 | + | ||
4192 | options@>=0.0.5: | 4346 | options@>=0.0.5: |
4193 | version "0.0.6" | 4347 | version "0.0.6" |
4194 | resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" | 4348 | resolved "https://registry.yarnpkg.com/options/-/options-0.0.6.tgz#ec22d312806bb53e731773e7cdaefcf1c643128f" |
... | @@ -4289,6 +4443,11 @@ p-try@^2.0.0: | ... | @@ -4289,6 +4443,11 @@ p-try@^2.0.0: |
4289 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" | 4443 | resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" |
4290 | integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== | 4444 | integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== |
4291 | 4445 | ||
4446 | +papaparse@^5.2.0: | ||
4447 | + version "5.2.0" | ||
4448 | + resolved "https://registry.yarnpkg.com/papaparse/-/papaparse-5.2.0.tgz#97976a1b135c46612773029153dc64995caa3b7b" | ||
4449 | + integrity sha512-ylq1wgUSnagU+MKQtNeVqrPhZuMYBvOSL00DHycFTCxownF95gpLAk1HiHdUW77N8yxRq1qHXLdlIPyBSG9NSA== | ||
4450 | + | ||
4292 | parse-json@^2.2.0: | 4451 | parse-json@^2.2.0: |
4293 | version "2.2.0" | 4452 | version "2.2.0" |
4294 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" | 4453 | resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" |
... | @@ -4356,6 +4515,11 @@ path-type@^2.0.0: | ... | @@ -4356,6 +4515,11 @@ path-type@^2.0.0: |
4356 | dependencies: | 4515 | dependencies: |
4357 | pify "^2.0.0" | 4516 | pify "^2.0.0" |
4358 | 4517 | ||
4518 | +performance-now@^2.1.0: | ||
4519 | + version "2.1.0" | ||
4520 | + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" | ||
4521 | + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= | ||
4522 | + | ||
4359 | pify@^2.0.0: | 4523 | pify@^2.0.0: |
4360 | version "2.3.0" | 4524 | version "2.3.0" |
4361 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" | 4525 | resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" |
... | @@ -4455,6 +4619,13 @@ pretty-format@^25.1.0: | ... | @@ -4455,6 +4619,13 @@ pretty-format@^25.1.0: |
4455 | ansi-styles "^4.0.0" | 4619 | ansi-styles "^4.0.0" |
4456 | react-is "^16.12.0" | 4620 | react-is "^16.12.0" |
4457 | 4621 | ||
4622 | +print-message@^2.1.0: | ||
4623 | + version "2.1.0" | ||
4624 | + resolved "https://registry.yarnpkg.com/print-message/-/print-message-2.1.0.tgz#b5588ed08b0e1bf77ac7bcb5cb78004afaf9a891" | ||
4625 | + integrity sha1-tViO0IsOG/d6x7y1y3gASvr5qJE= | ||
4626 | + dependencies: | ||
4627 | + chalk "1.1.1" | ||
4628 | + | ||
4458 | private@^0.1.8: | 4629 | private@^0.1.8: |
4459 | version "0.1.8" | 4630 | version "0.1.8" |
4460 | resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" | 4631 | resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" |
... | @@ -4472,7 +4643,7 @@ promise@^7.1.1: | ... | @@ -4472,7 +4643,7 @@ promise@^7.1.1: |
4472 | dependencies: | 4643 | dependencies: |
4473 | asap "~2.0.3" | 4644 | asap "~2.0.3" |
4474 | 4645 | ||
4475 | -prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: | 4646 | +prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2: |
4476 | version "15.7.2" | 4647 | version "15.7.2" |
4477 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" | 4648 | resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" |
4478 | integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== | 4649 | integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== |
... | @@ -4499,6 +4670,11 @@ qs@^6.5.0: | ... | @@ -4499,6 +4670,11 @@ qs@^6.5.0: |
4499 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.3.tgz#bfadcd296c2d549f1dffa560619132c977f5008e" | 4670 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.3.tgz#bfadcd296c2d549f1dffa560619132c977f5008e" |
4500 | integrity sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw== | 4671 | integrity sha512-EbZYNarm6138UKKq46tdx08Yo/q9ZhFoAXAI1meAFd2GtbRDhbZY2WQSICskT0c5q99aFzLG1D4nvTk9tqfXIw== |
4501 | 4672 | ||
4673 | +qs@^6.5.2: | ||
4674 | + version "6.9.4" | ||
4675 | + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.4.tgz#9090b290d1f91728d3c22e54843ca44aea5ab687" | ||
4676 | + integrity sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ== | ||
4677 | + | ||
4502 | query-string@^5.0.1: | 4678 | query-string@^5.0.1: |
4503 | version "5.1.1" | 4679 | version "5.1.1" |
4504 | resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" | 4680 | resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" |
... | @@ -4522,6 +4698,13 @@ querystringify@^2.1.1: | ... | @@ -4522,6 +4698,13 @@ querystringify@^2.1.1: |
4522 | resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" | 4698 | resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" |
4523 | integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== | 4699 | integrity sha512-w7fLxIRCRT7U8Qu53jQnJyPkYZIaR4n5151KMfcJlO/A9397Wxb1amJvROTK6TOnp7PfoAmg/qXiNHI+08jRfA== |
4524 | 4700 | ||
4701 | +raf@^3.1.0: | ||
4702 | + version "3.4.1" | ||
4703 | + resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39" | ||
4704 | + integrity sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA== | ||
4705 | + dependencies: | ||
4706 | + performance-now "^2.1.0" | ||
4707 | + | ||
4525 | range-parser@~1.2.1: | 4708 | range-parser@~1.2.1: |
4526 | version "1.2.1" | 4709 | version "1.2.1" |
4527 | resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" | 4710 | resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" |
... | @@ -4550,6 +4733,31 @@ react-is@^16.12.0, react-is@^16.13.0, react-is@^16.7.0, react-is@^16.8.1, react- | ... | @@ -4550,6 +4733,31 @@ react-is@^16.12.0, react-is@^16.13.0, react-is@^16.7.0, react-is@^16.8.1, react- |
4550 | resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" | 4733 | resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" |
4551 | integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== | 4734 | integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== |
4552 | 4735 | ||
4736 | +react-native-bottom-action-sheet@^2.0.1: | ||
4737 | + version "2.0.1" | ||
4738 | + resolved "https://registry.yarnpkg.com/react-native-bottom-action-sheet/-/react-native-bottom-action-sheet-2.0.1.tgz#d2ab05f275e38519142e288acb093d8638c3a964" | ||
4739 | + integrity sha512-7IUgBjYhub0OR/3vq6FybjXIURBXaoI1oYZRhRzyO/6wfad3hjh9J5ZZjtoNaXgFZfXT/94JPS1fdaBBN5t35A== | ||
4740 | + | ||
4741 | +react-native-drawer@2.5.1: | ||
4742 | + version "2.5.1" | ||
4743 | + resolved "https://registry.yarnpkg.com/react-native-drawer/-/react-native-drawer-2.5.1.tgz#08b9314184f48c724f1b467f8859797369798654" | ||
4744 | + integrity sha512-cxcQNbSWy5sbGi7anSVp6EDr6JarOBMY9lbFOeLFeVYbONiudoqRKbgEsSDgSw3/LFCLvUXK5zdjXCOedeytxQ== | ||
4745 | + dependencies: | ||
4746 | + prop-types "^15.5.8" | ||
4747 | + tween-functions "^1.0.1" | ||
4748 | + | ||
4749 | +react-native-easy-grid@0.2.2: | ||
4750 | + version "0.2.2" | ||
4751 | + resolved "https://registry.yarnpkg.com/react-native-easy-grid/-/react-native-easy-grid-0.2.2.tgz#f0be33620be1ebe2d2295918eb58b0a27e8272ab" | ||
4752 | + integrity sha512-MlYrNIldnEMKn6TVatQN1P64GoVlwGIuz+8ncdfJ0Wq/xtzUkQwlil8Uksyp7MhKfENE09MQnGNcba6Mx3oSAA== | ||
4753 | + dependencies: | ||
4754 | + lodash "^4.17.15" | ||
4755 | + | ||
4756 | +react-native-fast-image@^8.1.5: | ||
4757 | + version "8.1.5" | ||
4758 | + resolved "https://registry.yarnpkg.com/react-native-fast-image/-/react-native-fast-image-8.1.5.tgz#0a6404c988dad68c98d26f91155d0a5293ba2ea5" | ||
4759 | + integrity sha512-DoAWGLeQ2hbllummrpXH9B38OgM0TFmNYCF34F90/hdHZirqUtYHzF4QDdb/NV7ebSijHmM3mpkzct8PXtcYyg== | ||
4760 | + | ||
4553 | react-native-gesture-handler@~1.6.0: | 4761 | react-native-gesture-handler@~1.6.0: |
4554 | version "1.6.1" | 4762 | version "1.6.1" |
4555 | resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.6.1.tgz#678e2dce250ed66e93af409759be22cd6375dd17" | 4763 | resolved "https://registry.yarnpkg.com/react-native-gesture-handler/-/react-native-gesture-handler-1.6.1.tgz#678e2dce250ed66e93af409759be22cd6375dd17" |
... | @@ -4560,11 +4768,19 @@ react-native-gesture-handler@~1.6.0: | ... | @@ -4560,11 +4768,19 @@ react-native-gesture-handler@~1.6.0: |
4560 | invariant "^2.2.4" | 4768 | invariant "^2.2.4" |
4561 | prop-types "^15.7.2" | 4769 | prop-types "^15.7.2" |
4562 | 4770 | ||
4563 | -react-native-iphone-x-helper@^1.2.1: | 4771 | +react-native-iphone-x-helper@^1.0.3, react-native-iphone-x-helper@^1.2.1: |
4564 | version "1.2.1" | 4772 | version "1.2.1" |
4565 | resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz#645e2ffbbb49e80844bb4cbbe34a126fda1e6772" | 4773 | resolved "https://registry.yarnpkg.com/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.2.1.tgz#645e2ffbbb49e80844bb4cbbe34a126fda1e6772" |
4566 | integrity sha512-/VbpIEp8tSNNHIvstuA3Swx610whci1Zpc9mqNkqn14DkMbw+ORviln2u0XyHG1kPvvwTNGZY6QpeFwxYaSdbQ== | 4774 | integrity sha512-/VbpIEp8tSNNHIvstuA3Swx610whci1Zpc9mqNkqn14DkMbw+ORviln2u0XyHG1kPvvwTNGZY6QpeFwxYaSdbQ== |
4567 | 4775 | ||
4776 | +react-native-keyboard-aware-scroll-view@0.9.1: | ||
4777 | + version "0.9.1" | ||
4778 | + resolved "https://registry.yarnpkg.com/react-native-keyboard-aware-scroll-view/-/react-native-keyboard-aware-scroll-view-0.9.1.tgz#9e54b565a5f19b30bed12221d48921781f7630af" | ||
4779 | + integrity sha512-tBZ8rmjELN0F6t5UBp5CW3NYmZXgVnJSzVCssv/OqG2t6kiB+OUTqxNvUP24K+HARX4H+XaW0aEJSFQkQCv6KA== | ||
4780 | + dependencies: | ||
4781 | + prop-types "^15.6.2" | ||
4782 | + react-native-iphone-x-helper "^1.0.3" | ||
4783 | + | ||
4568 | react-native-maps@0.26.1: | 4784 | react-native-maps@0.26.1: |
4569 | version "0.26.1" | 4785 | version "0.26.1" |
4570 | resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.26.1.tgz#6ec316259b38d259c8974448d894bd7a23101da4" | 4786 | resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-0.26.1.tgz#6ec316259b38d259c8974448d894bd7a23101da4" |
... | @@ -4589,6 +4805,15 @@ react-native-screens@~2.2.0: | ... | @@ -4589,6 +4805,15 @@ react-native-screens@~2.2.0: |
4589 | dependencies: | 4805 | dependencies: |
4590 | debounce "^1.2.0" | 4806 | debounce "^1.2.0" |
4591 | 4807 | ||
4808 | +react-native-vector-icons@^6.6.0: | ||
4809 | + version "6.6.0" | ||
4810 | + resolved "https://registry.yarnpkg.com/react-native-vector-icons/-/react-native-vector-icons-6.6.0.tgz#66cf004918eb05d90778d64bd42077c1800d481b" | ||
4811 | + integrity sha512-MImKVx8JEvVVBnaShMr7/yTX4Y062JZMupht1T+IEgbqBj4aQeQ1z2SH4VHWKNtWtppk4kz9gYyUiMWqx6tNSw== | ||
4812 | + dependencies: | ||
4813 | + lodash "^4.0.0" | ||
4814 | + prop-types "^15.6.2" | ||
4815 | + yargs "^13.2.2" | ||
4816 | + | ||
4592 | react-native-view-shot@3.1.2: | 4817 | react-native-view-shot@3.1.2: |
4593 | version "3.1.2" | 4818 | version "3.1.2" |
4594 | resolved "https://registry.yarnpkg.com/react-native-view-shot/-/react-native-view-shot-3.1.2.tgz#8c8e84c67a4bc8b603e697dbbd59dbc9b4f84825" | 4819 | resolved "https://registry.yarnpkg.com/react-native-view-shot/-/react-native-view-shot-3.1.2.tgz#8c8e84c67a4bc8b603e697dbbd59dbc9b4f84825" |
... | @@ -4665,6 +4890,14 @@ react-timer-mixin@^0.13.4: | ... | @@ -4665,6 +4890,14 @@ react-timer-mixin@^0.13.4: |
4665 | resolved "https://registry.yarnpkg.com/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz#75a00c3c94c13abe29b43d63b4c65a88fc8264d3" | 4890 | resolved "https://registry.yarnpkg.com/react-timer-mixin/-/react-timer-mixin-0.13.4.tgz#75a00c3c94c13abe29b43d63b4c65a88fc8264d3" |
4666 | integrity sha512-4+ow23tp/Tv7hBM5Az5/Be/eKKF7DIvJ09voz5LyHGQaqqz9WV8YMs31eFvcYQs7d451LSg7kDJV70XYN/Ug/Q== | 4891 | integrity sha512-4+ow23tp/Tv7hBM5Az5/Be/eKKF7DIvJ09voz5LyHGQaqqz9WV8YMs31eFvcYQs7d451LSg7kDJV70XYN/Ug/Q== |
4667 | 4892 | ||
4893 | +react-tween-state@^0.1.5: | ||
4894 | + version "0.1.5" | ||
4895 | + resolved "https://registry.yarnpkg.com/react-tween-state/-/react-tween-state-0.1.5.tgz#e98b066551efb93cb92dd1be14995c2e3deae339" | ||
4896 | + integrity sha1-6YsGZVHvuTy5LdG+FJlcLj3q4zk= | ||
4897 | + dependencies: | ||
4898 | + raf "^3.1.0" | ||
4899 | + tween-functions "^1.0.1" | ||
4900 | + | ||
4668 | react@~16.9.0: | 4901 | react@~16.9.0: |
4669 | version "16.9.0" | 4902 | version "16.9.0" |
4670 | resolved "https://registry.yarnpkg.com/react/-/react-16.9.0.tgz#40ba2f9af13bc1a38d75dbf2f4359a5185c4f7aa" | 4903 | resolved "https://registry.yarnpkg.com/react/-/react-16.9.0.tgz#40ba2f9af13bc1a38d75dbf2f4359a5185c4f7aa" |
... | @@ -4801,6 +5034,11 @@ require-main-filename@^1.0.1: | ... | @@ -4801,6 +5034,11 @@ require-main-filename@^1.0.1: |
4801 | resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" | 5034 | resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" |
4802 | integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= | 5035 | integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= |
4803 | 5036 | ||
5037 | +require-main-filename@^2.0.0: | ||
5038 | + version "2.0.0" | ||
5039 | + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" | ||
5040 | + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== | ||
5041 | + | ||
4804 | requires-port@^1.0.0: | 5042 | requires-port@^1.0.0: |
4805 | version "1.0.0" | 5043 | version "1.0.0" |
4806 | resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" | 5044 | resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" |
... | @@ -5256,6 +5494,15 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: | ... | @@ -5256,6 +5494,15 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: |
5256 | is-fullwidth-code-point "^2.0.0" | 5494 | is-fullwidth-code-point "^2.0.0" |
5257 | strip-ansi "^4.0.0" | 5495 | strip-ansi "^4.0.0" |
5258 | 5496 | ||
5497 | +string-width@^3.0.0, string-width@^3.1.0: | ||
5498 | + version "3.1.0" | ||
5499 | + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" | ||
5500 | + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== | ||
5501 | + dependencies: | ||
5502 | + emoji-regex "^7.0.1" | ||
5503 | + is-fullwidth-code-point "^2.0.0" | ||
5504 | + strip-ansi "^5.1.0" | ||
5505 | + | ||
5259 | string_decoder@~1.1.1: | 5506 | string_decoder@~1.1.1: |
5260 | version "1.1.1" | 5507 | version "1.1.1" |
5261 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" | 5508 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" |
... | @@ -5277,7 +5524,7 @@ strip-ansi@^4.0.0: | ... | @@ -5277,7 +5524,7 @@ strip-ansi@^4.0.0: |
5277 | dependencies: | 5524 | dependencies: |
5278 | ansi-regex "^3.0.0" | 5525 | ansi-regex "^3.0.0" |
5279 | 5526 | ||
5280 | -strip-ansi@^5.0.0, strip-ansi@^5.2.0: | 5527 | +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: |
5281 | version "5.2.0" | 5528 | version "5.2.0" |
5282 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" | 5529 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" |
5283 | integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== | 5530 | integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== |
... | @@ -5315,6 +5562,11 @@ sudo-prompt@^9.0.0: | ... | @@ -5315,6 +5562,11 @@ sudo-prompt@^9.0.0: |
5315 | resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.1.1.tgz#73853d729770392caec029e2470db9c221754db0" | 5562 | resolved "https://registry.yarnpkg.com/sudo-prompt/-/sudo-prompt-9.1.1.tgz#73853d729770392caec029e2470db9c221754db0" |
5316 | integrity sha512-es33J1g2HjMpyAhz8lOR+ICmXXAqTuKbuXuUWLhOLew20oN9oUCgCJx615U/v7aioZg7IX5lIh9x34vwneu4pA== | 5563 | integrity sha512-es33J1g2HjMpyAhz8lOR+ICmXXAqTuKbuXuUWLhOLew20oN9oUCgCJx615U/v7aioZg7IX5lIh9x34vwneu4pA== |
5317 | 5564 | ||
5565 | +supports-color@^2.0.0: | ||
5566 | + version "2.0.0" | ||
5567 | + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" | ||
5568 | + integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= | ||
5569 | + | ||
5318 | supports-color@^5.3.0, supports-color@^5.5.0: | 5570 | supports-color@^5.3.0, supports-color@^5.5.0: |
5319 | version "5.5.0" | 5571 | version "5.5.0" |
5320 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" | 5572 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" |
... | @@ -5429,6 +5681,11 @@ toidentifier@1.0.0: | ... | @@ -5429,6 +5681,11 @@ toidentifier@1.0.0: |
5429 | resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" | 5681 | resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" |
5430 | integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== | 5682 | integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== |
5431 | 5683 | ||
5684 | +tween-functions@^1.0.1: | ||
5685 | + version "1.2.0" | ||
5686 | + resolved "https://registry.yarnpkg.com/tween-functions/-/tween-functions-1.2.0.tgz#1ae3a50e7c60bb3def774eac707acbca73bbc3ff" | ||
5687 | + integrity sha1-GuOlDnxguz3vd06scHrLynO7w/8= | ||
5688 | + | ||
5432 | type-fest@^0.7.1: | 5689 | type-fest@^0.7.1: |
5433 | version "0.7.1" | 5690 | version "0.7.1" |
5434 | resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" | 5691 | resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" |
... | @@ -5689,6 +5946,15 @@ wrap-ansi@^2.0.0: | ... | @@ -5689,6 +5946,15 @@ wrap-ansi@^2.0.0: |
5689 | string-width "^1.0.1" | 5946 | string-width "^1.0.1" |
5690 | strip-ansi "^3.0.1" | 5947 | strip-ansi "^3.0.1" |
5691 | 5948 | ||
5949 | +wrap-ansi@^5.1.0: | ||
5950 | + version "5.1.0" | ||
5951 | + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" | ||
5952 | + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== | ||
5953 | + dependencies: | ||
5954 | + ansi-styles "^3.2.0" | ||
5955 | + string-width "^3.0.0" | ||
5956 | + strip-ansi "^5.0.0" | ||
5957 | + | ||
5692 | wrappy@1: | 5958 | wrappy@1: |
5693 | version "1.0.2" | 5959 | version "1.0.2" |
5694 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" | 5960 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" |
... | @@ -5760,7 +6026,7 @@ y18n@^3.2.1: | ... | @@ -5760,7 +6026,7 @@ y18n@^3.2.1: |
5760 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" | 6026 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" |
5761 | integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= | 6027 | integrity sha1-bRX7qITAhnnA136I53WegR4H+kE= |
5762 | 6028 | ||
5763 | -"y18n@^3.2.1 || ^4.0.0": | 6029 | +"y18n@^3.2.1 || ^4.0.0", y18n@^4.0.0: |
5764 | version "4.0.0" | 6030 | version "4.0.0" |
5765 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" | 6031 | resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.0.tgz#95ef94f85ecc81d007c264e190a120f0a3c8566b" |
5766 | integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== | 6032 | integrity sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w== |
... | @@ -5778,6 +6044,14 @@ yargs-parser@^11.1.1: | ... | @@ -5778,6 +6044,14 @@ yargs-parser@^11.1.1: |
5778 | camelcase "^5.0.0" | 6044 | camelcase "^5.0.0" |
5779 | decamelize "^1.2.0" | 6045 | decamelize "^1.2.0" |
5780 | 6046 | ||
6047 | +yargs-parser@^13.1.2: | ||
6048 | + version "13.1.2" | ||
6049 | + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" | ||
6050 | + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== | ||
6051 | + dependencies: | ||
6052 | + camelcase "^5.0.0" | ||
6053 | + decamelize "^1.2.0" | ||
6054 | + | ||
5781 | yargs-parser@^7.0.0: | 6055 | yargs-parser@^7.0.0: |
5782 | version "7.0.0" | 6056 | version "7.0.0" |
5783 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" | 6057 | resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9" |
... | @@ -5803,6 +6077,22 @@ yargs@^12.0.5: | ... | @@ -5803,6 +6077,22 @@ yargs@^12.0.5: |
5803 | y18n "^3.2.1 || ^4.0.0" | 6077 | y18n "^3.2.1 || ^4.0.0" |
5804 | yargs-parser "^11.1.1" | 6078 | yargs-parser "^11.1.1" |
5805 | 6079 | ||
6080 | +yargs@^13.2.2: | ||
6081 | + version "13.3.2" | ||
6082 | + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" | ||
6083 | + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== | ||
6084 | + dependencies: | ||
6085 | + cliui "^5.0.0" | ||
6086 | + find-up "^3.0.0" | ||
6087 | + get-caller-file "^2.0.1" | ||
6088 | + require-directory "^2.1.1" | ||
6089 | + require-main-filename "^2.0.0" | ||
6090 | + set-blocking "^2.0.0" | ||
6091 | + string-width "^3.0.0" | ||
6092 | + which-module "^2.0.0" | ||
6093 | + y18n "^4.0.0" | ||
6094 | + yargs-parser "^13.1.2" | ||
6095 | + | ||
5806 | yargs@^9.0.0: | 6096 | yargs@^9.0.0: |
5807 | version "9.0.1" | 6097 | version "9.0.1" |
5808 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" | 6098 | resolved "https://registry.yarnpkg.com/yargs/-/yargs-9.0.1.tgz#52acc23feecac34042078ee78c0c007f5085db4c" | ... | ... |
code/user_and_post_server/.gitignore
0 → 100644
... | @@ -37,6 +37,7 @@ const sessionMiddleware = expressSession({ | ... | @@ -37,6 +37,7 @@ const sessionMiddleware = expressSession({ |
37 | 37 | ||
38 | const passportIndex = require('./passport/index'); | 38 | const passportIndex = require('./passport/index'); |
39 | const userRouter = require('./routes/user'); | 39 | const userRouter = require('./routes/user'); |
40 | +const apiRouter = require('./routes/api'); | ||
40 | 41 | ||
41 | passportIndex(passport); | 42 | passportIndex(passport); |
42 | 43 | ||
... | @@ -74,6 +75,8 @@ app.use(passport.session()); // 패스포트 세션 작업 | ... | @@ -74,6 +75,8 @@ app.use(passport.session()); // 패스포트 세션 작업 |
74 | 75 | ||
75 | app.use('/public', express.static(path.join(__dirname, 'open'))); // 모두에게 공개된 폴더 설정 | 76 | app.use('/public', express.static(path.join(__dirname, 'open'))); // 모두에게 공개된 폴더 설정 |
76 | app.use('/user', userRouter); | 77 | app.use('/user', userRouter); |
78 | +app.use('/api', apiRouter); | ||
79 | + | ||
77 | 80 | ||
78 | app.use(function (req, res, next) { | 81 | app.use(function (req, res, next) { |
79 | next(httpErrors(404)); | 82 | next(httpErrors(404)); |
... | @@ -84,7 +87,7 @@ app.use(function (err, req, res, next) { | ... | @@ -84,7 +87,7 @@ app.use(function (err, req, res, next) { |
84 | res.locals.message = err.message; | 87 | res.locals.message = err.message; |
85 | res.locals.error = req.app.get('env') === 'development' ? err : {}; | 88 | res.locals.error = req.app.get('env') === 'development' ? err : {}; |
86 | 89 | ||
87 | - //render the error page | 90 | + //render the error pagea |
88 | res.status(err.status || 500); | 91 | res.status(err.status || 500); |
89 | res.render('error'); | 92 | res.render('error'); |
90 | }); | 93 | }); | ... | ... |
File moved
... | @@ -376,7 +376,6 @@ | ... | @@ -376,7 +376,6 @@ |
376 | "version": "1.5.0", | 376 | "version": "1.5.0", |
377 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", | 377 | "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", |
378 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", | 378 | "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", |
379 | - "optional": true, | ||
380 | "requires": { | 379 | "requires": { |
381 | "file-uri-to-path": "1.0.0" | 380 | "file-uri-to-path": "1.0.0" |
382 | } | 381 | } |
... | @@ -1507,8 +1506,7 @@ | ... | @@ -1507,8 +1506,7 @@ |
1507 | "file-uri-to-path": { | 1506 | "file-uri-to-path": { |
1508 | "version": "1.0.0", | 1507 | "version": "1.0.0", |
1509 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", | 1508 | "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", |
1510 | - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", | 1509 | + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" |
1511 | - "optional": true | ||
1512 | }, | 1510 | }, |
1513 | "fill-range": { | 1511 | "fill-range": { |
1514 | "version": "4.0.0", | 1512 | "version": "4.0.0", |
... | @@ -1810,6 +1808,11 @@ | ... | @@ -1810,6 +1808,11 @@ |
1810 | } | 1808 | } |
1811 | } | 1809 | } |
1812 | }, | 1810 | }, |
1811 | + "hoek": { | ||
1812 | + "version": "4.2.1", | ||
1813 | + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", | ||
1814 | + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" | ||
1815 | + }, | ||
1813 | "http-errors": { | 1816 | "http-errors": { |
1814 | "version": "1.6.3", | 1817 | "version": "1.6.3", |
1815 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", | 1818 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", |
... | @@ -2110,6 +2113,14 @@ | ... | @@ -2110,6 +2113,14 @@ |
2110 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", | 2113 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", |
2111 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" | 2114 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" |
2112 | }, | 2115 | }, |
2116 | + "isemail": { | ||
2117 | + "version": "3.2.0", | ||
2118 | + "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", | ||
2119 | + "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", | ||
2120 | + "requires": { | ||
2121 | + "punycode": "2.x.x" | ||
2122 | + } | ||
2123 | + }, | ||
2113 | "isexe": { | 2124 | "isexe": { |
2114 | "version": "2.0.0", | 2125 | "version": "2.0.0", |
2115 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", | 2126 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", |
... | @@ -2120,6 +2131,23 @@ | ... | @@ -2120,6 +2131,23 @@ |
2120 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", | 2131 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", |
2121 | "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" | 2132 | "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" |
2122 | }, | 2133 | }, |
2134 | + "joi": { | ||
2135 | + "version": "13.7.0", | ||
2136 | + "resolved": "https://registry.npmjs.org/joi/-/joi-13.7.0.tgz", | ||
2137 | + "integrity": "sha512-xuY5VkHfeOYK3Hdi91ulocfuFopwgbSORmIwzcwHKESQhC7w1kD5jaVSPnqDxS2I8t3RZ9omCKAxNwXN5zG1/Q==", | ||
2138 | + "requires": { | ||
2139 | + "hoek": "5.x.x", | ||
2140 | + "isemail": "3.x.x", | ||
2141 | + "topo": "3.x.x" | ||
2142 | + }, | ||
2143 | + "dependencies": { | ||
2144 | + "hoek": { | ||
2145 | + "version": "5.0.4", | ||
2146 | + "resolved": "https://registry.npmjs.org/hoek/-/hoek-5.0.4.tgz", | ||
2147 | + "integrity": "sha512-Alr4ZQgoMlnere5FZJsIyfIjORBqZll5POhDsF4q64dPuJR6rNxXdDxtHSQq8OXRurhmx+PWYEE8bXRROY8h0w==" | ||
2148 | + } | ||
2149 | + } | ||
2150 | + }, | ||
2123 | "js-beautify": { | 2151 | "js-beautify": { |
2124 | "version": "1.11.0", | 2152 | "version": "1.11.0", |
2125 | "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.11.0.tgz", | 2153 | "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.11.0.tgz", |
... | @@ -2621,6 +2649,15 @@ | ... | @@ -2621,6 +2649,15 @@ |
2621 | "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", | 2649 | "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", |
2622 | "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" | 2650 | "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" |
2623 | }, | 2651 | }, |
2652 | + "node-expat": { | ||
2653 | + "version": "2.3.18", | ||
2654 | + "resolved": "https://registry.npmjs.org/node-expat/-/node-expat-2.3.18.tgz", | ||
2655 | + "integrity": "sha512-9dIrDxXePa9HSn+hhlAg1wXkvqOjxefEbMclGxk2cEnq/Y3U7Qo5HNNqeo3fQ4bVmLhcdt3YN1TZy7WMZy4MHw==", | ||
2656 | + "requires": { | ||
2657 | + "bindings": "^1.5.0", | ||
2658 | + "nan": "^2.13.2" | ||
2659 | + } | ||
2660 | + }, | ||
2624 | "node-pre-gyp": { | 2661 | "node-pre-gyp": { |
2625 | "version": "0.14.0", | 2662 | "version": "0.14.0", |
2626 | "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz", | 2663 | "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.14.0.tgz", |
... | @@ -3130,6 +3167,11 @@ | ... | @@ -3130,6 +3167,11 @@ |
3130 | "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz", | 3167 | "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz", |
3131 | "integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==" | 3168 | "integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==" |
3132 | }, | 3169 | }, |
3170 | + "punycode": { | ||
3171 | + "version": "2.1.1", | ||
3172 | + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", | ||
3173 | + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" | ||
3174 | + }, | ||
3133 | "qs": { | 3175 | "qs": { |
3134 | "version": "6.5.2", | 3176 | "version": "6.5.2", |
3135 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", | 3177 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", |
... | @@ -4034,6 +4076,21 @@ | ... | @@ -4034,6 +4076,21 @@ |
4034 | "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz", | 4076 | "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-0.0.1.tgz", |
4035 | "integrity": "sha1-zu78cXp2xDFvEm0LnbqlXX598Bo=" | 4077 | "integrity": "sha1-zu78cXp2xDFvEm0LnbqlXX598Bo=" |
4036 | }, | 4078 | }, |
4079 | + "topo": { | ||
4080 | + "version": "3.0.3", | ||
4081 | + "resolved": "https://registry.npmjs.org/topo/-/topo-3.0.3.tgz", | ||
4082 | + "integrity": "sha512-IgpPtvD4kjrJ7CRA3ov2FhWQADwv+Tdqbsf1ZnPUSAtCJ9e1Z44MmoSGDXGk4IppoZA7jd/QRkNddlLJWlUZsQ==", | ||
4083 | + "requires": { | ||
4084 | + "hoek": "6.x.x" | ||
4085 | + }, | ||
4086 | + "dependencies": { | ||
4087 | + "hoek": { | ||
4088 | + "version": "6.1.3", | ||
4089 | + "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.3.tgz", | ||
4090 | + "integrity": "sha512-YXXAAhmF9zpQbC7LEcREFtXfGq5K1fmd+4PHkBq8NUqmzW3G+Dq10bI/i0KucLRwss3YYFQ0fSfoxBZYiGUqtQ==" | ||
4091 | + } | ||
4092 | + } | ||
4093 | + }, | ||
4037 | "toposort-class": { | 4094 | "toposort-class": { |
4038 | "version": "1.0.1", | 4095 | "version": "1.0.1", |
4039 | "resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", | 4096 | "resolved": "https://registry.npmjs.org/toposort-class/-/toposort-class-1.0.1.tgz", |
... | @@ -4428,6 +4485,24 @@ | ... | @@ -4428,6 +4485,24 @@ |
4428 | "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", | 4485 | "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz", |
4429 | "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=" | 4486 | "integrity": "sha1-SWsswQnsqNus/i3HK2A8F8WHCtQ=" |
4430 | }, | 4487 | }, |
4488 | + "xml-js": { | ||
4489 | + "version": "1.6.11", | ||
4490 | + "resolved": "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz", | ||
4491 | + "integrity": "sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g==", | ||
4492 | + "requires": { | ||
4493 | + "sax": "^1.2.4" | ||
4494 | + } | ||
4495 | + }, | ||
4496 | + "xml2json": { | ||
4497 | + "version": "0.12.0", | ||
4498 | + "resolved": "https://registry.npmjs.org/xml2json/-/xml2json-0.12.0.tgz", | ||
4499 | + "integrity": "sha512-EPJHRWJnJUYbJlzR4pBhZODwWdi2IaYGtDdteJi0JpZ4OD31IplWALuit8r73dJuM4iHZdDVKY1tLqY2UICejg==", | ||
4500 | + "requires": { | ||
4501 | + "hoek": "^4.2.1", | ||
4502 | + "joi": "^13.1.2", | ||
4503 | + "node-expat": "^2.3.18" | ||
4504 | + } | ||
4505 | + }, | ||
4431 | "xmlhttprequest": { | 4506 | "xmlhttprequest": { |
4432 | "version": "1.8.0", | 4507 | "version": "1.8.0", |
4433 | "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", | 4508 | "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", | ... | ... |
... | @@ -18,6 +18,7 @@ | ... | @@ -18,6 +18,7 @@ |
18 | "express-session": "^1.16.2", | 18 | "express-session": "^1.16.2", |
19 | "fs": "0.0.1-security", | 19 | "fs": "0.0.1-security", |
20 | "http-errors": "~1.6.3", | 20 | "http-errors": "~1.6.3", |
21 | + "moment": "^2.26.0", | ||
21 | "mongoose": "^5.9.2", | 22 | "mongoose": "^5.9.2", |
22 | "morgan": "^1.9.1", | 23 | "morgan": "^1.9.1", |
23 | "multer": "^1.4.2", | 24 | "multer": "^1.4.2", |
... | @@ -31,6 +32,8 @@ | ... | @@ -31,6 +32,8 @@ |
31 | "sequelize": "^5.21.5", | 32 | "sequelize": "^5.21.5", |
32 | "sequelize-cli": "^5.5.1", | 33 | "sequelize-cli": "^5.5.1", |
33 | "socket.io": "^2.3.0", | 34 | "socket.io": "^2.3.0", |
35 | + "xml-js": "^1.6.11", | ||
36 | + "xml2json": "^0.12.0", | ||
34 | "xmlhttprequest": "^1.8.0" | 37 | "xmlhttprequest": "^1.8.0" |
35 | } | 38 | } |
36 | } | 39 | } | ... | ... |
File moved
code/user_and_post_server/routes/api.js
0 → 100644
1 | +var express = require('express'); | ||
2 | +const axios = require('axios'); | ||
3 | +const convert = require('xml-js'); | ||
4 | +var router = express.Router(); | ||
5 | +let xmlParser = require('xml2json'); | ||
6 | +var searchPubTransPath = require('../setPath'); | ||
7 | +const moment = require('moment'); | ||
8 | + | ||
9 | +/* GET home page. */ | ||
10 | +router.get('/', function (req, res, next) { | ||
11 | + return res.json({title: 'Express'}); | ||
12 | +}); | ||
13 | + | ||
14 | +router.post('/setOptRoute', async (req, res, next) => { | ||
15 | + var {startLocation, endLocation, endTime, personalVelocity} = req.body; | ||
16 | + try { | ||
17 | + const startLocationX = startLocation.longitude; | ||
18 | + const startLocationY = startLocation.latitude; | ||
19 | + const endLocationX = endLocation.longitude; | ||
20 | + const endLocationY = endLocation.latitude; | ||
21 | + var avgSpeed = personalVelocity; | ||
22 | + if(!avgSpeed){ | ||
23 | + avgSpeed = 60; | ||
24 | + } | ||
25 | + console.log('endTime 은? ', endTime, personalVelocity); | ||
26 | + const path = await searchPubTransPath(startLocationX, startLocationY, endLocationX, endLocationY, avgSpeed, endTime); | ||
27 | + const optRoute = path; | ||
28 | + console.log(path); | ||
29 | + return res.json({optRoute: optRoute}); | ||
30 | + } catch (e) { | ||
31 | + console.error(e); | ||
32 | + // next(e); | ||
33 | + } | ||
34 | +}); | ||
35 | + | ||
36 | +module.exports = router; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -4,7 +4,6 @@ const bcrypt = require('bcrypt'); | ... | @@ -4,7 +4,6 @@ const bcrypt = require('bcrypt'); |
4 | const passport = require('passport'); | 4 | const passport = require('passport'); |
5 | const {isLoggedIn, isNotLoggedIn} = require("./middleware"); | 5 | const {isLoggedIn, isNotLoggedIn} = require("./middleware"); |
6 | const models = require('../models/index'); | 6 | const models = require('../models/index'); |
7 | -const {searchPubTransPathAJAX} = require('../crawling'); | ||
8 | 7 | ||
9 | router.get('/loadMe', isLoggedIn, (req, res, next) => { | 8 | router.get('/loadMe', isLoggedIn, (req, res, next) => { |
10 | // console.log('loadMe요청옴', req.user); | 9 | // console.log('loadMe요청옴', req.user); | ... | ... |
code/user_and_post_server/setPath.js
0 → 100644
1 | +const axios = require('axios'); | ||
2 | +const convert = require('xml-js'); | ||
3 | +const moment = require('moment'); | ||
4 | + | ||
5 | +const apiKey = ''; | ||
6 | + | ||
7 | +const reverseGeocoding = async (_x, _y) => { | ||
8 | + try { | ||
9 | + var result = await axios.get("http://apis.vworld.kr/coord2jibun.do?x=" + _x + "&y=" + _y + "&output=xml&epsg=epsg:4326&apiKey="); | ||
10 | + result = convert.xml2js(result.data, {compact: true, spaces: 4}); | ||
11 | + result = JSON.parse(JSON.stringify(result)); | ||
12 | + var cityName = result.result.ADDR._cdata.split(" ")[0]; | ||
13 | + return cityName | ||
14 | + } catch (e) { | ||
15 | + console.error(e); | ||
16 | + } | ||
17 | + | ||
18 | +}; | ||
19 | + | ||
20 | +const subwayArrivalTime = async (stationID, wayCode) => { | ||
21 | + try { | ||
22 | + let today = new Date(); | ||
23 | + let day = today.getDay();//요일 | ||
24 | + let hours = today.getHours();//시 | ||
25 | + let minutes = today.getMinutes();//분 | ||
26 | + var result = await axios.get("https://api.odsay.com/v1/api/subwayTimeTable?lang=0&stationID=" + stationID + "&wayCode=" + wayCode + `&showExpressTime=1&apiKey=${apiKey}`); | ||
27 | + } catch (e) { | ||
28 | + console.error(e); | ||
29 | + } | ||
30 | + | ||
31 | +} | ||
32 | +//subwayArrivalTime(216,1); | ||
33 | +const seoulBusStationID = async (stationID) => { | ||
34 | + try { | ||
35 | + var result = await axios.get("https://api.odsay.com/v1/api/busStationInfo?lang=0&stationID=" + parseInt(stationID) + `&apiKey=${apiKey}`); | ||
36 | + result = result.data; | ||
37 | + var _stationID = result.result.arsID; | ||
38 | + _stationID = _stationID.replace("-", ""); | ||
39 | + return _stationID; | ||
40 | + } catch (e) { | ||
41 | + console.error(e); | ||
42 | + } | ||
43 | +} | ||
44 | + | ||
45 | +const seoulBusArrivalTime = async (stationID, busNum) => { | ||
46 | + try { | ||
47 | + | ||
48 | + var _stationID = await seoulBusStationID(stationID); | ||
49 | + | ||
50 | + var result = await axios.get('http://ws.bus.go.kr/api/rest/stationinfo/getStationByUid?serviceKey' + _stationID); | ||
51 | + //console.log(res.data); | ||
52 | + result = convert.xml2js(result.data, {compact: true, spaces: 4}); | ||
53 | + result = JSON.parse(JSON.stringify(result)); | ||
54 | + //console.log(result.ServiceResult.msgBody.itemList); | ||
55 | + var arrList = result.ServiceResult.msgBody.itemList; | ||
56 | + //console.log(arrList); | ||
57 | + for (var i = 0; i < arrList.length; i++) { | ||
58 | + if (arrList[i].rtNm._text == busNum) { | ||
59 | + var msg = new Object(); | ||
60 | + msg.msg1 = arrList[i].arrmsg1._text; | ||
61 | + msg.msg2 = arrList[i].arrmsg2._text; | ||
62 | + msg.timeInterval = 7; | ||
63 | + return msg; | ||
64 | + } | ||
65 | + } | ||
66 | + var msg = new Object(); | ||
67 | + msg.msg1 = "도착예정 없음"; | ||
68 | + msg.msg2 = "도착예정 없음"; | ||
69 | + msg.timeInterval = 7; | ||
70 | + return msg; | ||
71 | + | ||
72 | + | ||
73 | + } catch (e) { | ||
74 | + console.error(e); | ||
75 | + } | ||
76 | +}; | ||
77 | + | ||
78 | +const gyeonggiLocalData = async (stationID, busID) => { | ||
79 | + try { | ||
80 | + var result = await axios.get("https://api.odsay.com/v1/api/busStationInfo?lang=0&stationID=" + parseInt(stationID) + `&apiKey=${apiKey}`); | ||
81 | + result = result.data; | ||
82 | + var stationLocalId = result.result.localStationID; | ||
83 | + for (var i = 0; i < result.result.lane.length; i++) { | ||
84 | + if (result.result.lane[i].busID == busID) { | ||
85 | + busLocalId = result.result.lane[i].busLocalBlID; | ||
86 | + | ||
87 | + return [stationLocalId, busLocalId]; | ||
88 | + } | ||
89 | + } | ||
90 | + } catch (e) { | ||
91 | + console.error(e); | ||
92 | + } | ||
93 | +}; | ||
94 | +const gyeonggiBusArrivalTime = async (stationID, busID) => { | ||
95 | + try { | ||
96 | + var localData = await gyeonggiLocalData(stationID, busID); | ||
97 | + var stationLocalID = localData[0]; | ||
98 | + var busLocalID = localData[1]; | ||
99 | + var result = await axios.get('http://openapi.gbis.go.kr/ws/rest/busarrivalservice/station?&stationId=' + stationLocalID); | ||
100 | + result = convert.xml2js(result.data, {compact: true, spaces: 4}); | ||
101 | + result = JSON.parse(JSON.stringify(result)); | ||
102 | + | ||
103 | + var msg = new Object(); | ||
104 | + if (result.response.msgHeader.resultMessage._text == "결과가 존재하지 않습니다.") { | ||
105 | + msg.msg1 = "도착 정보 없음"; | ||
106 | + msg.msg2 = "도착 정보 없음"; | ||
107 | + msg.timeInterval = 7; | ||
108 | + console.log(msg); | ||
109 | + return msg; | ||
110 | + | ||
111 | + } else if (result.response.msgHeader.resultMessage._text == '정상적으로 처리되었습니다.') { | ||
112 | + | ||
113 | + var arrList = result.response.msgBody.busArrivalList; | ||
114 | + for (var i = 0; i < arrList.length; i++) { | ||
115 | + var item = arrList[i]; | ||
116 | + if (item.routeId._text == busLocalID) { | ||
117 | + msg.msg1 = item.predictTime1._text + "분 남음" + "(" + item.locationNo1._text + "개 역 전에 도착)"; | ||
118 | + if (parseInt(item.predictTime2._text) > 0) { | ||
119 | + msg.msg2= msg.msg2 = item.predictTime2._text + "분 남음" + "(" + item.locationNo2._text + "개 역 전에 도착)"; | ||
120 | + msg.timeInterval = (parseInt(item.predictTime2._text) - parseInt(item.predictTime1._text))/60;//초 | ||
121 | + console.log("time interval,",msg.timeInterval); | ||
122 | + } else { | ||
123 | + msg.msg2="도착 정보 없음"; | ||
124 | + msg.timeInterval = parseInt(item.predictTime1._text); | ||
125 | + } | ||
126 | + console.log(msg); | ||
127 | + return msg;//JSON타입 데이터 | ||
128 | + | ||
129 | + } | ||
130 | + } | ||
131 | + msg.msg1 = "도착 정보 없음"; | ||
132 | + msg.msg2 = "도착 정보 없음"; | ||
133 | + msg.timeInterval = 7; | ||
134 | + console.log(msg); | ||
135 | + return msg; | ||
136 | + | ||
137 | + } | ||
138 | + | ||
139 | + } catch (e) { | ||
140 | + console.error(e); | ||
141 | + } | ||
142 | +} | ||
143 | + | ||
144 | +function printSubwayInfo(subPath) { | ||
145 | + console.log("-------지하철 이동---------"); | ||
146 | + console.log("소요시간:", subPath.time); | ||
147 | + console.log("총 정거장수:", subPath.stationCnt); | ||
148 | + console.log("지하철 정보:"); | ||
149 | + for (var i = 0; i < subPath.laneList.length; i++) { | ||
150 | + console.log(subPath.laneList[i].name); | ||
151 | + } | ||
152 | + console.log("출발역:", subPath.startName); | ||
153 | + console.log("도착역:", subPath.endName); | ||
154 | + console.log("station 리스트"); | ||
155 | + console.log("------노선-------"); | ||
156 | + for (var i = 0; i < subPath.stationList.length; i++) { | ||
157 | + console.log("|") | ||
158 | + console.log(subPath.stationList[i]); | ||
159 | + } | ||
160 | + | ||
161 | + | ||
162 | +} | ||
163 | + | ||
164 | +function printBusInfo(subPath) { | ||
165 | + console.log("--------버스 이동----------"); | ||
166 | + console.log("소요시간:", subPath.time); | ||
167 | + console.log(subPath.stationCnt, "개 정류장 이동"); | ||
168 | + for (var i = 0; i < subPath.arrivalInfo.length; i++) { | ||
169 | + console.log("버스 번호:", subPath.arrivalInfo[i].busNo); | ||
170 | + console.log(subPath.arrivalInfo[i].msg); | ||
171 | + console.log("-----------------------"); | ||
172 | + } | ||
173 | + //console.log("대체버스:",subPath.busNumberList); | ||
174 | + console.log("출발역:", subPath.startName); | ||
175 | + console.log("도착역:", subPath.endName); | ||
176 | + console.log("-------노선--------"); | ||
177 | + for (var i = 0; i < subPath.stationList.length; i++) { | ||
178 | + console.log("|"); | ||
179 | + console.log(subPath.stationList[i].stationName); | ||
180 | + } | ||
181 | + | ||
182 | + | ||
183 | +} | ||
184 | + | ||
185 | +function printWalkInfo(subPath) { | ||
186 | + console.log("--------도보 이동----------"); | ||
187 | + console.log("도보 이동 시간:", subPath.time); | ||
188 | + console.log("도보 이동 거리:", subPath.distance); | ||
189 | + | ||
190 | + | ||
191 | +} | ||
192 | + | ||
193 | +const searchPubTransPath = async (sx, sy, ex, ey, avgSpeed, endTime) => { | ||
194 | + //출발지점x좌표, 출발지점 y좌표, 도착지점 x좌표, 도착지점 y좌표, 보행자 평균 속도, 희망 도착시간(stringtype 2digit->hour, 2digit->min) | ||
195 | + try { | ||
196 | + var result = await axios.get("https://api.odsay.com/v1/api/searchPubTransPath?SX=" + sx + "&SY=" + sy + "&EX=" + ex + "&EY=" + ey + `&apiKey=${apiKey}`); | ||
197 | + result = result.data; | ||
198 | + var endTime = moment(endTime).format('HH:mm').split(':'); | ||
199 | + console.log(endTime); | ||
200 | + | ||
201 | + var arrivalTime = parseInt(endTime[0]) * 60 + parseInt(endTime[1]);//endTime의 시각을 minute단위로 바꿈 | ||
202 | + if (result.result.searchType == 0) {//도시내 이동 | ||
203 | + var pathList = new Array(); | ||
204 | + for (var i = 0; i < result.result.path.length; i++) { | ||
205 | + var path = result.result.path[i]; | ||
206 | + console.log("========================================================================================"); | ||
207 | + console.log("========================================================================================"); | ||
208 | + console.log(i + 1, "번째 경로"); | ||
209 | + var pathObj = new Object(); | ||
210 | + if (path.pathType == 1) { | ||
211 | + pathObj.pathType = "지하철"; | ||
212 | + } else if (path.pathType == 2) { | ||
213 | + pathObj.pathType = "버스"; | ||
214 | + } else { | ||
215 | + pathObj.pathType = "지하철&버스"; | ||
216 | + } | ||
217 | + pathObj.walkTime = 0; | ||
218 | + pathObj.info = path.info; | ||
219 | + pathObj.walkDistance = 0; | ||
220 | + pathObj.busTimeInterval = 0; | ||
221 | + console.log(pathObj.pathType); | ||
222 | + console.log("총소요시간:", pathObj.info.totalTime); | ||
223 | + console.log("비용:", pathObj.info.payment); | ||
224 | + console.log("출발역:", pathObj.info.firstStartStation); | ||
225 | + console.log("도착역:", pathObj.info.lastEndStation); | ||
226 | + console.log("도보:", pathObj.info.totalWalk, " 이동"); | ||
227 | + console.log("총", pathObj.info.totalStationCount, "개 역 이동"); | ||
228 | + console.log("버스:", pathObj.info.busStationCount, "개 역 이동"); | ||
229 | + console.log("지하철:", pathObj.info.subwayStationCount, "개 역 이동"); | ||
230 | + console.log("=======경로 상세정보========"); | ||
231 | + pathObj.subPathList = new Array(); | ||
232 | + //console.log(pathObj.info); | ||
233 | + for (var j = 0; j < path.subPath.length; j++) { | ||
234 | + var subPath = new Object(); | ||
235 | + if (path.subPath[j].trafficType == 1) {//지하철 환승 | ||
236 | + subPath.trafficType = "지하철"; | ||
237 | + subPath.time = path.subPath[j].sectionTime; | ||
238 | + subPath.stationCnt = path.subPath[j].stationCount; | ||
239 | + subPath.laneList = path.subPath[j].lane; | ||
240 | + subPath.startName = path.subPath[j].startName; | ||
241 | + subPath.startID = path.subPath[j].startID; | ||
242 | + subPath.endName = path.subPath[j].endName; | ||
243 | + subPath.endID = path.subPath[j].endID; | ||
244 | + subPath.stationList = new Array(); | ||
245 | + for (var k = 0; k < path.subPath[j].passStopList.stations.length; k++) { | ||
246 | + subPath.stationList.push(path.subPath[j].passStopList.stations[k].stationName); | ||
247 | + } | ||
248 | + printSubwayInfo(subPath); | ||
249 | + } else if (path.subPath[j].trafficType == 2) {//버스=>실시간 정보! | ||
250 | + subPath.trafficType = "버스"; | ||
251 | + subPath.time = path.subPath[j].sectionTime;//총소요시간 | ||
252 | + subPath.stationCnt = path.subPath[j].stationCount; | ||
253 | + subPath.startName = path.subPath[j].startName; | ||
254 | + subPath.startID = path.subPath[j].startID; | ||
255 | + subPath.endName = path.subPath[j].endName; | ||
256 | + subPath.endID = path.subPath[j].endID; | ||
257 | + subPath.stationList = path.subPath[j].passStopList.stations; | ||
258 | + subPath.arrivalInfo = new Array(); | ||
259 | + var cityName = await reverseGeocoding(path.subPath[j].passStopList.stations[0].x, path.subPath[j].passStopList.stations[0].y); | ||
260 | + if (cityName == "서울특별시") {//stationID와 busNo로 도착 예정시간 추출 | ||
261 | + //seoulBusArrivalTime(path.subPath[j].passStopList.stations[0].stationID,busNumberList); | ||
262 | + for (var a = 0; a < path.subPath[j].lane.length; a++) { | ||
263 | + var busArrivalInfoItem = new Object(); | ||
264 | + var _msg = await seoulBusArrivalTime(subPath.startID, path.subPath[j].lane[a].busNo); | ||
265 | + busArrivalInfoItem.busID = path.subPath[j].lane[a].busID; | ||
266 | + busArrivalInfoItem.busNo = path.subPath[j].lane[a].busNo; | ||
267 | + busArrivalInfoItem.msg = _msg; | ||
268 | + subPath.arrivalInfo.push(busArrivalInfoItem); | ||
269 | + pathObj.busTimeInterval = _msg.timeInterval; //초->분단위로 바꿈 | ||
270 | + console.log(_msg.timeInterval); | ||
271 | + if (a == 2)//버스 최대 3개까지만 출력시킴 | ||
272 | + break; | ||
273 | + } | ||
274 | + printBusInfo(subPath); | ||
275 | + } else if (cityName == "경기도") { | ||
276 | + for (var a = 0; a < path.subPath[j].lane.length; a++) { | ||
277 | + var busArrivalInfoItem = new Object(); | ||
278 | + var _msg = await gyeonggiBusArrivalTime(subPath.startID, path.subPath[j].lane[a].busID); | ||
279 | + busArrivalInfoItem.busID = path.subPath[j].lane[a].busID; | ||
280 | + busArrivalInfoItem.busNo = path.subPath[j].lane[a].busNo; | ||
281 | + busArrivalInfoItem.msg = _msg; | ||
282 | + subPath.arrivalInfo.push(busArrivalInfoItem); | ||
283 | + console.log("----------메시지메시지-----------", _msg); | ||
284 | + pathObj.busTimeInterval = _msg.timeInterval; | ||
285 | + | ||
286 | + if (a == 2)//버스 최대 3개까지만 출력 | ||
287 | + break; | ||
288 | + } | ||
289 | + printBusInfo(subPath); | ||
290 | + } else { | ||
291 | + //서울, 경기를 제외한 지역은 실시간 정보 제공 불가 | ||
292 | + printBusInfo(subPath); | ||
293 | + } | ||
294 | + } else {//도보이동 | ||
295 | + pathObj.walkTime += path.subPath[j].sectionTime; | ||
296 | + pathObj.walkDistance += path.subPath[j].distance; | ||
297 | + subPath.trafficType = "도보"; | ||
298 | + subPath.time = path.subPath[j].sectionTime; | ||
299 | + subPath.distance = path.subPath[j].distance; | ||
300 | + printWalkInfo(subPath); | ||
301 | + } | ||
302 | + pathObj.subPathList.push(subPath); | ||
303 | + | ||
304 | + } | ||
305 | + | ||
306 | + pathList.push(pathObj); | ||
307 | + var optTotalTime = pathObj.info.totalTime - pathObj.walkTime + pathObj.walkDistance / avgSpeed;//사용자의 보행속도를 고려한 이동시간 | ||
308 | + console.log("arrrrrrrrrrr",arrivalTime) | ||
309 | + var departureTime1 = parseInt(arrivalTime - optTotalTime); | ||
310 | + | ||
311 | + if(departureTime1<0){ | ||
312 | + departureTime1+=1440; | ||
313 | + } | ||
314 | + if(path.pathType==1){//지하철의 경우 시간간격 4분으로 | ||
315 | + pathObj.busTimeInterval=4; | ||
316 | + } | ||
317 | + var departureTime2 = parseInt(arrivalTime - optTotalTime - pathObj.busTimeInterval); | ||
318 | + if(departureTime2<0){ | ||
319 | + departureTime2+=1440; | ||
320 | + } | ||
321 | + console.log(pathObj.busTimeInterval); | ||
322 | + console.log("dp1",departureTime1); | ||
323 | + console.log("dp2",departureTime2); | ||
324 | + | ||
325 | + console.log("pathType",path.pathType); | ||
326 | + console.log("departure time 1",departureTime1); | ||
327 | + console.log("departure time 2",departureTime2); | ||
328 | + var hour1 = departureTime1 / 60; | ||
329 | + var min1 = departureTime1 % 60; | ||
330 | + var hour2 = departureTime2 / 60; | ||
331 | + var min2 =departureTime2 % 60; | ||
332 | + pathObj.info.hour1=parseInt(hour1).toString(); | ||
333 | + pathObj.info.min1=parseInt(min1).toString(); | ||
334 | + pathObj.info.hour2=parseInt(hour2).toString(); | ||
335 | + pathObj.info.min2=parseInt(min2).toString(); | ||
336 | + console.log(pathObj.info.hour1,"시 ",pathObj.info.min1,"분"); | ||
337 | + console.log(pathObj.info.hour2,"시 ",pathObj.info.min2,"분"); | ||
338 | + if (i == 2)//경로 3개까지만 출력 | ||
339 | + break; | ||
340 | + | ||
341 | + | ||
342 | + } | ||
343 | + return {pathList}; | ||
344 | + } else if (result.result.searchType == 1) {//도시간 이동 | ||
345 | + var path = new Object(); | ||
346 | + path.trainList = new Array(); | ||
347 | + for (var j = 0; j < result.result.trainRequest.count; j++) { | ||
348 | + var train = new Object(); | ||
349 | + train = result.result.trainRequest.OBJ[j]; | ||
350 | + path.trainList.push(train); | ||
351 | + if (j == 2) | ||
352 | + break; | ||
353 | + } | ||
354 | + path.exBusList = new Array(); | ||
355 | + for (var j = 0; j < result.result.exBusRequest.count; j++) { | ||
356 | + var exBus = new Object(); | ||
357 | + exBus = reuslt.result.exBusRequest.OBJ[j]; | ||
358 | + path.exBusList.push(exBus); | ||
359 | + if (j == 2) | ||
360 | + break; | ||
361 | + } | ||
362 | + path.outBusList = new Array(); | ||
363 | + for (var j = 0; j < result.result.outBusRequest.count; j++) { | ||
364 | + var outBus = new Object(); | ||
365 | + outBus = result.result.outBusRequest.OBJ[j]; | ||
366 | + path.outBusList.push(outBus); | ||
367 | + if (j == 2) | ||
368 | + break; | ||
369 | + } | ||
370 | + return path; | ||
371 | + | ||
372 | + } | ||
373 | + | ||
374 | + } catch (e) { | ||
375 | + console.error(e); | ||
376 | + } | ||
377 | +}; | ||
378 | +searchPubTransPath(126.999451,37.266670, 126.986990,37.541386,60,"00:10"); | ||
379 | +module.exports = searchPubTransPath; | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
면담확인서/6월 면담확인서.hwp
0 → 100644
No preview for this file type
보고서/최종보고서.docx
0 → 100644
No preview for this file type
-
Please register or login to post a comment