diff --git a/nirvana-ios.xcodeproj/project.pbxproj b/nirvana-ios.xcodeproj/project.pbxproj index e29b5f8..e4bb54a 100644 --- a/nirvana-ios.xcodeproj/project.pbxproj +++ b/nirvana-ios.xcodeproj/project.pbxproj @@ -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 = ""; }; 894E41D82784BB8000A68728 /* woosh.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = woosh.mp3; sourceTree = ""; }; 894E41DC2784D68600A68728 /* pop.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = pop.mp3; sourceTree = ""; }; - 894E80BD276ED7A700624B72 /* avatars.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = avatars.swift; sourceTree = ""; }; + 894E80BD276ED7A700624B72 /* systemImages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = systemImages.swift; sourceTree = ""; }; 894E80C0276EFD0400624B72 /* AudioPlayerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioPlayerView.swift; sourceTree = ""; }; 894E80C227702E5800624B72 /* AddBasicInfoViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddBasicInfoViewModel.swift; sourceTree = ""; }; 896CE6FD27707E6B00DB474E /* CircleNavigationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleNavigationView.swift; sourceTree = ""; }; @@ -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 */, diff --git a/nirvana-ios/Assets.xcassets/wallpapers/Contents.json b/nirvana-ios/Assets.xcassets/wallpapers/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/nirvana-ios/Assets.xcassets/wallpapers/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/nirvana-ios/Assets.xcassets/wallpapers/beach.imageset/Contents.json b/nirvana-ios/Assets.xcassets/wallpapers/beach.imageset/Contents.json new file mode 100644 index 0000000..0de4759 --- /dev/null +++ b/nirvana-ios/Assets.xcassets/wallpapers/beach.imageset/Contents.json @@ -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 + } +} diff --git a/nirvana-ios/Assets.xcassets/wallpapers/beach.imageset/beach.jpg b/nirvana-ios/Assets.xcassets/wallpapers/beach.imageset/beach.jpg new file mode 100644 index 0000000..716f9cd Binary files /dev/null and b/nirvana-ios/Assets.xcassets/wallpapers/beach.imageset/beach.jpg differ diff --git a/nirvana-ios/Assets.xcassets/wallpapers/beach2.imageset/Contents.json b/nirvana-ios/Assets.xcassets/wallpapers/beach2.imageset/Contents.json new file mode 100644 index 0000000..912b874 --- /dev/null +++ b/nirvana-ios/Assets.xcassets/wallpapers/beach2.imageset/Contents.json @@ -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 + } +} diff --git a/nirvana-ios/Assets.xcassets/wallpapers/beach2.imageset/beach2.jpg b/nirvana-ios/Assets.xcassets/wallpapers/beach2.imageset/beach2.jpg new file mode 100644 index 0000000..0c288f6 Binary files /dev/null and b/nirvana-ios/Assets.xcassets/wallpapers/beach2.imageset/beach2.jpg differ diff --git a/nirvana-ios/Assets.xcassets/wallpapers/clouds.imageset/Contents.json b/nirvana-ios/Assets.xcassets/wallpapers/clouds.imageset/Contents.json new file mode 100644 index 0000000..a9c9d68 --- /dev/null +++ b/nirvana-ios/Assets.xcassets/wallpapers/clouds.imageset/Contents.json @@ -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 + } +} diff --git a/nirvana-ios/Assets.xcassets/wallpapers/clouds.imageset/clouds.jpg b/nirvana-ios/Assets.xcassets/wallpapers/clouds.imageset/clouds.jpg new file mode 100644 index 0000000..eff44e9 Binary files /dev/null and b/nirvana-ios/Assets.xcassets/wallpapers/clouds.imageset/clouds.jpg differ diff --git a/nirvana-ios/Assets.xcassets/wallpapers/clouds2.imageset/Contents.json b/nirvana-ios/Assets.xcassets/wallpapers/clouds2.imageset/Contents.json new file mode 100644 index 0000000..5f70a23 --- /dev/null +++ b/nirvana-ios/Assets.xcassets/wallpapers/clouds2.imageset/Contents.json @@ -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 + } +} diff --git a/nirvana-ios/Assets.xcassets/wallpapers/clouds2.imageset/clouds2.jpg b/nirvana-ios/Assets.xcassets/wallpapers/clouds2.imageset/clouds2.jpg new file mode 100644 index 0000000..e8b6956 Binary files /dev/null and b/nirvana-ios/Assets.xcassets/wallpapers/clouds2.imageset/clouds2.jpg differ diff --git a/nirvana-ios/Assets.xcassets/wallpapers/lotuses.imageset/Contents.json b/nirvana-ios/Assets.xcassets/wallpapers/lotuses.imageset/Contents.json new file mode 100644 index 0000000..0ae017e --- /dev/null +++ b/nirvana-ios/Assets.xcassets/wallpapers/lotuses.imageset/Contents.json @@ -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 + } +} diff --git a/nirvana-ios/Assets.xcassets/wallpapers/lotuses.imageset/lotuses.jpg b/nirvana-ios/Assets.xcassets/wallpapers/lotuses.imageset/lotuses.jpg new file mode 100644 index 0000000..f9523af Binary files /dev/null and b/nirvana-ios/Assets.xcassets/wallpapers/lotuses.imageset/lotuses.jpg differ diff --git a/nirvana-ios/Assets.xcassets/wallpapers/waves.imageset/Contents.json b/nirvana-ios/Assets.xcassets/wallpapers/waves.imageset/Contents.json new file mode 100644 index 0000000..e1a2c18 --- /dev/null +++ b/nirvana-ios/Assets.xcassets/wallpapers/waves.imageset/Contents.json @@ -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 + } +} diff --git a/nirvana-ios/Assets.xcassets/wallpapers/waves.imageset/waves.jpg b/nirvana-ios/Assets.xcassets/wallpapers/waves.imageset/waves.jpg new file mode 100644 index 0000000..1a7b125 Binary files /dev/null and b/nirvana-ios/Assets.xcassets/wallpapers/waves.imageset/waves.jpg differ diff --git a/nirvana-ios/Globals/avatars.swift b/nirvana-ios/Globals/systemImages.swift similarity index 94% rename from nirvana-ios/Globals/avatars.swift rename to nirvana-ios/Globals/systemImages.swift index e86dc82..cb759cf 100644 --- a/nirvana-ios/Globals/avatars.swift +++ b/nirvana-ios/Globals/systemImages.swift @@ -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", diff --git a/nirvana-ios/Views/AddBasicInfo/AddBasicInfoView.swift b/nirvana-ios/Views/AddBasicInfo/AddBasicInfoView.swift index e94b8c7..2bf47c5 100644 --- a/nirvana-ios/Views/AddBasicInfo/AddBasicInfoView.swift +++ b/nirvana-ios/Views/AddBasicInfo/AddBasicInfoView.swift @@ -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.. Color { if convoId != nil && convoId == self.convoVM.selectedConvoId { - return NirvanaColor.teal.opacity(0.7) + return Color.green } return NirvanaColor.dimTeal.opacity(0.2) diff --git a/nirvana-ios/Views/Templates/WavesGlassBackgroundView.swift b/nirvana-ios/Views/Templates/WavesGlassBackgroundView.swift index 34af292..70dbc2b 100644 --- a/nirvana-ios/Views/Templates/WavesGlassBackgroundView.swift +++ b/nirvana-ios/Views/Templates/WavesGlassBackgroundView.swift @@ -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..