Merge branch 'init_project' into 'master'
Init project + Login See merge request BC/private/linphone-iphone-6.0!1
32
.swiftlint.yml
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
disabled_rules:
|
||||
- trailing_whitespace
|
||||
opt_in_rules:
|
||||
- empty_count
|
||||
- empty_string
|
||||
excluded:
|
||||
- Carthage
|
||||
- Pods
|
||||
- SwiftLint/Common/3rdPartyLib
|
||||
line_length:
|
||||
warning: 150
|
||||
error: 200
|
||||
ignores_function_declarations: true
|
||||
ignores_comments: true
|
||||
ignores_urls: true
|
||||
function_body_length:
|
||||
warning: 300
|
||||
error: 500
|
||||
function_parameter_count:
|
||||
warning: 6
|
||||
error: 8
|
||||
type_body_length:
|
||||
warning: 300
|
||||
error: 500
|
||||
file_length:
|
||||
warning: 1000
|
||||
error: 1500
|
||||
ignore_comment_only_lines: true
|
||||
cyclomatic_complexity:
|
||||
warning: 15
|
||||
error: 25
|
||||
reporter: "xcode"
|
||||
|
|
@ -7,6 +7,9 @@
|
|||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
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 */; };
|
||||
D719ABB72ABC67BF00B41C10 /* LinphoneApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABB62ABC67BF00B41C10 /* LinphoneApp.swift */; };
|
||||
D719ABB92ABC67BF00B41C10 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D719ABB82ABC67BF00B41C10 /* ContentView.swift */; };
|
||||
D719ABBB2ABC67BF00B41C10 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D719ABBA2ABC67BF00B41C10 /* Assets.xcassets */; };
|
||||
|
|
@ -14,9 +17,42 @@
|
|||
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 */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
D74C9CFA2ACACF2D0021626A /* WelcomePage2Fragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D74C9CF92ACACF2D0021626A /* WelcomePage2Fragment.swift */; };
|
||||
D74C9CFC2ACACF370021626A /* WelcomePage3Fragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D74C9CFB2ACACF370021626A /* WelcomePage3Fragment.swift */; };
|
||||
D74C9CFF2ACAEC5E0021626A /* PopupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D74C9CFE2ACAEC5E0021626A /* PopupView.swift */; };
|
||||
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 */; };
|
||||
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 */; };
|
||||
D7A2EDD62AC18115005D90FC /* SharedMainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7A2EDD52AC18115005D90FC /* SharedMainViewModel.swift */; };
|
||||
D7D24D132AC1B4E800C6F35B /* NotoSans-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D0D2AC1B4E800C6F35B /* NotoSans-Medium.ttf */; };
|
||||
D7D24D142AC1B4E800C6F35B /* NotoSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D0E2AC1B4E800C6F35B /* NotoSans-Regular.ttf */; };
|
||||
D7D24D152AC1B4E800C6F35B /* NotoSans-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D0F2AC1B4E800C6F35B /* NotoSans-Light.ttf */; };
|
||||
D7D24D162AC1B4E800C6F35B /* NotoSans-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D102AC1B4E800C6F35B /* NotoSans-SemiBold.ttf */; };
|
||||
D7D24D172AC1B4E800C6F35B /* NotoSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D112AC1B4E800C6F35B /* NotoSans-Bold.ttf */; };
|
||||
D7D24D182AC1B4E800C6F35B /* NotoSans-ExtraBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = D7D24D122AC1B4E800C6F35B /* NotoSans-ExtraBold.ttf */; };
|
||||
D7DA67622ACCB2FA00E95002 /* LoginFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DA67612ACCB2FA00E95002 /* LoginFragment.swift */; };
|
||||
D7DA67642ACCB31700E95002 /* ProfileModeFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7DA67632ACCB31700E95002 /* ProfileModeFragment.swift */; };
|
||||
D7EAACCF2AD6ED8000AA6A8A /* PermissionsFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7EAACCE2AD6ED8000AA6A8A /* PermissionsFragment.swift */; };
|
||||
D7FB55112AD447FD00A5AB15 /* RegisterFragment.swift in Sources */ = {isa = PBXBuildFile; fileRef = D7FB55102AD447FD00A5AB15 /* RegisterFragment.swift */; };
|
||||
F4BB8DFBA0FF08430EBA9351 /* Pods_Linphone.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6F5B27C5576B1EAED2F205EB /* Pods_Linphone.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* 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 = "<group>"; };
|
||||
6F5B27C5576B1EAED2F205EB /* Pods_Linphone.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Linphone.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D70C93DD2AC2D0F60063CA3B /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
|
||||
D717071D2AC5922E0037746F /* ColorExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ColorExtension.swift; sourceTree = "<group>"; };
|
||||
D717071F2AC5989C0037746F /* TextExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextExtension.swift; sourceTree = "<group>"; };
|
||||
D719ABB32ABC67BF00B41C10 /* Linphone.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Linphone.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
D719ABB62ABC67BF00B41C10 /* LinphoneApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinphoneApp.swift; sourceTree = "<group>"; };
|
||||
D719ABB82ABC67BF00B41C10 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
|
||||
|
|
@ -26,6 +62,35 @@
|
|||
D719ABC82ABC6FD700B41C10 /* CoreContext.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CoreContext.swift; sourceTree = "<group>"; };
|
||||
D719ABCB2ABC769C00B41C10 /* AssistantView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AssistantView.swift; sourceTree = "<group>"; };
|
||||
D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountLoginViewModel.swift; sourceTree = "<group>"; };
|
||||
D723432F2ACEFEF8009AA24E /* QrCodeScannerFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QrCodeScannerFragment.swift; sourceTree = "<group>"; };
|
||||
D72343312ACEFF58009AA24E /* QRScannerController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRScannerController.swift; sourceTree = "<group>"; };
|
||||
D72343332ACEFFC3009AA24E /* QRScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QRScanner.swift; sourceTree = "<group>"; };
|
||||
D72343352AD037AF009AA24E /* ToastView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToastView.swift; sourceTree = "<group>"; };
|
||||
D748BF2B2ACD82D2004844EB /* ThirdPartySipAccountLoginFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirdPartySipAccountLoginFragment.swift; sourceTree = "<group>"; };
|
||||
D748BF2D2ACD82E7004844EB /* ThirdPartySipAccountWarningFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirdPartySipAccountWarningFragment.swift; sourceTree = "<group>"; };
|
||||
D74C9CF72ACACECE0021626A /* WelcomePage1Fragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomePage1Fragment.swift; sourceTree = "<group>"; };
|
||||
D74C9CF92ACACF2D0021626A /* WelcomePage2Fragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomePage2Fragment.swift; sourceTree = "<group>"; };
|
||||
D74C9CFB2ACACF370021626A /* WelcomePage3Fragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomePage3Fragment.swift; sourceTree = "<group>"; };
|
||||
D74C9CFE2ACAEC5E0021626A /* PopupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopupView.swift; sourceTree = "<group>"; };
|
||||
D74C9D002ACB098C0021626A /* PermissionManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionManager.swift; sourceTree = "<group>"; };
|
||||
D750D3382AD3E6EE00EC99C5 /* PopupLoadingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PopupLoadingView.swift; sourceTree = "<group>"; };
|
||||
D7702EF12AC7205000557C00 /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = "<group>"; };
|
||||
D7A03FBC2ACC2DB60081A588 /* ContactsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContactsView.swift; sourceTree = "<group>"; };
|
||||
D7A03FBF2ACC2E390081A588 /* HistoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HistoryView.swift; sourceTree = "<group>"; };
|
||||
D7A03FC52ACC458A0081A588 /* SplashScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SplashScreen.swift; sourceTree = "<group>"; };
|
||||
D7A2EDD52AC18115005D90FC /* SharedMainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SharedMainViewModel.swift; sourceTree = "<group>"; };
|
||||
D7A2EDDA2AC19EEC005D90FC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
D7D24D0D2AC1B4E800C6F35B /* NotoSans-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-Medium.ttf"; sourceTree = "<group>"; };
|
||||
D7D24D0E2AC1B4E800C6F35B /* NotoSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-Regular.ttf"; sourceTree = "<group>"; };
|
||||
D7D24D0F2AC1B4E800C6F35B /* NotoSans-Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-Light.ttf"; sourceTree = "<group>"; };
|
||||
D7D24D102AC1B4E800C6F35B /* NotoSans-SemiBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-SemiBold.ttf"; sourceTree = "<group>"; };
|
||||
D7D24D112AC1B4E800C6F35B /* NotoSans-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-Bold.ttf"; sourceTree = "<group>"; };
|
||||
D7D24D122AC1B4E800C6F35B /* NotoSans-ExtraBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NotoSans-ExtraBold.ttf"; sourceTree = "<group>"; };
|
||||
D7DA67612ACCB2FA00E95002 /* LoginFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginFragment.swift; sourceTree = "<group>"; };
|
||||
D7DA67632ACCB31700E95002 /* ProfileModeFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileModeFragment.swift; sourceTree = "<group>"; };
|
||||
D7EAACCE2AD6ED8000AA6A8A /* PermissionsFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PermissionsFragment.swift; sourceTree = "<group>"; };
|
||||
D7FB55102AD447FD00A5AB15 /* RegisterFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterFragment.swift; sourceTree = "<group>"; };
|
||||
F76FB87556A3109F61F9E2D5 /* Pods-Linphone.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Linphone.release.xcconfig"; path = "Target Support Files/Pods-Linphone/Pods-Linphone.release.xcconfig"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
|
|
@ -33,17 +98,47 @@
|
|||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
F4BB8DFBA0FF08430EBA9351 /* Pods_Linphone.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
52EFCC310713B3CA01062945 /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
6F5B27C5576B1EAED2F205EB /* Pods_Linphone.framework */,
|
||||
);
|
||||
name = Frameworks;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
A31AF2AB8C6A3D7B7EA3B424 /* Pods */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
377E0B5C2B1F38192E694334 /* Pods-Linphone.debug.xcconfig */,
|
||||
F76FB87556A3109F61F9E2D5 /* Pods-Linphone.release.xcconfig */,
|
||||
);
|
||||
path = Pods;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D717071C2AC591EF0037746F /* Utils */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D717071D2AC5922E0037746F /* ColorExtension.swift */,
|
||||
D717071F2AC5989C0037746F /* TextExtension.swift */,
|
||||
D74C9D002ACB098C0021626A /* PermissionManager.swift */,
|
||||
);
|
||||
path = Utils;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D719ABAA2ABC67BF00B41C10 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D719ABB52ABC67BF00B41C10 /* Linphone */,
|
||||
D719ABB42ABC67BF00B41C10 /* Products */,
|
||||
A31AF2AB8C6A3D7B7EA3B424 /* Pods */,
|
||||
52EFCC310713B3CA01062945 /* Frameworks */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
|
|
@ -58,12 +153,17 @@
|
|||
D719ABB52ABC67BF00B41C10 /* Linphone */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D719ABC72ABC6FB200B41C10 /* core */,
|
||||
D719ABC52ABC6EE800B41C10 /* ui */,
|
||||
D7A03FC52ACC458A0081A588 /* SplashScreen.swift */,
|
||||
D719ABB62ABC67BF00B41C10 /* LinphoneApp.swift */,
|
||||
D719ABC72ABC6FB200B41C10 /* Core */,
|
||||
D719ABC52ABC6EE800B41C10 /* UI */,
|
||||
D717071C2AC591EF0037746F /* Utils */,
|
||||
D719ABBA2ABC67BF00B41C10 /* Assets.xcassets */,
|
||||
D719ABBC2ABC67BF00B41C10 /* Linphone.entitlements */,
|
||||
D7A2EDDA2AC19EEC005D90FC /* Info.plist */,
|
||||
D70C93DD2AC2D0F60063CA3B /* Localizable.xcstrings */,
|
||||
D719ABBD2ABC67BF00B41C10 /* Preview Content */,
|
||||
D7D24D0C2AC1B4C700C6F35B /* Fonts */,
|
||||
);
|
||||
path = Linphone;
|
||||
sourceTree = "<group>";
|
||||
|
|
@ -76,54 +176,134 @@
|
|||
path = "Preview Content";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D719ABC52ABC6EE800B41C10 /* ui */ = {
|
||||
D719ABC52ABC6EE800B41C10 /* UI */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D719ABCA2ABC761800B41C10 /* assistant */,
|
||||
D719ABC62ABC6F0200B41C10 /* main */,
|
||||
D719ABCA2ABC761800B41C10 /* Assistant */,
|
||||
D719ABC62ABC6F0200B41C10 /* Main */,
|
||||
D7702EF02AC7200600557C00 /* Welcome */,
|
||||
);
|
||||
path = ui;
|
||||
path = UI;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D719ABC62ABC6F0200B41C10 /* main */ = {
|
||||
D719ABC62ABC6F0200B41C10 /* Main */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D719ABD02ABC7C4F00B41C10 /* viewmodel */,
|
||||
D7A03FBB2ACC2D850081A588 /* Contacts */,
|
||||
D74C9CFD2ACAEC150021626A /* Fragments */,
|
||||
D7A03FBE2ACC2E010081A588 /* History */,
|
||||
D7A2EDD42AC180FE005D90FC /* Viewmodel */,
|
||||
D719ABB82ABC67BF00B41C10 /* ContentView.swift */,
|
||||
);
|
||||
path = main;
|
||||
path = Main;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D719ABC72ABC6FB200B41C10 /* core */ = {
|
||||
D719ABC72ABC6FB200B41C10 /* Core */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D719ABC82ABC6FD700B41C10 /* CoreContext.swift */,
|
||||
);
|
||||
path = core;
|
||||
path = Core;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D719ABCA2ABC761800B41C10 /* assistant */ = {
|
||||
D719ABCA2ABC761800B41C10 /* Assistant */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D719ABCD2ABC777600B41C10 /* viewmodel */,
|
||||
D7DA67602ACCB2D700E95002 /* Fragments */,
|
||||
D719ABCD2ABC777600B41C10 /* Viewmodel */,
|
||||
D719ABCB2ABC769C00B41C10 /* AssistantView.swift */,
|
||||
);
|
||||
path = assistant;
|
||||
path = Assistant;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D719ABCD2ABC777600B41C10 /* viewmodel */ = {
|
||||
D719ABCD2ABC777600B41C10 /* Viewmodel */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */,
|
||||
D72343332ACEFFC3009AA24E /* QRScanner.swift */,
|
||||
D72343312ACEFF58009AA24E /* QRScannerController.swift */,
|
||||
);
|
||||
path = viewmodel;
|
||||
path = Viewmodel;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D719ABD02ABC7C4F00B41C10 /* viewmodel */ = {
|
||||
D74C9CF62ACACEB70021626A /* Fragments */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D74C9CF72ACACECE0021626A /* WelcomePage1Fragment.swift */,
|
||||
D74C9CF92ACACF2D0021626A /* WelcomePage2Fragment.swift */,
|
||||
D74C9CFB2ACACF370021626A /* WelcomePage3Fragment.swift */,
|
||||
);
|
||||
path = viewmodel;
|
||||
path = Fragments;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D74C9CFD2ACAEC150021626A /* Fragments */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D74C9CFE2ACAEC5E0021626A /* PopupView.swift */,
|
||||
D72343352AD037AF009AA24E /* ToastView.swift */,
|
||||
D750D3382AD3E6EE00EC99C5 /* PopupLoadingView.swift */,
|
||||
);
|
||||
path = Fragments;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7702EF02AC7200600557C00 /* Welcome */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D74C9CF62ACACEB70021626A /* Fragments */,
|
||||
D7702EF12AC7205000557C00 /* WelcomeView.swift */,
|
||||
);
|
||||
path = Welcome;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7A03FBB2ACC2D850081A588 /* Contacts */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D7A03FBC2ACC2DB60081A588 /* ContactsView.swift */,
|
||||
);
|
||||
path = Contacts;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7A03FBE2ACC2E010081A588 /* History */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D7A03FBF2ACC2E390081A588 /* HistoryView.swift */,
|
||||
);
|
||||
path = History;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7A2EDD42AC180FE005D90FC /* Viewmodel */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D7A2EDD52AC18115005D90FC /* SharedMainViewModel.swift */,
|
||||
);
|
||||
path = Viewmodel;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7D24D0C2AC1B4C700C6F35B /* Fonts */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D7D24D0F2AC1B4E800C6F35B /* NotoSans-Light.ttf */,
|
||||
D7D24D0E2AC1B4E800C6F35B /* NotoSans-Regular.ttf */,
|
||||
D7D24D0D2AC1B4E800C6F35B /* NotoSans-Medium.ttf */,
|
||||
D7D24D102AC1B4E800C6F35B /* NotoSans-SemiBold.ttf */,
|
||||
D7D24D112AC1B4E800C6F35B /* NotoSans-Bold.ttf */,
|
||||
D7D24D122AC1B4E800C6F35B /* NotoSans-ExtraBold.ttf */,
|
||||
);
|
||||
path = Fonts;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D7DA67602ACCB2D700E95002 /* Fragments */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D7DA67612ACCB2FA00E95002 /* LoginFragment.swift */,
|
||||
D7EAACCE2AD6ED8000AA6A8A /* PermissionsFragment.swift */,
|
||||
D7DA67632ACCB31700E95002 /* ProfileModeFragment.swift */,
|
||||
D723432F2ACEFEF8009AA24E /* QrCodeScannerFragment.swift */,
|
||||
D7FB55102AD447FD00A5AB15 /* RegisterFragment.swift */,
|
||||
D748BF2B2ACD82D2004844EB /* ThirdPartySipAccountLoginFragment.swift */,
|
||||
D748BF2D2ACD82E7004844EB /* ThirdPartySipAccountWarningFragment.swift */,
|
||||
);
|
||||
path = Fragments;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
|
@ -133,9 +313,12 @@
|
|||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = D719ABC22ABC67BF00B41C10 /* Build configuration list for PBXNativeTarget "Linphone" */;
|
||||
buildPhases = (
|
||||
6FE8573A5CFC1DA89D3172B5 /* [CP] Check Pods Manifest.lock */,
|
||||
D719ABAF2ABC67BF00B41C10 /* Sources */,
|
||||
D719ABB02ABC67BF00B41C10 /* Frameworks */,
|
||||
D719ABB12ABC67BF00B41C10 /* Resources */,
|
||||
D7FB55122AD53FE200A5AB15 /* Run Script */,
|
||||
230129DD87A6EBB04DF458AD /* [CP] Embed Pods Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
|
@ -184,23 +367,114 @@
|
|||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D7D24D142AC1B4E800C6F35B /* NotoSans-Regular.ttf in Resources */,
|
||||
D7D24D182AC1B4E800C6F35B /* NotoSans-ExtraBold.ttf in Resources */,
|
||||
D7D24D152AC1B4E800C6F35B /* NotoSans-Light.ttf in Resources */,
|
||||
D7D24D162AC1B4E800C6F35B /* NotoSans-SemiBold.ttf in Resources */,
|
||||
D7D24D172AC1B4E800C6F35B /* NotoSans-Bold.ttf in Resources */,
|
||||
D719ABBF2ABC67BF00B41C10 /* Preview Assets.xcassets in Resources */,
|
||||
D719ABBB2ABC67BF00B41C10 /* Assets.xcassets in Resources */,
|
||||
D7D24D132AC1B4E800C6F35B /* NotoSans-Medium.ttf in Resources */,
|
||||
D70C93DE2AC2D0F60063CA3B /* Localizable.xcstrings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
230129DD87A6EBB04DF458AD /* [CP] Embed Pods Frameworks */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Linphone/Pods-Linphone-frameworks-${CONFIGURATION}-input-files.xcfilelist",
|
||||
);
|
||||
name = "[CP] Embed Pods Frameworks";
|
||||
outputFileListPaths = (
|
||||
"${PODS_ROOT}/Target Support Files/Pods-Linphone/Pods-Linphone-frameworks-${CONFIGURATION}-output-files.xcfilelist",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Linphone/Pods-Linphone-frameworks.sh\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
6FE8573A5CFC1DA89D3172B5 /* [CP] Check Pods Manifest.lock */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
|
||||
"${PODS_ROOT}/Manifest.lock",
|
||||
);
|
||||
name = "[CP] Check Pods Manifest.lock";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
"$(DERIVED_FILE_DIR)/Pods-Linphone-checkManifestLockResult.txt",
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
|
||||
showEnvVarsInLog = 0;
|
||||
};
|
||||
D7FB55122AD53FE200A5AB15 /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
alwaysOutOfDate = 1;
|
||||
buildActionMask = 12;
|
||||
files = (
|
||||
);
|
||||
inputFileListPaths = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputFileListPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if [[ \"$(uname -m)\" == arm64 ]]; then\n export PATH=\"/opt/homebrew/bin:$PATH\"\nfi\n\nif which swiftlint > /dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
D719ABAF2ABC67BF00B41C10 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
D71707202AC5989C0037746F /* TextExtension.swift in Sources */,
|
||||
D719ABB92ABC67BF00B41C10 /* ContentView.swift in Sources */,
|
||||
D750D3392AD3E6EE00EC99C5 /* PopupLoadingView.swift in Sources */,
|
||||
D719ABC92ABC6FD700B41C10 /* CoreContext.swift in Sources */,
|
||||
D7EAACCF2AD6ED8000AA6A8A /* PermissionsFragment.swift in Sources */,
|
||||
D7A03FBD2ACC2DB60081A588 /* ContactsView.swift in Sources */,
|
||||
D719ABCF2ABC779A00B41C10 /* AccountLoginViewModel.swift in Sources */,
|
||||
D74C9D012ACB098C0021626A /* PermissionManager.swift in Sources */,
|
||||
D7702EF22AC7205000557C00 /* WelcomeView.swift in Sources */,
|
||||
D719ABB72ABC67BF00B41C10 /* LinphoneApp.swift in Sources */,
|
||||
D7A2EDD62AC18115005D90FC /* SharedMainViewModel.swift in Sources */,
|
||||
D7A03FC62ACC458A0081A588 /* SplashScreen.swift in Sources */,
|
||||
D7A03FC02ACC2E390081A588 /* HistoryView.swift in Sources */,
|
||||
D748BF2E2ACD82E7004844EB /* ThirdPartySipAccountWarningFragment.swift in Sources */,
|
||||
D748BF2C2ACD82D2004844EB /* ThirdPartySipAccountLoginFragment.swift in Sources */,
|
||||
D74C9CF82ACACECE0021626A /* WelcomePage1Fragment.swift in Sources */,
|
||||
D72343362AD037AF009AA24E /* ToastView.swift in Sources */,
|
||||
D7FB55112AD447FD00A5AB15 /* RegisterFragment.swift in Sources */,
|
||||
D72343322ACEFF58009AA24E /* QRScannerController.swift in Sources */,
|
||||
D72343342ACEFFC3009AA24E /* QRScanner.swift in Sources */,
|
||||
D72343302ACEFEF8009AA24E /* QrCodeScannerFragment.swift in Sources */,
|
||||
D717071E2AC5922E0037746F /* ColorExtension.swift in Sources */,
|
||||
D7DA67642ACCB31700E95002 /* ProfileModeFragment.swift in Sources */,
|
||||
D74C9CFC2ACACF370021626A /* WelcomePage3Fragment.swift in Sources */,
|
||||
D719ABCC2ABC769C00B41C10 /* AssistantView.swift in Sources */,
|
||||
D74C9CFA2ACACF2D0021626A /* WelcomePage2Fragment.swift in Sources */,
|
||||
D74C9CFF2ACAEC5E0021626A /* PopupView.swift in Sources */,
|
||||
D7DA67622ACCB2FA00E95002 /* LoginFragment.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -322,9 +596,11 @@
|
|||
};
|
||||
D719ABC32ABC67BF00B41C10 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 377E0B5C2B1F38192E694334 /* Pods-Linphone.debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = Linphone/Linphone.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
|
|
@ -334,6 +610,9 @@
|
|||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = Linphone/Info.plist;
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "Share photos with your friends and customize avatars";
|
||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "";
|
||||
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
|
||||
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
|
||||
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
|
||||
|
|
@ -361,9 +640,11 @@
|
|||
};
|
||||
D719ABC42ABC67BF00B41C10 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = F76FB87556A3109F61F9E2D5 /* Pods-Linphone.release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
|
||||
CODE_SIGN_ENTITLEMENTS = Linphone/Linphone.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
|
|
@ -373,6 +654,9 @@
|
|||
ENABLE_HARDENED_RUNTIME = YES;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_FILE = Linphone/Info.plist;
|
||||
INFOPLIST_KEY_NSCameraUsageDescription = "Share photos with your friends and customize avatars";
|
||||
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "";
|
||||
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
|
||||
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
|
||||
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
|
||||
|
|
|
|||
BIN
Linphone/.DS_Store
vendored
21
Linphone/Assets.xcassets/address-book.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "address-book.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
1
Linphone/Assets.xcassets/address-book.imageset/address-book.svg
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M83.19,174.4a8,8,0,0,0,11.21-1.6,52,52,0,0,1,83.2,0,8,8,0,1,0,12.8-9.6A67.88,67.88,0,0,0,163,141.51a40,40,0,1,0-53.94,0A67.88,67.88,0,0,0,81.6,163.2,8,8,0,0,0,83.19,174.4ZM112,112a24,24,0,1,1,24,24A24,24,0,0,1,112,112Zm96-88H64A16,16,0,0,0,48,40V64H32a8,8,0,0,0,0,16H48v40H32a8,8,0,0,0,0,16H48v40H32a8,8,0,0,0,0,16H48v24a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V40A16,16,0,0,0,208,24Zm0,192H64V40H208Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 524 B |
21
Linphone/Assets.xcassets/bell-ringing.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "bell-ringing.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
3
Linphone/Assets.xcassets/bell-ringing.imageset/bell-ringing.svg
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M27.9999 8.88753C27.7645 9.00943 27.4904 9.03287 27.2377 8.95271C26.985 8.87255 26.7745 8.69534 26.6524 8.46003C25.6979 6.57439 24.2532 4.98065 22.4699 3.84628C22.3588 3.77619 22.2626 3.68489 22.1867 3.57761C22.1109 3.47032 22.0569 3.34915 22.0279 3.221C21.9989 3.09286 21.9954 2.96025 22.0176 2.83075C22.0398 2.70126 22.0873 2.57741 22.1574 2.46628C22.2275 2.35515 22.3188 2.25891 22.4261 2.18306C22.5334 2.10721 22.6546 2.05324 22.7827 2.02422C22.9109 1.9952 23.0435 1.99171 23.173 2.01394C23.3025 2.03617 23.4263 2.08369 23.5374 2.15378C25.6157 3.48445 27.3032 5.34323 28.4274 7.54003C28.5493 7.77543 28.5728 8.04959 28.4926 8.30227C28.4125 8.55495 28.2353 8.76546 27.9999 8.88753ZM4.46369 9.00003C4.6469 8.99995 4.82656 8.94955 4.98307 8.85432C5.13958 8.75909 5.26692 8.6227 5.35119 8.46003C6.3057 6.57439 7.75047 4.98065 9.53369 3.84628C9.75813 3.70472 9.91714 3.4798 9.97575 3.221C10.0344 2.9622 9.98775 2.69072 9.84619 2.46628C9.70463 2.24184 9.47971 2.08283 9.22091 2.02422C8.96211 1.96562 8.69063 2.01222 8.46619 2.15378C6.38795 3.48445 4.70042 5.34323 3.57619 7.54003C3.49724 7.69243 3.45884 7.86258 3.46469 8.03412C3.47054 8.20566 3.52045 8.3728 3.6096 8.51946C3.69876 8.66613 3.82416 8.78738 3.97374 8.87154C4.12333 8.95571 4.29206 8.99996 4.46369 9.00003ZM27.7262 21.9925C27.9034 22.2963 27.9973 22.6415 27.9985 22.9932C27.9997 23.3448 27.9081 23.6906 27.7331 23.9956C27.558 24.3007 27.3056 24.5541 27.0013 24.7304C26.697 24.9068 26.3516 24.9998 25.9999 25H20.8999C20.6704 26.1303 20.0572 27.1465 19.1642 27.8764C18.2712 28.6063 17.1533 29.005 15.9999 29.005C14.8466 29.005 13.7287 28.6063 12.8357 27.8764C11.9427 27.1465 11.3295 26.1303 11.0999 25H5.99994C5.64847 24.9993 5.30339 24.906 4.99945 24.7295C4.69552 24.553 4.44347 24.2995 4.26869 23.9946C4.09392 23.6896 4.00259 23.344 4.0039 22.9925C4.00522 22.6411 4.09914 22.2962 4.27619 21.9925C5.40244 20.0488 5.99994 17.285 5.99994 14C5.99994 11.3479 7.05351 8.80433 8.92887 6.92896C10.8042 5.0536 13.3478 4.00003 15.9999 4.00003C18.6521 4.00003 21.1956 5.0536 23.071 6.92896C24.9464 8.80433 25.9999 11.3479 25.9999 14C25.9999 17.2838 26.5974 20.0475 27.7262 21.9925ZM18.8274 25H13.1724C13.3796 25.5843 13.7627 26.09 14.269 26.4477C14.7753 26.8054 15.38 26.9974 15.9999 26.9974C16.6199 26.9974 17.2245 26.8054 17.7309 26.4477C18.2372 26.09 18.6203 25.5843 18.8274 25ZM25.9999 23C24.6699 20.7163 23.9999 17.6888 23.9999 14C23.9999 11.8783 23.1571 9.84347 21.6568 8.34317C20.1565 6.84288 18.1217 6.00003 15.9999 6.00003C13.8782 6.00003 11.8434 6.84288 10.3431 8.34317C8.8428 9.84347 7.99994 11.8783 7.99994 14C7.99994 17.69 7.32744 20.7175 5.99994 23H25.9999Z" fill="#22334D"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
21
Linphone/Assets.xcassets/caret-down.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "caret-down.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
1
Linphone/Assets.xcassets/caret-down.imageset/caret-down.svg
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 238 B |
21
Linphone/Assets.xcassets/caret-left.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "caret-left.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
1
Linphone/Assets.xcassets/caret-left.imageset/caret-left.svg
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 224 B |
21
Linphone/Assets.xcassets/conversation.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "conversation.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
4
Linphone/Assets.xcassets/conversation.imageset/conversation.svg
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M15.74 11.25C15.74 11.4489 15.6641 11.6397 15.5291 11.7803C15.3941 11.921 15.211 12 15.02 12H9.26C9.06904 12 8.88591 11.921 8.75088 11.7803C8.61586 11.6397 8.54 11.4489 8.54 11.25C8.54 11.0511 8.61586 10.8603 8.75088 10.7197C8.88591 10.579 9.06904 10.5 9.26 10.5H15.02C15.211 10.5 15.3941 10.579 15.5291 10.7197C15.6641 10.8603 15.74 11.0511 15.74 11.25ZM15.02 13.5H9.26C9.06904 13.5 8.88591 13.579 8.75088 13.7197C8.61586 13.8603 8.54 14.0511 8.54 14.25C8.54 14.4489 8.61586 14.6397 8.75088 14.7803C8.88591 14.921 9.06904 15 9.26 15H15.02C15.211 15 15.3941 14.921 15.5291 14.7803C15.6641 14.6397 15.74 14.4489 15.74 14.25C15.74 14.0511 15.6641 13.8603 15.5291 13.7197C15.3941 13.579 15.211 13.5 15.02 13.5ZM21.5 12.375C21.4974 14.8606 20.5483 17.2435 18.8611 19.0011C17.1738 20.7587 14.8861 21.7473 12.5 21.75H4.9103C4.53641 21.7495 4.17797 21.5946 3.91359 21.3192C3.64921 21.0438 3.50048 20.6704 3.5 20.2809V12.375C3.5 9.8886 4.44821 7.50403 6.13604 5.74587C7.82387 3.98772 10.1131 3 12.5 3C14.8869 3 17.1761 3.98772 18.864 5.74587C20.5518 7.50403 21.5 9.8886 21.5 12.375ZM20.06 12.375C20.06 10.2864 19.2635 8.28338 17.8457 6.80653C16.428 5.32969 14.505 4.5 12.5 4.5C10.495 4.5 8.57205 5.32969 7.15427 6.80653C5.7365 8.28338 4.94 10.2864 4.94 12.375V20.25H12.5C14.5044 20.2478 16.426 19.4174 17.8434 17.941C19.2607 16.4646 20.0579 14.4629 20.06 12.375Z" fill="#6C7A87"/>
|
||||
<line x1="2.91379" y1="1.96552" x2="22.4655" y2="20.5862" stroke="#6C7A87" stroke-width="2" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
21
Linphone/Assets.xcassets/current-dot.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "current-dot.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
4
Linphone/Assets.xcassets/current-dot.imageset/current-dot.svg
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg viewBox="0 0 20 20" width="20px" height="20px" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="18" height="10" rx="5" fill="#FE5E00" x="1" y="5" ry="5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 219 B |
21
Linphone/Assets.xcassets/danger.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "danger.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
3
Linphone/Assets.xcassets/danger.imageset/danger.svg
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12.5 2C10.5222 2 8.58879 2.58649 6.9443 3.6853C5.29981 4.78412 4.01809 6.3459 3.26121 8.17316C2.50433 10.0004 2.3063 12.0111 2.69215 13.9509C3.078 15.8907 4.03041 17.6725 5.42894 19.0711C6.82746 20.4696 8.60929 21.422 10.5491 21.8078C12.4889 22.1937 14.4996 21.9957 16.3268 21.2388C18.1541 20.4819 19.7159 19.2002 20.8147 17.5557C21.9135 15.9112 22.5 13.9778 22.5 12C22.4972 9.34869 21.4427 6.80678 19.568 4.93202C17.6932 3.05727 15.1513 2.0028 12.5 2ZM11.7308 7.38461C11.7308 7.1806 11.8118 6.98494 11.9561 6.84069C12.1003 6.69643 12.296 6.61538 12.5 6.61538C12.704 6.61538 12.8997 6.69643 13.0439 6.84069C13.1882 6.98494 13.2692 7.1806 13.2692 7.38461V12.7692C13.2692 12.9732 13.1882 13.1689 13.0439 13.3132C12.8997 13.4574 12.704 13.5385 12.5 13.5385C12.296 13.5385 12.1003 13.4574 11.9561 13.3132C11.8118 13.1689 11.7308 12.9732 11.7308 12.7692V7.38461ZM12.5 17.3846C12.2718 17.3846 12.0487 17.3169 11.859 17.1902C11.6692 17.0634 11.5213 16.8832 11.434 16.6723C11.3467 16.4615 11.3238 16.2295 11.3683 16.0057C11.4128 15.7818 11.5227 15.5762 11.6841 15.4149C11.8455 15.2535 12.0511 15.1436 12.2749 15.0991C12.4987 15.0546 12.7307 15.0774 12.9416 15.1648C13.1524 15.2521 13.3326 15.4 13.4594 15.5897C13.5862 15.7795 13.6538 16.0026 13.6538 16.2308C13.6538 16.5368 13.5323 16.8303 13.3159 17.0467C13.0995 17.263 12.806 17.3846 12.5 17.3846Z" fill="#DD5F5F"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
21
Linphone/Assets.xcassets/dot.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "dot.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
4
Linphone/Assets.xcassets/dot.imageset/dot.svg
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg viewBox="0 0 20 20" width="20px" height="20px" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect width="10" height="10" rx="5" fill="#FE5E00" x="5" y="5" ry="5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 219 B |
21
Linphone/Assets.xcassets/eye-slash.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "eye-slash.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
1
Linphone/Assets.xcassets/eye-slash.imageset/eye-slash.svg
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M53.92,34.62A8,8,0,1,0,42.08,45.38L61.32,66.55C25,88.84,9.38,123.2,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208a127.11,127.11,0,0,0,52.07-10.83l22,24.21a8,8,0,1,0,11.84-10.76Zm47.33,75.84,41.67,45.85a32,32,0,0,1-41.67-45.85ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.16,133.16,0,0,1,25,128c4.69-8.79,19.66-33.39,47.35-49.38l18,19.75a48,48,0,0,0,63.66,70l14.73,16.2A112,112,0,0,1,128,192Zm6-95.43a8,8,0,0,1,3-15.72,48.16,48.16,0,0,1,38.77,42.64,8,8,0,0,1-7.22,8.71,6.39,6.39,0,0,1-.75,0,8,8,0,0,1-8-7.26A32.09,32.09,0,0,0,134,96.57Zm113.28,34.69c-.42.94-10.55,23.37-33.36,43.8a8,8,0,1,1-10.67-11.92A132.77,132.77,0,0,0,231.05,128a133.15,133.15,0,0,0-23.12-30.77C185.67,75.19,158.78,64,128,64a118.37,118.37,0,0,0-19.36,1.57A8,8,0,1,1,106,49.79,134,134,0,0,1,128,48c34.88,0,66.57,13.26,91.66,38.35,18.83,18.83,27.3,37.62,27.65,38.41A8,8,0,0,1,247.31,131.26Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1 KiB |
21
Linphone/Assets.xcassets/eye.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "eye.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
1
Linphone/Assets.xcassets/eye.imageset/eye.svg
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 725 B |
21
Linphone/Assets.xcassets/info.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "info.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
1
Linphone/Assets.xcassets/info.imageset/info.svg
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 372 B |
21
Linphone/Assets.xcassets/linphone.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "linphone.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
4
Linphone/Assets.xcassets/linphone.imageset/linphone.svg
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
<svg width="100" height="102" viewBox="0 0 100 102" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M8.6875 20.0294C8.6875 20.0294 -1.40036 33.9437 0.165001 40.2052C0.110894 39.9626 6.77429 32.9001 6.77429 32.9001C7.12215 34.8134 23.2975 39.5095 23.2975 39.5095C25.445 40.8785 26.1852 41.8614 26.6021 44.0316V52.3802C32.1897 55.8567 37.3222 57.0103 49.7346 57.7719C62.9229 57.2098 68.3698 56.0419 73.215 52.3802C73.215 52.3802 72.6932 45.9448 73.215 43.6837C73.7368 41.4226 74.8948 40.1294 76.6936 39.5095C83.4046 37.9742 86.7174 36.2945 93.0429 33.0741L100 40.2052C98.9428 32.3646 97.1261 28.0247 91.6514 20.3773C87.3051 15.4109 84.5184 12.8059 78.7807 8.55017C72.5428 4.86457 69.0816 3.45721 62.9532 1.76695C52.3155 -0.411175 46.4515 -0.404504 36.1682 1.76695C29.8672 3.66662 26.7269 5.10003 22.08 8.55017C22.08 8.55017 4.51322 -1.53771 2.25214 0.20158C-0.00892752 1.94087 8.6875 20.0294 8.6875 20.0294Z" fill="#FF5E00"/>
|
||||
<path d="M20.6976 73.9197C12.6175 70.3826 8.23958 67.7107 0.695801 61.7447C2.50969 69.2539 4.20076 73.2077 8.34866 79.8333C12.7684 85.8146 15.4841 88.4837 20.6976 92.1822C26.3355 96.0518 29.7168 97.7432 36.1772 99.835C41.9808 101.23 45.217 101.674 50.9612 101.748C56.818 101.455 59.8573 100.817 64.8754 99.6611C70.4104 97.4553 73.2303 96.0646 77.9201 93.3997C85.6964 97.7895 95.3129 102.792 96.7044 100.705C98.0958 98.6175 90.4429 81.7465 90.4429 81.7465C95.5469 74.4362 97.6349 69.5132 99.6612 61.2229C92.6739 66.7039 88.135 69.9023 79.4854 73.9197C68.7861 78.14 62.5545 79.495 50.9612 79.8333C37.455 79.5976 30.8636 78.2611 20.6976 73.9197Z" fill="#FF5E00"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
21
Linphone/Assets.xcassets/microphone.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "microphone.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
3
Linphone/Assets.xcassets/microphone.imageset/microphone.svg
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M16 22C17.5908 21.9983 19.116 21.3657 20.2408 20.2408C21.3657 19.116 21.9983 17.5908 22 16V8C22 6.4087 21.3679 4.88258 20.2426 3.75736C19.1174 2.63214 17.5913 2 16 2C14.4087 2 12.8826 2.63214 11.7574 3.75736C10.6321 4.88258 10 6.4087 10 8V16C10.0017 17.5908 10.6343 19.116 11.7592 20.2408C12.884 21.3657 14.4092 21.9983 16 22ZM12 8C12 6.93913 12.4214 5.92172 13.1716 5.17157C13.9217 4.42143 14.9391 4 16 4C17.0609 4 18.0783 4.42143 18.8284 5.17157C19.5786 5.92172 20 6.93913 20 8V16C20 17.0609 19.5786 18.0783 18.8284 18.8284C18.0783 19.5786 17.0609 20 16 20C14.9391 20 13.9217 19.5786 13.1716 18.8284C12.4214 18.0783 12 17.0609 12 16V8ZM17 25.95V29C17 29.2652 16.8946 29.5196 16.7071 29.7071C16.5196 29.8946 16.2652 30 16 30C15.7348 30 15.4804 29.8946 15.2929 29.7071C15.1054 29.5196 15 29.2652 15 29V25.95C12.5346 25.6991 10.2497 24.543 8.5873 22.7051C6.9249 20.8672 6.00305 18.4782 6 16C6 15.7348 6.10536 15.4804 6.29289 15.2929C6.48043 15.1054 6.73478 15 7 15C7.26522 15 7.51957 15.1054 7.70711 15.2929C7.89464 15.4804 8 15.7348 8 16C8 18.1217 8.84285 20.1566 10.3431 21.6569C11.8434 23.1571 13.8783 24 16 24C18.1217 24 20.1566 23.1571 21.6569 21.6569C23.1571 20.1566 24 18.1217 24 16C24 15.7348 24.1054 15.4804 24.2929 15.2929C24.4804 15.1054 24.7348 15 25 15C25.2652 15 25.5196 15.1054 25.7071 15.2929C25.8946 15.4804 26 15.7348 26 16C25.997 18.4782 25.0751 20.8672 23.4127 22.7051C21.7503 24.543 19.4654 25.6991 17 25.95Z" fill="#22334D"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
21
Linphone/Assets.xcassets/mountain.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "mountain.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
14
Linphone/Assets.xcassets/mountain.imageset/mountain.svg
vendored
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<svg width="1084" height="108" viewBox="0 0 1084 108" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g opacity="0.9">
|
||||
<path d="M0 0.29875L272.636 54.6952L413.749 36.1953L473.309 0L598.844 48.2605L807.764 0.804341L990.383 36.2792L1084 0.862443L1084 108H0V0.29875Z" fill="#FFB9A0"/>
|
||||
<path d="M0 38.069L246.063 8.6521L323.034 30.1425L391.757 27.9563L466.895 50.4778L587.465 22.0956L727.782 60.013L817.843 31.1736L966.96 75.0722L1056.5 25.1305L1084 38.069L1084 107H0V38.069Z" fill="#FF9E79"/>
|
||||
<path d="M0 108V101.901L132.44 59.5213L288.21 71.6998L358.77 64.3474L416.498 82.8472L595.179 98.1297L727.782 61.0131L842.051 68.3655L926.64 39.0691L1025.32 67.1323L1084 101.901L1084 108H0Z" fill="url(#paint0_linear_17_367)"/>
|
||||
</g>
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear_17_367" x1="542" y1="76" x2="542" y2="105.5" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#FF723B"/>
|
||||
<stop offset="0.859375" stop-color="white" stop-opacity="0.87"/>
|
||||
<stop offset="1" stop-color="white"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1,005 B |
21
Linphone/Assets.xcassets/open-source.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "open-source.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
3
Linphone/Assets.xcassets/open-source.imageset/open-source.svg
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="111" height="106" viewBox="0 0 111 106" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M61.2248 72.0632C68.6648 69.3 72.5488 63.979 72.5488 54.8208C72.5488 45.6627 64.8313 37.5929 55.1884 37.5766C45.0122 37.5604 37.3361 45.6293 37.4586 54.8208C37.5812 64.0123 41.9652 70.1271 48.9809 72.338L36.5523 102.914C19.918 98.6079 3 78.9843 3 54.8208C3 26.2013 25.9958 3 54.819 3C83.6422 3 107.007 26.2012 107.007 54.8208C107.007 79.36 90.2498 98.7106 73.2606 103L61.2248 72.0632Z" stroke="#FF5E00" stroke-width="6" stroke-linecap="round" stroke-linejoin="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 585 B |
21
Linphone/Assets.xcassets/phone.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "phone.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
1
Linphone/Assets.xcassets/phone.imageset/phone.svg
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M222.37,158.46l-47.11-21.11-.13-.06a16,16,0,0,0-15.17,1.4,8.12,8.12,0,0,0-.75.56L134.87,160c-15.42-7.49-31.34-23.29-38.83-38.51l20.78-24.71c.2-.25.39-.5.57-.77a16,16,0,0,0,1.32-15.06l0-.12L97.54,33.64a16,16,0,0,0-16.62-9.52A56.26,56.26,0,0,0,32,80c0,79.4,64.6,144,144,144a56.26,56.26,0,0,0,55.88-48.92A16,16,0,0,0,222.37,158.46ZM176,208A128.14,128.14,0,0,1,48,80,40.2,40.2,0,0,1,82.87,40a.61.61,0,0,0,0,.12l21,47L83.2,111.86a6.13,6.13,0,0,0-.57.77,16,16,0,0,0-1,15.7c9.06,18.53,27.73,37.06,46.46,46.11a16,16,0,0,0,15.75-1.14,8.44,8.44,0,0,0,.74-.56L168.89,152l47,21.05h0s.08,0,.11,0A40.21,40.21,0,0,1,176,208Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 733 B |
21
Linphone/Assets.xcassets/profile-mode.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "profile-mode.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
Linphone/Assets.xcassets/profile-mode.imageset/profile-mode.png
vendored
Normal file
|
After Width: | Height: | Size: 152 KiB |
21
Linphone/Assets.xcassets/qr-code.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "qr-code.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
1
Linphone/Assets.xcassets/qr-code.imageset/qr-code.svg
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" fill="#000000" viewBox="0 0 256 256"><path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm0,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48ZM200,40H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-64,72V144a8,8,0,0,1,16,0v32a8,8,0,0,1-16,0Zm80-16a8,8,0,0,1-8,8H184v40a8,8,0,0,1-8,8H144a8,8,0,0,1,0-16h24V144a8,8,0,0,1,16,0v8h24A8,8,0,0,1,216,160Zm0,32v16a8,8,0,0,1-16,0V192a8,8,0,0,1,16,0Z"></path></svg>
|
||||
|
After Width: | Height: | Size: 654 B |
21
Linphone/Assets.xcassets/radio-button-fill.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "radio-button-fill.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
10
Linphone/Assets.xcassets/radio-button-fill.imageset/radio-button-fill.svg
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="radiobutton" clip-path="url(#clip0_2022_35988)">
|
||||
<path id="Vector" d="M12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12C17 9.24 14.76 7 12 7ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z" fill="#FE5E00"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_2022_35988">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 585 B |
21
Linphone/Assets.xcassets/radio-button.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "radio-button.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
10
Linphone/Assets.xcassets/radio-button.imageset/radio-button.svg
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<g id="radiobutton" clip-path="url(#clip0_2022_35992)">
|
||||
<path id="Vector" d="M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z" fill="#FE5E00"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_2022_35992">
|
||||
<rect width="24" height="24" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 493 B |
21
Linphone/Assets.xcassets/secure-image.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "secure-image.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
6
Linphone/Assets.xcassets/secure-image.imageset/secure-image.svg
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<svg width="70" height="100" viewBox="0 0 70 100" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="3" y="42.7959" width="63.3878" height="54.2041" rx="7" stroke="#FF5E00" stroke-width="6"/>
|
||||
<path d="M11.1633 26.5306C11.1633 13.535 21.6983 3 34.6939 3C47.6895 3 58.2246 13.535 58.2246 26.5306V42.9184H11.1633V26.5306Z" stroke="#FF5E00" stroke-width="6"/>
|
||||
<circle cx="34.9491" cy="64.5409" r="6.37755" fill="#FF5E00"/>
|
||||
<path d="M34.6939 63.7756L41.8367 81.6328H27.551L34.6939 63.7756Z" fill="#FF5E00"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 516 B |
21
Linphone/Assets.xcassets/success.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "success.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
3
Linphone/Assets.xcassets/success.imageset/success.svg
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M12 2C10.0222 2 8.08879 2.58649 6.4443 3.6853C4.79981 4.78412 3.51809 6.3459 2.76121 8.17316C2.00433 10.0004 1.8063 12.0111 2.19215 13.9509C2.578 15.8907 3.53041 17.6725 4.92894 19.0711C6.32746 20.4696 8.10929 21.422 10.0491 21.8078C11.9889 22.1937 13.9996 21.9957 15.8268 21.2388C17.6541 20.4819 19.2159 19.2002 20.3147 17.5557C21.4135 15.9112 22 13.9778 22 12C21.9972 9.34869 20.9427 6.80678 19.068 4.93202C17.1932 3.05727 14.6513 2.0028 12 2ZM12 20.4615C10.3265 20.4615 8.69052 19.9653 7.29902 19.0355C5.90753 18.1057 4.823 16.7842 4.18256 15.2381C3.54213 13.6919 3.37456 11.9906 3.70105 10.3492C4.02754 8.70786 4.83343 7.20016 6.01679 6.01679C7.20016 4.83342 8.70786 4.02754 10.3492 3.70105C11.9906 3.37456 13.6919 3.54212 15.2381 4.18256C16.7842 4.82299 18.1057 5.90753 19.0355 7.29902C19.9653 8.69051 20.4615 10.3265 20.4615 12C20.459 14.2434 19.5667 16.3941 17.9804 17.9804C16.3941 19.5667 14.2434 20.459 12 20.4615ZM7.38462 10.0769C7.38462 9.84871 7.45229 9.62563 7.57908 9.43588C7.70586 9.24613 7.88607 9.09824 8.09691 9.01091C8.30774 8.92357 8.53974 8.90072 8.76357 8.94525C8.98739 8.98977 9.19299 9.09966 9.35436 9.26103C9.51573 9.4224 9.62562 9.62799 9.67014 9.85182C9.71466 10.0756 9.69181 10.3076 9.60448 10.5185C9.51715 10.7293 9.36926 10.9095 9.17951 11.0363C8.98976 11.1631 8.76667 11.2308 8.53846 11.2308C8.23245 11.2308 7.93896 11.1092 7.72257 10.8928C7.50618 10.6764 7.38462 10.3829 7.38462 10.0769ZM16.6154 10.0769C16.6154 10.3051 16.5477 10.5282 16.4209 10.718C16.2941 10.9077 16.1139 11.0556 15.9031 11.1429C15.6923 11.2303 15.4603 11.2531 15.2364 11.2086C15.0126 11.1641 14.807 11.0542 14.6456 10.8928C14.4843 10.7314 14.3744 10.5259 14.3299 10.302C14.2853 10.0782 14.3082 9.8462 14.3955 9.63536C14.4829 9.42453 14.6307 9.24432 14.8205 9.11753C15.0102 8.99075 15.2333 8.92308 15.4615 8.92308C15.7676 8.92308 16.061 9.04464 16.2774 9.26103C16.4938 9.47742 16.6154 9.7709 16.6154 10.0769ZM16.5125 14.6923C15.5231 16.4029 13.8779 17.3846 12 17.3846C10.1221 17.3846 8.47789 16.4038 7.48846 14.6923C7.43281 14.6048 7.39544 14.5068 7.3786 14.4045C7.36176 14.3021 7.36581 14.1974 7.39049 14.0966C7.41517 13.9959 7.45998 13.9011 7.52222 13.8181C7.58447 13.7351 7.66285 13.6656 7.75267 13.6137C7.84249 13.5617 7.94189 13.5285 8.04487 13.516C8.14786 13.5035 8.25232 13.512 8.35195 13.5409C8.45159 13.5698 8.54435 13.6185 8.62466 13.6842C8.70496 13.7499 8.77114 13.8311 8.81923 13.9231C9.5375 15.1644 10.6663 15.8462 12 15.8462C13.3337 15.8462 14.4625 15.1635 15.1798 13.9231C15.2818 13.7463 15.4498 13.6174 15.6469 13.5645C15.844 13.5117 16.054 13.5393 16.2308 13.6413C16.4075 13.7434 16.5365 13.9114 16.5893 14.1085C16.6421 14.3056 16.6145 14.5156 16.5125 14.6923Z" fill="#4FAE80"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.7 KiB |
21
Linphone/Assets.xcassets/video-call.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "VideoCall.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
3
Linphone/Assets.xcassets/video-call.imageset/VideoCall.svg
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M22.6123 6.96504C22.4953 6.90235 22.3636 6.87258 22.231 6.87887C22.0985 6.88517 21.9701 6.9273 21.8597 7.00079L18.6 9.16962V6.87337C18.6 6.48439 18.4455 6.11133 18.1704 5.83628C17.8954 5.56123 17.5223 5.4067 17.1333 5.4067H9.89717C9.70267 5.4067 9.51615 5.48396 9.37862 5.62149C9.2411 5.75902 9.16383 5.94554 9.16383 6.14004C9.16383 6.33453 9.2411 6.52105 9.37862 6.65858C9.51615 6.79611 9.70267 6.87337 9.89717 6.87337H17.1333V14.9061C17.1333 15.1006 17.2106 15.2871 17.3481 15.4247C17.4856 15.5622 17.6722 15.6395 17.8667 15.6395C18.0612 15.6395 18.2477 15.5622 18.3852 15.4247C18.5227 15.2871 18.6 15.1006 18.6 14.9061V14.8484L21.8597 17.0218C21.9807 17.1004 22.1223 17.1415 22.2667 17.14C22.4612 17.14 22.6477 17.0628 22.7852 16.9252C22.9227 16.7877 23 16.6012 23 16.4067V7.6067C22.9991 7.47476 22.9626 7.3455 22.8943 7.23257C22.8261 7.11964 22.7286 7.02721 22.6123 6.96504ZM21.5333 15.0363L18.6 13.081V10.9324L21.5333 8.9817V15.0363ZM4.476 3.44687C4.4116 3.37427 4.33343 3.31518 4.24603 3.27302C4.15862 3.23086 4.06372 3.20647 3.96681 3.20125C3.86991 3.19604 3.77294 3.21011 3.68152 3.24265C3.59009 3.27519 3.50603 3.32556 3.43422 3.39082C3.3624 3.45609 3.30425 3.53496 3.26314 3.62286C3.22203 3.71077 3.19878 3.80596 3.19473 3.90292C3.19067 3.99987 3.20591 4.09667 3.23954 4.1877C3.27318 4.27873 3.32454 4.36217 3.39067 4.4332L4.27525 5.4067H2.46667C2.07768 5.4067 1.70463 5.56123 1.42958 5.83628C1.15452 6.11133 1 6.48439 1 6.87337V17.14C1 17.529 1.15452 17.9021 1.42958 18.1771C1.70463 18.4522 2.07768 18.6067 2.46667 18.6067H16.2753L18.0573 20.5665C18.1217 20.6391 18.1999 20.6982 18.2873 20.7404C18.3747 20.7825 18.4696 20.8069 18.5665 20.8122C18.6634 20.8174 18.7604 20.8033 18.8518 20.7708C18.9432 20.7382 19.0273 20.6878 19.0991 20.6226C19.1709 20.5573 19.2291 20.4784 19.2702 20.3905C19.3113 20.3026 19.3346 20.2074 19.3386 20.1105C19.3427 20.0135 19.3274 19.9167 19.2938 19.8257C19.2602 19.7347 19.2088 19.6512 19.1427 19.5802L4.476 3.44687ZM2.46667 17.14V6.87337H5.609L14.9425 17.14H2.46667Z" fill="#6C7A87"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.1 KiB |
21
Linphone/Assets.xcassets/video-camera.imageset/Contents.json
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "video-camera.svg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
3
Linphone/Assets.xcassets/video-camera.imageset/video-camera.svg
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M31.4713 9.125C31.3118 9.03953 31.1321 8.99892 30.9514 9.0075C30.7707 9.01609 30.5956 9.07354 30.445 9.17375L26 12.1313V9C26 8.46957 25.7893 7.96086 25.4142 7.58579C25.0391 7.21071 24.5304 7 24 7H4C3.46957 7 2.96086 7.21071 2.58579 7.58579C2.21071 7.96086 2 8.46957 2 9V23C2 23.5304 2.21071 24.0391 2.58579 24.4142C2.96086 24.7893 3.46957 25 4 25H24C24.5304 25 25.0391 24.7893 25.4142 24.4142C25.7893 24.0391 26 23.5304 26 23V19.875L30.445 22.8388C30.6101 22.946 30.8032 23.002 31 23C31.2652 23 31.5196 22.8946 31.7071 22.7071C31.8946 22.5196 32 22.2652 32 22V10C31.9987 9.82007 31.949 9.64382 31.8559 9.48982C31.7628 9.33582 31.63 9.20979 31.4713 9.125ZM24 23H4V9H24V23ZM30 20.1313L26 17.465V14.535L30 11.875V20.1313Z" fill="#22334D"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 849 B |
78
Linphone/Core/CoreContext.swift
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import linphonesw
|
||||
|
||||
final class CoreContext: ObservableObject {
|
||||
|
||||
static let shared = CoreContext()
|
||||
|
||||
var mCore: Core!
|
||||
var mRegistrationDelegate: CoreDelegate!
|
||||
var mConfigurationDelegate: CoreDelegate!
|
||||
|
||||
var coreVersion: String = Core.getVersion
|
||||
@Published var loggedIn: Bool = false
|
||||
@Published var loggingInProgress: Bool = false
|
||||
@Published var toastMessage: String = ""
|
||||
|
||||
private init() {}
|
||||
|
||||
func initialiseCore() async throws {
|
||||
LoggingService.Instance.logLevel = LogLevel.Debug
|
||||
|
||||
let factory = Factory.Instance
|
||||
let configDir = factory.getConfigDir(context: nil)
|
||||
try? mCore = Factory.Instance.createCore(configPath: "\(configDir)/MyConfig", factoryConfigPath: "", systemContext: nil)
|
||||
try? mCore.start()
|
||||
|
||||
// Create a Core listener to listen for the callback we need
|
||||
// In this case, we want to know about the account registration status
|
||||
|
||||
mRegistrationDelegate =
|
||||
CoreDelegateStub(
|
||||
onConfiguringStatus: {(_: Core, state: Config.ConfiguringState, message: String) in
|
||||
NSLog("New configuration state is \(state) = \(message)\n")
|
||||
if state == .Successful {
|
||||
self.toastMessage = "Successful"
|
||||
} else {
|
||||
self.toastMessage = "Failed"
|
||||
}
|
||||
},
|
||||
|
||||
onAccountRegistrationStateChanged: {(_: Core, account: Account, state: RegistrationState, message: String) in
|
||||
// If account has been configured correctly, we will go through Progress and Ok states
|
||||
// Otherwise, we will be Failed.
|
||||
NSLog("New registration state is \(state) for user id \( String(describing: account.params?.identityAddress?.asString())) = \(message)\n")
|
||||
if state == .Ok {
|
||||
self.loggingInProgress = false
|
||||
self.loggedIn = true
|
||||
} else if state == .Progress {
|
||||
self.loggingInProgress = true
|
||||
} else {
|
||||
self.toastMessage = "Registration failed"
|
||||
self.loggingInProgress = false
|
||||
self.loggedIn = false
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
mCore.addDelegate(delegate: mRegistrationDelegate)
|
||||
}
|
||||
}
|
||||
BIN
Linphone/Fonts/NotoSans-Bold.ttf
Normal file
BIN
Linphone/Fonts/NotoSans-ExtraBold.ttf
Normal file
BIN
Linphone/Fonts/NotoSans-Light.ttf
Normal file
BIN
Linphone/Fonts/NotoSans-Medium.ttf
Normal file
BIN
Linphone/Fonts/NotoSans-Regular.ttf
Normal file
BIN
Linphone/Fonts/NotoSans-SemiBold.ttf
Normal file
20
Linphone/Info.plist
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>NotoSans-Light.ttf</string>
|
||||
<string>NotoSans-Regular.ttf</string>
|
||||
<string>NotoSans-Medium.ttf</string>
|
||||
<string>NotoSans-SemiBold.ttf</string>
|
||||
<string>NotoSans-Bold.ttf</string>
|
||||
<string>NotoSans-ExtraBold.ttf</string>
|
||||
</array>
|
||||
<key>UILaunchScreen</key>
|
||||
<dict>
|
||||
<key>UIImageName</key>
|
||||
<string>linphone</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,29 +1,38 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
@main
|
||||
struct LinphoneApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
ContentView()
|
||||
}
|
||||
}
|
||||
|
||||
@ObservedObject private var coreContext = CoreContext.shared
|
||||
@State private var isActive = false
|
||||
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
if isActive {
|
||||
ContentView(sharedMainViewModel: SharedMainViewModel())
|
||||
.toast(isShowing: $coreContext.toastMessage)
|
||||
} else {
|
||||
SplashScreen(isActive: $isActive)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
308
Linphone/Localizable.xcstrings
Normal file
|
|
@ -0,0 +1,308 @@
|
|||
{
|
||||
"sourceLanguage" : "en",
|
||||
"strings" : {
|
||||
"" : {
|
||||
|
||||
},
|
||||
" et " : {
|
||||
|
||||
},
|
||||
" or " : {
|
||||
|
||||
},
|
||||
"." : {
|
||||
|
||||
},
|
||||
"[Forgotten password?](https://subscribe.linphone.org/)" : {
|
||||
|
||||
},
|
||||
"[linphone.org/contact](https://linphone.org/contact)" : {
|
||||
|
||||
},
|
||||
"[nos conditions d’utilisation](https://linphone.org/general-terms)" : {
|
||||
|
||||
},
|
||||
"[notre politique de confidentialité](https://linphone.org/privacy-policy)" : {
|
||||
|
||||
},
|
||||
"**Camera** : Pour capturer votre vidéo lors des appels vidéo et conférence." : {
|
||||
|
||||
},
|
||||
"**Contacts** : Pour vous afficher vos contacts et retrouver qui utilise Linphone." : {
|
||||
|
||||
},
|
||||
"**Micro** : Pour permettre à vos correspondants de vous entendre." : {
|
||||
|
||||
},
|
||||
"**Notifications** : Pour vous informé quand vous recevez un message ou un appel." : {
|
||||
|
||||
},
|
||||
"%lld Book (Example)" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"variations" : {
|
||||
"plural" : {
|
||||
"one" : {
|
||||
"stringUnit" : {
|
||||
"state" : "needs_review",
|
||||
"value" : "%lld Book"
|
||||
}
|
||||
},
|
||||
"other" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%lld Books"
|
||||
}
|
||||
},
|
||||
"zero" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "No Book"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"fr" : {
|
||||
"variations" : {
|
||||
"plural" : {
|
||||
"one" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%lld Livre"
|
||||
}
|
||||
},
|
||||
"other" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "%lld Livres"
|
||||
}
|
||||
},
|
||||
"zero" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Pas de Livre"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Accept all" : {
|
||||
|
||||
},
|
||||
"assistant_account_login" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Login"
|
||||
}
|
||||
},
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Login en FR"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Calls" : {
|
||||
|
||||
},
|
||||
"Ce mode vous permet d’être interopérable avec d’autres services SIP.\nVos communications seront chiffrées de point à point. " : {
|
||||
|
||||
},
|
||||
"Chiffrement de bout en bout de tous vos échanges, grâce au mode default vos communications sont à l’abri des regards." : {
|
||||
|
||||
},
|
||||
"Close" : {
|
||||
|
||||
},
|
||||
"Conditions de service" : {
|
||||
|
||||
},
|
||||
"Contacts" : {
|
||||
|
||||
},
|
||||
"Contacts View" : {
|
||||
|
||||
},
|
||||
"Continue" : {
|
||||
|
||||
},
|
||||
"D'accord" : {
|
||||
|
||||
},
|
||||
"Default" : {
|
||||
|
||||
},
|
||||
"Default mode" : {
|
||||
|
||||
},
|
||||
"Demande d’autorisations" : {
|
||||
|
||||
},
|
||||
"Deny all" : {
|
||||
|
||||
},
|
||||
"Display Name" : {
|
||||
|
||||
},
|
||||
"Domain" : {
|
||||
|
||||
},
|
||||
"En continuant, vous acceptez ces conditions, " : {
|
||||
|
||||
},
|
||||
"Error" : {
|
||||
|
||||
},
|
||||
"History View" : {
|
||||
|
||||
},
|
||||
"I prefere create an account" : {
|
||||
|
||||
},
|
||||
"I understand" : {
|
||||
|
||||
},
|
||||
"Interoperable" : {
|
||||
|
||||
},
|
||||
"Interoperable mode" : {
|
||||
|
||||
},
|
||||
"Invalid QR code!" : {
|
||||
|
||||
},
|
||||
"Invalide URI" : {
|
||||
|
||||
},
|
||||
"Linphone" : {
|
||||
|
||||
},
|
||||
"Log out" : {
|
||||
|
||||
},
|
||||
"Next" : {
|
||||
|
||||
},
|
||||
"Not account yet?" : {
|
||||
|
||||
},
|
||||
"Open source" : {
|
||||
|
||||
},
|
||||
"Opération en cours..." : {
|
||||
|
||||
},
|
||||
"password" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Password"
|
||||
}
|
||||
},
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Password en FR"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Personnalize your profil mode" : {
|
||||
|
||||
},
|
||||
"Plus tard" : {
|
||||
|
||||
},
|
||||
"Pour vous permettre de vous profitez pleinement de Linphone nous avons besoin des autorisations suivantes :" : {
|
||||
|
||||
},
|
||||
"QR code validated!" : {
|
||||
|
||||
},
|
||||
"Register" : {
|
||||
|
||||
},
|
||||
"Scan QR code" : {
|
||||
|
||||
},
|
||||
"Sécurisé" : {
|
||||
|
||||
},
|
||||
"sip.linphone.org" : {
|
||||
|
||||
},
|
||||
"Skip" : {
|
||||
|
||||
},
|
||||
"Start" : {
|
||||
|
||||
},
|
||||
"TCP" : {
|
||||
|
||||
},
|
||||
"The user name or password is incorrects" : {
|
||||
|
||||
},
|
||||
"TLS" : {
|
||||
|
||||
},
|
||||
"to Linphone" : {
|
||||
|
||||
},
|
||||
"Transport" : {
|
||||
|
||||
},
|
||||
"UDP" : {
|
||||
|
||||
},
|
||||
"Une application de communication **sécurisée**, **open source** et **française**." : {
|
||||
|
||||
},
|
||||
"Une application open source et un **service gratuit** depuis **2001**." : {
|
||||
|
||||
},
|
||||
"Use a SIP account" : {
|
||||
|
||||
},
|
||||
"Use SIP Account" : {
|
||||
|
||||
},
|
||||
"username" : {
|
||||
"extractionState" : "manual",
|
||||
"localizations" : {
|
||||
"en" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Username"
|
||||
}
|
||||
},
|
||||
"fr" : {
|
||||
"stringUnit" : {
|
||||
"state" : "translated",
|
||||
"value" : "Username en FR"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"Vos communications sont en sécurité grâce aux **Chiffrement de bout en bout**." : {
|
||||
|
||||
},
|
||||
"Welcome" : {
|
||||
|
||||
},
|
||||
"You will change this mode later" : {
|
||||
|
||||
}
|
||||
},
|
||||
"version" : "1.0"
|
||||
}
|
||||
54
Linphone/SplashScreen.swift
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct SplashScreen: View {
|
||||
|
||||
@ObservedObject private var coreContext = CoreContext.shared
|
||||
@Binding var isActive: Bool
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { _ in
|
||||
VStack {
|
||||
Spacer()
|
||||
HStack {
|
||||
Spacer()
|
||||
Image("linphone")
|
||||
Spacer()
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
|
||||
}
|
||||
.ignoresSafeArea(.all)
|
||||
.onAppear {
|
||||
Task {
|
||||
try await coreContext.initialiseCore()
|
||||
withAnimation {
|
||||
self.isActive = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
SplashScreen(isActive: .constant(true))
|
||||
}
|
||||
38
Linphone/UI/Assistant/AssistantView.swift
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct AssistantView: View {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
@ObservedObject private var coreContext = CoreContext.shared
|
||||
|
||||
var body: some View {
|
||||
if sharedMainViewModel.displayProfileMode && coreContext.loggedIn {
|
||||
ProfileModeFragment(sharedMainViewModel: sharedMainViewModel)
|
||||
} else {
|
||||
LoginFragment(accountLoginViewModel: AccountLoginViewModel(), sharedMainViewModel: sharedMainViewModel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
AssistantView(sharedMainViewModel: SharedMainViewModel())
|
||||
}
|
||||
321
Linphone/UI/Assistant/Fragments/LoginFragment.swift
Normal file
|
|
@ -0,0 +1,321 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct LoginFragment: View {
|
||||
|
||||
@ObservedObject private var coreContext = CoreContext.shared
|
||||
@ObservedObject var accountLoginViewModel: AccountLoginViewModel
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
|
||||
@State private var isSecured: Bool = true
|
||||
|
||||
@FocusState var isNameFocused: Bool
|
||||
@FocusState var isPasswordFocused: Bool
|
||||
|
||||
@State private var isShowPopup = false
|
||||
|
||||
@State private var linkActive = ""
|
||||
|
||||
@State private var isLinkSIPActive = false
|
||||
@State private var isLinkREGActive = false
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
ZStack {
|
||||
GeometryReader { geometry in
|
||||
ScrollView(.vertical) {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
Text("assistant_account_login")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
Text(String(localized: "username")+"*")
|
||||
.default_text_style_700(styleSize: 15)
|
||||
.padding(.bottom, -5)
|
||||
|
||||
TextField("username", text: $accountLoginViewModel.username)
|
||||
.default_text_style(styleSize: 15)
|
||||
.disabled(coreContext.loggedIn)
|
||||
.frame(height: 25)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 15)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(isNameFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
.focused($isNameFocused)
|
||||
|
||||
Text(String(localized: "password")+"*")
|
||||
.default_text_style_700(styleSize: 15)
|
||||
.padding(.bottom, -5)
|
||||
|
||||
ZStack(alignment: .trailing) {
|
||||
Group {
|
||||
if isSecured {
|
||||
SecureField("password", text: $accountLoginViewModel.passwd)
|
||||
.default_text_style(styleSize: 15)
|
||||
.frame(height: 25)
|
||||
.focused($isPasswordFocused)
|
||||
} else {
|
||||
TextField("password", text: $accountLoginViewModel.passwd)
|
||||
.default_text_style(styleSize: 15)
|
||||
.frame(height: 25)
|
||||
.focused($isPasswordFocused)
|
||||
}
|
||||
}
|
||||
|
||||
Button(action: {
|
||||
isSecured.toggle()
|
||||
}, label: {
|
||||
Image(self.isSecured ? "eye-slash" : "eye")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20)
|
||||
})
|
||||
}
|
||||
.disabled(coreContext.loggedIn)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 15)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(isPasswordFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
|
||||
Button(action: {
|
||||
self.accountLoginViewModel.login()
|
||||
}, label: {
|
||||
Text(coreContext.loggedIn ? "Log out" : "assistant_account_login")
|
||||
.default_text_style_white_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.background((accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty) ? Color.orangeMain100 : Color.orangeMain500)
|
||||
.cornerRadius(60)
|
||||
.disabled(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty)
|
||||
.padding(.bottom)
|
||||
|
||||
HStack {
|
||||
Text("[Forgotten password?](https://subscribe.linphone.org/)")
|
||||
.underline()
|
||||
.tint(Color.grayMain2c600)
|
||||
.default_text_style_600(styleSize: 15)
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.bottom, 30)
|
||||
|
||||
HStack {
|
||||
VStack {
|
||||
Divider()
|
||||
}
|
||||
Text(" or ")
|
||||
.default_text_style(styleSize: 15)
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
VStack {
|
||||
Divider()
|
||||
}
|
||||
}
|
||||
.padding(.bottom, 10)
|
||||
|
||||
NavigationLink(destination: {
|
||||
QrCodeScannerFragment()
|
||||
}, label: {
|
||||
HStack {
|
||||
Image("qr-code")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
.frame(width: 20, height: 20)
|
||||
|
||||
Text("Scan QR code")
|
||||
.default_text_style_orange_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(Color.orangeMain500, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
|
||||
NavigationLink(isActive: $isLinkSIPActive, destination: {
|
||||
ThirdPartySipAccountWarningFragment(sharedMainViewModel: sharedMainViewModel, accountLoginViewModel: accountLoginViewModel)
|
||||
}, label: {
|
||||
Text("Use SIP Account")
|
||||
.default_text_style_orange_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
})
|
||||
.disabled(!sharedMainViewModel.generalTermsAccepted)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(Color.orangeMain500, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
.simultaneousGesture(
|
||||
TapGesture().onEnded {
|
||||
self.linkActive = "SIP"
|
||||
if !sharedMainViewModel.generalTermsAccepted {
|
||||
withAnimation {
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
} else {
|
||||
self.isLinkSIPActive = true
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Spacer()
|
||||
|
||||
HStack(alignment: .center) {
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("Not account yet?")
|
||||
.default_text_style(styleSize: 15)
|
||||
.foregroundStyle(Color.grayMain2c700)
|
||||
.padding(.horizontal, 10)
|
||||
|
||||
NavigationLink(destination: RegisterFragment(), isActive: $isLinkREGActive, label: {Text("Register")
|
||||
.default_text_style_orange_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
})
|
||||
.disabled(!sharedMainViewModel.generalTermsAccepted)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(Color.orangeMain500, lineWidth: 1)
|
||||
)
|
||||
.padding(.horizontal, 10)
|
||||
.simultaneousGesture(
|
||||
TapGesture().onEnded {
|
||||
self.linkActive = "REG"
|
||||
if !sharedMainViewModel.generalTermsAccepted {
|
||||
withAnimation {
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
} else {
|
||||
self.isLinkREGActive = true
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.bottom)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
|
||||
if self.isShowPopup {
|
||||
let contentPopup1 = Text("En continuant, vous acceptez ces conditions, ")
|
||||
let contentPopup2 = Text("[notre politique de confidentialité](https://linphone.org/privacy-policy)").underline()
|
||||
let contentPopup3 = Text(" et ")
|
||||
let contentPopup4 = Text("[nos conditions d’utilisation](https://linphone.org/general-terms)").underline()
|
||||
let contentPopup5 = Text(".")
|
||||
PopupView(sharedMainViewModel: sharedMainViewModel, isShowPopup: $isShowPopup,
|
||||
title: Text("Conditions de service"),
|
||||
content: contentPopup1 + contentPopup2 + contentPopup3 + contentPopup4 + contentPopup5,
|
||||
titleFirstButton: Text("Deny all"),
|
||||
actionFirstButton: {self.isShowPopup.toggle()},
|
||||
titleSecondButton: Text("Accept all"),
|
||||
actionSecondButton: {acceptGeneralTerms()})
|
||||
.background(.black.opacity(0.65))
|
||||
.onTapGesture {
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
sharedMainViewModel.changeDisplayProfileMode()
|
||||
}
|
||||
|
||||
if coreContext.loggingInProgress {
|
||||
PopupLoadingView(sharedMainViewModel: sharedMainViewModel)
|
||||
.background(.black.opacity(0.65))
|
||||
}
|
||||
|
||||
if !coreContext.loggingInProgress && !coreContext.loggedIn {
|
||||
ZStack {
|
||||
|
||||
}.onAppear {
|
||||
self.accountLoginViewModel.unregister()
|
||||
self.accountLoginViewModel.delete()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
}
|
||||
|
||||
func acceptGeneralTerms() {
|
||||
sharedMainViewModel.changeGeneralTerms()
|
||||
self.isShowPopup.toggle()
|
||||
switch linkActive {
|
||||
case "SIP":
|
||||
self.isLinkSIPActive = true
|
||||
case "REG":
|
||||
self.isLinkREGActive = true
|
||||
default:
|
||||
print("Link Not Active")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
LoginFragment(accountLoginViewModel: AccountLoginViewModel(), sharedMainViewModel: SharedMainViewModel())
|
||||
}
|
||||
227
Linphone/UI/Assistant/Fragments/PermissionsFragment.swift
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct PermissionsFragment: View {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
|
||||
var permissionManager = PermissionManager.shared
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
ScrollView(.vertical) {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.padding(.top, -65)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
|
||||
Text("Demande d’autorisations")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
|
||||
Text("Pour vous permettre de vous profitez pleinement de Linphone nous avons besoin des autorisations suivantes :")
|
||||
.default_text_style(styleSize: 15)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
Spacer()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
HStack(alignment: .center) {
|
||||
Image("bell-ringing")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20, alignment: .leading)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(16)
|
||||
.background(Color.grayMain2c200)
|
||||
.cornerRadius(40)
|
||||
|
||||
Text("**Notifications** : Pour vous informé quand vous recevez un message ou un appel.")
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(.leading, 10)
|
||||
}
|
||||
.padding(.bottom)
|
||||
|
||||
HStack {
|
||||
HStack(alignment: .center) {
|
||||
Image("address-book")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20, alignment: .leading)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(16)
|
||||
.background(Color.grayMain2c200)
|
||||
.cornerRadius(40)
|
||||
|
||||
Text("**Contacts** : Pour vous afficher vos contacts et retrouver qui utilise Linphone.")
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(.leading, 10)
|
||||
}
|
||||
.padding(.bottom)
|
||||
|
||||
HStack {
|
||||
HStack(alignment: .center) {
|
||||
Image("microphone")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20, alignment: .leading)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(16)
|
||||
.background(Color.grayMain2c200)
|
||||
.cornerRadius(40)
|
||||
|
||||
Text("**Micro** : Pour permettre à vos correspondants de vous entendre.")
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(.leading, 10)
|
||||
}
|
||||
.padding(.bottom)
|
||||
|
||||
HStack {
|
||||
HStack(alignment: .center) {
|
||||
Image("video-camera")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20, alignment: .leading)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(16)
|
||||
.background(Color.grayMain2c200)
|
||||
.cornerRadius(40)
|
||||
|
||||
Text("**Camera** : Pour capturer votre vidéo lors des appels vidéo et conférence.")
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(.leading, 10)
|
||||
}
|
||||
.padding(.bottom)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.frame(maxHeight: .infinity)
|
||||
.padding(.horizontal, 20)
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: {
|
||||
withAnimation {
|
||||
sharedMainViewModel.changeWelcomeView()
|
||||
}
|
||||
}, label: {
|
||||
Text("Plus tard")
|
||||
.default_text_style_orange_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(Color.orangeMain500, lineWidth: 1)
|
||||
)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal)
|
||||
|
||||
Button {
|
||||
permissionManager.cameraRequestPermission()
|
||||
} label: {
|
||||
Text("D'accord")
|
||||
.default_text_style_white_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.background(Color.orangeMain500)
|
||||
.cornerRadius(60)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationBarHidden(true)
|
||||
.onReceive(permissionManager.$cameraPermissionGranted, perform: { (granted) in
|
||||
if granted {
|
||||
withAnimation {
|
||||
sharedMainViewModel.changeWelcomeView()
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
PermissionsFragment(sharedMainViewModel: SharedMainViewModel())
|
||||
}
|
||||
171
Linphone/UI/Assistant/Fragments/ProfileModeFragment.swift
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ProfileModeFragment: View {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
|
||||
@State var options: Int = 1
|
||||
@State private var isShowPopup = false
|
||||
@State private var isShowPopupForDefault = true
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
ScrollView(.vertical) {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
Text("Personnalize your profil mode")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, -10)
|
||||
Text("You will change this mode later")
|
||||
.default_text_style_white(styleSize: 15)
|
||||
.padding(.top, 40)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
|
||||
VStack(spacing: 10) {
|
||||
Button(action: {
|
||||
options = 1
|
||||
}, label: {
|
||||
HStack {
|
||||
Image(options == 1 ? "radio-button-fill" : "radio-button")
|
||||
Text("Default")
|
||||
.profile_mode_text_style_gray_800(styleSize: 16)
|
||||
Image("info")
|
||||
.resizable()
|
||||
.frame(width: 25, height: 25)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
self.isShowPopupForDefault = true
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
})
|
||||
|
||||
HStack {
|
||||
Text("Chiffrement de bout en bout de tous vos échanges, grâce au mode default vos communications sont à l’abri des regards.")
|
||||
.profile_mode_text_style_gray(styleSize: 15)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.vertical, 20)
|
||||
.background(Color.gray100)
|
||||
.cornerRadius(15)
|
||||
.padding(.bottom, 5)
|
||||
|
||||
Image("profile-mode")
|
||||
.resizable()
|
||||
.frame(width: 150, height: 60)
|
||||
.padding()
|
||||
|
||||
Button(action: {
|
||||
options = 2
|
||||
}, label: {
|
||||
HStack {
|
||||
Image(options == 2 ? "radio-button-fill" : "radio-button")
|
||||
Text("Interoperable")
|
||||
.profile_mode_text_style_gray_800(styleSize: 16)
|
||||
Image("info")
|
||||
.resizable()
|
||||
.frame(width: 25, height: 25)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
self.isShowPopupForDefault = false
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
})
|
||||
|
||||
HStack {
|
||||
Text("Ce mode vous permet d’être interopérable avec d’autres services SIP.\nVos communications seront chiffrées de point à point. ")
|
||||
.profile_mode_text_style_gray(styleSize: 15)
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.vertical, 20)
|
||||
.background(Color.gray100)
|
||||
.cornerRadius(15)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding()
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: {
|
||||
sharedMainViewModel.changeHideProfileMode()
|
||||
}, label: {
|
||||
Text("Continue")
|
||||
.default_text_style_white_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.background(Color.orangeMain500)
|
||||
.cornerRadius(60)
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
.onAppear {
|
||||
UserDefaults.standard.set(false, forKey: "display_profile_mode")
|
||||
}
|
||||
|
||||
if self.isShowPopup {
|
||||
PopupView(sharedMainViewModel: sharedMainViewModel, isShowPopup: $isShowPopup,
|
||||
title: Text(isShowPopupForDefault ? "Default mode" : "Interoperable mode"),
|
||||
content: Text(
|
||||
isShowPopupForDefault
|
||||
? "Texte explicatif du default mode : lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
||||
+ "Etiam velit sapien, egestas sit amet dictum eget, condimentum a ligula."
|
||||
: "Texte explicatif du interoperable mode : lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
||||
+ " Etiam velit sapien, egestas sit amet dictum eget, condimentum a ligula."),
|
||||
titleFirstButton: nil,
|
||||
actionFirstButton: {},
|
||||
titleSecondButton: Text("Close"),
|
||||
actionSecondButton: {
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
)
|
||||
.background(.black.opacity(0.65))
|
||||
.onTapGesture {
|
||||
self.isShowPopup.toggle()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ProfileModeFragment(sharedMainViewModel: SharedMainViewModel())
|
||||
}
|
||||
69
Linphone/UI/Assistant/Fragments/QrCodeScannerFragment.swift
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct QrCodeScannerFragment: View {
|
||||
|
||||
@ObservedObject private var coreContext = CoreContext.shared
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
@State var scanResult = "Scan a QR code"
|
||||
|
||||
var body: some View {
|
||||
ZStack(alignment: .top) {
|
||||
QRScanner(result: $scanResult)
|
||||
|
||||
Text(scanResult)
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 175)
|
||||
|
||||
HStack {
|
||||
Button {
|
||||
dismiss()
|
||||
} label: {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.white)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
}
|
||||
.padding()
|
||||
.padding(.top, 50)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
.edgesIgnoringSafeArea(.all)
|
||||
.navigationBarHidden(true)
|
||||
|
||||
if coreContext.toastMessage == "Successful" {
|
||||
ZStack {
|
||||
|
||||
}.onAppear {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
QrCodeScannerFragment()
|
||||
}
|
||||
76
Linphone/UI/Assistant/Fragments/RegisterFragment.swift
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct RegisterFragment: View {
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
GeometryReader { geometry in
|
||||
ScrollView(.vertical) {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.padding(.top, -65)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
|
||||
Text("Register")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
RegisterFragment()
|
||||
}
|
||||
|
|
@ -0,0 +1,237 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ThirdPartySipAccountLoginFragment: View {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
@ObservedObject private var coreContext = CoreContext.shared
|
||||
@ObservedObject var accountLoginViewModel: AccountLoginViewModel
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
@State private var isSecured: Bool = true
|
||||
|
||||
@FocusState var isNameFocused: Bool
|
||||
@FocusState var isPasswordFocused: Bool
|
||||
@FocusState var isDomainFocused: Bool
|
||||
@FocusState var isDisplayNameFocused: Bool
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
ScrollView(.vertical) {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.padding(.top, -65)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
accountLoginViewModel.domain = "sip.linphone.org"
|
||||
accountLoginViewModel.transportType = "TLS"
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
|
||||
Text("Use a SIP account")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
Text(String(localized: "username")+"*")
|
||||
.default_text_style_700(styleSize: 15)
|
||||
.padding(.bottom, -5)
|
||||
|
||||
TextField("username", text: $accountLoginViewModel.username)
|
||||
.default_text_style(styleSize: 15)
|
||||
.disabled(coreContext.loggedIn)
|
||||
.frame(height: 25)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 15)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(isNameFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
.focused($isNameFocused)
|
||||
|
||||
Text(String(localized: "password")+"*")
|
||||
.default_text_style_700(styleSize: 15)
|
||||
.padding(.bottom, -5)
|
||||
|
||||
ZStack(alignment: .trailing) {
|
||||
Group {
|
||||
if isSecured {
|
||||
SecureField("password", text: $accountLoginViewModel.passwd)
|
||||
.default_text_style(styleSize: 15)
|
||||
.frame(height: 25)
|
||||
.focused($isPasswordFocused)
|
||||
} else {
|
||||
TextField("password", text: $accountLoginViewModel.passwd)
|
||||
.default_text_style(styleSize: 15)
|
||||
.frame(height: 25)
|
||||
.focused($isPasswordFocused)
|
||||
}
|
||||
}
|
||||
Button(action: {
|
||||
isSecured.toggle()
|
||||
}, label: {
|
||||
Image(self.isSecured ? "eye-slash" : "eye")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20)
|
||||
})
|
||||
}
|
||||
.disabled(coreContext.loggedIn)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 15)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(isPasswordFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
|
||||
Text(String(localized: "Domain")+"*")
|
||||
.default_text_style_700(styleSize: 15)
|
||||
.padding(.bottom, -5)
|
||||
|
||||
TextField("sip.linphone.org", text: $accountLoginViewModel.domain)
|
||||
.default_text_style(styleSize: 15)
|
||||
.disabled(coreContext.loggedIn)
|
||||
.frame(height: 25)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 15)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(isDomainFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
.focused($isDomainFocused)
|
||||
|
||||
Text(String(localized: "Display Name"))
|
||||
.default_text_style_700(styleSize: 15)
|
||||
.padding(.bottom, -5)
|
||||
|
||||
TextField("Display Name", text: $accountLoginViewModel.displayName)
|
||||
.default_text_style(styleSize: 15)
|
||||
.disabled(coreContext.loggedIn)
|
||||
.frame(height: 25)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 15)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(isDisplayNameFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
.focused($isDisplayNameFocused)
|
||||
|
||||
Text(String(localized: "Transport"))
|
||||
.default_text_style_700(styleSize: 15)
|
||||
.padding(.bottom, -5)
|
||||
|
||||
Menu {
|
||||
Button("TLS") {accountLoginViewModel.transportType = "TLS"}
|
||||
Button("TCP") {accountLoginViewModel.transportType = "TCP"}
|
||||
Button("UDP") {accountLoginViewModel.transportType = "UDP"}
|
||||
} label: {
|
||||
Text(accountLoginViewModel.transportType)
|
||||
.default_text_style(styleSize: 15)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
Image("caret-down")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20)
|
||||
}
|
||||
.frame(height: 25)
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 15)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(Color.gray200, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom)
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: {
|
||||
self.accountLoginViewModel.login()
|
||||
accountLoginViewModel.domain = "sip.linphone.org"
|
||||
accountLoginViewModel.transportType = "TLS"
|
||||
}, label: {
|
||||
Text(coreContext.loggedIn ? "Log out" : "assistant_account_login")
|
||||
.default_text_style_white_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.background(
|
||||
(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty || accountLoginViewModel.domain.isEmpty)
|
||||
? Color.orangeMain100
|
||||
: Color.orangeMain500)
|
||||
.cornerRadius(60)
|
||||
.disabled(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty || accountLoginViewModel.domain.isEmpty)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
}
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ThirdPartySipAccountLoginFragment(sharedMainViewModel: SharedMainViewModel(), accountLoginViewModel: AccountLoginViewModel())
|
||||
}
|
||||
|
|
@ -0,0 +1,192 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ThirdPartySipAccountWarningFragment: View {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
@ObservedObject private var coreContext = CoreContext.shared
|
||||
@ObservedObject var accountLoginViewModel: AccountLoginViewModel
|
||||
|
||||
@Environment(\.dismiss) var dismiss
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
GeometryReader { geometry in
|
||||
ScrollView(.vertical) {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Image("caret-left")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.padding(.top, -65)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.leading)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
|
||||
Text("Use a SIP account")
|
||||
.default_text_style_white_800(styleSize: 20)
|
||||
.padding(.top, 20)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
|
||||
Spacer()
|
||||
|
||||
VStack(alignment: .leading) {
|
||||
HStack {
|
||||
Spacer()
|
||||
HStack(alignment: .center) {
|
||||
Image("conversation")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20, alignment: .leading)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(16)
|
||||
.background(Color.grayMain2c200)
|
||||
.cornerRadius(40)
|
||||
.padding(.horizontal)
|
||||
|
||||
HStack(alignment: .center) {
|
||||
Image("video-call")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 20, height: 20, alignment: .leading)
|
||||
.onTapGesture {
|
||||
withAnimation {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(16)
|
||||
.background(Color.grayMain2c200)
|
||||
.cornerRadius(40)
|
||||
.padding(.horizontal)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.bottom, 40)
|
||||
|
||||
Text("Some features require a Linphone account, such as group messaging, video conferences...\n\n"
|
||||
+ "These features are hidden when you register with a third party SIP account.\n\n"
|
||||
+ "To enable it in a commercial projet, please contact us. ")
|
||||
.default_text_style(styleSize: 15)
|
||||
.multilineTextAlignment(.center)
|
||||
.padding(.bottom)
|
||||
|
||||
HStack {
|
||||
Spacer()
|
||||
|
||||
HStack {
|
||||
Text("[linphone.org/contact](https://linphone.org/contact)")
|
||||
.tint(Color.orangeMain500)
|
||||
.default_text_style_orange_600(styleSize: 15)
|
||||
.frame(height: 35)
|
||||
}
|
||||
.padding(.horizontal, 15)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(Color.orangeMain500, lineWidth: 1)
|
||||
)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
.padding(.vertical)
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 20)
|
||||
|
||||
Spacer()
|
||||
|
||||
Button(action: {
|
||||
dismiss()
|
||||
}, label: {
|
||||
Text("I prefere create an account")
|
||||
.default_text_style_orange_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(Color.orangeMain500, lineWidth: 1)
|
||||
)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal)
|
||||
|
||||
NavigationLink(destination: {
|
||||
ThirdPartySipAccountLoginFragment(sharedMainViewModel: sharedMainViewModel, accountLoginViewModel: accountLoginViewModel)
|
||||
}, label: {
|
||||
Text("I understand")
|
||||
.default_text_style_white_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.background(Color.orangeMain500)
|
||||
.cornerRadius(60)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
}
|
||||
}
|
||||
.navigationViewStyle(StackNavigationViewStyle())
|
||||
.navigationBarHidden(true)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ThirdPartySipAccountWarningFragment(sharedMainViewModel: SharedMainViewModel(), accountLoginViewModel: AccountLoginViewModel())
|
||||
}
|
||||
|
|
@ -1,31 +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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import linphonesw
|
||||
import SwiftUI
|
||||
|
||||
class AccountLoginViewModel : ObservableObject {
|
||||
class AccountLoginViewModel: ObservableObject {
|
||||
|
||||
var coreContext = CoreContext.shared
|
||||
@Published var username : String = "user"
|
||||
@Published var passwd : String = "pwd"
|
||||
@Published var domain : String = "sip.example.org"
|
||||
@Published var transportType : String = "TLS"
|
||||
private var coreContext = CoreContext.shared
|
||||
|
||||
@Published var username: String = ""
|
||||
@Published var passwd: String = ""
|
||||
@Published var domain: String = "sip.linphone.org"
|
||||
@Published var displayName: String = ""
|
||||
@Published var transportType: String = "TLS"
|
||||
|
||||
init() {}
|
||||
|
||||
|
|
@ -34,10 +37,12 @@ class AccountLoginViewModel : ObservableObject {
|
|||
// Get the transport protocol to use.
|
||||
// TLS is strongly recommended
|
||||
// Only use UDP if you don't have the choice
|
||||
var transport : TransportType
|
||||
if (transportType == "TLS") { transport = TransportType.Tls }
|
||||
else if (transportType == "TCP") { transport = TransportType.Tcp }
|
||||
else { transport = TransportType.Udp }
|
||||
var transport: TransportType
|
||||
if transportType == "TLS" {
|
||||
transport = TransportType.Tls
|
||||
} else if transportType == "TCP" {
|
||||
transport = TransportType.Tcp
|
||||
} else { transport = TransportType.Udp }
|
||||
|
||||
// To configure a SIP account, we need an Account object and an AuthInfo object
|
||||
// The first one is how to connect to the proxy server, the second one stores the credentials
|
||||
|
|
@ -55,7 +60,7 @@ class AccountLoginViewModel : ObservableObject {
|
|||
|
||||
// A SIP account is identified by an identity address that we can construct from the username and domain
|
||||
let identity = try Factory.Instance.createAddress(addr: String("sip:" + username + "@" + domain))
|
||||
try! accountParams.setIdentityaddress(newValue: identity)
|
||||
try accountParams.setIdentityaddress(newValue: identity)
|
||||
|
||||
// We also need to configure where the proxy server is located
|
||||
let address = try Factory.Instance.createAddress(addr: String("sip:" + domain))
|
||||
90
Linphone/UI/Assistant/Viewmodel/QRScanner.swift
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
import AVFoundation
|
||||
|
||||
struct QRScanner: UIViewControllerRepresentable {
|
||||
|
||||
@Binding var result: String
|
||||
|
||||
func makeUIViewController(context: Context) -> QRScannerController {
|
||||
let controller = QRScannerController()
|
||||
controller.delegate = context.coordinator
|
||||
|
||||
return controller
|
||||
}
|
||||
|
||||
func makeCoordinator() -> Coordinator {
|
||||
Coordinator($result)
|
||||
}
|
||||
|
||||
func updateUIViewController(_ uiViewController: QRScannerController, context: Context) {
|
||||
}
|
||||
}
|
||||
|
||||
class Coordinator: NSObject, AVCaptureMetadataOutputObjectsDelegate {
|
||||
|
||||
private var coreContext = CoreContext.shared
|
||||
|
||||
@Binding var scanResult: String
|
||||
private var lastResult: String = ""
|
||||
|
||||
init(_ scanResult: Binding<String>) {
|
||||
self._scanResult = scanResult
|
||||
}
|
||||
|
||||
func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) {
|
||||
|
||||
// Check if the metadataObjects array is not nil and it contains at least one object.
|
||||
if metadataObjects.isEmpty {
|
||||
scanResult = "Scan a QR code"
|
||||
return
|
||||
}
|
||||
|
||||
// Get the metadata object.
|
||||
guard let metadataObj = metadataObjects[0] as? AVMetadataMachineReadableCodeObject else {
|
||||
return
|
||||
}
|
||||
|
||||
if metadataObj.type == AVMetadataObject.ObjectType.qr,
|
||||
let result = metadataObj.stringValue {
|
||||
if !result.isEmpty && result != lastResult {
|
||||
if let url = NSURL(string: result) {
|
||||
if UIApplication.shared.canOpenURL(url as URL) {
|
||||
lastResult = result
|
||||
do {
|
||||
try coreContext.mCore.setProvisioninguri(newValue: result)
|
||||
coreContext.mCore.stop()
|
||||
try coreContext.mCore.start()
|
||||
} catch {
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
coreContext.toastMessage = "Invalide URI"
|
||||
}
|
||||
} else {
|
||||
coreContext.toastMessage = "Invalide URI"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
76
Linphone/UI/Assistant/Viewmodel/QRScannerController.swift
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
import AVFoundation
|
||||
|
||||
class QRScannerController: UIViewController {
|
||||
var captureSession = AVCaptureSession()
|
||||
var videoPreviewLayer: AVCaptureVideoPreviewLayer?
|
||||
var qrCodeFrameView: UIView?
|
||||
|
||||
var delegate: AVCaptureMetadataOutputObjectsDelegate?
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
// Get the back-facing camera for capturing videos
|
||||
guard let captureDevice = AVCaptureDevice.default(.builtInWideAngleCamera, for: .video, position: .back) else {
|
||||
print("Failed to get the camera device")
|
||||
return
|
||||
}
|
||||
|
||||
let videoInput: AVCaptureDeviceInput
|
||||
|
||||
do {
|
||||
// Get an instance of the AVCaptureDeviceInput class using the previous device object.
|
||||
videoInput = try AVCaptureDeviceInput(device: captureDevice)
|
||||
|
||||
} catch {
|
||||
// If any error occurs, simply print it out and don't continue any more.
|
||||
print(error)
|
||||
return
|
||||
}
|
||||
|
||||
// Set the input device on the capture session.
|
||||
captureSession.addInput(videoInput)
|
||||
|
||||
// Initialize a AVCaptureMetadataOutput object and set it as the output device to the capture session.
|
||||
let captureMetadataOutput = AVCaptureMetadataOutput()
|
||||
captureSession.addOutput(captureMetadataOutput)
|
||||
|
||||
// Set delegate and use the default dispatch queue to execute the call back
|
||||
captureMetadataOutput.setMetadataObjectsDelegate(delegate, queue: DispatchQueue.main)
|
||||
captureMetadataOutput.metadataObjectTypes = [ .qr ]
|
||||
|
||||
// Initialize the video preview layer and add it as a sublayer to the viewPreview view's layer.
|
||||
videoPreviewLayer = AVCaptureVideoPreviewLayer(session: captureSession)
|
||||
videoPreviewLayer?.videoGravity = AVLayerVideoGravity.resizeAspectFill
|
||||
videoPreviewLayer?.frame = view.layer.bounds
|
||||
view.layer.addSublayer(videoPreviewLayer!)
|
||||
|
||||
// Start video capture.
|
||||
DispatchQueue.global(qos: .background).async {
|
||||
self.captureSession.startRunning()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
36
Linphone/UI/Main/Contacts/ContactsView.swift
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContactsView: View {
|
||||
var body: some View {
|
||||
VStack {
|
||||
Spacer()
|
||||
Image("linphone")
|
||||
.padding(.bottom, 20)
|
||||
Text("Contacts View")
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ContactsView()
|
||||
}
|
||||
50
Linphone/UI/Main/ContentView.swift
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
@ObservedObject private var coreContext = CoreContext.shared
|
||||
|
||||
var body: some View {
|
||||
if !sharedMainViewModel.welcomeViewDisplayed {
|
||||
WelcomeView(sharedMainViewModel: sharedMainViewModel)
|
||||
} else if coreContext.mCore.defaultAccount == nil || sharedMainViewModel.displayProfileMode {
|
||||
AssistantView(sharedMainViewModel: sharedMainViewModel)
|
||||
} else {
|
||||
TabView {
|
||||
ContactsView()
|
||||
.tabItem {
|
||||
Label("Contacts", image: "address-book")
|
||||
}
|
||||
|
||||
HistoryView()
|
||||
.tabItem {
|
||||
Label("Calls", image: "phone")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ContentView(sharedMainViewModel: SharedMainViewModel())
|
||||
}
|
||||
59
Linphone/UI/Main/Fragments/PopupLoadingView.swift
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct PopupLoadingView: View {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
VStack(alignment: .leading) {
|
||||
|
||||
ProgressView()
|
||||
.controlSize(.large)
|
||||
.progressViewStyle(CircularProgressViewStyle(tint: Color.orangeMain500))
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.top)
|
||||
.padding(.bottom)
|
||||
|
||||
Text("Opération en cours...")
|
||||
.tint(Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 15)
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 20)
|
||||
.background(.white)
|
||||
.cornerRadius(20)
|
||||
.padding(.horizontal)
|
||||
.frame(maxHeight: .infinity)
|
||||
.frame(maxWidth: .infinity)
|
||||
.shadow(color: Color.orangeMain500, radius: 0, x: 0, y: 2)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.position(x: geometry.size.width / 2, y: geometry.size.height / 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
PopupLoadingView(sharedMainViewModel: SharedMainViewModel())
|
||||
.background(.black.opacity(0.65))
|
||||
}
|
||||
111
Linphone/UI/Main/Fragments/PopupView.swift
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
import Photos
|
||||
|
||||
struct PopupView: View {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
|
||||
var permissionManager = PermissionManager.shared
|
||||
|
||||
@Binding var isShowPopup: Bool
|
||||
var title: Text
|
||||
var content: Text?
|
||||
|
||||
var titleFirstButton: Text?
|
||||
var actionFirstButton: () -> Void
|
||||
|
||||
var titleSecondButton: Text?
|
||||
var actionSecondButton: () -> Void
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
VStack(alignment: .leading) {
|
||||
title
|
||||
.default_text_style_800(styleSize: 16)
|
||||
.frame(alignment: .leading)
|
||||
.padding(.bottom, 2)
|
||||
|
||||
if content != nil {
|
||||
content
|
||||
.tint(Color.grayMain2c600)
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(.bottom, 20)
|
||||
}
|
||||
|
||||
if titleFirstButton != nil {
|
||||
Button(action: {
|
||||
actionFirstButton()
|
||||
}, label: {
|
||||
titleFirstButton
|
||||
.default_text_style_orange_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.cornerRadius(60)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 60)
|
||||
.inset(by: 0.5)
|
||||
.stroke(Color.orangeMain500, lineWidth: 1)
|
||||
)
|
||||
.padding(.bottom, 10)
|
||||
}
|
||||
|
||||
if titleSecondButton != nil {
|
||||
Button(action: {
|
||||
actionSecondButton()
|
||||
}, label: {
|
||||
titleSecondButton
|
||||
.default_text_style_white_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.background(Color.orangeMain500)
|
||||
.cornerRadius(60)
|
||||
}
|
||||
}
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 20)
|
||||
.background(.white)
|
||||
.cornerRadius(20)
|
||||
.padding(.horizontal)
|
||||
.frame(maxHeight: .infinity)
|
||||
.shadow(color: Color.orangeMain500, radius: 0, x: 0, y: 2)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.position(x: geometry.size.width / 2, y: geometry.size.height / 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
PopupView(sharedMainViewModel: SharedMainViewModel(), isShowPopup: .constant(true),
|
||||
title: Text("Title"),
|
||||
content: Text("Content"),
|
||||
titleFirstButton: Text("Deny all"),
|
||||
actionFirstButton: {},
|
||||
titleSecondButton: Text("Accept all"),
|
||||
actionSecondButton: {})
|
||||
.background(.black.opacity(0.65))
|
||||
}
|
||||
111
Linphone/UI/Main/Fragments/ToastView.swift
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ToastView: ViewModifier {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
|
||||
@Binding var isShowing: String
|
||||
|
||||
func body(content: Content) -> some View {
|
||||
ZStack {
|
||||
content
|
||||
toastView
|
||||
}
|
||||
}
|
||||
|
||||
private var toastView: some View {
|
||||
VStack {
|
||||
if !isShowing.isEmpty {
|
||||
HStack {
|
||||
Image(isShowing == "Successful" ? "success" : "danger")
|
||||
.resizable()
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
|
||||
switch isShowing {
|
||||
case "Successful":
|
||||
Text("QR code validated!")
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(Color.greenSuccess500)
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(8)
|
||||
|
||||
case "Failed":
|
||||
Text("Invalid QR code!")
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(Color.redDanger500)
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(8)
|
||||
|
||||
case "Invalide URI":
|
||||
Text("Invalide URI")
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(Color.redDanger500)
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(8)
|
||||
|
||||
case "Registration failed":
|
||||
Text("The user name or password is incorrects")
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(Color.redDanger500)
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(8)
|
||||
|
||||
default:
|
||||
Text("Error")
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundStyle(Color.redDanger500)
|
||||
.default_text_style(styleSize: 15)
|
||||
.padding(8)
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.background(.white)
|
||||
.cornerRadius(50)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 50)
|
||||
.inset(by: 0.5)
|
||||
.stroke(isShowing == "Successful" ? Color.greenSuccess500 : Color.redDanger500, lineWidth: 1)
|
||||
)
|
||||
.onTapGesture {
|
||||
isShowing = ""
|
||||
}
|
||||
.onAppear {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
|
||||
isShowing = ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.bottom, 18)
|
||||
.animation(.linear(duration: 0.3), value: isShowing)
|
||||
.transition(.opacity)
|
||||
}
|
||||
}
|
||||
|
||||
extension View {
|
||||
func toast(isShowing: Binding<String>) -> some View {
|
||||
self.modifier(ToastView(sharedMainViewModel: SharedMainViewModel(), isShowing: isShowing))
|
||||
}
|
||||
}
|
||||
39
Linphone/UI/Main/History/HistoryView.swift
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
HistoryView()
|
||||
}
|
||||
89
Linphone/UI/Main/Viewmodel/SharedMainViewModel.swift
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import linphonesw
|
||||
|
||||
class SharedMainViewModel: ObservableObject {
|
||||
|
||||
@Published var welcomeViewDisplayed = false
|
||||
@Published var generalTermsAccepted = false
|
||||
@Published var displayProfileMode = false
|
||||
|
||||
var maxWidth = 400.0
|
||||
|
||||
init() {
|
||||
let preferences = UserDefaults.standard
|
||||
|
||||
let welcomeViewKey = "welcome_view"
|
||||
|
||||
if preferences.object(forKey: welcomeViewKey) == nil {
|
||||
preferences.set(welcomeViewDisplayed, forKey: welcomeViewKey)
|
||||
} else {
|
||||
welcomeViewDisplayed = preferences.bool(forKey: welcomeViewKey)
|
||||
}
|
||||
|
||||
let generalTermsKey = "general_terms"
|
||||
|
||||
if preferences.object(forKey: generalTermsKey) == nil {
|
||||
preferences.set(generalTermsAccepted, forKey: generalTermsKey)
|
||||
} else {
|
||||
generalTermsAccepted = preferences.bool(forKey: generalTermsKey)
|
||||
}
|
||||
|
||||
let displayProfileModeKey = "display_profile_mode"
|
||||
|
||||
if preferences.object(forKey: displayProfileModeKey) == nil {
|
||||
preferences.set(displayProfileMode, forKey: displayProfileModeKey)
|
||||
} else {
|
||||
displayProfileMode = preferences.bool(forKey: displayProfileModeKey)
|
||||
}
|
||||
}
|
||||
|
||||
func changeWelcomeView() {
|
||||
let preferences = UserDefaults.standard
|
||||
|
||||
welcomeViewDisplayed = true
|
||||
let welcomeViewKey = "welcome_view"
|
||||
preferences.set(welcomeViewDisplayed, forKey: welcomeViewKey)
|
||||
}
|
||||
|
||||
func changeGeneralTerms() {
|
||||
let preferences = UserDefaults.standard
|
||||
|
||||
generalTermsAccepted = true
|
||||
let generalTermsKey = "general_terms"
|
||||
preferences.set(generalTermsAccepted, forKey: generalTermsKey)
|
||||
}
|
||||
|
||||
func changeDisplayProfileMode() {
|
||||
let preferences = UserDefaults.standard
|
||||
|
||||
displayProfileMode = true
|
||||
let displayProfileModeKey = "display_profile_mode"
|
||||
preferences.set(displayProfileMode, forKey: displayProfileModeKey)
|
||||
}
|
||||
|
||||
func changeHideProfileMode() {
|
||||
let preferences = UserDefaults.standard
|
||||
|
||||
displayProfileMode = false
|
||||
let displayProfileModeKey = "display_profile_mode"
|
||||
preferences.set(displayProfileMode, forKey: displayProfileModeKey)
|
||||
}
|
||||
}
|
||||
52
Linphone/UI/Welcome/Fragments/WelcomePage1Fragment.swift
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct WelcomePage1Fragment: View {
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Spacer()
|
||||
VStack {
|
||||
Image("linphone")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
.frame(width: 100, height: 100)
|
||||
Text("Linphone")
|
||||
.welcome_text_style_gray_800(styleSize: 30)
|
||||
.padding(.bottom, 20)
|
||||
Text("Une application de communication **sécurisée**, **open source** et **française**.")
|
||||
.welcome_text_style_gray(styleSize: 15)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
}
|
||||
Spacer()
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.horizontal, 20)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
WelcomePage1Fragment()
|
||||
}
|
||||
51
Linphone/UI/Welcome/Fragments/WelcomePage2Fragment.swift
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct WelcomePage2Fragment: View {
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Spacer()
|
||||
VStack {
|
||||
Image("secure-image")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
.frame(width: 70, height: 100)
|
||||
Text("Sécurisé")
|
||||
.welcome_text_style_gray_800(styleSize: 30)
|
||||
.padding(.bottom, 20)
|
||||
Text("Vos communications sont en sécurité grâce aux **Chiffrement de bout en bout**.")
|
||||
.welcome_text_style_gray(styleSize: 15)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
}
|
||||
Spacer()
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
WelcomePage2Fragment()
|
||||
}
|
||||
51
Linphone/UI/Welcome/Fragments/WelcomePage3Fragment.swift
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
struct WelcomePage3Fragment: View {
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
Spacer()
|
||||
VStack {
|
||||
Image("open-source")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
.frame(width: 100, height: 100)
|
||||
Text("Open source")
|
||||
.welcome_text_style_gray_800(styleSize: 30)
|
||||
.padding(.bottom, 20)
|
||||
Text("Une application open source et un **service gratuit** depuis **2001**.")
|
||||
.welcome_text_style_gray(styleSize: 15)
|
||||
.multilineTextAlignment(.center)
|
||||
|
||||
}
|
||||
Spacer()
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
WelcomePage3Fragment()
|
||||
}
|
||||
161
Linphone/UI/Welcome/WelcomeView.swift
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct WelcomeView: View {
|
||||
|
||||
@ObservedObject var sharedMainViewModel: SharedMainViewModel
|
||||
|
||||
@State private var index = 0
|
||||
|
||||
var body: some View {
|
||||
NavigationView {
|
||||
GeometryReader { geometry in
|
||||
ScrollView {
|
||||
VStack {
|
||||
ZStack {
|
||||
Image("mountain")
|
||||
.resizable()
|
||||
.scaledToFill()
|
||||
.frame(width: geometry.size.width, height: 100)
|
||||
.clipped()
|
||||
|
||||
VStack(alignment: .trailing) {
|
||||
NavigationLink(destination: {
|
||||
PermissionsFragment(sharedMainViewModel: sharedMainViewModel)
|
||||
}, label: {
|
||||
Text("Skip")
|
||||
.underline()
|
||||
.default_text_style_600(styleSize: 15)
|
||||
|
||||
})
|
||||
.padding(.top, -35)
|
||||
.padding(.trailing, 20)
|
||||
.simultaneousGesture(
|
||||
TapGesture().onEnded {
|
||||
self.index = 2
|
||||
}
|
||||
)
|
||||
Text("Welcome")
|
||||
.welcome_text_style_white_800(styleSize: 35)
|
||||
.padding(.trailing, 100)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.bottom, -25)
|
||||
Text("to Linphone")
|
||||
.welcome_text_style_white_800(styleSize: 25)
|
||||
.padding(.leading, 100)
|
||||
.frame(width: geometry.size.width)
|
||||
.padding(.bottom, -10)
|
||||
}
|
||||
.frame(width: geometry.size.width)
|
||||
}
|
||||
.padding(.top, 35)
|
||||
.padding(.bottom, 10)
|
||||
|
||||
Spacer()
|
||||
|
||||
VStack {
|
||||
TabView(selection: $index) {
|
||||
ForEach((0..<3), id: \.self) { index in
|
||||
if index == 0 {
|
||||
WelcomePage1Fragment()
|
||||
} else if index == 1 {
|
||||
WelcomePage2Fragment()
|
||||
} else if index == 2 {
|
||||
WelcomePage3Fragment()
|
||||
} else {
|
||||
WelcomePage1Fragment()
|
||||
}
|
||||
}
|
||||
}
|
||||
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))
|
||||
.frame(minHeight: 300)
|
||||
.onAppear {
|
||||
setupAppearance()
|
||||
}
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
if index == 2 {
|
||||
NavigationLink(destination: {
|
||||
PermissionsFragment(sharedMainViewModel: sharedMainViewModel)
|
||||
}, label: {
|
||||
Text("Start")
|
||||
.default_text_style_white_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.background(Color.orangeMain500)
|
||||
.cornerRadius(60)
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
} else {
|
||||
Button(action: {
|
||||
withAnimation {
|
||||
index += 1
|
||||
}
|
||||
}, label: {
|
||||
Text("Next")
|
||||
.default_text_style_white_600(styleSize: 20)
|
||||
.frame(height: 35)
|
||||
.frame(maxWidth: .infinity)
|
||||
})
|
||||
.padding(.horizontal, 20)
|
||||
.padding(.vertical, 10)
|
||||
.background(Color.orangeMain500)
|
||||
.cornerRadius(60)
|
||||
.padding(.horizontal)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
|
||||
.frame(maxWidth: sharedMainViewModel.maxWidth)
|
||||
}
|
||||
}
|
||||
.frame(minHeight: geometry.size.height)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func setupAppearance() {
|
||||
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor(Color.orangeMain500)
|
||||
if #available(iOS 16.0, *) {
|
||||
|
||||
let dotCurrentImage = UIImage(named: "current-dot")
|
||||
let dotImage = UIImage(named: "dot")
|
||||
|
||||
UIPageControl.appearance().setCurrentPageIndicatorImage(dotCurrentImage, forPage: 0)
|
||||
UIPageControl.appearance().setCurrentPageIndicatorImage(dotCurrentImage, forPage: 1)
|
||||
UIPageControl.appearance().setCurrentPageIndicatorImage(dotCurrentImage, forPage: 2)
|
||||
|
||||
UIPageControl.appearance().setIndicatorImage(dotImage, forPage: 0)
|
||||
UIPageControl.appearance().setIndicatorImage(dotImage, forPage: 1)
|
||||
UIPageControl.appearance().setIndicatorImage(dotImage, forPage: 2)
|
||||
}
|
||||
UIPageControl.appearance().pageIndicatorTintColor = UIColor(Color.grayMain2c200)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
WelcomeView(sharedMainViewModel: SharedMainViewModel())
|
||||
}
|
||||
91
Linphone/Utils/ColorExtension.swift
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
extension Color {
|
||||
|
||||
static let transparentColor = Color(hex: "#00000000")
|
||||
static let black = Color(hex: "#000000")
|
||||
static let white = Color(hex: "#FFFFFF")
|
||||
|
||||
static let orangeMain700 = Color(hex: "#B72D00")
|
||||
static let orangeMain500 = Color(hex: "#FF5E00")
|
||||
static let orangeMain300 = Color(hex: "#FFB266")
|
||||
static let orangeMain100 = Color(hex: "#FFEACB")
|
||||
static let orangeMain100Alpha50 = Color(hex: "#80FFEACB")
|
||||
|
||||
static let grayMain2c800 = Color(hex: "#22334D")
|
||||
static let grayMain2c800Alpha65 = Color(hex: "#A622334D")
|
||||
static let grayMain2c700 = Color(hex: "#364860")
|
||||
static let grayMain2c600 = Color(hex: "#4E6074")
|
||||
static let grayMain2c500 = Color(hex: "#6C7A87")
|
||||
static let grayMain2c400 = Color(hex: "#9AABB5")
|
||||
static let grayMain2c300 = Color(hex: "#C0D1D9")
|
||||
static let grayMain2c200 = Color(hex: "#DFECF2")
|
||||
static let grayMain2c100 = Color(hex: "#EEF6F8")
|
||||
|
||||
static let gray100 = Color(hex: "#F9F9F9")
|
||||
static let gray200 = Color(hex: "#EDEDED")
|
||||
static let gray300 = Color(hex: "#C9C9C9")
|
||||
static let gray400 = Color(hex: "#949494")
|
||||
static let gray500 = Color(hex: "#4E4E4E")
|
||||
static let gray600 = Color(hex: "#2E3030")
|
||||
static let gray900 = Color(hex: "#070707")
|
||||
|
||||
static let redDanger200 = Color(hex: "#F5CCBE")
|
||||
static let redDanger500 = Color(hex: "#DD5F5F")
|
||||
static let redDanger700 = Color(hex: "#9E3548")
|
||||
|
||||
static let greenSuccess500 = Color(hex: "#4FAE80")
|
||||
static let greenSuccess700 = Color(hex: "#377D71")
|
||||
static let greenSuccess200 = Color(hex: "#ACF5C1")
|
||||
|
||||
static let blueInfo500 = Color(hex: "#4AA8FF")
|
||||
|
||||
static let orangeWarning600 = Color(hex: "#DBB820")
|
||||
|
||||
static let orangeAway = Color(hex: "#FFA645")
|
||||
|
||||
init(hex: String) {
|
||||
let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
|
||||
var int: UInt64 = 0
|
||||
Scanner(string: hex).scanHexInt64(&int)
|
||||
let alpha, red, green, blue: UInt64
|
||||
switch hex.count {
|
||||
case 3: // RGB (12-bit)
|
||||
(alpha, red, green, blue) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17)
|
||||
case 6: // RGB (24-bit)
|
||||
(alpha, red, green, blue) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF)
|
||||
case 8: // ARGB (32-bit)
|
||||
(alpha, red, green, blue) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF)
|
||||
default:
|
||||
(alpha, red, green, blue) = (1, 1, 1, 0)
|
||||
}
|
||||
|
||||
self.init(
|
||||
.sRGB,
|
||||
red: Double(red) / 255,
|
||||
green: Double(green) / 255,
|
||||
blue: Double(blue) / 255,
|
||||
opacity: Double(alpha) / 255
|
||||
)
|
||||
}
|
||||
}
|
||||
47
Linphone/Utils/PermissionManager.swift
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import Photos
|
||||
|
||||
class PermissionManager: ObservableObject {
|
||||
|
||||
static let shared = PermissionManager()
|
||||
|
||||
@Published var photoLibraryPermissionGranted = false
|
||||
@Published var cameraPermissionGranted = false
|
||||
|
||||
private init() {}
|
||||
|
||||
func photoLibraryRequestPermission() {
|
||||
PHPhotoLibrary.requestAuthorization(for: .readWrite, handler: {status in
|
||||
DispatchQueue.main.async {
|
||||
self.photoLibraryPermissionGranted = (status == .authorized || status == .limited || status == .restricted)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func cameraRequestPermission() {
|
||||
AVCaptureDevice.requestAccess(for: .video, completionHandler: {accessGranted in
|
||||
DispatchQueue.main.async {
|
||||
self.cameraPermissionGranted = accessGranted
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
139
Linphone/Utils/TextExtension.swift
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import Foundation
|
||||
import SwiftUI
|
||||
|
||||
extension View {
|
||||
|
||||
func default_text_style_300(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Light", size: styleSize))
|
||||
.foregroundStyle(Color.grayMain2c600)
|
||||
}
|
||||
|
||||
func default_text_style(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Regular", size: styleSize))
|
||||
.foregroundStyle(Color.grayMain2c600)
|
||||
}
|
||||
|
||||
func default_text_style_500(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Medium", size: styleSize))
|
||||
.foregroundStyle(Color.grayMain2c600)
|
||||
}
|
||||
|
||||
func default_text_style_600(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-SemiBold", size: styleSize))
|
||||
.foregroundStyle(Color.grayMain2c600)
|
||||
}
|
||||
|
||||
func default_text_style_700(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Bold", size: styleSize))
|
||||
.foregroundStyle(Color.grayMain2c600)
|
||||
}
|
||||
|
||||
func default_text_style_800(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
|
||||
.foregroundStyle(Color.grayMain2c600)
|
||||
}
|
||||
|
||||
func default_text_style_white_300(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Light", size: styleSize))
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
|
||||
func default_text_style_white(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Regular", size: styleSize))
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
|
||||
func default_text_style_white_500(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Medium", size: styleSize))
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
|
||||
func default_text_style_white_600(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-SemiBold", size: styleSize))
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
|
||||
func default_text_style_white_700(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Bold", size: styleSize))
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
|
||||
func default_text_style_white_800(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
|
||||
func default_text_style_orange_300(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Light", size: styleSize))
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
}
|
||||
|
||||
func default_text_style_orange(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Regular", size: styleSize))
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
}
|
||||
|
||||
func default_text_style_orange_500(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Medium", size: styleSize))
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
}
|
||||
|
||||
func default_text_style_orange_600(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-SemiBold", size: styleSize))
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
}
|
||||
|
||||
func default_text_style_orange_700(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Bold", size: styleSize))
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
}
|
||||
|
||||
func default_text_style_orange_800(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
|
||||
.foregroundStyle(Color.orangeMain500)
|
||||
}
|
||||
|
||||
func welcome_text_style_white_800(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
|
||||
.foregroundStyle(Color.white)
|
||||
}
|
||||
|
||||
func welcome_text_style_gray_800(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
|
||||
.foregroundStyle(Color.grayMain2c600)
|
||||
}
|
||||
|
||||
func welcome_text_style_gray(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Regular", size: styleSize))
|
||||
.foregroundStyle(Color.grayMain2c600)
|
||||
}
|
||||
|
||||
func profile_mode_text_style_gray_800(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
|
||||
.foregroundStyle(Color.gray900)
|
||||
}
|
||||
|
||||
func profile_mode_text_style_gray(styleSize: CGFloat) -> some View {
|
||||
self.font(Font.custom("NotoSans-Regular", size: styleSize))
|
||||
.foregroundStyle(Color.grayMain2c600)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import linphonesw
|
||||
|
||||
class CoreContext : ObservableObject {
|
||||
|
||||
static let shared = CoreContext()
|
||||
|
||||
var mCore: Core!
|
||||
var mRegistrationDelegate : CoreDelegate!
|
||||
|
||||
var coreVersion: String = Core.getVersion
|
||||
@Published var loggedIn: Bool = false
|
||||
|
||||
private init() {
|
||||
|
||||
LoggingService.Instance.logLevel = LogLevel.Debug
|
||||
|
||||
try? mCore = Factory.Instance.createCore(configPath: "", factoryConfigPath: "", systemContext: nil)
|
||||
try? mCore.start()
|
||||
|
||||
// Create a Core listener to listen for the callback we need
|
||||
// In this case, we want to know about the account registration status
|
||||
mRegistrationDelegate = CoreDelegateStub(onAccountRegistrationStateChanged: { (core: Core, account: Account, state: RegistrationState, message: String) in
|
||||
|
||||
// If account has been configured correctly, we will go through Progress and Ok states
|
||||
// Otherwise, we will be Failed.
|
||||
NSLog("New registration state is \(state) for user id \( String(describing: account.params?.identityAddress?.asString()))\n")
|
||||
if (state == .Ok) {
|
||||
self.loggedIn = true
|
||||
} else if (state == .Cleared) {
|
||||
self.loggedIn = false
|
||||
}
|
||||
})
|
||||
mCore.addDelegate(delegate: mRegistrationDelegate)
|
||||
}
|
||||
}
|
||||
BIN
Linphone/ui/.DS_Store
vendored
|
|
@ -1,90 +0,0 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct AssistantView: View {
|
||||
|
||||
var coreContext = CoreContext.shared
|
||||
@ObservedObject var accountLoginViewModel : AccountLoginViewModel
|
||||
|
||||
var body: some View {
|
||||
VStack {
|
||||
HStack {
|
||||
Text("Username:")
|
||||
.font(.title)
|
||||
TextField("", text : $accountLoginViewModel.username)
|
||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||
.disabled(coreContext.loggedIn)
|
||||
}
|
||||
HStack {
|
||||
Text("Password:")
|
||||
.font(.title)
|
||||
TextField("", text : $accountLoginViewModel.passwd)
|
||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||
.disabled(coreContext.loggedIn)
|
||||
}
|
||||
HStack {
|
||||
Text("Domain:")
|
||||
.font(.title)
|
||||
TextField("", text : $accountLoginViewModel.domain)
|
||||
.textFieldStyle(RoundedBorderTextFieldStyle())
|
||||
.disabled(coreContext.loggedIn)
|
||||
}
|
||||
Picker(selection: $accountLoginViewModel.transportType, label: Text("Transport:")) {
|
||||
Text("TLS").tag("TLS")
|
||||
Text("TCP").tag("TCP")
|
||||
Text("UDP").tag("UDP")
|
||||
}.pickerStyle(SegmentedPickerStyle()).padding()
|
||||
VStack {
|
||||
HStack {
|
||||
Button(action: {
|
||||
if (self.coreContext.loggedIn)
|
||||
{
|
||||
self.accountLoginViewModel.unregister()
|
||||
self.accountLoginViewModel.delete()
|
||||
} else {
|
||||
self.accountLoginViewModel.login()
|
||||
}
|
||||
})
|
||||
{
|
||||
Text(coreContext.loggedIn ? "Log out & \ndelete account" : "Create & \nlog in account")
|
||||
.font(.largeTitle)
|
||||
.foregroundColor(Color.white)
|
||||
.frame(width: 220.0, height: 90)
|
||||
.background(Color.gray)
|
||||
}
|
||||
|
||||
}
|
||||
HStack {
|
||||
Text("Login State : ")
|
||||
.font(.footnote)
|
||||
Text(coreContext.loggedIn ? "Looged in" : "Unregistered")
|
||||
.font(.footnote)
|
||||
.foregroundColor(coreContext.loggedIn ? Color.green : Color.black)
|
||||
}.padding(.top, 10.0)
|
||||
}
|
||||
Group {
|
||||
Spacer()
|
||||
Text("Core Version is \(coreContext.coreVersion)")
|
||||
}
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ContentView: View {
|
||||
|
||||
var body: some View {
|
||||
AssistantView(accountLoginViewModel: AccountLoginViewModel())
|
||||
}
|
||||
}
|
||||
|
||||
struct ContentView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
AssistantView(accountLoginViewModel: AccountLoginViewModel())
|
||||
}
|
||||
}
|
||||
8
Podfile
|
|
@ -23,3 +23,11 @@ target 'Linphone' do
|
|||
basic_pods
|
||||
|
||||
end
|
||||
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '15.0'
|
||||
end
|
||||
end
|
||||
end
|
||||