Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vereign Credential Manager
Manage
Activity
Members
Labels
Plan
Issues
33
Issue boards
Milestones
Wiki
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SSI Space
Vereign Personal Wallet
Vereign Credential Manager
Commits
19c54d7d
Commit
19c54d7d
authored
1 year ago
by
Alexey Lunin
Browse files
Options
Downloads
Patches
Plain Diff
fix subjects
parent
253da00f
No related branches found
No related tags found
1 merge request
!12
Hin messaging
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/screens/EmailDetails/Subject.tsx
+32
-7
32 additions, 7 deletions
src/screens/EmailDetails/Subject.tsx
src/screens/EmailDetails/index.tsx
+3
-1
3 additions, 1 deletion
src/screens/EmailDetails/index.tsx
with
35 additions
and
8 deletions
src/screens/EmailDetails/Subject.tsx
+
32
−
7
View file @
19c54d7d
...
@@ -4,15 +4,24 @@ import { StyleSheet, Text, View } from 'react-native';
...
@@ -4,15 +4,24 @@ import { StyleSheet, Text, View } from 'react-native';
import
EmailSvg
from
'
src/assets/svg/e-mail.svg
'
;
import
EmailSvg
from
'
src/assets/svg/e-mail.svg
'
;
import
{
ColorPallet
,
TextTheme
}
from
'
src/theme/theme
'
;
import
{
ColorPallet
,
TextTheme
}
from
'
src/theme/theme
'
;
import
Card
from
'
src/components/EmailCard
'
;
import
Card
from
'
src/components/EmailCard
'
;
import
{
parseEmailAddresses
}
from
"
../../utils/email
"
;
interface
Props
{
interface
Props
{
subject
:
string
;
subject
:
string
;
recipients
:
string
[];
to
:
string
;
cc
:
string
;
bcc
:
string
;
}
}
const
Subject
=
({
subject
,
recipients
}:
Props
)
=>
{
const
Subject
=
({
subject
,
to
,
cc
,
bcc
}:
Props
)
=>
{
const
{
t
}
=
useTranslation
();
const
{
t
}
=
useTranslation
();
const
toList
=
parseEmailAddresses
(
to
);
const
ccList
=
parseEmailAddresses
(
cc
);
const
bccList
=
parseEmailAddresses
(
bcc
);
const
all
=
[...
toList
,
...
ccList
,
...
bccList
];
return
(
return
(
<
Card
background
=
"white"
SvgIcon
=
{
EmailSvg
}
>
<
Card
background
=
"white"
SvgIcon
=
{
EmailSvg
}
>
<
View
style
=
{
styles
.
container
}
>
<
View
style
=
{
styles
.
container
}
>
...
@@ -20,13 +29,29 @@ const Subject = ({ subject, recipients }: Props) => {
...
@@ -20,13 +29,29 @@ const Subject = ({ subject, recipients }: Props) => {
<
Text
style
=
{
styles
.
subject
}
>
{
subject
||
t
<
string
>
(
'
Seal.Details.NoSubject
'
)
}
</
Text
>
<
Text
style
=
{
styles
.
subject
}
>
{
subject
||
t
<
string
>
(
'
Seal.Details.NoSubject
'
)
}
</
Text
>
)
}
)
}
<
Text
style
=
{
styles
.
recipientLabel
}
>
<
Text
style
=
{
styles
.
recipientLabel
}
>
{
recipients
.
length
?
t
<
string
>
(
'
Seal.Details.Recipients
'
)
:
t
<
string
>
(
'
Seal.Details.NoRecipients
'
)
}
{
all
.
length
?
t
<
string
>
(
'
Seal.Details.Recipients
'
)
:
t
<
string
>
(
'
Seal.Details.NoRecipients
'
)
}
</
Text
>
</
Text
>
{
recipients
.
map
((
recipient
)
=>
(
{
toList
.
map
((
recipient
)
=>
(
<
React
.
Fragment
key
=
{
recipient
}
>
<
Text
<
Text
style
=
{
styles
.
recipientName
}
>
{
recipient
}
</
Text
>
key
=
{
recipient
.
email
}
</
React
.
Fragment
>
style
=
{
styles
.
recipientName
}
>
to:
{
recipient
.
name
}
{
recipient
.
email
}
</
Text
>
))
}
{
ccList
.
map
((
recipient
)
=>
(
<
Text
key
=
{
recipient
.
email
}
style
=
{
styles
.
recipientName
}
>
cc:
{
recipient
.
name
}
{
recipient
.
email
}
</
Text
>
))
}
{
bccList
.
map
((
recipient
)
=>
(
<
Text
key
=
{
recipient
.
email
}
style
=
{
styles
.
recipientName
}
>
bcc:
{
recipient
.
name
}
{
recipient
.
email
}
</
Text
>
))
}
))
}
</
View
>
</
View
>
</
Card
>
</
Card
>
...
...
This diff is collapsed.
Click to expand it.
src/screens/EmailDetails/index.tsx
+
3
−
1
View file @
19c54d7d
...
@@ -144,7 +144,9 @@ const EmailDetails: React.FC<EmailDetailsProps> = observer(({
...
@@ -144,7 +144,9 @@ const EmailDetails: React.FC<EmailDetailsProps> = observer(({
/>
/>
<
Subject
<
Subject
subject
=
{
email
.
subject
}
subject
=
{
email
.
subject
}
recipients
=
{
email
.
to
?.
split
(
'
,
'
).
map
(
p
=>
p
.
trim
())
||
[]
}
to
=
{
email
.
to
}
cc
=
{
email
.
cc
}
bcc
=
{
email
.
bcc
}
/>
/>
<
ContentCard
<
ContentCard
html
=
{
html
}
html
=
{
html
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment