Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bluejoyq
/
searchGuide
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
bluejoyq
2019-11-21 11:22:14 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
9ccee5f0fa21dda7f47175b880bd2acd99fcc23c
9ccee5f0
1 parent
2ec23583
edit search prompt
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
31 deletions
searchGuide/.expo/packager-info.json
searchGuide/.expo/settings.json
searchGuide/components/Home/Home.js
searchGuide/components/PromptSearch/PromptSearch.js
searchGuide/components/RateBar/RateBar.js
searchGuide/components/RateLine/RateLine.js
searchGuide/components/RateSentence/RateSentence.js
searchGuide/.expo/packager-info.json
View file @
9ccee5f
...
...
@@ -2,8 +2,8 @@
"devToolsPort"
:
19002
,
"expoServerPort"
:
19000
,
"packagerPort"
:
19001
,
"packagerPid"
:
18
38
8
,
"expoServerNgrokUrl"
:
"https://
cx-ky7
.anonymous.searchguide.exp.direct"
,
"packagerNgrokUrl"
:
"https://packager.
cx-ky7
.anonymous.searchguide.exp.direct"
,
"ngrokPid"
:
32168
"packagerPid"
:
18
06
8
,
"expoServerNgrokUrl"
:
"https://
ru-c66
.anonymous.searchguide.exp.direct"
,
"packagerNgrokUrl"
:
"https://packager.
ru-c66
.anonymous.searchguide.exp.direct"
,
"ngrokPid"
:
11840
}
...
...
searchGuide/.expo/settings.json
View file @
9ccee5f
...
...
@@ -3,6 +3,6 @@
"lanType"
:
"ip"
,
"dev"
:
true
,
"minify"
:
false
,
"urlRandomness"
:
"
cx-ky7
"
,
"urlRandomness"
:
"
ru-c66
"
,
"https"
:
false
}
...
...
searchGuide/components/Home/Home.js
View file @
9ccee5f
...
...
@@ -12,7 +12,7 @@ const Home = ({searchResults}) => {
<
View
style
=
{{
flex
:
1
,
backgroundColor
:
'#eee'
,
margin
:
0
,
padding
:
0
}}
>
<
SearchBar
/>
<
ScrollView
style
=
{{
marginBottom
:
10
}}
>
{
searchResults
.
length
?
(
searchResults
.
map
((
searchResult
,
index
)
=>
(
{
searchResults
.
length
?
(
searchResults
.
map
((
searchResult
,
index
)
=>
(
<
SearchCard
key
=
{
index
}
title
=
{
searchResult
.
title
}
...
...
@@ -20,9 +20,7 @@ const Home = ({searchResults}) => {
url
=
{
searchResult
.
url
}
metric
=
{
Math
.
round
(
searchResult
.
confidence
*
100
)}
site
=
{
searchResult
.
site
}
/>
))
)
:
<
PromptSearch
/>
}
/>
)))
: <PromptSearch /
>
}
<
/ScrollView
>
<
/View>
)
...
...
searchGuide/components/PromptSearch/PromptSearch.js
View file @
9ccee5f
import
React
from
'react'
;
import
{
View
,
Text
,
StyleSheet
,
Button
}
from
'react-native'
;
import
{
View
,
Text
,
StyleSheet
,
Button
,
Alert
}
from
'react-native'
;
import
Icon
from
'react-native-vector-icons/FontAwesome'
;
import
Swiper
from
'react-native-swiper'
;
import
{
DARK_MAIN
,
LIGHT_MAIN
,
WHITE_MAIN
}
from
'react-native-dotenv'
;
const
FirstSlide
=
()
=>
(
<
View
style
=
{
styles
.
slide1
}
>
...
...
@@ -16,9 +17,9 @@ const SecondSlide = () => (
<
View
style
=
{
styles
.
slide2
}
>
<
Icon
name
=
'search'
style
=
{
styles
.
icon
}
size
=
{
50
}
/
>
<
Text
style
=
{
styles
.
text
}
>
길잡이가
수정한
<
/Text
>
<
Text
style
=
{
styles
.
text
}
>
검색
키워드를
확인하세요
<
/Text
>
<
Text
style
=
{
styles
.
text
}
>
검색
문장을
확인하세요
<
/Text
>
<
Text
style
=
{
styles
.
subtext
}
>
길잡이는
항상
최적의
<
/Text
>
<
Text
style
=
{
styles
.
subtext
}
>
검색키
위
드를
제안합니다
<
/Text
>
<
Text
style
=
{
styles
.
subtext
}
>
검색키
워
드를
제안합니다
<
/Text
>
<
/View
>
)
const
ThirdSlide
=
()
=>
(
...
...
@@ -36,18 +37,17 @@ const LastSlide = () => (
<
Text
style
=
{
styles
.
text
}
>
내
손
안의
검색
도우미
<
/Text
>
<
Text
style
=
{
styles
.
text
}
>
길잡이에서
<
/Text
>
<
Text
style
=
{
styles
.
text
}
>
검색을
시작하세요
<
/Text
>
<
Button
title
=
"지금 바로 시작!"
onPress
=
{()
=>
Alert
.
alert
(
'Simple Button pressed'
)}
/
>
<
/View
>
)
export
default
PromptSearch
=
()
=>
{
return
(
<>
<
Text
>
ssdd
<
/Text
>
<
Swiper
style
=
{
styles
.
wrapper
}
showsButtons
=
{
true
}
loop
=
{
false
}
>
<
Swiper
style
=
{
styles
.
wrapper
}
showsButtons
=
{
true
}
loop
=
{
false
}
height
=
{
400
}
activeDotColor
=
{
LIGHT_MAIN
}
>
<
FirstSlide
/>
<
SecondSlide
/>
<
ThirdSlide
/>
...
...
@@ -59,9 +59,7 @@ export default PromptSearch = () => {
const
styles
=
StyleSheet
.
create
({
container
:
{
height
:
270
,
width
:
'100%'
,
display
:
'flex'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
},
...
...
@@ -82,29 +80,30 @@ const styles = StyleSheet.create({
color
:
'#999999'
,
},
wrapper
:
{
flex
:
1
,
},
slide1
:
{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
'#
9DD6EB
'
,
backgroundColor
:
'#
eee
'
,
},
slide2
:
{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
'#
97CAE5
'
,
backgroundColor
:
'#
eee
'
,
},
slide3
:
{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
'#
92BBD9
'
,
backgroundColor
:
'#
eee
'
,
},
slide4
:
{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
backgroundColor
:
'#
FFF
'
,
backgroundColor
:
'#
eee
'
,
},
});
\ No newline at end of file
...
...
searchGuide/components/RateBar/RateBar.js
View file @
9ccee5f
...
...
@@ -43,12 +43,12 @@ export default RateBar = (props) => {
value
:
(
100
-
(
props
.
score
.
key
+
props
.
score
.
fix
)),
}
}]}
style
=
{{
height
:
6
0
,
width
:
'90%'
}}
style
=
{{
height
:
5
0
,
width
:
'90%'
}}
keys
=
{[
'keyword'
,
'korean'
,
'rest'
]}
colors
=
{[
'#ffaa5a'
,
'#2cc3c2'
,
'#ffffff'
]}
showGrid
=
{
false
}
horizontal
=
{
true
}
contentInset
=
{
{
top
:
10
,
bottom
:
10
}
}
contentInset
=
{
{
top
:
10
}
}
valueAccessor
=
{({
item
,
key
})
=>
item
[
key
].
value
}
/>
<
View
style
=
{
styles
.
infoContainer
}
>
...
...
searchGuide/components/RateLine/RateLine.js
View file @
9ccee5f
import
React
,
{
useEffect
}
from
'react'
;
import
{
Surface
,
Text
}
from
'react-native-paper'
;
import
{
StyleSheet
}
from
'react-native'
;
import
{
Surface
,
Text
,
Divider
}
from
'react-native-paper'
;
import
{
View
,
StyleSheet
}
from
'react-native'
;
import
{
connect
}
from
'react-redux'
;
import
{
load
}
from
'../../reducers/search'
;
import
PromptSearchRate
from
'../PromptSearch/PromptSearchRate'
;
...
...
@@ -17,9 +17,16 @@ const RateLine = ({load,pastScore }) => {
return
(
<
Surface
style
=
{
styles
.
surface
}
>
{
pastScore
.
length
?
pastScore
.
map
((
elem
,
index
)
=>
(
<
Text
key
=
{
index
}
>
{
elem
}
<
/Text
>
))
:
<
PromptSearchRate
/>
<>
<
Text
style
=
{
styles
.
info
}
>
최근
점수
<
/Text
>
<
View
style
=
{
styles
.
scoreContainer
}
>
{
pastScore
.
map
((
elem
,
index
)
=>
(
<
Text
key
=
{
index
}
style
=
{
styles
.
score
}
>
{
elem
}
<
/Text
>
))}
<
/View
>
<
View
style
=
{
styles
.
detail
}
><
Text
style
=
{
styles
.
new
}
>
최근
<
/Text><Text></
Text
><
/View
>
<
/
>
:
<
PromptSearchRate
/>
}
<
/Surface
>
);
...
...
@@ -38,6 +45,29 @@ const styles = StyleSheet.create({
marginTop
:
10
,
marginBottom
:
10
,
},
info
:{
fontSize
:
25
,
fontWeight
:
'bold'
,
marginBottom
:
15
},
score
:{
fontSize
:
20
},
scoreContainer
:{
flexDirection
:
'row'
,
justifyContent
:
'space-around'
,
width
:
'100%'
},
detail
:{
width
:
'100%'
,
justifyContent
:
'space-around'
,
},
new
:{
fontSize
:
18
,
marginLeft
:
20
,
color
:
'#995432'
}
});
const
RateLineContainer
=
(
{
load
,
pastScore
}
)
=>
(
...
...
searchGuide/components/RateSentence/RateSentence.js
View file @
9ccee5f
...
...
@@ -52,9 +52,11 @@ const RateSentence = ({originalText, fixedText, keywordText }) => {
},
Text
:{
fontSize
:
25
,
textAlign
:
'center'
},
infoText
:{
fontSize
:
20
,
textAlign
:
'center'
}
});
...
...
Please
register
or
login
to post a comment