adding in backgrounds but playing around
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
89288ECB27675B9F00E962C4 /* OnboardingTemplateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89288ECA27675B9F00E962C4 /* OnboardingTemplateView.swift */; };
|
||||
894E41D92784BB8000A68728 /* woosh.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 894E41D82784BB8000A68728 /* woosh.mp3 */; };
|
||||
894E41DD2784D68600A68728 /* pop.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 894E41DC2784D68600A68728 /* pop.mp3 */; };
|
||||
894E80BE276ED7A700624B72 /* avatars.swift in Sources */ = {isa = PBXBuildFile; fileRef = 894E80BD276ED7A700624B72 /* avatars.swift */; };
|
||||
894E80BE276ED7A700624B72 /* systemImages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 894E80BD276ED7A700624B72 /* systemImages.swift */; };
|
||||
894E80C1276EFD0500624B72 /* AudioPlayerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 894E80C0276EFD0400624B72 /* AudioPlayerView.swift */; };
|
||||
894E80C327702E5900624B72 /* AddBasicInfoViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 894E80C227702E5800624B72 /* AddBasicInfoViewModel.swift */; };
|
||||
896CE6FE27707E6B00DB474E /* CircleNavigationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 896CE6FD27707E6B00DB474E /* CircleNavigationView.swift */; };
|
||||
@@ -139,7 +139,7 @@
|
||||
89288ECA27675B9F00E962C4 /* OnboardingTemplateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingTemplateView.swift; sourceTree = "<group>"; };
|
||||
894E41D82784BB8000A68728 /* woosh.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = woosh.mp3; sourceTree = "<group>"; };
|
||||
894E41DC2784D68600A68728 /* pop.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = pop.mp3; sourceTree = "<group>"; };
|
||||
894E80BD276ED7A700624B72 /* avatars.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = avatars.swift; sourceTree = "<group>"; };
|
||||
894E80BD276ED7A700624B72 /* systemImages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = systemImages.swift; sourceTree = "<group>"; };
|
||||
894E80C0276EFD0400624B72 /* AudioPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioPlayerView.swift; sourceTree = "<group>"; };
|
||||
894E80C227702E5800624B72 /* AddBasicInfoViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddBasicInfoViewModel.swift; sourceTree = "<group>"; };
|
||||
896CE6FD27707E6B00DB474E /* CircleNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleNavigationView.swift; sourceTree = "<group>"; };
|
||||
@@ -363,7 +363,7 @@
|
||||
89BDCDE427695DB900577829 /* NirvanaImage.swift */,
|
||||
89BDCDE62769616600577829 /* UIImage+Extension.swift */,
|
||||
89F18AEB276E92BF00115B1E /* CustomExtensions.swift */,
|
||||
894E80BD276ED7A700624B72 /* avatars.swift */,
|
||||
894E80BD276ED7A700624B72 /* systemImages.swift */,
|
||||
896CE70827712CED00DB474E /* StringExtension.swift */,
|
||||
);
|
||||
path = Globals;
|
||||
@@ -647,7 +647,7 @@
|
||||
891A15E327653A7000B26659 /* ContentView.swift in Sources */,
|
||||
891060E4277359B900F14509 /* CloudStorageService.swift in Sources */,
|
||||
896CE7002770847400DB474E /* CircleFooterView.swift in Sources */,
|
||||
894E80BE276ED7A700624B72 /* avatars.swift in Sources */,
|
||||
894E80BE276ED7A700624B72 /* systemImages.swift in Sources */,
|
||||
89091997277DDE030025F4BB /* ProfilePicturesOverlappedView.swift in Sources */,
|
||||
890C2462277BF935009B4A30 /* CallView.swift in Sources */,
|
||||
896CE7052770AE5D00DB474E /* InboxView.swift in Sources */,
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "beach.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "beach2.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 912 KiB |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "clouds.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "clouds2.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 4.9 MiB |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "lotuses.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.4 MiB |
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "waves.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.5 MiB |
@@ -7,8 +7,17 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
struct Avatars {
|
||||
static let avatarSystemNames = [
|
||||
struct SystemImages {
|
||||
static let wallpapers = [
|
||||
"clouds",
|
||||
"lotuses",
|
||||
"clouds2",
|
||||
"waves",
|
||||
"beach",
|
||||
"beach2"
|
||||
]
|
||||
|
||||
static let avatars = [
|
||||
"Artboards_Diversity_Avatars_by_Netguru-1",
|
||||
"Artboards_Diversity_Avatars_by_Netguru-2",
|
||||
"Artboards_Diversity_Avatars_by_Netguru-3",
|
||||
@@ -63,8 +63,8 @@ struct AddBasicInfoView: View {
|
||||
// Horizontal scroll view to allow user to select the avatar he or she wants
|
||||
ScrollView([.horizontal, .vertical], showsIndicators: false) {
|
||||
LazyVGrid(columns: columns) {
|
||||
ForEach(0..<Avatars.avatarSystemNames.count, id: \.self) { index in
|
||||
Image(Avatars.avatarSystemNames[index])
|
||||
ForEach(0..<SystemImages.avatars.count, id: \.self) { index in
|
||||
Image(SystemImages.avatars[index])
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 50, height: 50, alignment: .center)
|
||||
@@ -107,7 +107,7 @@ struct AddBasicInfoView: View {
|
||||
// button to save information
|
||||
Button {
|
||||
var updatedUser = self.authSessionStore.user
|
||||
updatedUser?.avatar = Avatars.avatarSystemNames[self.selectedAvatarIndex]
|
||||
updatedUser?.avatar = SystemImages.avatars[self.selectedAvatarIndex]
|
||||
updatedUser?.nickname = self.nickname
|
||||
|
||||
print("attempting to save information \(updatedUser)")
|
||||
@@ -137,7 +137,7 @@ struct AddBasicInfoView: View {
|
||||
self.nickname = self.authSessionStore.user?.nickname ?? ""
|
||||
|
||||
if self.authSessionStore.user?.avatar != nil { // if user has previously selected an avatar
|
||||
self.selectedAvatarIndex = Avatars.avatarSystemNames.firstIndex(of: (self.authSessionStore.user?.avatar)!) ?? 0 // 0 in case the system names doesn't have it anymore
|
||||
self.selectedAvatarIndex = SystemImages.avatars.firstIndex(of: (self.authSessionStore.user?.avatar)!) ?? 0 // 0 in case the system names doesn't have it anymore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class AddBasicInfoViewModel : ObservableObject {
|
||||
completion()
|
||||
return
|
||||
}
|
||||
if !Avatars.avatarSystemNames.contains(currUser.avatar!) {
|
||||
if !SystemImages.avatars.contains(currUser.avatar!) {
|
||||
self.state = .failed("Invalid avatar selected!")
|
||||
completion()
|
||||
return
|
||||
|
||||
@@ -108,7 +108,7 @@ struct ListContactRow: View {
|
||||
if contact.isExisting { // add to circle
|
||||
// TODO: check if this contact is already in user's circle
|
||||
HStack(alignment: .center, spacing: 0) {
|
||||
Image(contact.user?.avatar ?? Avatars.avatarSystemNames[1])
|
||||
Image(contact.user?.avatar ?? SystemImages.avatars[1])
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.clipShape(Circle())
|
||||
@@ -167,7 +167,7 @@ struct ListContactRow: View {
|
||||
}
|
||||
else { // invite button to text the person
|
||||
HStack(alignment: .center, spacing: 0) {
|
||||
Image(Avatars.avatarSystemNames[1])
|
||||
Image(SystemImages.avatars[1])
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.clipShape(Circle())
|
||||
|
||||
@@ -20,7 +20,7 @@ struct ProfilePicturesOverlappedView: View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
ForEach(0..<users.count, id: \.self) {userIndex in
|
||||
Image(users[userIndex].avatar ?? Avatars.avatarSystemNames[1])
|
||||
Image(users[userIndex].avatar ?? SystemImages.avatars[1])
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.background(NirvanaColor.dimTeal)
|
||||
|
||||
@@ -176,7 +176,7 @@ struct CircleGridView: View {
|
||||
UserStatusView(status: self.authSessionStore.relevantUsersDict[friendId]?.userStatus, size: 20, padding: 5)
|
||||
|
||||
// inside avatar
|
||||
Image(self.authSessionStore.relevantUsersDict[friendId]?.avatar ?? Avatars.avatarSystemNames[0])
|
||||
Image(self.authSessionStore.relevantUsersDict[friendId]?.avatar ?? SystemImages.avatars[0])
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.shadow(color: Color.black.opacity(0.2), radius: 10, x: 0, y: 20)
|
||||
@@ -289,7 +289,7 @@ struct CircleGridView: View {
|
||||
.blur(radius: 5)
|
||||
.cornerRadius(100)
|
||||
|
||||
Image(self.authSessionStore.relevantUsersDict[inboxUserId]?.avatar ?? Avatars.avatarSystemNames[0])
|
||||
Image(self.authSessionStore.relevantUsersDict[inboxUserId]?.avatar ?? SystemImages.avatars[0])
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.shadow(color: Color.black.opacity(0.2), radius: 10, x: 0, y: 20)
|
||||
@@ -481,7 +481,7 @@ struct CircleGridView: View {
|
||||
|
||||
private func getBubbleTint(convoId: String?) -> Color {
|
||||
if convoId != nil && convoId == self.convoVM.selectedConvoId {
|
||||
return NirvanaColor.teal.opacity(0.7)
|
||||
return Color.green
|
||||
}
|
||||
|
||||
return NirvanaColor.dimTeal.opacity(0.2)
|
||||
|
||||
@@ -15,20 +15,25 @@ struct WavesGlassBackgroundView: View {
|
||||
var isRecording: Bool = false
|
||||
|
||||
@State var animateWaves = false
|
||||
@State var backgroundImage = ""
|
||||
|
||||
let recordingColors = [NirvanaColor.solidBlue, NirvanaColor.dimTeal, Color.orange.opacity(0.8), NirvanaColor.teal.opacity(0.7), NirvanaColor.teal.opacity(0.7), NirvanaColor.solidTeal.opacity(0.7), NirvanaColor.solidBlue]
|
||||
let normalColors = [NirvanaColor.solidBlue, NirvanaColor.dimTeal, Color.orange.opacity(0.4), NirvanaColor.teal.opacity(0.5), NirvanaColor.teal.opacity(0.3), NirvanaColor.solidTeal.opacity(0.3), NirvanaColor.solidBlue]
|
||||
|
||||
var body: some View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
AngularGradient(
|
||||
gradient: Gradient(
|
||||
colors: self.isRecording ? recordingColors : normalColors),
|
||||
center: .bottom,
|
||||
angle: .degrees(120))
|
||||
|
||||
Image("beach2")
|
||||
.resizable()
|
||||
|
||||
|
||||
LinearGradient(gradient: Gradient(
|
||||
colors: [NirvanaColor.white.opacity(0), NirvanaColor.white.opacity(1.0)]), startPoint: .bottom, endPoint: .top)
|
||||
colors: [NirvanaColor.white.opacity(0.2), NirvanaColor.white.opacity(1.0)]), startPoint: .bottom, endPoint: .top)
|
||||
|
||||
getWave(peakPercentage: 0.4, troughPercentage: 0.65, peakAltercation: baseLineY, troughAltercation: baseLineY - 50)
|
||||
.foregroundColor(NirvanaColor.dimTeal.opacity(0.5))
|
||||
@@ -62,6 +67,10 @@ struct WavesGlassBackgroundView: View {
|
||||
.onAppear() {
|
||||
// start repeat animation for waves
|
||||
self.animateWaves = true
|
||||
|
||||
// randomly choose a wallpaper out of all available
|
||||
let randomInt = Int.random(in: 0..<SystemImages.wallpapers.count)
|
||||
self.backgroundImage = SystemImages.wallpapers[randomInt]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user