Add request permission view

This commit is contained in:
Benoit Martins 2023-10-11 23:39:55 +02:00
parent adc8b00d6d
commit ad09a2511a
13 changed files with 481 additions and 146 deletions

View file

@ -7,7 +7,6 @@
objects = {
/* Begin PBXBuildFile section */
0DF2F35F000C9BBAE8FCB4A0 /* Pods_Linphone.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C92C314A5427A62F953EB70 /* Pods_Linphone.framework */; };
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 */; };
@ -43,13 +42,14 @@
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 */
3A132937ACADB95696E2F906 /* 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>"; };
3E2758142B8F42856C3A34DF /* 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>"; };
7C92C314A5427A62F953EB70 /* Pods_Linphone.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Linphone.framework; sourceTree = BUILT_PRODUCTS_DIR; };
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>"; };
@ -88,7 +88,9 @@
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 */
@ -96,17 +98,17 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0DF2F35F000C9BBAE8FCB4A0 /* Pods_Linphone.framework in Frameworks */,
F4BB8DFBA0FF08430EBA9351 /* Pods_Linphone.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
1110B8CBF3C1BFD76F8BBFB2 /* Frameworks */ = {
52EFCC310713B3CA01062945 /* Frameworks */ = {
isa = PBXGroup;
children = (
7C92C314A5427A62F953EB70 /* Pods_Linphone.framework */,
6F5B27C5576B1EAED2F205EB /* Pods_Linphone.framework */,
);
name = Frameworks;
sourceTree = "<group>";
@ -114,8 +116,8 @@
A31AF2AB8C6A3D7B7EA3B424 /* Pods */ = {
isa = PBXGroup;
children = (
3A132937ACADB95696E2F906 /* Pods-Linphone.debug.xcconfig */,
3E2758142B8F42856C3A34DF /* Pods-Linphone.release.xcconfig */,
377E0B5C2B1F38192E694334 /* Pods-Linphone.debug.xcconfig */,
F76FB87556A3109F61F9E2D5 /* Pods-Linphone.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@ -136,7 +138,7 @@
D719ABB52ABC67BF00B41C10 /* Linphone */,
D719ABB42ABC67BF00B41C10 /* Products */,
A31AF2AB8C6A3D7B7EA3B424 /* Pods */,
1110B8CBF3C1BFD76F8BBFB2 /* Frameworks */,
52EFCC310713B3CA01062945 /* Frameworks */,
);
sourceTree = "<group>";
};
@ -294,11 +296,12 @@
isa = PBXGroup;
children = (
D7DA67612ACCB2FA00E95002 /* LoginFragment.swift */,
D7EAACCE2AD6ED8000AA6A8A /* PermissionsFragment.swift */,
D7DA67632ACCB31700E95002 /* ProfileModeFragment.swift */,
D748BF2B2ACD82D2004844EB /* ThirdPartySipAccountLoginFragment.swift */,
D748BF2D2ACD82E7004844EB /* ThirdPartySipAccountWarningFragment.swift */,
D723432F2ACEFEF8009AA24E /* QrCodeScannerFragment.swift */,
D7FB55102AD447FD00A5AB15 /* RegisterFragment.swift */,
D748BF2B2ACD82D2004844EB /* ThirdPartySipAccountLoginFragment.swift */,
D748BF2D2ACD82E7004844EB /* ThirdPartySipAccountWarningFragment.swift */,
);
path = Fragments;
sourceTree = "<group>";
@ -310,12 +313,12 @@
isa = PBXNativeTarget;
buildConfigurationList = D719ABC22ABC67BF00B41C10 /* Build configuration list for PBXNativeTarget "Linphone" */;
buildPhases = (
EAE6BD221624F991B659AC2E /* [CP] Check Pods Manifest.lock */,
6FE8573A5CFC1DA89D3172B5 /* [CP] Check Pods Manifest.lock */,
D719ABAF2ABC67BF00B41C10 /* Sources */,
D719ABB02ABC67BF00B41C10 /* Frameworks */,
D719ABB12ABC67BF00B41C10 /* Resources */,
D7FB55122AD53FE200A5AB15 /* Run Script */,
A35AE8ABA69001024776F16C /* [CP] Embed Pods Frameworks */,
230129DD87A6EBB04DF458AD /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@ -379,7 +382,7 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
A35AE8ABA69001024776F16C /* [CP] Embed Pods Frameworks */ = {
230129DD87A6EBB04DF458AD /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -396,26 +399,7 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Linphone/Pods-Linphone-frameworks.sh\"\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";
};
EAE6BD221624F991B659AC2E /* [CP] Check Pods Manifest.lock */ = {
6FE8573A5CFC1DA89D3172B5 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@ -437,6 +421,25 @@
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 */
@ -448,6 +451,7 @@
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 */,
@ -592,7 +596,7 @@
};
D719ABC32ABC67BF00B41C10 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3A132937ACADB95696E2F906 /* Pods-Linphone.debug.xcconfig */;
baseConfigurationReference = 377E0B5C2B1F38192E694334 /* Pods-Linphone.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@ -636,7 +640,7 @@
};
D719ABC42ABC67BF00B41C10 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 3E2758142B8F42856C3A34DF /* Pods-Linphone.release.xcconfig */;
baseConfigurationReference = F76FB87556A3109F61F9E2D5 /* Pods-Linphone.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;

View file

@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "linphone.svg",
"filename" : "Linphone.svg",
"idiom" : "universal",
"scale" : "1x"
},

View 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
}
}

View 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

View 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
}
}

View 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

View 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
}
}

View 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

View file

@ -24,6 +24,18 @@
},
"[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",
@ -121,12 +133,18 @@
},
"Continue" : {
},
"D'accord" : {
},
"Default" : {
},
"Default mode" : {
},
"Demande dautorisations" : {
},
"Deny all" : {
@ -201,6 +219,12 @@
},
"Personnalize your profil mode" : {
},
"Plus tard" : {
},
"Pour vous permettre de vous profitez pleinement de Linphone nous avons besoin des autorisations suivantes :" : {
},
"QR code validated!" : {

View file

@ -34,7 +34,6 @@ struct LoginFragment: View {
@State private var linkActive = ""
@State private var isLinkQRActive = false
@State private var isLinkSIPActive = false
@State private var isLinkREGActive = false
@ -155,7 +154,7 @@ struct LoginFragment: View {
}
.padding(.bottom, 10)
NavigationLink(isActive: $isLinkQRActive, destination: {
NavigationLink(destination: {
QrCodeScannerFragment()
}, label: {
HStack {
@ -172,7 +171,6 @@ struct LoginFragment: View {
.frame(maxWidth: .infinity)
})
.disabled(!sharedMainViewModel.generalTermsAccepted)
.padding(.horizontal, 20)
.padding(.vertical, 10)
.cornerRadius(60)
@ -182,18 +180,6 @@ struct LoginFragment: View {
.stroke(Color.orangeMain500, lineWidth: 1)
)
.padding(.bottom)
.simultaneousGesture(
TapGesture().onEnded {
self.linkActive = "QR"
if !sharedMainViewModel.generalTermsAccepted {
withAnimation {
self.isShowPopup.toggle()
}
} else {
self.isLinkQRActive = true
}
}
)
NavigationLink(isActive: $isLinkSIPActive, destination: {
ThirdPartySipAccountWarningFragment(sharedMainViewModel: sharedMainViewModel, accountLoginViewModel: accountLoginViewModel)
@ -320,8 +306,6 @@ struct LoginFragment: View {
sharedMainViewModel.changeGeneralTerms()
self.isShowPopup.toggle()
switch linkActive {
case "QR":
self.isLinkQRActive = true
case "SIP":
self.isLinkSIPActive = true
case "REG":

View 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 dautorisations")
.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())
}

View file

@ -1,9 +1,21 @@
//
// RegisterFragment.swift
// Linphone
//
// Created by Benoît Martins on 09/10/2023.
//
/*
* 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

View file

@ -23,106 +23,118 @@ struct WelcomeView: View {
@ObservedObject var sharedMainViewModel: SharedMainViewModel
var permissionManager = PermissionManager.shared
@State private var index = 0
var body: some View {
GeometryReader { geometry in
ScrollView {
VStack {
ZStack {
Image("mountain")
.resizable()
.scaledToFill()
.frame(width: geometry.size.width, height: 100)
.clipped()
NavigationView {
GeometryReader { geometry in
ScrollView {
VStack {
ZStack {
Image("mountain")
.resizable()
.scaledToFill()
.frame(width: geometry.size.width, height: 100)
.clipped()
VStack(alignment: .trailing) {
Text("Skip")
.underline()
.default_text_style_600(styleSize: 15)
VStack(alignment: .trailing) {
NavigationLink(destination: {
PermissionsFragment(sharedMainViewModel: sharedMainViewModel)
}, label: {
Text("Skip")
.underline()
.default_text_style_600(styleSize: 15)
})
.padding(.top, -35)
.padding(.trailing, 20)
.onTapGesture {
withAnimation {
.simultaneousGesture(
TapGesture().onEnded {
self.index = 2
permissionManager.cameraRequestPermission()
}
)
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()
}
}
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)
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))
.frame(minHeight: 300)
.onAppear {
setupAppearance()
}
}
.frame(width: geometry.size.width)
}
.padding(.top, 35)
.padding(.bottom, 10)
Spacer()
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()
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
}
}
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))
.frame(minHeight: 300)
.onAppear {
setupAppearance()
}, 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)
}
}
Spacer()
Button(action: {
if index < 2 {
withAnimation {
index += 1
}
} else if index == 2 {
permissionManager.cameraRequestPermission()
}
}, label: {
Text(index == 2 ? "Start" : "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)
}
.frame(minHeight: geometry.size.height)
}
}
.onReceive(permissionManager.$cameraPermissionGranted, perform: { (granted) in
if granted {
withAnimation {
sharedMainViewModel.changeWelcomeView()
}
}
})
}
func setupAppearance() {