Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
AppUms_Lecturer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tungnq
AppUms_Lecturer
Commits
a5e8f1e0
Commit
a5e8f1e0
authored
Sep 05, 2025
by
tungnq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TODO: Đã hoàn thiện xong giao diện soạn email
parent
6bb07a98
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
153 additions
and
36 deletions
+153
-36
colors.js
src/assets/colors.js
+3
-0
ScreenNames.js
src/routers/ScreenNames.js
+1
-1
StackNavigation.js
src/routers/StackNavigation.js
+2
-0
drawerView.js
src/routers/drawer_email/drawerView.js
+1
-1
style.js
src/routers/drawer_email/style.js
+5
-0
style.js
src/screens/email/send/style.js
+54
-0
view.js
src/screens/email/send/view.js
+28
-12
style.js
src/screens/email/style.js
+14
-7
view.js
src/screens/email/view.js
+45
-15
No files found.
src/assets/colors.js
View file @
a5e8f1e0
...
...
@@ -7,6 +7,9 @@ const colors = {
gray
:
'rgba(217, 217, 217, 1)'
,
gray1
:
'rgba(204, 204, 204, 1)'
,
gray2
:
'rgba(196, 196, 196, 1)'
,
gray3
:
'#6F6F6F'
,
gray4
:
'rgba(80, 80, 80, 1)'
,
grayBorderInputTextHeader
:
'rgba(204, 204, 204, 0.36)'
,
grayButton
:
'rgba(217, 217, 217, 0.56)'
,
...
...
src/routers/ScreenNames.js
View file @
a5e8f1e0
...
...
@@ -51,7 +51,7 @@ export const EDITSENDDOCUMENT = 'EDITSENDDOCUMENT';
export
const
DETAILSENDDOCUMENT
=
'DETAILDOCUMENT'
;
export
const
STATUSSENDDOCUMENT
=
'STATUSSENDDOCUMENT'
;
export
const
DRAWERTABEMAIL
=
'DRAWERTAB
EMAIL'
;
export
const
SENDEDEMAIL
=
'SENDED
EMAIL'
;
export
const
EMAIL
=
'EMAIL'
;
export
const
SENDEMAIL
=
'SENDEMAIL'
;
export
const
DETAILEMAIL
=
'DETAILEMAIL'
;
...
...
src/routers/StackNavigation.js
View file @
a5e8f1e0
...
...
@@ -30,6 +30,7 @@ import StatusSendDocument from '../screens/list_send_document/status';
import
ListWork
from
'../screens/list_work'
;
import
DetailListWork
from
'../screens/list_work/detail'
;
import
DrawerEmailView
from
'../routers/drawer_email/drawerView'
;
import
SendEmail
from
'../screens/email/send'
;
const
Stack
=
createStackNavigator
();
function
MyStack
(
props
)
{
...
...
@@ -68,6 +69,7 @@ function MyStack(props) {
<
Stack
.
Screen
name
=
{
ScreenName
.
LISTWORK
}
component
=
{
ListWork
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
DETAILWORK
}
component
=
{
DetailListWork
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
EMAIL
}
component
=
{
DrawerEmailView
}
/
>
<
Stack
.
Screen
name
=
{
ScreenName
.
SENDEMAIL
}
component
=
{
SendEmail
}
/
>
<
/Stack.Navigator
>
);
}
...
...
src/routers/drawer_email/drawerView.js
View file @
a5e8f1e0
...
...
@@ -108,7 +108,7 @@ const DrawerNavigatorEmailView = (props) =>{
}
/
>
<
Drawer
.
Screen
name
=
{
ScreenName
.
SENDEMAIL
}
name
=
{
ScreenName
.
SENDE
DE
MAIL
}
component
=
{
SendEmail
}
options
=
{
{
...
...
src/routers/drawer_email/style.js
View file @
a5e8f1e0
...
...
@@ -71,6 +71,11 @@ const styles = StyleSheet.create({
},
label
:{
marginLeft
:
8
},
labelSel
:{
color
:
R
.
colors
.
white
,
fontWeight
:
'600'
,
fontFamily
:
R
.
fonts
.
fontMedium
}
})
...
...
src/screens/email/send/style.js
View file @
a5e8f1e0
import
{
StyleSheet
,
Text
,
View
}
from
'react-native'
import
R
from
'../../../assets/R'
const
styles
=
StyleSheet
.
create
({
container
:{
flex
:
1
,
backgroundColor
:
R
.
colors
.
white
},
body
:{
flex
:
1
,
backgroundColor
:
R
.
colors
.
white
},
header
:{
flexDirection
:
'row'
,
backgroundColor
:
R
.
colors
.
blue
,
height
:
50
,
alignItems
:
'center'
,
justifyContent
:
'space-between'
,
paddingHorizontal
:
15
},
icon
:{
width
:
25
,
height
:
20
},
sendButton
:{
backgroundColor
:
R
.
colors
.
orange
,
borderRadius
:
5
,
width
:
90
,
paddingHorizontal
:
5
,
height
:
35
,
alignItems
:
'center'
,
justifyContent
:
'space-around'
,
flexDirection
:
'row'
},
sendText
:{
color
:
R
.
colors
.
white
,
fontSize
:
R
.
fontsize
.
fontSizeSubTitle
,
fontFamily
:
R
.
fonts
.
fontRegular
,
fontWeight
:
'400'
,
},
iconSend
:{
width
:
20
,
height
:
20
},
title
:{
fontSize
:
R
.
fontsize
.
fontSizeSubTitle
,
fontFamily
:
R
.
fonts
.
fontMedium
,
fontWeight
:
'600'
,
color
:
R
.
colors
.
white
}
})
export
default
styles
\ No newline at end of file
src/screens/email/send/view.js
View file @
a5e8f1e0
import
React
from
'react'
;
import
{
Text
,
View
,
TouchableOpacity
,
StyleSheet
}
from
'react-native'
;
import
{
Text
,
View
,
TouchableOpacity
,
StyleSheet
,
Image
}
from
'react-native'
;
import
styles
from
'./style'
;
import
R
from
'../../../assets/R'
;
import
Button
from
'../../../components/Button'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
const
SendEmailView
=
(
props
)
=>
{
const
{
}
=
props
;
const
navigation
=
useNavigation
();
const
renderHeader
=
()
=>
{
return
(
<
View
style
=
{{
flex
:
1
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
}}
>
<
TouchableOpacity
>
<
Text
>
SendEmail
<
/Text
>
<
View
style
=
{
styles
.
header
}
>
<
TouchableOpacity
onPress
=
{()
=>
navigation
.
goBack
()}
>
<
Image
source
=
{
R
.
images
.
icBack
}
style
=
{
styles
.
icon
}
/
>
<
/TouchableOpacity
>
<
Text
style
=
{
styles
.
title
}
>
So
ạ
n
email
<
/Text
>
<
TouchableOpacity
onPress
=
{()
=>
(
navigation
.
goBack
())}
style
=
{
styles
.
sendButton
}
>
<
Text
style
=
{
styles
.
sendText
}
>
G
ử
i
Đ
i
<
/Text
>
<
Image
source
=
{
R
.
images
.
icSend
}
style
=
{
styles
.
iconSend
}
tintColor
=
{
R
.
colors
.
white
}
/
>
<
/TouchableOpacity
>
<
/View
>
);
}
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
body
}
>
{
renderHeader
()}
<
/View
>
<
/View
>
);
};
export
default
SendEmailView
;
const
styles
=
StyleSheet
.
create
({})
\ No newline at end of file
src/screens/email/style.js
View file @
a5e8f1e0
...
...
@@ -39,7 +39,6 @@ const styles = StyleSheet.create({
alignItems
:
'flex-start'
},
unreadEmail
:
{
backgroundColor
:
R
.
colors
.
grayBorderInputTextHeader
},
avatarContainer
:
{
marginRight
:
10
,
...
...
@@ -69,7 +68,9 @@ const styles = StyleSheet.create({
},
senderName
:
{
fontSize
:
R
.
fontsize
.
fontsSizeTitle
,
color
:
R
.
colors
.
black
,
fontWeight
:
'400'
,
fontFamily
:
R
.
fonts
.
fontRegular
,
color
:
R
.
colors
.
gray4
,
flex
:
1
,
marginRight
:
10
},
...
...
@@ -78,31 +79,37 @@ const styles = StyleSheet.create({
fontFamily
:
R
.
fonts
.
fontMedium
,
color
:
R
.
colors
.
black
},
unreadEmail
:
{
fontWeight
:
'600'
,
fontFamily
:
R
.
fonts
.
fontMedium
,
color
:
R
.
colors
.
gray3
},
emailDate
:
{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
color
:
R
.
colors
.
gray2
},
emailSubject
:
{
fontSize
:
R
.
fontsize
.
fontSizeBtn
,
color
:
R
.
colors
.
black
,
color
:
R
.
colors
.
gray4
,
},
emailPreview
:
{
fontSize
:
R
.
fontsize
.
fontSizeContent
,
color
:
R
.
colors
.
gray
2
,
color
:
R
.
colors
.
gray
4
,
},
attachmentIndicator
:
{
width
:
20
,
height
:
20
,
borderRadius
:
10
,
backgroundColor
:
R
.
colors
.
blue
,
backgroundColor
:
R
.
colors
.
blue
3
,
justifyContent
:
'center'
,
alignItems
:
'center'
,
marginTop
:
4
},
attachmentCount
:
{
color
:
R
.
colors
.
white
,
color
:
R
.
colors
.
blue
,
fontWeight
:
'600'
,
fontFamily
:
R
.
fonts
.
fontMedium
,
fontSize
:
R
.
fontsize
.
fontSizeContent
,
fontWeight
:
'bold'
}
})
...
...
src/screens/email/view.js
View file @
a5e8f1e0
...
...
@@ -9,10 +9,25 @@ import {
RefreshControl
,
}
from
'react-native'
;
import
styles
from
'./style'
;
import
FAB
from
'../../components/FAB/fab'
;
import
SubButton
from
'../../components/FAB/sub_button'
;
import
R
from
'../../assets/R'
;
import
*
as
SCREENNAME
from
'../../routers/ScreenNames'
;
import
{
useNavigation
}
from
'@react-navigation/native'
;
const
EmailHomeView
=
props
=>
{
const
{
groupedEmails
,
loading
,
onEmailPress
,
onRefresh
,
formatEmailDate
}
=
props
;
const
{
groupedEmails
,
loading
,
onEmailPress
,
onRefresh
,
formatEmailDate
}
=
props
;
const
navigation
=
useNavigation
();
if
(
loading
)
{
return
(
<
View
style
=
{
styles
.
loadingContainer
}
>
<
ActivityIndicator
size
=
"large"
color
=
"#007AFF"
/>
<
Text
style
=
{
styles
.
loadingText
}
>
Đ
ang
t
ả
i
email
...
<
/Text
>
<
/View
>
);
}
const
renderEmailItem
=
({
item
})
=>
(
<
TouchableOpacity
...
...
@@ -31,7 +46,6 @@ const EmailHomeView = props => {
<
Text
style
=
{[
styles
.
senderName
,
!
item
.
isRead
&&
styles
.
unreadText
]}
>
{
item
.
sender
}
<
/Text
>
<
/View
>
<
Text
...
...
@@ -40,14 +54,27 @@ const EmailHomeView = props => {
{
item
.
subject
}
<
/Text
>
<
Text
style
=
{
styles
.
emailPreview
}
numberOfLines
=
{
2
}
>
<
Text
style
=
{[
styles
.
emailPreview
,
!
item
.
isRead
&&
styles
.
unreadEmail
]}
numberOfLines
=
{
2
}
>
{
item
.
preview
}
<
/Text
>
<
/View
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'flex-end'
,
position
:
'absolute'
,
right
:
15
,
top
:
10
}}
>
<
View
style
=
{{
justifyContent
:
'center'
,
alignItems
:
'flex-end'
,
position
:
'absolute'
,
right
:
15
,
top
:
10
,
}}
>
<
Text
style
=
{
styles
.
emailDate
}
>
{
`
${
item
.
date
.
getDate
().
toString
().
padStart
(
2
,
'0'
)}
/
${(
item
.
date
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
)}
/
${
item
.
date
.
getFullYear
()}
`
}
{
`
${
item
.
date
.
getDate
().
toString
().
padStart
(
2
,
'0'
)}
/
${(
item
.
date
.
getMonth
()
+
1
)
.
toString
()
.
padStart
(
2
,
'0'
)}
/
${
item
.
date
.
getFullYear
()}
`
}
<
/Text
>
{
item
.
hasAttachment
&&
(
<
View
style
=
{
styles
.
attachmentIndicator
}
>
...
...
@@ -67,17 +94,9 @@ const EmailHomeView = props => {
<
/View
>
);
if
(
loading
)
{
return
(
<
View
style
=
{
styles
.
loadingContainer
}
>
<
ActivityIndicator
size
=
"large"
color
=
"#007AFF"
/>
<
Text
style
=
{
styles
.
loadingText
}
>
Đ
ang
t
ả
i
email
...
<
/Text
>
<
/View
>
);
}
return
(
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
body
}
>
<
FlatList
data
=
{
Object
.
keys
(
groupedEmails
)}
keyExtractor
=
{
item
=>
item
}
...
...
@@ -95,6 +114,17 @@ const EmailHomeView = props => {
contentContainerStyle
=
{
styles
.
listContainer
}
/
>
<
/View
>
<
FAB
>
<
SubButton
onPress
=
{()
=>
navigation
.
navigate
(
SCREENNAME
.
SENDEMAIL
)}
label
=
"Soạn email"
images
=
{
R
.
images
.
icEdit
}
backgroundColor
=
{
R
.
colors
.
orange
}
/
>
<
/FAB
>
<
/View
>
);
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment