Add Welcome View

This commit is contained in:
Benoit Martins 2023-10-01 22:20:30 +02:00
parent e0d77cdb06
commit ae5f3a6c41
39 changed files with 983 additions and 152 deletions

View file

@ -18,6 +18,15 @@
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 */; };
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 */; };
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 */; };
@ -42,6 +51,15 @@
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>"; };
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>"; };
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>"; };
@ -82,13 +100,14 @@
path = Pods;
sourceTree = "<group>";
};
D717071C2AC591EF0037746F /* utils */ = {
D717071C2AC591EF0037746F /* Utils */ = {
isa = PBXGroup;
children = (
D717071D2AC5922E0037746F /* ColorExtension.swift */,
D717071F2AC5989C0037746F /* TextExtension.swift */,
D74C9D002ACB098C0021626A /* PermissionManager.swift */,
);
path = utils;
path = Utils;
sourceTree = "<group>";
};
D719ABAA2ABC67BF00B41C10 = {
@ -112,10 +131,11 @@
D719ABB52ABC67BF00B41C10 /* Linphone */ = {
isa = PBXGroup;
children = (
D719ABC72ABC6FB200B41C10 /* core */,
D719ABC52ABC6EE800B41C10 /* ui */,
D717071C2AC591EF0037746F /* utils */,
D7A03FC52ACC458A0081A588 /* SplashScreen.swift */,
D719ABB62ABC67BF00B41C10 /* LinphoneApp.swift */,
D719ABC72ABC6FB200B41C10 /* Core */,
D719ABC52ABC6EE800B41C10 /* UI */,
D717071C2AC591EF0037746F /* Utils */,
D719ABBA2ABC67BF00B41C10 /* Assets.xcassets */,
D719ABBC2ABC67BF00B41C10 /* Linphone.entitlements */,
D7A2EDDA2AC19EEC005D90FC /* Info.plist */,
@ -134,55 +154,102 @@
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 = (
D7A2EDD42AC180FE005D90FC /* 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 */,
D719ABCD2ABC777600B41C10 /* Viewmodel */,
D719ABCB2ABC769C00B41C10 /* AssistantView.swift */,
);
path = assistant;
path = Assistant;
sourceTree = "<group>";
};
D719ABCD2ABC777600B41C10 /* viewmodel */ = {
D719ABCD2ABC777600B41C10 /* Viewmodel */ = {
isa = PBXGroup;
children = (
D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */,
);
path = viewmodel;
path = Viewmodel;
sourceTree = "<group>";
};
D7A2EDD42AC180FE005D90FC /* viewmodel */ = {
D74C9CF62ACACEB70021626A /* Fragments */ = {
isa = PBXGroup;
children = (
D74C9CF72ACACECE0021626A /* WelcomePage1Fragment.swift */,
D74C9CF92ACACF2D0021626A /* WelcomePage2Fragment.swift */,
D74C9CFB2ACACF370021626A /* WelcomePage3Fragment.swift */,
);
path = Fragments;
sourceTree = "<group>";
};
D74C9CFD2ACAEC150021626A /* Fragments */ = {
isa = PBXGroup;
children = (
D74C9CFE2ACAEC5E0021626A /* PopupView.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;
path = Viewmodel;
sourceTree = "<group>";
};
D7D24D0C2AC1B4C700C6F35B /* Fonts */ = {
@ -322,11 +389,20 @@
D71707202AC5989C0037746F /* TextExtension.swift in Sources */,
D719ABB92ABC67BF00B41C10 /* ContentView.swift in Sources */,
D719ABC92ABC6FD700B41C10 /* CoreContext.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 */,
D74C9CF82ACACECE0021626A /* WelcomePage1Fragment.swift in Sources */,
D717071E2AC5922E0037746F /* ColorExtension.swift in Sources */,
D74C9CFC2ACACF370021626A /* WelcomePage3Fragment.swift in Sources */,
D719ABCC2ABC769C00B41C10 /* AssistantView.swift in Sources */,
D74C9CFA2ACACF2D0021626A /* WelcomePage2Fragment.swift in Sources */,
D74C9CFF2ACAEC5E0021626A /* PopupView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -452,6 +528,7 @@
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;
@ -462,6 +539,7 @@
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Linphone/Info.plist;
INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "";
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
@ -493,6 +571,7 @@
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;
@ -503,6 +582,7 @@
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Linphone/Info.plist;
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

Binary file not shown.

View file

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

View 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

View file

@ -1,101 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="481.54166mm"
height="54.655354mm"
viewBox="0 0 481.54166 54.655354"
version="1.1"
id="svg8"
inkscape:version="1.0rc1 (09960d6f05, 2020-04-09)"
sodipodi:docname="footer.svg">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.98"
inkscape:cx="104.62963"
inkscape:cy="93.881695"
inkscape:document-units="mm"
inkscape:current-layer="g26"
inkscape:document-rotation="0"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1920"
inkscape:window-height="1027"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1">
<sodipodi:guide
position="8.0766935e-06,54.504169"
orientation="1,0"
id="guide42" />
<sodipodi:guide
position="481.54165,-9.0933001e-07"
orientation="1,0"
id="guide44" />
<sodipodi:guide
position="1.0000693e-05,34.883781"
orientation="0,-1"
id="guide887" />
<sodipodi:guide
position="1.0000693e-05,3.0868056"
orientation="0,-1"
id="guide889" />
</sodipodi:namedview>
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(327.89435,-68.791666)">
<g
id="g26"
transform="translate(9.2773437e-7,54.308819)">
<path
style="fill:#ffb9a0;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -327.89434,14.634035 121.11229,27.528297 62.6859,-9.362178 26.45833,-18.317307 55.766026,24.423076 92.807691,-24.016025 81.124273,17.952698 41.58713,-17.923294 1e-5,54.218899 h -481.54165 z"
id="path36"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccccccccccc" />
<path
style="fill:#ff9e79;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -327.89434,34.25442 109.3078,-14.886957 34.19231,10.875621 30.52885,-1.10639 33.3782,11.397435 53.560418,-14.363353 62.3326405,19.188794 40.0075805,-14.594673 66.241771,22.215676 39.77373,-25.273923 12.21834,6.54777 1e-5,34.883781 -481.54166,1e-6 z"
id="path38"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccccccc" />
<path
style="fill:#ff723b;fill-opacity:1;stroke:none;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m -327.89434,69.138201 0,-3.086806 58.83344,-21.446755 69.19693,6.163152 31.34474,-3.720844 25.64423,9.362181 79.375,7.733974 58.9058785,-18.783533 50.7612655,3.720841 37.576541,-14.825991 43.835825,14.201899 26.06779,17.595076 1e-5,3.086806 z"
id="path40"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccccccccccc" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 3.8 KiB

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

View 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

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

View 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

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

View 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

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

View 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

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

View 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

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

View 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

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

View 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

View file

@ -19,7 +19,7 @@
import linphonesw
class CoreContext : ObservableObject {
final class CoreContext : ObservableObject {
static let shared = CoreContext()
@ -29,11 +29,14 @@ class CoreContext : ObservableObject {
var coreVersion: String = Core.getVersion
@Published var loggedIn : Bool = false
private init() {
private init() {}
func initialiseCore() async throws {
LoggingService.Instance.logLevel = LogLevel.Debug
try? mCore = Factory.Instance.createCore(configPath: "", factoryConfigPath: "", systemContext: nil)
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

View file

@ -11,5 +11,10 @@
<string>NotoSans-Bold.ttf</string>
<string>NotoSans-ExtraBold.ttf</string>
</array>
<key>UILaunchScreen</key>
<dict>
<key>UIImageName</key>
<string>linphone</string>
</dict>
</dict>
</plist>

View file

@ -21,9 +21,16 @@ import SwiftUI
@main
struct LinphoneApp: App {
@State private var isActive = false
var body: some Scene {
WindowGroup {
if isActive {
ContentView(sharedMainViewModel: SharedMainViewModel())
}else {
SplashScreen(isActive: $isActive)
}
}
}
}

View file

@ -6,6 +6,12 @@
},
" or " : {
},
"[nos conditions dutilisation](https://linphone.org/general-terms)" : {
},
"[notre politique de confidentialité](https://linphone.org/privacy-policy)" : {
},
"%lld Book (Example)" : {
"extractionState" : "manual",
@ -59,6 +65,9 @@
}
}
}
},
"Accept all" : {
},
"assistant_account_login" : {
"extractionState" : "manual",
@ -77,14 +86,51 @@
}
}
},
"Calls" : {
},
"Conditions de service" : {
},
"Contacts" : {
},
"Contacts View" : {
},
"Deny all" : {
},
"En continuant, vous acceptez ces conditions, %@ et %@." : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "En continuant, vous acceptez ces conditions, %1$@ et %2$@."
}
}
}
},
"Forgotten password?" : {
},
"History View" : {
},
"Linphone" : {
},
"Log out" : {
},
"Next" : {
},
"Not account yet?" : {
},
"Open source" : {
},
"password" : {
"extractionState" : "manual",
@ -108,12 +154,30 @@
},
"Scan QR code" : {
},
"Sécurisé" : {
},
"Skip" : {
},
"Start" : {
},
"TCP" : {
},
"TLS" : {
},
"to Linphone" : {
},
"Une application de communication **sécurisée**, **open source** et **française**." : {
},
"Une application open source et un **service gratuit** depuis **2001**." : {
},
"Use SIP Account" : {
@ -134,6 +198,12 @@
}
}
}
},
"Vos communications sont en sécurité grâce aux **Chiffrement de bout en bout**." : {
},
"Welcome" : {
}
},
"version" : "1.0"

View file

@ -0,0 +1,38 @@
//
// SplashScreen.swift
// Linphone
//
// Created by Benoît Martins on 03/10/2023.
//
import SwiftUI
struct SplashScreen: View {
@ObservedObject private var coreContext = CoreContext.shared
@Binding var isActive: Bool
var body: some View {
GeometryReader { geometry in
VStack {
Spacer()
HStack {
Spacer()
Image("linphone")
Spacer()
}
Spacer()
}
}
.ignoresSafeArea(.all)
.onAppear {
Task {
try await coreContext.initialiseCore()
withAnimation {
self.isActive = true
}
}
}
}
}

View file

@ -34,7 +34,7 @@ struct AssistantView: View {
ScrollView(.vertical) {
VStack {
ZStack {
Image("Mountain")
Image("mountain")
.resizable()
.scaledToFill()
.frame(width: geometry.size.width, height: 100)
@ -230,9 +230,6 @@ struct AssistantView: View {
}
}
struct AssistantView_Previews: PreviewProvider {
static var previews: some View {
#Preview {
AssistantView(accountLoginViewModel: AccountLoginViewModel())
}
}

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2010-2023 Belledonne Communications SARL.
*
* This file is part of Linphone
* 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
@ -17,9 +17,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import linphonesw
import SwiftUI
class SharedMainViewModel : ObservableObject {
init() {}
struct ContactsView: View {
var body: some View {
VStack {
Spacer()
Image("linphone")
.padding(.bottom, 20)
Text("Contacts View")
Spacer()
}
}
}
#Preview {
ContactsView()
}

View 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 UserDefaults.standard.bool(forKey: "general_terms") == false {
WelcomeView(sharedMainViewModel: sharedMainViewModel)
} else if coreContext.mCore.defaultAccount == nil {
AssistantView(accountLoginViewModel: AccountLoginViewModel())
} else {
TabView {
ContactsView()
.tabItem {
Label("Contacts", image: "address-book")
}
HistoryView()
.tabItem {
Label("Calls", image: "phone")
}
}
}
}
}
#Preview {
ContentView(sharedMainViewModel: SharedMainViewModel())
}

View file

@ -0,0 +1,81 @@
/*
* 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 {
var permissionManager = PermissionManager.shared
@Binding var isShowPopup: Bool
var body: some View {
GeometryReader { geometry in
VStack (alignment: .leading) {
Text("Conditions de service")
.default_text_style_800(styleSize: 16)
.frame(alignment: .leading)
.padding(.bottom, 2)
Text("En continuant, vous acceptez ces conditions, \(Text("[notre politique de confidentialité](https://linphone.org/privacy-policy)").underline()) et \(Text("[nos conditions dutilisation](https://linphone.org/general-terms)").underline()).")
.tint(Color.gray_main2_600)
.default_text_style(styleSize: 15)
.padding(.bottom, 20)
Button(action: {
self.isShowPopup.toggle()
}) {
Text("Deny all")
.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.orange_main_500, lineWidth: 1)
)
.padding(.bottom, 10)
Button(action: {
permissionManager.photoLibraryRequestPermission()
}) {
Text("Accept all")
.default_text_style_white_600(styleSize: 20)
.frame(height: 35)
.frame(maxWidth: .infinity)
}
.padding(.horizontal, 20)
.padding(.vertical, 10)
.background(Color.orange_main_500)
.cornerRadius(60)
}
.padding(.horizontal, 20)
.padding(.vertical, 20)
.background(.white)
.cornerRadius(20)
.padding(.horizontal)
.frame(maxHeight: .infinity)
.shadow(color: Color.orange_main_500, radius: 0, x: 0, y: 2)
}
}
}

View file

@ -0,0 +1,27 @@
//
// HistoryView.swift
// Linphone
//
// Created by Benoît Martins on 03/10/2023.
//
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()
}

View file

@ -1,7 +1,7 @@
/*
* Copyright (c) 2010-2023 Belledonne Communications SARL.
*
* This file is part of linphone-iphone
* 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
@ -17,20 +17,29 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import SwiftUI
import linphonesw
struct ContentView: View {
class SharedMainViewModel : ObservableObject {
@ObservedObject var sharedMainViewModel : SharedMainViewModel
@Published var generalTermsAccepted = false
var body: some View {
AssistantView(accountLoginViewModel: AccountLoginViewModel())
init() {
let preferences = UserDefaults.standard
let generalTermsKey = "general_terms"
if preferences.object(forKey: generalTermsKey) == nil {
preferences.set(generalTermsAccepted, forKey: generalTermsKey)
} else {
generalTermsAccepted = preferences.bool(forKey: generalTermsKey)
}
}
struct ContentView_Previews: PreviewProvider {
func changeGeneralTerms(){
let preferences = UserDefaults.standard
static var previews: some View {
AssistantView(accountLoginViewModel: AccountLoginViewModel())
generalTermsAccepted = true
let generalTermsKey = "general_terms"
preferences.set(generalTermsAccepted, forKey: generalTermsKey)
}
}

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

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

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

View file

@ -0,0 +1,154 @@
/*
* 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
var permissionManager = PermissionManager.shared
@State private var index = 0
@State private var isShowPopup = false
var body: some View {
GeometryReader { geometry in
ZStack {
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)
.padding(.top, -35)
.padding(.trailing, 20)
.onTapGesture {
withAnimation {
self.index = 2
self.isShowPopup.toggle()
}
}
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)
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))
.onAppear {
setupAppearance()
}
}
Button(action: {
if index < 2 {
withAnimation {
index += 1
}
} else if index == 2 {
withAnimation{
self.isShowPopup.toggle()
}
}
}) {
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.orange_main_500)
.cornerRadius(60)
.padding(.bottom)
.padding(.horizontal)
}
if self.isShowPopup {
PopupView(isShowPopup: $isShowPopup)
.background(.black.opacity(0.65))
.edgesIgnoringSafeArea(.all)
.onTapGesture {
self.isShowPopup.toggle()
}
}
}
}
.onReceive(permissionManager.$photoLibraryPermissionGranted, perform: { (granted) in
if granted {
withAnimation {
sharedMainViewModel.changeGeneralTerms()
}
}
})
}
func setupAppearance() {
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor(Color.orange_main_500)
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.gray_main2_200)
}
}
#Preview {
WelcomeView(sharedMainViewModel: SharedMainViewModel())
}

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

View file

@ -111,4 +111,19 @@ extension View {
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
.foregroundStyle(Color.orange_main_500)
}
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.gray_main2_600)
}
func welcome_text_style_gray(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Regular", size: styleSize))
.foregroundStyle(Color.gray_main2_600)
}
}

BIN
Linphone/ui/.DS_Store vendored

Binary file not shown.