Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Joel Oksanen
individual_project
Commits
727acebd
Commit
727acebd
authored
Feb 23, 2020
by
Joel Oksanen
Browse files
Connected ios client and local server. Improved UI
parent
16c718bc
Changes
6
Hide whitespace changes
Inline
Side-by-side
ADAbot/ADAbot.xcodeproj/project.xcworkspace/xcuserdata/joeloksanen.xcuserdatad/UserInterfaceState.xcuserstate
View file @
727acebd
No preview for this file type
ADAbot/ADAbot/ChatView.swift
View file @
727acebd
...
...
@@ -11,8 +11,9 @@ import SwiftUI
struct
ChatView
:
View
{
var
body
:
some
View
{
ZStack
{
Rectangle
()
.
foregroundColor
(
Color
(
red
:
231
/
255
,
green
:
234
/
255
,
blue
:
239
/
255
))
Text
(
"Chat"
)
}
.
background
(
Color
(
red
:
231
/
255
,
green
:
234
/
255
,
blue
:
239
/
255
))
}
}
ADAbot/ADAbot/ConnectionManager.swift
View file @
727acebd
...
...
@@ -49,6 +49,7 @@ class ConnectionManager: ObservableObject {
}
}
task
.
resume
()
}
}
ADAbot/ADAbot/ContentView.swift
View file @
727acebd
...
...
@@ -10,10 +10,13 @@ import SwiftUI
struct
ContentView
:
View
{
var
body
:
some
View
{
VStack
{
VStack
(
spacing
:
0
)
{
ProductView
()
.
zIndex
(
2
)
ChatView
()
.
zIndex
(
1
)
}
.
edgesIgnoringSafeArea
(
.
all
)
.
background
(
Color
.
black
)
}
}
...
...
ADAbot/ADAbot/Info.plist
View file @
727acebd
...
...
@@ -56,5 +56,10 @@
<string>
UIInterfaceOrientationLandscapeLeft
</string>
<string>
UIInterfaceOrientationLandscapeRight
</string>
</array>
<key>
NSAppTransportSecurity
</key>
<dict>
<key>
NSAllowsArbitraryLoads
</key>
<true/>
</dict>
</dict>
</plist>
ADAbot/ADAbot/ProductView.swift
View file @
727acebd
...
...
@@ -10,11 +10,32 @@ import SwiftUI
struct
ProductView
:
View
{
@ObservedObject
var
connectionManager
=
ConnectionManager
()
let
height
:
CGFloat
=
200
var
body
:
some
View
{
ZStack
{
Text
(
connectionManager
.
product
.
name
)
Rectangle
()
.
foregroundColor
(
Color
.
white
)
.
frame
(
height
:
height
)
.
shadow
(
color
:
Color
(
.
sRGB
,
white
:
0
,
opacity
:
0.05
),
radius
:
20
,
x
:
0
,
y
:
8
)
VStack
{
Spacer
()
HStack
(
alignment
:
.
top
)
{
Text
(
connectionManager
.
product
.
name
)
.
foregroundColor
(
Color
.
gray
)
Spacer
()
Image
(
uiImage
:
connectionManager
.
product
.
image
)
.
resizable
()
.
aspectRatio
(
contentMode
:
.
fit
)
.
frame
(
width
:
120
,
height
:
120
)
.
border
(
Color
(
white
:
0.85
),
width
:
1
)
}
.
padding
(
EdgeInsets
(
top
:
0
,
leading
:
20
,
bottom
:
20
,
trailing
:
20
))
}
.
frame
(
height
:
height
)
}
.
background
(
Color
.
white
)
}
}
Write
Preview
Supports
Markdown
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