Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Elixxir dApps SDK Swift
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mobile
iOS
Elixxir dApps SDK Swift
Commits
7a004c2a
Commit
7a004c2a
authored
2 years ago
by
Dariusz Rybicki
Browse files
Options
Downloads
Patches
Plain Diff
Improve UI in ContactView
parent
046063e2
No related branches found
No related tags found
2 merge requests
!112
Restore contacts from backup
,
!102
Release 1.0.0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Examples/xx-messenger/Sources/ContactFeature/ContactView.swift
+16
-0
16 additions, 0 deletions
...les/xx-messenger/Sources/ContactFeature/ContactView.swift
with
16 additions
and
0 deletions
Examples/xx-messenger/Sources/ContactFeature/ContactView.swift
+
16
−
0
View file @
7a004c2a
...
@@ -26,6 +26,10 @@ public struct ContactView: View {
...
@@ -26,6 +26,10 @@ public struct ContactView: View {
var
importUsername
:
Bool
var
importUsername
:
Bool
var
importEmail
:
Bool
var
importEmail
:
Bool
var
importPhone
:
Bool
var
importPhone
:
Bool
var
canSendRequest
:
Bool
var
canVerifyContact
:
Bool
var
canConfirmRequest
:
Bool
var
canCheckAuthorization
:
Bool
init
(
state
:
ContactState
)
{
init
(
state
:
ContactState
)
{
dbContact
=
state
.
dbContact
dbContact
=
state
.
dbContact
...
@@ -36,6 +40,10 @@ public struct ContactView: View {
...
@@ -36,6 +40,10 @@ public struct ContactView: View {
importUsername
=
state
.
importUsername
importUsername
=
state
.
importUsername
importEmail
=
state
.
importEmail
importEmail
=
state
.
importEmail
importPhone
=
state
.
importPhone
importPhone
=
state
.
importPhone
canSendRequest
=
state
.
xxContact
!=
nil
||
state
.
dbContact
?
.
marshaled
!=
nil
canVerifyContact
=
state
.
dbContact
?
.
marshaled
!=
nil
canConfirmRequest
=
state
.
dbContact
?
.
marshaled
!=
nil
canCheckAuthorization
=
state
.
dbContact
?
.
marshaled
!=
nil
}
}
}
}
...
@@ -109,6 +117,7 @@ public struct ContactView: View {
...
@@ -109,6 +117,7 @@ public struct ContactView: View {
Section
{
Section
{
ContactAuthStatusView
(
dbContact
.
authStatus
)
ContactAuthStatusView
(
dbContact
.
authStatus
)
Button
{
Button
{
viewStore
.
send
(
.
sendRequestTapped
)
viewStore
.
send
(
.
sendRequestTapped
)
}
label
:
{
}
label
:
{
...
@@ -118,6 +127,8 @@ public struct ContactView: View {
...
@@ -118,6 +127,8 @@ public struct ContactView: View {
Image
(
systemName
:
"chevron.forward"
)
Image
(
systemName
:
"chevron.forward"
)
}
}
}
}
.
disabled
(
!
viewStore
.
canSendRequest
)
Button
{
Button
{
viewStore
.
send
(
.
verifyContactTapped
)
viewStore
.
send
(
.
verifyContactTapped
)
}
label
:
{
}
label
:
{
...
@@ -127,6 +138,8 @@ public struct ContactView: View {
...
@@ -127,6 +138,8 @@ public struct ContactView: View {
Image
(
systemName
:
"chevron.forward"
)
Image
(
systemName
:
"chevron.forward"
)
}
}
}
}
.
disabled
(
!
viewStore
.
canVerifyContact
)
Button
{
Button
{
viewStore
.
send
(
.
confirmRequestTapped
)
viewStore
.
send
(
.
confirmRequestTapped
)
}
label
:
{
}
label
:
{
...
@@ -136,6 +149,8 @@ public struct ContactView: View {
...
@@ -136,6 +149,8 @@ public struct ContactView: View {
Image
(
systemName
:
"chevron.forward"
)
Image
(
systemName
:
"chevron.forward"
)
}
}
}
}
.
disabled
(
!
viewStore
.
canConfirmRequest
)
Button
{
Button
{
viewStore
.
send
(
.
checkAuthTapped
)
viewStore
.
send
(
.
checkAuthTapped
)
}
label
:
{
}
label
:
{
...
@@ -145,6 +160,7 @@ public struct ContactView: View {
...
@@ -145,6 +160,7 @@ public struct ContactView: View {
Image
(
systemName
:
"chevron.forward"
)
Image
(
systemName
:
"chevron.forward"
)
}
}
}
}
.
disabled
(
!
viewStore
.
canCheckAuthorization
)
}
header
:
{
}
header
:
{
Text
(
"Auth"
)
Text
(
"Auth"
)
}
}
...
...
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