diff --git a/Linphone.xcodeproj/project.pbxproj b/Linphone.xcodeproj/project.pbxproj index c8f9d54ca..8dd980a3b 100644 --- a/Linphone.xcodeproj/project.pbxproj +++ b/Linphone.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + D706BA822ADD72D100278F45 /* DeviceRotationViewModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = D706BA812ADD72D100278F45 /* DeviceRotationViewModifier.swift */; }; D70C93DE2AC2D0F60063CA3B /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = D70C93DD2AC2D0F60063CA3B /* Localizable.xcstrings */; }; D717071E2AC5922E0037746F /* ColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D717071D2AC5922E0037746F /* ColorExtension.swift */; }; D71707202AC5989C0037746F /* TextExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D717071F2AC5989C0037746F /* TextExtension.swift */; }; @@ -17,10 +18,12 @@ D719ABC92ABC6FD700B41C10 /* CoreContext.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABC82ABC6FD700B41C10 /* CoreContext.swift */; }; D719ABCC2ABC769C00B41C10 /* AssistantView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABCB2ABC769C00B41C10 /* AssistantView.swift */; }; D719ABCF2ABC779A00B41C10 /* AccountLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */; }; + D72250632ADE9615008FB426 /* HistoryViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D72250622ADE9615008FB426 /* HistoryViewModel.swift */; }; D72343302ACEFEF8009AA24E /* QrCodeScannerFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D723432F2ACEFEF8009AA24E /* QrCodeScannerFragment.swift */; }; D72343322ACEFF58009AA24E /* QRScannerController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D72343312ACEFF58009AA24E /* QRScannerController.swift */; }; D72343342ACEFFC3009AA24E /* QRScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = D72343332ACEFFC3009AA24E /* QRScanner.swift */; }; D72343362AD037AF009AA24E /* ToastView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D72343352AD037AF009AA24E /* ToastView.swift */; }; + D72992392ADD7F68003AF125 /* HistoryContactFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D72992382ADD7F68003AF125 /* HistoryContactFragment.swift */; }; D748BF2C2ACD82D2004844EB /* ThirdPartySipAccountLoginFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D748BF2B2ACD82D2004844EB /* ThirdPartySipAccountLoginFragment.swift */; }; D748BF2E2ACD82E7004844EB /* ThirdPartySipAccountWarningFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D748BF2D2ACD82E7004844EB /* ThirdPartySipAccountWarningFragment.swift */; }; D74C9CF82ACACECE0021626A /* WelcomePage1Fragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D74C9CF72ACACECE0021626A /* WelcomePage1Fragment.swift */; }; @@ -30,6 +33,8 @@ D74C9D012ACB098C0021626A /* PermissionManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D74C9D002ACB098C0021626A /* PermissionManager.swift */; }; D750D3392AD3E6EE00EC99C5 /* PopupLoadingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D750D3382AD3E6EE00EC99C5 /* PopupLoadingView.swift */; }; D7702EF22AC7205000557C00 /* WelcomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7702EF12AC7205000557C00 /* WelcomeView.swift */; }; + D78290B82ADD3910004AA85C /* ContactFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78290B72ADD3910004AA85C /* ContactFragment.swift */; }; + D78290BB2ADD40B2004AA85C /* ContactViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D78290BA2ADD40B2004AA85C /* ContactViewModel.swift */; }; D7A03FBD2ACC2DB60081A588 /* ContactsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A03FBC2ACC2DB60081A588 /* ContactsView.swift */; }; D7A03FC02ACC2E390081A588 /* HistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A03FBF2ACC2E390081A588 /* HistoryView.swift */; }; D7A03FC62ACC458A0081A588 /* SplashScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A03FC52ACC458A0081A588 /* SplashScreen.swift */; }; @@ -50,6 +55,7 @@ /* Begin PBXFileReference section */ 377E0B5C2B1F38192E694334 /* Pods-Linphone.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Linphone.debug.xcconfig"; path = "Target Support Files/Pods-Linphone/Pods-Linphone.debug.xcconfig"; sourceTree = ""; }; 6F5B27C5576B1EAED2F205EB /* Pods_Linphone.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Linphone.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D706BA812ADD72D100278F45 /* DeviceRotationViewModifier.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeviceRotationViewModifier.swift; sourceTree = ""; }; D70C93DD2AC2D0F60063CA3B /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = ""; }; D717071D2AC5922E0037746F /* ColorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorExtension.swift; sourceTree = ""; }; D717071F2AC5989C0037746F /* TextExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextExtension.swift; sourceTree = ""; }; @@ -62,10 +68,12 @@ D719ABC82ABC6FD700B41C10 /* CoreContext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreContext.swift; sourceTree = ""; }; D719ABCB2ABC769C00B41C10 /* AssistantView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssistantView.swift; sourceTree = ""; }; D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountLoginViewModel.swift; sourceTree = ""; }; + D72250622ADE9615008FB426 /* HistoryViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryViewModel.swift; sourceTree = ""; }; D723432F2ACEFEF8009AA24E /* QrCodeScannerFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QrCodeScannerFragment.swift; sourceTree = ""; }; D72343312ACEFF58009AA24E /* QRScannerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRScannerController.swift; sourceTree = ""; }; D72343332ACEFFC3009AA24E /* QRScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRScanner.swift; sourceTree = ""; }; D72343352AD037AF009AA24E /* ToastView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastView.swift; sourceTree = ""; }; + D72992382ADD7F68003AF125 /* HistoryContactFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryContactFragment.swift; sourceTree = ""; }; D748BF2B2ACD82D2004844EB /* ThirdPartySipAccountLoginFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirdPartySipAccountLoginFragment.swift; sourceTree = ""; }; D748BF2D2ACD82E7004844EB /* ThirdPartySipAccountWarningFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirdPartySipAccountWarningFragment.swift; sourceTree = ""; }; D74C9CF72ACACECE0021626A /* WelcomePage1Fragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomePage1Fragment.swift; sourceTree = ""; }; @@ -75,6 +83,8 @@ D74C9D002ACB098C0021626A /* PermissionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionManager.swift; sourceTree = ""; }; D750D3382AD3E6EE00EC99C5 /* PopupLoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopupLoadingView.swift; sourceTree = ""; }; D7702EF12AC7205000557C00 /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = ""; }; + D78290B72ADD3910004AA85C /* ContactFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactFragment.swift; sourceTree = ""; }; + D78290BA2ADD40B2004AA85C /* ContactViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactViewModel.swift; sourceTree = ""; }; D7A03FBC2ACC2DB60081A588 /* ContactsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsView.swift; sourceTree = ""; }; D7A03FBF2ACC2E390081A588 /* HistoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryView.swift; sourceTree = ""; }; D7A03FC52ACC458A0081A588 /* SplashScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplashScreen.swift; sourceTree = ""; }; @@ -226,6 +236,22 @@ path = Viewmodel; sourceTree = ""; }; + D72250612ADE95E4008FB426 /* ViewModel */ = { + isa = PBXGroup; + children = ( + D72250622ADE9615008FB426 /* HistoryViewModel.swift */, + ); + path = ViewModel; + sourceTree = ""; + }; + D72992372ADD7F1C003AF125 /* Fragments */ = { + isa = PBXGroup; + children = ( + D72992382ADD7F68003AF125 /* HistoryContactFragment.swift */, + ); + path = Fragments; + sourceTree = ""; + }; D74C9CF62ACACEB70021626A /* Fragments */ = { isa = PBXGroup; children = ( @@ -242,6 +268,7 @@ D74C9CFE2ACAEC5E0021626A /* PopupView.swift */, D72343352AD037AF009AA24E /* ToastView.swift */, D750D3382AD3E6EE00EC99C5 /* PopupLoadingView.swift */, + D706BA812ADD72D100278F45 /* DeviceRotationViewModifier.swift */, ); path = Fragments; sourceTree = ""; @@ -255,9 +282,27 @@ path = Welcome; sourceTree = ""; }; + D78290B62ADD38F9004AA85C /* Fragments */ = { + isa = PBXGroup; + children = ( + D78290B72ADD3910004AA85C /* ContactFragment.swift */, + ); + path = Fragments; + sourceTree = ""; + }; + D78290B92ADD409D004AA85C /* ViewModel */ = { + isa = PBXGroup; + children = ( + D78290BA2ADD40B2004AA85C /* ContactViewModel.swift */, + ); + path = ViewModel; + sourceTree = ""; + }; D7A03FBB2ACC2D850081A588 /* Contacts */ = { isa = PBXGroup; children = ( + D78290B62ADD38F9004AA85C /* Fragments */, + D78290B92ADD409D004AA85C /* ViewModel */, D7A03FBC2ACC2DB60081A588 /* ContactsView.swift */, ); path = Contacts; @@ -266,6 +311,8 @@ D7A03FBE2ACC2E010081A588 /* History */ = { isa = PBXGroup; children = ( + D72992372ADD7F1C003AF125 /* Fragments */, + D72250612ADE95E4008FB426 /* ViewModel */, D7A03FBF2ACC2E390081A588 /* HistoryView.swift */, ); path = History; @@ -450,13 +497,17 @@ D71707202AC5989C0037746F /* TextExtension.swift in Sources */, D719ABB92ABC67BF00B41C10 /* ContentView.swift in Sources */, D750D3392AD3E6EE00EC99C5 /* PopupLoadingView.swift in Sources */, + D706BA822ADD72D100278F45 /* DeviceRotationViewModifier.swift in Sources */, D719ABC92ABC6FD700B41C10 /* CoreContext.swift in Sources */, D7EAACCF2AD6ED8000AA6A8A /* PermissionsFragment.swift in Sources */, D7A03FBD2ACC2DB60081A588 /* ContactsView.swift in Sources */, D719ABCF2ABC779A00B41C10 /* AccountLoginViewModel.swift in Sources */, + D78290BB2ADD40B2004AA85C /* ContactViewModel.swift in Sources */, + D72992392ADD7F68003AF125 /* HistoryContactFragment.swift in Sources */, D74C9D012ACB098C0021626A /* PermissionManager.swift in Sources */, D7702EF22AC7205000557C00 /* WelcomeView.swift in Sources */, D719ABB72ABC67BF00B41C10 /* LinphoneApp.swift in Sources */, + D72250632ADE9615008FB426 /* HistoryViewModel.swift in Sources */, D7A2EDD62AC18115005D90FC /* SharedMainViewModel.swift in Sources */, D7A03FC62ACC458A0081A588 /* SplashScreen.swift in Sources */, D7A03FC02ACC2E390081A588 /* HistoryView.swift in Sources */, @@ -469,6 +520,7 @@ D72343342ACEFFC3009AA24E /* QRScanner.swift in Sources */, D72343302ACEFEF8009AA24E /* QrCodeScannerFragment.swift in Sources */, D717071E2AC5922E0037746F /* ColorExtension.swift in Sources */, + D78290B82ADD3910004AA85C /* ContactFragment.swift in Sources */, D7DA67642ACCB31700E95002 /* ProfileModeFragment.swift in Sources */, D74C9CFC2ACACF370021626A /* WelcomePage3Fragment.swift in Sources */, D719ABCC2ABC769C00B41C10 /* AssistantView.swift in Sources */, @@ -621,8 +673,8 @@ "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; @@ -665,8 +717,8 @@ "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; - INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; IPHONEOS_DEPLOYMENT_TARGET = 15.0; LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; diff --git a/Linphone/Assets.xcassets/contacts.imageset/Contents.json b/Linphone/Assets.xcassets/contacts.imageset/Contents.json new file mode 100644 index 000000000..4289db091 --- /dev/null +++ b/Linphone/Assets.xcassets/contacts.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "contacts.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/contacts.imageset/contacts.svg b/Linphone/Assets.xcassets/contacts.imageset/contacts.svg new file mode 100644 index 000000000..f1706dc95 --- /dev/null +++ b/Linphone/Assets.xcassets/contacts.imageset/contacts.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/filtres.imageset/Contents.json b/Linphone/Assets.xcassets/filtres.imageset/Contents.json new file mode 100644 index 000000000..49440ce83 --- /dev/null +++ b/Linphone/Assets.xcassets/filtres.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "filtres.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/filtres.imageset/filtres.svg b/Linphone/Assets.xcassets/filtres.imageset/filtres.svg new file mode 100644 index 000000000..032a19982 --- /dev/null +++ b/Linphone/Assets.xcassets/filtres.imageset/filtres.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/illus-belledonne1.imageset/Contents.json b/Linphone/Assets.xcassets/illus-belledonne1.imageset/Contents.json new file mode 100644 index 000000000..ca2746c0a --- /dev/null +++ b/Linphone/Assets.xcassets/illus-belledonne1.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "illus-belledonne1.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/illus-belledonne1.imageset/illus-belledonne1.svg b/Linphone/Assets.xcassets/illus-belledonne1.imageset/illus-belledonne1.svg new file mode 100644 index 000000000..2980979dc --- /dev/null +++ b/Linphone/Assets.xcassets/illus-belledonne1.imageset/illus-belledonne1.svg @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Linphone/Assets.xcassets/more.imageset/Contents.json b/Linphone/Assets.xcassets/more.imageset/Contents.json new file mode 100644 index 000000000..259aa12c1 --- /dev/null +++ b/Linphone/Assets.xcassets/more.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "more.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/more.imageset/more.svg b/Linphone/Assets.xcassets/more.imageset/more.svg new file mode 100644 index 000000000..c9321f60f --- /dev/null +++ b/Linphone/Assets.xcassets/more.imageset/more.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/Assets.xcassets/profile-image-example.imageset/Contents.json b/Linphone/Assets.xcassets/profile-image-example.imageset/Contents.json new file mode 100644 index 000000000..7d497f83a --- /dev/null +++ b/Linphone/Assets.xcassets/profile-image-example.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "profile-image-example.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/profile-image-example.imageset/profile-image-example.png b/Linphone/Assets.xcassets/profile-image-example.imageset/profile-image-example.png new file mode 100644 index 000000000..d1e23f999 Binary files /dev/null and b/Linphone/Assets.xcassets/profile-image-example.imageset/profile-image-example.png differ diff --git a/Linphone/Assets.xcassets/search.imageset/Contents.json b/Linphone/Assets.xcassets/search.imageset/Contents.json new file mode 100644 index 000000000..6e7791884 --- /dev/null +++ b/Linphone/Assets.xcassets/search.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "search.svg", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Linphone/Assets.xcassets/search.imageset/search.svg b/Linphone/Assets.xcassets/search.imageset/search.svg new file mode 100644 index 000000000..201e5000d --- /dev/null +++ b/Linphone/Assets.xcassets/search.imageset/search.svg @@ -0,0 +1,3 @@ + + + diff --git a/Linphone/LinphoneApp.swift b/Linphone/LinphoneApp.swift index 87b0a4007..3dda9cf64 100644 --- a/Linphone/LinphoneApp.swift +++ b/Linphone/LinphoneApp.swift @@ -28,7 +28,7 @@ struct LinphoneApp: App { var body: some Scene { WindowGroup { if isActive { - ContentView(sharedMainViewModel: SharedMainViewModel()) + ContentView(sharedMainViewModel: SharedMainViewModel(), contactViewModel: ContactViewModel(), historyViewModel: HistoryViewModel()) .toast(isShowing: $coreContext.toastMessage) } else { SplashScreen(isActive: $isActive) diff --git a/Linphone/Localizable.xcstrings b/Linphone/Localizable.xcstrings index 220ead687..7d9056b79 100644 --- a/Linphone/Localizable.xcstrings +++ b/Linphone/Localizable.xcstrings @@ -36,6 +36,9 @@ }, "**Notifications** : Pour vous informé quand vous recevez un message ou un appel." : { + }, + "%lld" : { + }, "%lld Book (Example)" : { "extractionState" : "manual", @@ -127,9 +130,6 @@ }, "Contacts" : { - }, - "Contacts View" : { - }, "Continue" : { @@ -161,7 +161,7 @@ "Error" : { }, - "History View" : { + "History Contact fragment" : { }, "I prefere create an account" : { @@ -190,6 +190,12 @@ }, "Next" : { + }, + "No calls for the moment..." : { + + }, + "No contacts for the moment..." : { + }, "Not account yet?" : { diff --git a/Linphone/UI/Main/Contacts/ContactsView.swift b/Linphone/UI/Main/Contacts/ContactsView.swift index 1c5d3495a..8b44da54f 100644 --- a/Linphone/UI/Main/Contacts/ContactsView.swift +++ b/Linphone/UI/Main/Contacts/ContactsView.swift @@ -20,17 +20,109 @@ import SwiftUI struct ContactsView: View { + + @ObservedObject var contactViewModel: ContactViewModel + @ObservedObject var historyViewModel: HistoryViewModel + + @State private var orientation = UIDevice.current.orientation + @State private var selectedIndex = 0 + + var objects: [Int] = [ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 + ] + var body: some View { - VStack { - Spacer() - Image("linphone") - .padding(.bottom, 20) - Text("Contacts View") - Spacer() + NavigationView { + ZStack(alignment: .bottomTrailing) { + VStack(spacing: 0) { + HStack { + Image("profile-image-example") + .resizable() + .frame(width: 40, height: 40) + .clipShape(Circle()) + + Text("Contacts") + .default_text_style_white_800(styleSize: 20) + .padding(.leading, 10) + + Spacer() + + Button { + + } label: { + Image("search") + } + + Button { + + } label: { + Image("filtres") + } + .padding(.leading) + } + .frame(maxWidth: .infinity) + .frame(height: 50) + .padding(.horizontal) + .background(Color.orangeMain500) + + VStack { + List { + ForEach(objects, id: \.self) { index in + Button { + withAnimation { + contactViewModel.contactTitle = String(index) + } + } label: { + Text("\(index)") + .frame( maxWidth: .infinity, alignment: .leading) + .foregroundStyle(Color.orangeMain500) + } + .buttonStyle(.borderless) + .listRowSeparator(.hidden) + } + } + .listStyle(.plain) + .overlay( + VStack { + if objects.isEmpty { + Spacer() + Image("illus-belledonne1") + .resizable() + .scaledToFit() + .clipped() + .padding(.all) + Text("No contacts for the moment...") + .default_text_style_800(styleSize: 16) + Spacer() + Spacer() + } + } + .padding(.all) + ) + } + } + .onRotate { newOrientation in + orientation = newOrientation + } + + Button { + // Action + } label: { + Image("contacts") + .padding() + .background(.white) + .clipShape(Circle()) + .shadow(color: .black.opacity(0.2), radius: 4) + + } + .padding() + } } + .navigationViewStyle(.stack) } } #Preview { - ContactsView() + ContactsView(contactViewModel: ContactViewModel(), historyViewModel: HistoryViewModel()) } diff --git a/Linphone/UI/Main/Contacts/Fragments/ContactFragment.swift b/Linphone/UI/Main/Contacts/Fragments/ContactFragment.swift new file mode 100644 index 000000000..9168b860e --- /dev/null +++ b/Linphone/UI/Main/Contacts/Fragments/ContactFragment.swift @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import SwiftUI + +struct ContactFragment: View { + + @ObservedObject var contactViewModel: ContactViewModel + + @State private var orientation = UIDevice.current.orientation + + var body: some View { + VStack(alignment: .leading) { + + if !(orientation == .landscapeLeft || orientation == .landscapeRight || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) { + HStack { + Image("caret-left") + .renderingMode(.template) + .resizable() + .foregroundStyle(Color.grayMain2c500) + .frame(width: 25, height: 25, alignment: .leading) + .padding(.top, 20) + .onTapGesture { + withAnimation { + contactViewModel.contactTitle = "" + } + } + + Spacer() + } + .padding(.leading) + } + + Spacer() + + Text(contactViewModel.contactTitle) + .frame(maxWidth: .infinity) + + List { + ForEach(1...40, id: \.self) { index in + Button { + contactViewModel.contactTitle = String(index) + } label: { + Text("\(index)") + .frame( maxWidth: .infinity, alignment: .leading) + } + .buttonStyle(.borderless) + } + } + } + .navigationBarHidden(true) + .onRotate { newOrientation in + orientation = newOrientation + } + + } +} + +#Preview { + ContactFragment(contactViewModel: ContactViewModel()) +} diff --git a/Linphone/UI/Main/Contacts/ViewModel/ContactViewModel.swift b/Linphone/UI/Main/Contacts/ViewModel/ContactViewModel.swift new file mode 100644 index 000000000..9114b2607 --- /dev/null +++ b/Linphone/UI/Main/Contacts/ViewModel/ContactViewModel.swift @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import Foundation + +class ContactViewModel: ObservableObject { + + @Published var contactTitle: String = "" + + init() {} +} diff --git a/Linphone/UI/Main/ContentView.swift b/Linphone/UI/Main/ContentView.swift index cf6d798d6..97991cd9d 100644 --- a/Linphone/UI/Main/ContentView.swift +++ b/Linphone/UI/Main/ContentView.swift @@ -22,6 +22,8 @@ import SwiftUI struct ContentView: View { @ObservedObject var sharedMainViewModel: SharedMainViewModel + @ObservedObject var contactViewModel: ContactViewModel + @ObservedObject var historyViewModel: HistoryViewModel @ObservedObject private var coreContext = CoreContext.shared @State var index = 0 @@ -34,79 +36,81 @@ struct ContentView: View { AssistantView(sharedMainViewModel: sharedMainViewModel) } else { GeometryReader { geometry in - NavigationView { - if orientation == .landscapeLeft || orientation == .landscapeRight || geometry.size.width > geometry.size.height { + ZStack { + VStack(spacing: 0) { HStack(spacing: 0) { - VStack { - Group { - Spacer() - Button(action: { - self.index = 0 - }, label: { - VStack { - Image("address-book") - .renderingMode(.template) - .resizable() - .foregroundStyle(self.index == 0 ? Color.orangeMain500 : Color.grayMain2c600) - .frame(width: 25, height: 25) - if self.index == 0 { - Text("Contacts") - .default_text_style_700(styleSize: 10) - } else { - Text("Contacts") - .default_text_style(styleSize: 10) + if orientation == .landscapeLeft || orientation == .landscapeRight || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height { + VStack { + Group { + Spacer() + Button(action: { + self.index = 0 + }, label: { + VStack { + Image("address-book") + .renderingMode(.template) + .resizable() + .foregroundStyle(self.index == 0 ? Color.orangeMain500 : Color.grayMain2c600) + .frame(width: 25, height: 25) + if self.index == 0 { + Text("Contacts") + .default_text_style_700(styleSize: 10) + } else { + Text("Contacts") + .default_text_style(styleSize: 10) + } } - } - }) - - Spacer() - - Button(action: { - self.index = 1 - }, label: { - VStack { - Image("phone") - .renderingMode(.template) - .resizable() - .foregroundStyle(self.index == 1 ? Color.orangeMain500 : Color.grayMain2c600) - .frame(width: 25, height: 25) - if self.index == 1 { - Text("Calls") - .default_text_style_700(styleSize: 10) - } else { - Text("Calls") - .default_text_style(styleSize: 10) + }) + + Spacer() + + Button(action: { + self.index = 1 + contactViewModel.contactTitle = "" + }, label: { + VStack { + Image("phone") + .renderingMode(.template) + .resizable() + .foregroundStyle(self.index == 1 ? Color.orangeMain500 : Color.grayMain2c600) + .frame(width: 25, height: 25) + if self.index == 1 { + Text("Calls") + .default_text_style_700(styleSize: 10) + } else { + Text("Calls") + .default_text_style(styleSize: 10) + } } - } - }) - - Spacer() + }) + + Spacer() + } } + .frame(width: 75) + .padding(.leading, orientation == .landscapeRight && geometry.safeAreaInsets.bottom > 0 ? -geometry.safeAreaInsets.leading : 0) } - .frame(width: 60) - .padding(.leading, orientation == .landscapeRight && geometry.safeAreaInsets.bottom > 0 ? -geometry.safeAreaInsets.leading : 0) - .background(Color.gray100) VStack { if self.index == 0 { - ContactsView() + ContactsView(contactViewModel: contactViewModel, historyViewModel: historyViewModel) } else if self.index == 1 { HistoryView() } } - .frame(maxWidth: .infinity) + .frame(maxWidth: + (orientation == .landscapeLeft || orientation == .landscapeRight || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) + ? geometry.size.width/100*40 + : .infinity + ) + + if orientation == .landscapeLeft || orientation == .landscapeRight || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height { + Spacer() + } } - } else { - VStack(spacing: 0) { - VStack { - if self.index == 0 { - ContactsView() - } else if self.index == 1 { - HistoryView() - } - } - .frame(maxWidth: .infinity) - + .shadow(color: Color.gray200, radius: 2) + + if !(orientation == .landscapeLeft || orientation == .landscapeRight || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) { HStack { Group { Spacer() @@ -134,6 +138,7 @@ struct ContentView: View { Button(action: { self.index = 1 + contactViewModel.contactTitle = "" }, label: { VStack { Image("phone") @@ -151,44 +156,48 @@ struct ContentView: View { } }) .padding(.top) - Spacer() } } - .background(Color.gray100) + .padding(.bottom, geometry.safeAreaInsets.bottom > 0 ? 0 : 15) + .background( + Color.white + .shadow(color: Color.gray200, radius: 4, x: 0, y: 0) + .mask(Rectangle().padding(.top, -8)) + ) } } + + if !contactViewModel.contactTitle.isEmpty || !historyViewModel.historyTitle.isEmpty { + HStack(spacing: 0) { + Spacer() + .frame(maxWidth: + (orientation == .landscapeLeft || orientation == .landscapeRight || UIScreen.main.bounds.size.width > UIScreen.main.bounds.size.height) + ? (geometry.size.width/100*40) + 75 + : 0 + ) + if self.index == 0 { + ContactFragment(contactViewModel: contactViewModel) + .frame(maxWidth: .infinity) + .background(Color.gray100) + } else if self.index == 1 { + HistoryContactFragment() + .frame(maxWidth: .infinity) + .background(Color.gray100) + } + } + .padding(.leading, orientation == .landscapeRight && geometry.safeAreaInsets.bottom > 0 ? -geometry.safeAreaInsets.leading : 0) + .transition(.move(edge: .trailing)) + } } - .onRotate { newOrientation in - orientation = newOrientation - } + } + .onRotate { newOrientation in + orientation = newOrientation } } } } -struct DeviceRotationViewModifier: ViewModifier { - let action: (UIDeviceOrientation) -> Void - - func body(content: Content) -> some View { - content - .onAppear() - .onReceive(NotificationCenter.default.publisher(for: UIDevice.orientationDidChangeNotification)) { _ in - if UIDevice.current.orientation == .landscapeLeft - || UIDevice.current.orientation == .landscapeRight - || UIDevice.current.orientation == .portrait { - action(UIDevice.current.orientation) - } - } - } -} - -extension View { - func onRotate(perform action: @escaping (UIDeviceOrientation) -> Void) -> some View { - self.modifier(DeviceRotationViewModifier(action: action)) - } -} - #Preview { - ContentView(sharedMainViewModel: SharedMainViewModel()) + ContentView(sharedMainViewModel: SharedMainViewModel(), contactViewModel: ContactViewModel(), historyViewModel: HistoryViewModel()) } diff --git a/Linphone/UI/Main/Fragments/DeviceRotationViewModifier.swift b/Linphone/UI/Main/Fragments/DeviceRotationViewModifier.swift new file mode 100644 index 000000000..3f3fd0f22 --- /dev/null +++ b/Linphone/UI/Main/Fragments/DeviceRotationViewModifier.swift @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import SwiftUI + +struct DeviceRotationViewModifier: ViewModifier { + + private var idiom: UIUserInterfaceIdiom { UIDevice.current.userInterfaceIdiom } + + let action: (UIDeviceOrientation) -> Void + + func body(content: Content) -> some View { + content + .onAppear() + .onReceive(NotificationCenter.default.publisher(for: UIDevice.orientationDidChangeNotification)) { _ in + if UIDevice.current.orientation == .landscapeLeft + || UIDevice.current.orientation == .landscapeRight + || UIDevice.current.orientation == .portrait + || (UIDevice.current.orientation == .portraitUpsideDown && idiom == .pad) { + action(UIDevice.current.orientation) + } + } + } +} + +extension View { + func onRotate(perform action: @escaping (UIDeviceOrientation) -> Void) -> some View { + self.modifier(DeviceRotationViewModifier(action: action)) + } +} diff --git a/Linphone/UI/Main/History/Fragments/HistoryContactFragment.swift b/Linphone/UI/Main/History/Fragments/HistoryContactFragment.swift new file mode 100644 index 000000000..ef7dc3419 --- /dev/null +++ b/Linphone/UI/Main/History/Fragments/HistoryContactFragment.swift @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of Linphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import SwiftUI + +struct HistoryContactFragment: View { + var body: some View { + VStack { + Spacer() + Text("History Contact fragment") + Spacer() + } + } +} + +#Preview { + HistoryContactFragment() +} diff --git a/Linphone/UI/Main/History/HistoryView.swift b/Linphone/UI/Main/History/HistoryView.swift index de3a16833..e2510ed9b 100644 --- a/Linphone/UI/Main/History/HistoryView.swift +++ b/Linphone/UI/Main/History/HistoryView.swift @@ -21,16 +21,55 @@ import SwiftUI struct HistoryView: View { - @ObservedObject private var coreContext = CoreContext.shared - var body: some View { - VStack { - Spacer() - Image("linphone") - .padding(.bottom, 20) - Text("History View") - Spacer() + NavigationView { + VStack(spacing: 0) { + HStack { + Image("profile-image-example") + .resizable() + .frame(width: 40, height: 40) + .clipShape(Circle()) + + Text("Calls") + .default_text_style_white_800(styleSize: 20) + .padding(.leading, 10) + + Spacer() + + Button { + + } label: { + Image("search") + } + + Button { + + } label: { + Image("more") + } + .padding(.leading) + } + .frame(maxWidth: .infinity) + .frame(height: 50) + .padding(.horizontal) + .background(Color.orangeMain500) + + VStack { + Spacer() + Image("illus-belledonne1") + .resizable() + .scaledToFit() + .clipped() + .padding(.all) + Text("No calls for the moment...") + .default_text_style_800(styleSize: 16) + Spacer() + Spacer() + } + .padding(.all) + } } + .navigationViewStyle(.stack) } } diff --git a/Linphone/UI/Main/History/ViewModel/HistoryViewModel.swift b/Linphone/UI/Main/History/ViewModel/HistoryViewModel.swift new file mode 100644 index 000000000..3222b6a0f --- /dev/null +++ b/Linphone/UI/Main/History/ViewModel/HistoryViewModel.swift @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2010-2023 Belledonne Communications SARL. + * + * This file is part of linphone-iphone + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import Foundation + +class HistoryViewModel: ObservableObject { + + @Published var historyTitle: String = "" + + init() {} +}