From 8f733195d4c0a571d8810dcc07d82238d6333b77 Mon Sep 17 00:00:00 2001 From: Benoit Martins Date: Mon, 16 Oct 2023 16:57:04 +0200 Subject: [PATCH] Add home page --- Linphone.xcodeproj/project.pbxproj | 60 +++++- .../contacts.imageset/Contents.json | 21 ++ .../contacts.imageset/contacts.svg | 3 + .../filtres.imageset/Contents.json | 21 ++ .../filtres.imageset/filtres.svg | 3 + .../illus-belledonne1.imageset/Contents.json | 21 ++ .../illus-belledonne1.svg | 65 ++++++ .../more.imageset/Contents.json | 21 ++ .../Assets.xcassets/more.imageset/more.svg | 3 + .../Contents.json | 21 ++ .../profile-image-example.png | Bin 0 -> 20925 bytes .../search.imageset/Contents.json | 21 ++ .../search.imageset/search.svg | 3 + Linphone/LinphoneApp.swift | 2 +- Linphone/Localizable.xcstrings | 14 +- Linphone/UI/Main/Contacts/ContactsView.swift | 106 +++++++++- .../Contacts/Fragments/ContactFragment.swift | 77 ++++++++ .../Contacts/ViewModel/ContactViewModel.swift | 27 +++ Linphone/UI/Main/ContentView.swift | 185 +++++++++--------- .../DeviceRotationViewModifier.swift | 46 +++++ .../Fragments/HistoryContactFragment.swift | 34 ++++ Linphone/UI/Main/History/HistoryView.swift | 55 +++++- .../History/ViewModel/HistoryViewModel.swift | 27 +++ 23 files changed, 724 insertions(+), 112 deletions(-) create mode 100644 Linphone/Assets.xcassets/contacts.imageset/Contents.json create mode 100644 Linphone/Assets.xcassets/contacts.imageset/contacts.svg create mode 100644 Linphone/Assets.xcassets/filtres.imageset/Contents.json create mode 100644 Linphone/Assets.xcassets/filtres.imageset/filtres.svg create mode 100644 Linphone/Assets.xcassets/illus-belledonne1.imageset/Contents.json create mode 100644 Linphone/Assets.xcassets/illus-belledonne1.imageset/illus-belledonne1.svg create mode 100644 Linphone/Assets.xcassets/more.imageset/Contents.json create mode 100644 Linphone/Assets.xcassets/more.imageset/more.svg create mode 100644 Linphone/Assets.xcassets/profile-image-example.imageset/Contents.json create mode 100644 Linphone/Assets.xcassets/profile-image-example.imageset/profile-image-example.png create mode 100644 Linphone/Assets.xcassets/search.imageset/Contents.json create mode 100644 Linphone/Assets.xcassets/search.imageset/search.svg create mode 100644 Linphone/UI/Main/Contacts/Fragments/ContactFragment.swift create mode 100644 Linphone/UI/Main/Contacts/ViewModel/ContactViewModel.swift create mode 100644 Linphone/UI/Main/Fragments/DeviceRotationViewModifier.swift create mode 100644 Linphone/UI/Main/History/Fragments/HistoryContactFragment.swift create mode 100644 Linphone/UI/Main/History/ViewModel/HistoryViewModel.swift 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 0000000000000000000000000000000000000000..d1e23f9998d38455f60ac192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1IP0Yv2 zdS=s7MMmbLf&n{)0NBqHGa%&u0=HflB9F~w^yfD@Q(kxbBO--~*+XHcA}meDTeV6UAInShh$Rw!tJka>EE z9A}NxLrBAkA=!)vLu&!EfsHZRlB@xcc_90V<1&;WpE*g<9!jf$n5-j`I1i zREio}EM%xP4F91wVK=L|#)@43v%$80Zrd`C?q9^2Epkry1B-?;< zjj2(Y67NeIhGgV$i3Opf%^Xt?6lD6_et4L& zkN0sFXFm)S%jGMi18BVNgRaj1H#7w3k{kOOFRn!@2DX`85U|@fI#v<>jX9Qh(%o!5 zUuljubS(Q}7tA@W*LY~}3*;N5;cx7Rw`u$~2*rPul59*(ZdIkAHA-D4kF5a!t!;5y zpMc}|8)CK*P{3|2;~RqrQKCSCy^(E(9$_}SBz(|v#i|8DOJ!V#N!Ycf=@G-<&C7;H z{~Gi@?FvCTu6FAJ!B6j$OaDjvy!?tr6CWo2`bFOGgYtW$*|r)ut-VTHm+w=x4vbp^ z9Z00Zpv-1Srm^8z-at1;YP*0|m7e|HiCkKHZW`H{*xob`LrL51$U0u%s(@k6<#-*5 z*fD|Cwcm9EruOMt$0`X2C7&(BxV~O3Yd24hThXCo?;2&Qwfn{ibKF*lvpK77X%p58 kKO~y^MzdM_EB~DT9UrV4@;~|7TmS$707*qoM6N<$f`3{g_W%F@ literal 0 HcmV?d00001 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() {} +}