Use SwiftLint

This commit is contained in:
Benoit Martins 2023-10-10 11:58:07 +02:00
parent 3669674eae
commit adc8b00d6d
31 changed files with 984 additions and 900 deletions

32
.swiftlint.yml Normal file
View 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"

View file

@ -7,7 +7,7 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
2B416B2E7C90375B792A28AE /* Pods_Linphone.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2C08FB4788AD667D35BAE64D /* Pods_Linphone.framework */; }; 0DF2F35F000C9BBAE8FCB4A0 /* Pods_Linphone.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7C92C314A5427A62F953EB70 /* Pods_Linphone.framework */; };
D70C93DE2AC2D0F60063CA3B /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = D70C93DD2AC2D0F60063CA3B /* Localizable.xcstrings */; }; D70C93DE2AC2D0F60063CA3B /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = D70C93DD2AC2D0F60063CA3B /* Localizable.xcstrings */; };
D717071E2AC5922E0037746F /* ColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D717071D2AC5922E0037746F /* ColorExtension.swift */; }; D717071E2AC5922E0037746F /* ColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D717071D2AC5922E0037746F /* ColorExtension.swift */; };
D71707202AC5989C0037746F /* TextExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D717071F2AC5989C0037746F /* TextExtension.swift */; }; D71707202AC5989C0037746F /* TextExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = D717071F2AC5989C0037746F /* TextExtension.swift */; };
@ -47,8 +47,9 @@
/* End PBXBuildFile section */ /* End PBXBuildFile section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
2C08FB4788AD667D35BAE64D /* Pods_Linphone.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Linphone.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 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>"; };
BC39A28B26EDB00C91AB7756 /* 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>"; }; 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; };
D70C93DD2AC2D0F60063CA3B /* Localizable.xcstrings */ = {isa = PBXFileReference; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; }; 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>"; }; 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>"; }; D717071F2AC5989C0037746F /* TextExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextExtension.swift; sourceTree = "<group>"; };
@ -88,7 +89,6 @@
D7DA67612ACCB2FA00E95002 /* LoginFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginFragment.swift; 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>"; }; D7DA67632ACCB31700E95002 /* ProfileModeFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileModeFragment.swift; sourceTree = "<group>"; };
D7FB55102AD447FD00A5AB15 /* RegisterFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterFragment.swift; sourceTree = "<group>"; }; D7FB55102AD447FD00A5AB15 /* RegisterFragment.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterFragment.swift; sourceTree = "<group>"; };
FBDE73581C1DC4F98CC3DF3A /* 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>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */ /* Begin PBXFrameworksBuildPhase section */
@ -96,17 +96,17 @@
isa = PBXFrameworksBuildPhase; isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
2B416B2E7C90375B792A28AE /* Pods_Linphone.framework in Frameworks */, 0DF2F35F000C9BBAE8FCB4A0 /* Pods_Linphone.framework in Frameworks */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
/* End PBXFrameworksBuildPhase section */ /* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */ /* Begin PBXGroup section */
9FFD5E6302DF1093E1CB7311 /* Frameworks */ = { 1110B8CBF3C1BFD76F8BBFB2 /* Frameworks */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
2C08FB4788AD667D35BAE64D /* Pods_Linphone.framework */, 7C92C314A5427A62F953EB70 /* Pods_Linphone.framework */,
); );
name = Frameworks; name = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
@ -114,8 +114,8 @@
A31AF2AB8C6A3D7B7EA3B424 /* Pods */ = { A31AF2AB8C6A3D7B7EA3B424 /* Pods */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
FBDE73581C1DC4F98CC3DF3A /* Pods-Linphone.debug.xcconfig */, 3A132937ACADB95696E2F906 /* Pods-Linphone.debug.xcconfig */,
BC39A28B26EDB00C91AB7756 /* Pods-Linphone.release.xcconfig */, 3E2758142B8F42856C3A34DF /* Pods-Linphone.release.xcconfig */,
); );
path = Pods; path = Pods;
sourceTree = "<group>"; sourceTree = "<group>";
@ -126,7 +126,6 @@
D717071D2AC5922E0037746F /* ColorExtension.swift */, D717071D2AC5922E0037746F /* ColorExtension.swift */,
D717071F2AC5989C0037746F /* TextExtension.swift */, D717071F2AC5989C0037746F /* TextExtension.swift */,
D74C9D002ACB098C0021626A /* PermissionManager.swift */, D74C9D002ACB098C0021626A /* PermissionManager.swift */,
D72343312ACEFF58009AA24E /* QRScannerController.swift */,
); );
path = Utils; path = Utils;
sourceTree = "<group>"; sourceTree = "<group>";
@ -137,7 +136,7 @@
D719ABB52ABC67BF00B41C10 /* Linphone */, D719ABB52ABC67BF00B41C10 /* Linphone */,
D719ABB42ABC67BF00B41C10 /* Products */, D719ABB42ABC67BF00B41C10 /* Products */,
A31AF2AB8C6A3D7B7EA3B424 /* Pods */, A31AF2AB8C6A3D7B7EA3B424 /* Pods */,
9FFD5E6302DF1093E1CB7311 /* Frameworks */, 1110B8CBF3C1BFD76F8BBFB2 /* Frameworks */,
); );
sourceTree = "<group>"; sourceTree = "<group>";
}; };
@ -220,6 +219,7 @@
children = ( children = (
D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */, D719ABCE2ABC779A00B41C10 /* AccountLoginViewModel.swift */,
D72343332ACEFFC3009AA24E /* QRScanner.swift */, D72343332ACEFFC3009AA24E /* QRScanner.swift */,
D72343312ACEFF58009AA24E /* QRScannerController.swift */,
); );
path = Viewmodel; path = Viewmodel;
sourceTree = "<group>"; sourceTree = "<group>";
@ -310,11 +310,12 @@
isa = PBXNativeTarget; isa = PBXNativeTarget;
buildConfigurationList = D719ABC22ABC67BF00B41C10 /* Build configuration list for PBXNativeTarget "Linphone" */; buildConfigurationList = D719ABC22ABC67BF00B41C10 /* Build configuration list for PBXNativeTarget "Linphone" */;
buildPhases = ( buildPhases = (
5387C360B232ECCFFE549C7A /* [CP] Check Pods Manifest.lock */, EAE6BD221624F991B659AC2E /* [CP] Check Pods Manifest.lock */,
D719ABAF2ABC67BF00B41C10 /* Sources */, D719ABAF2ABC67BF00B41C10 /* Sources */,
D719ABB02ABC67BF00B41C10 /* Frameworks */, D719ABB02ABC67BF00B41C10 /* Frameworks */,
D719ABB12ABC67BF00B41C10 /* Resources */, D719ABB12ABC67BF00B41C10 /* Resources */,
C6890D9F62DE340F66542619 /* [CP] Embed Pods Frameworks */, D7FB55122AD53FE200A5AB15 /* Run Script */,
A35AE8ABA69001024776F16C /* [CP] Embed Pods Frameworks */,
); );
buildRules = ( buildRules = (
); );
@ -378,7 +379,43 @@
/* End PBXResourcesBuildPhase section */ /* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */
5387C360B232ECCFFE549C7A /* [CP] Check Pods Manifest.lock */ = { A35AE8ABA69001024776F16C /* [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;
};
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 */ = {
isa = PBXShellScriptBuildPhase; isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
@ -400,23 +437,6 @@
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"; 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; showEnvVarsInLog = 0;
}; };
C6890D9F62DE340F66542619 /* [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;
};
/* End PBXShellScriptBuildPhase section */ /* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */
@ -572,7 +592,7 @@
}; };
D719ABC32ABC67BF00B41C10 /* Debug */ = { D719ABC32ABC67BF00B41C10 /* Debug */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = FBDE73581C1DC4F98CC3DF3A /* Pods-Linphone.debug.xcconfig */; baseConfigurationReference = 3A132937ACADB95696E2F906 /* Pods-Linphone.debug.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@ -616,7 +636,7 @@
}; };
D719ABC42ABC67BF00B41C10 /* Release */ = { D719ABC42ABC67BF00B41C10 /* Release */ = {
isa = XCBuildConfiguration; isa = XCBuildConfiguration;
baseConfigurationReference = BC39A28B26EDB00C91AB7756 /* Pods-Linphone.release.xcconfig */; baseConfigurationReference = 3E2758142B8F42856C3A34DF /* Pods-Linphone.release.xcconfig */;
buildSettings = { buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;

View file

@ -47,23 +47,23 @@ final class CoreContext : ObservableObject {
mRegistrationDelegate = mRegistrationDelegate =
CoreDelegateStub( CoreDelegateStub(
onConfiguringStatus: { (core: Core, state: Config.ConfiguringState, message: String) in onConfiguringStatus: {(_: Core, state: Config.ConfiguringState, message: String) in
NSLog("New configuration state is \(state) = \(message)\n") NSLog("New configuration state is \(state) = \(message)\n")
if (state == .Successful) { if state == .Successful {
self.toastMessage = "Successful" self.toastMessage = "Successful"
} else { } else {
self.toastMessage = "Failed" self.toastMessage = "Failed"
} }
}, },
onAccountRegistrationStateChanged: { (core: Core, account: Account, state: RegistrationState, message: String) in onAccountRegistrationStateChanged: {(_: Core, account: Account, state: RegistrationState, message: String) in
// If account has been configured correctly, we will go through Progress and Ok states // If account has been configured correctly, we will go through Progress and Ok states
// Otherwise, we will be Failed. // Otherwise, we will be Failed.
NSLog("New registration state is \(state) for user id \( String(describing: account.params?.identityAddress?.asString()))\n") NSLog("New registration state is \(state) for user id \( String(describing: account.params?.identityAddress?.asString())) = \(message)\n")
if (state == .Ok) { if state == .Ok {
self.loggingInProgress = false self.loggingInProgress = false
self.loggedIn = true self.loggedIn = true
} else if (state == .Progress) { } else if state == .Progress {
self.loggingInProgress = true self.loggingInProgress = true
} else { } else {
self.toastMessage = "Registration failed" self.toastMessage = "Registration failed"

View file

@ -3,9 +3,15 @@
"strings" : { "strings" : {
"" : { "" : {
},
" et " : {
}, },
" or " : { " or " : {
},
"." : {
}, },
"[Forgotten password?](https://subscribe.linphone.org/)" : { "[Forgotten password?](https://subscribe.linphone.org/)" : {
@ -131,15 +137,8 @@
"Domain" : { "Domain" : {
}, },
"En continuant, vous acceptez ces conditions, %@ et %@." : { "En continuant, vous acceptez ces conditions, " : {
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "En continuant, vous acceptez ces conditions, %1$@ et %2$@."
}
}
}
}, },
"Error" : { "Error" : {
@ -220,21 +219,12 @@
}, },
"Skip" : { "Skip" : {
},
"Some features require a Linphone account, such as group messaging, video conferences...\n\nThese features are hidden when you register with a third party SIP account.\n\nTo enable it in a commercial projet, please contact us. " : {
}, },
"Start" : { "Start" : {
}, },
"TCP" : { "TCP" : {
},
"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." : {
}, },
"The user name or password is incorrects" : { "The user name or password is incorrects" : {

View file

@ -25,7 +25,7 @@ struct SplashScreen: View {
@Binding var isActive: Bool @Binding var isActive: Bool
var body: some View { var body: some View {
GeometryReader { geometry in GeometryReader { _ in
VStack { VStack {
Spacer() Spacer()
HStack { HStack {

View file

@ -25,7 +25,7 @@ struct AssistantView: View {
@ObservedObject private var coreContext = CoreContext.shared @ObservedObject private var coreContext = CoreContext.shared
var body: some View { var body: some View {
if (sharedMainViewModel.displayProfileMode && coreContext.loggedIn){ if sharedMainViewModel.displayProfileMode && coreContext.loggedIn {
ProfileModeFragment(sharedMainViewModel: sharedMainViewModel) ProfileModeFragment(sharedMainViewModel: sharedMainViewModel)
} else { } else {
LoginFragment(accountLoginViewModel: AccountLoginViewModel(), sharedMainViewModel: sharedMainViewModel) LoginFragment(accountLoginViewModel: AccountLoginViewModel(), sharedMainViewModel: sharedMainViewModel)

View file

@ -72,7 +72,7 @@ struct LoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(isNameFocused ? Color.orange_main_500 : Color.gray_200, lineWidth: 1) .stroke(isNameFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
) )
.padding(.bottom) .padding(.bottom)
.focused($isNameFocused) .focused($isNameFocused)
@ -95,15 +95,16 @@ struct LoginFragment: View {
.focused($isPasswordFocused) .focused($isPasswordFocused)
} }
} }
Button(action: { Button(action: {
isSecured.toggle() isSecured.toggle()
}) { }, label: {
Image(self.isSecured ? "eye-slash" : "eye") Image(self.isSecured ? "eye-slash" : "eye")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
.frame(width: 20, height: 20) .frame(width: 20, height: 20)
} })
} }
.disabled(coreContext.loggedIn) .disabled(coreContext.loggedIn)
.padding(.horizontal, 20) .padding(.horizontal, 20)
@ -112,26 +113,21 @@ struct LoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(isPasswordFocused ? Color.orange_main_500 : Color.gray_200, lineWidth: 1) .stroke(isPasswordFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
) )
.padding(.bottom) .padding(.bottom)
Button(action: { Button(action: {
if (self.coreContext.loggedIn){
self.accountLoginViewModel.unregister()
self.accountLoginViewModel.delete()
} else {
self.accountLoginViewModel.login() self.accountLoginViewModel.login()
} }, label: {
}) {
Text(coreContext.loggedIn ? "Log out" : "assistant_account_login") Text(coreContext.loggedIn ? "Log out" : "assistant_account_login")
.default_text_style_white_600(styleSize: 20) .default_text_style_white_600(styleSize: 20)
.frame(height: 35) .frame(height: 35)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} })
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 10) .padding(.vertical, 10)
.background((accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty) ? Color.orange_main_100 : Color.orange_main_500) .background((accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty) ? Color.orangeMain100 : Color.orangeMain500)
.cornerRadius(60) .cornerRadius(60)
.disabled(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty) .disabled(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty)
.padding(.bottom) .padding(.bottom)
@ -139,9 +135,9 @@ struct LoginFragment: View {
HStack { HStack {
Text("[Forgotten password?](https://subscribe.linphone.org/)") Text("[Forgotten password?](https://subscribe.linphone.org/)")
.underline() .underline()
.tint(Color.gray_main2_600) .tint(Color.grayMain2c600)
.default_text_style_600(styleSize: 15) .default_text_style_600(styleSize: 15)
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
} }
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.padding(.bottom, 30) .padding(.bottom, 30)
@ -152,7 +148,7 @@ struct LoginFragment: View {
} }
Text(" or ") Text(" or ")
.default_text_style(styleSize: 15) .default_text_style(styleSize: 15)
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
VStack { VStack {
Divider() Divider()
} }
@ -166,7 +162,7 @@ struct LoginFragment: View {
Image("qr-code") Image("qr-code")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
.frame(width: 20, height: 20) .frame(width: 20, height: 20)
Text("Scan QR code") Text("Scan QR code")
@ -183,10 +179,11 @@ struct LoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(Color.orange_main_500, lineWidth: 1) .stroke(Color.orangeMain500, lineWidth: 1)
) )
.padding(.bottom) .padding(.bottom)
.simultaneousGesture(TapGesture().onEnded{ .simultaneousGesture(
TapGesture().onEnded {
self.linkActive = "QR" self.linkActive = "QR"
if !sharedMainViewModel.generalTermsAccepted { if !sharedMainViewModel.generalTermsAccepted {
withAnimation { withAnimation {
@ -195,7 +192,8 @@ struct LoginFragment: View {
} else { } else {
self.isLinkQRActive = true self.isLinkQRActive = true
} }
}) }
)
NavigationLink(isActive: $isLinkSIPActive, destination: { NavigationLink(isActive: $isLinkSIPActive, destination: {
ThirdPartySipAccountWarningFragment(sharedMainViewModel: sharedMainViewModel, accountLoginViewModel: accountLoginViewModel) ThirdPartySipAccountWarningFragment(sharedMainViewModel: sharedMainViewModel, accountLoginViewModel: accountLoginViewModel)
@ -213,10 +211,11 @@ struct LoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(Color.orange_main_500, lineWidth: 1) .stroke(Color.orangeMain500, lineWidth: 1)
) )
.padding(.bottom) .padding(.bottom)
.simultaneousGesture(TapGesture().onEnded{ .simultaneousGesture(
TapGesture().onEnded {
self.linkActive = "SIP" self.linkActive = "SIP"
if !sharedMainViewModel.generalTermsAccepted { if !sharedMainViewModel.generalTermsAccepted {
withAnimation { withAnimation {
@ -225,7 +224,8 @@ struct LoginFragment: View {
} else { } else {
self.isLinkSIPActive = true self.isLinkSIPActive = true
} }
}) }
)
Spacer() Spacer()
@ -235,7 +235,7 @@ struct LoginFragment: View {
Text("Not account yet?") Text("Not account yet?")
.default_text_style(styleSize: 15) .default_text_style(styleSize: 15)
.foregroundStyle(Color.gray_main2_700) .foregroundStyle(Color.grayMain2c700)
.padding(.horizontal, 10) .padding(.horizontal, 10)
NavigationLink(destination: RegisterFragment(), isActive: $isLinkREGActive, label: {Text("Register") NavigationLink(destination: RegisterFragment(), isActive: $isLinkREGActive, label: {Text("Register")
@ -249,10 +249,11 @@ struct LoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(Color.orange_main_500, lineWidth: 1) .stroke(Color.orangeMain500, lineWidth: 1)
) )
.padding(.horizontal, 10) .padding(.horizontal, 10)
.simultaneousGesture(TapGesture().onEnded{ .simultaneousGesture(
TapGesture().onEnded {
self.linkActive = "REG" self.linkActive = "REG"
if !sharedMainViewModel.generalTermsAccepted { if !sharedMainViewModel.generalTermsAccepted {
withAnimation { withAnimation {
@ -261,7 +262,8 @@ struct LoginFragment: View {
} else { } else {
self.isLinkREGActive = true self.isLinkREGActive = true
} }
}) }
)
Spacer() Spacer()
} }
@ -274,7 +276,18 @@ struct LoginFragment: View {
} }
if self.isShowPopup { if self.isShowPopup {
PopupView(sharedMainViewModel: sharedMainViewModel, isShowPopup: $isShowPopup, title: Text("Conditions de service"), content: 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())."), titleFirstButton: Text("Deny all"), actionFirstButton: {self.isShowPopup.toggle()}, titleSecondButton: Text("Accept all"), actionSecondButton: {acceptGeneralTerms()}) 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 dutilisation](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)) .background(.black.opacity(0.65))
.onTapGesture { .onTapGesture {
self.isShowPopup.toggle() self.isShowPopup.toggle()

View file

@ -50,7 +50,7 @@ struct ProfileModeFragment: View {
VStack(spacing: 10) { VStack(spacing: 10) {
Button(action: { Button(action: {
options = 1 options = 1
}) { }, label: {
HStack { HStack {
Image(options == 1 ? "radio-button-fill" : "radio-button") Image(options == 1 ? "radio-button-fill" : "radio-button")
Text("Default") Text("Default")
@ -66,7 +66,7 @@ struct ProfileModeFragment: View {
} }
Spacer() Spacer()
} }
} })
HStack { HStack {
Text("Chiffrement de bout en bout de tous vos échanges, grâce au mode default vos communications sont à labri des regards.") Text("Chiffrement de bout en bout de tous vos échanges, grâce au mode default vos communications sont à labri des regards.")
@ -75,7 +75,7 @@ struct ProfileModeFragment: View {
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 16) .padding(.horizontal, 16)
.padding(.vertical, 20) .padding(.vertical, 20)
.background(Color.gray_100) .background(Color.gray100)
.cornerRadius(15) .cornerRadius(15)
.padding(.bottom, 5) .padding(.bottom, 5)
@ -86,7 +86,7 @@ struct ProfileModeFragment: View {
Button(action: { Button(action: {
options = 2 options = 2
}) { }, label: {
HStack { HStack {
Image(options == 2 ? "radio-button-fill" : "radio-button") Image(options == 2 ? "radio-button-fill" : "radio-button")
Text("Interoperable") Text("Interoperable")
@ -102,7 +102,7 @@ struct ProfileModeFragment: View {
} }
Spacer() Spacer()
} }
} })
HStack { HStack {
Text("Ce mode vous permet dêtre interopérable avec dautres services SIP.\nVos communications seront chiffrées de point à point. ") Text("Ce mode vous permet dêtre interopérable avec dautres services SIP.\nVos communications seront chiffrées de point à point. ")
@ -111,7 +111,7 @@ struct ProfileModeFragment: View {
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 16) .padding(.horizontal, 16)
.padding(.vertical, 20) .padding(.vertical, 20)
.background(Color.gray_100) .background(Color.gray100)
.cornerRadius(15) .cornerRadius(15)
} }
.frame(maxWidth: sharedMainViewModel.maxWidth) .frame(maxWidth: sharedMainViewModel.maxWidth)
@ -121,15 +121,15 @@ struct ProfileModeFragment: View {
Button(action: { Button(action: {
sharedMainViewModel.changeHideProfileMode() sharedMainViewModel.changeHideProfileMode()
}) { }, label: {
Text("Continue") Text("Continue")
.default_text_style_white_600(styleSize: 20) .default_text_style_white_600(styleSize: 20)
.frame(height: 35) .frame(height: 35)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} })
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 10) .padding(.vertical, 10)
.background(Color.orange_main_500) .background(Color.orangeMain500)
.cornerRadius(60) .cornerRadius(60)
.padding(.horizontal) .padding(.horizontal)
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0) .padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
@ -142,7 +142,21 @@ struct ProfileModeFragment: View {
} }
if self.isShowPopup { 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()}) 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)) .background(.black.opacity(0.65))
.onTapGesture { .onTapGesture {
self.isShowPopup.toggle() self.isShowPopup.toggle()

View file

@ -28,7 +28,7 @@ struct RegisterFragment: View {
Image("caret-left") Image("caret-left")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
.frame(width: 25, height: 25, alignment: .leading) .frame(width: 25, height: 25, alignment: .leading)
.padding(.top, -65) .padding(.top, -65)
.onTapGesture { .onTapGesture {

View file

@ -50,7 +50,7 @@ struct ThirdPartySipAccountLoginFragment: View {
Image("caret-left") Image("caret-left")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
.frame(width: 25, height: 25, alignment: .leading) .frame(width: 25, height: 25, alignment: .leading)
.padding(.top, -65) .padding(.top, -65)
.onTapGesture { .onTapGesture {
@ -89,7 +89,7 @@ struct ThirdPartySipAccountLoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(isNameFocused ? Color.orange_main_500 : Color.gray_200, lineWidth: 1) .stroke(isNameFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
) )
.padding(.bottom) .padding(.bottom)
.focused($isNameFocused) .focused($isNameFocused)
@ -114,13 +114,13 @@ struct ThirdPartySipAccountLoginFragment: View {
} }
Button(action: { Button(action: {
isSecured.toggle() isSecured.toggle()
}) { }, label: {
Image(self.isSecured ? "eye-slash" : "eye") Image(self.isSecured ? "eye-slash" : "eye")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
.frame(width: 20, height: 20) .frame(width: 20, height: 20)
} })
} }
.disabled(coreContext.loggedIn) .disabled(coreContext.loggedIn)
.padding(.horizontal, 20) .padding(.horizontal, 20)
@ -129,7 +129,7 @@ struct ThirdPartySipAccountLoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(isPasswordFocused ? Color.orange_main_500 : Color.gray_200, lineWidth: 1) .stroke(isPasswordFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
) )
.padding(.bottom) .padding(.bottom)
@ -147,7 +147,7 @@ struct ThirdPartySipAccountLoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(isDomainFocused ? Color.orange_main_500 : Color.gray_200, lineWidth: 1) .stroke(isDomainFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
) )
.padding(.bottom) .padding(.bottom)
.focused($isDomainFocused) .focused($isDomainFocused)
@ -166,7 +166,7 @@ struct ThirdPartySipAccountLoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(isDisplayNameFocused ? Color.orange_main_500 : Color.gray_200, lineWidth: 1) .stroke(isDisplayNameFocused ? Color.orangeMain500 : Color.gray200, lineWidth: 1)
) )
.padding(.bottom) .padding(.bottom)
.focused($isDisplayNameFocused) .focused($isDisplayNameFocused)
@ -186,7 +186,7 @@ struct ThirdPartySipAccountLoginFragment: View {
Image("caret-down") Image("caret-down")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
.frame(width: 20, height: 20) .frame(width: 20, height: 20)
} }
.frame(height: 25) .frame(height: 25)
@ -196,31 +196,28 @@ struct ThirdPartySipAccountLoginFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(Color.gray_200, lineWidth: 1) .stroke(Color.gray200, lineWidth: 1)
) )
.padding(.bottom) .padding(.bottom)
Spacer() Spacer()
Button(action: { Button(action: {
if (self.coreContext.loggedIn){
self.accountLoginViewModel.unregister()
self.accountLoginViewModel.delete()
} else {
self.accountLoginViewModel.login() self.accountLoginViewModel.login()
}
accountLoginViewModel.domain = "sip.linphone.org" accountLoginViewModel.domain = "sip.linphone.org"
accountLoginViewModel.transportType = "TLS" accountLoginViewModel.transportType = "TLS"
}) { }, label: {
Text(coreContext.loggedIn ? "Log out" : "assistant_account_login") Text(coreContext.loggedIn ? "Log out" : "assistant_account_login")
.default_text_style_white_600(styleSize: 20) .default_text_style_white_600(styleSize: 20)
.frame(height: 35) .frame(height: 35)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} })
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 10) .padding(.vertical, 10)
.background((accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty || accountLoginViewModel.domain.isEmpty) ? Color.orange_main_100 : Color.orange_main_500) .background(
(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty || accountLoginViewModel.domain.isEmpty)
? Color.orangeMain100
: Color.orangeMain500)
.cornerRadius(60) .cornerRadius(60)
.disabled(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty || accountLoginViewModel.domain.isEmpty) .disabled(accountLoginViewModel.username.isEmpty || accountLoginViewModel.passwd.isEmpty || accountLoginViewModel.domain.isEmpty)
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0) .padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)

View file

@ -44,7 +44,7 @@ struct ThirdPartySipAccountWarningFragment: View {
Image("caret-left") Image("caret-left")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
.frame(width: 25, height: 25, alignment: .leading) .frame(width: 25, height: 25, alignment: .leading)
.padding(.top, -65) .padding(.top, -65)
.onTapGesture { .onTapGesture {
@ -75,7 +75,7 @@ struct ThirdPartySipAccountWarningFragment: View {
Image("conversation") Image("conversation")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
.frame(width: 20, height: 20, alignment: .leading) .frame(width: 20, height: 20, alignment: .leading)
.onTapGesture { .onTapGesture {
withAnimation { withAnimation {
@ -84,7 +84,7 @@ struct ThirdPartySipAccountWarningFragment: View {
} }
} }
.padding(16) .padding(16)
.background(Color.gray_main2_200) .background(Color.grayMain2c200)
.cornerRadius(40) .cornerRadius(40)
.padding(.horizontal) .padding(.horizontal)
@ -92,7 +92,7 @@ struct ThirdPartySipAccountWarningFragment: View {
Image("video-call") Image("video-call")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.gray_main2_500) .foregroundStyle(Color.grayMain2c500)
.frame(width: 20, height: 20, alignment: .leading) .frame(width: 20, height: 20, alignment: .leading)
.onTapGesture { .onTapGesture {
withAnimation { withAnimation {
@ -101,7 +101,7 @@ struct ThirdPartySipAccountWarningFragment: View {
} }
} }
.padding(16) .padding(16)
.background(Color.gray_main2_200) .background(Color.grayMain2c200)
.cornerRadius(40) .cornerRadius(40)
.padding(.horizontal) .padding(.horizontal)
@ -109,7 +109,9 @@ struct ThirdPartySipAccountWarningFragment: View {
} }
.padding(.bottom, 40) .padding(.bottom, 40)
Text("Some features require a Linphone account, such as group messaging, video conferences...\n\nThese features are hidden when you register with a third party SIP account.\n\nTo enable it in a commercial projet, please contact us. ") 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) .default_text_style(styleSize: 15)
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.padding(.bottom) .padding(.bottom)
@ -119,7 +121,7 @@ struct ThirdPartySipAccountWarningFragment: View {
HStack { HStack {
Text("[linphone.org/contact](https://linphone.org/contact)") Text("[linphone.org/contact](https://linphone.org/contact)")
.tint(Color.orange_main_500) .tint(Color.orangeMain500)
.default_text_style_orange_600(styleSize: 15) .default_text_style_orange_600(styleSize: 15)
.frame(height: 35) .frame(height: 35)
} }
@ -128,7 +130,7 @@ struct ThirdPartySipAccountWarningFragment: View {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(Color.orange_main_500, lineWidth: 1) .stroke(Color.orangeMain500, lineWidth: 1)
) )
Spacer() Spacer()
@ -142,19 +144,19 @@ struct ThirdPartySipAccountWarningFragment: View {
Button(action: { Button(action: {
dismiss() dismiss()
}) { }, label: {
Text("I prefere create an account") Text("I prefere create an account")
.default_text_style_orange_600(styleSize: 20) .default_text_style_orange_600(styleSize: 20)
.frame(height: 35) .frame(height: 35)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} })
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 10) .padding(.vertical, 10)
.cornerRadius(60) .cornerRadius(60)
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(Color.orange_main_500, lineWidth: 1) .stroke(Color.orangeMain500, lineWidth: 1)
) )
.frame(maxWidth: sharedMainViewModel.maxWidth) .frame(maxWidth: sharedMainViewModel.maxWidth)
.padding(.horizontal) .padding(.horizontal)
@ -170,7 +172,7 @@ struct ThirdPartySipAccountWarningFragment: View {
}) })
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 10) .padding(.vertical, 10)
.background(Color.orange_main_500) .background(Color.orangeMain500)
.cornerRadius(60) .cornerRadius(60)
.frame(maxWidth: sharedMainViewModel.maxWidth) .frame(maxWidth: sharedMainViewModel.maxWidth)
.padding(.horizontal) .padding(.horizontal)

View file

@ -38,9 +38,11 @@ class AccountLoginViewModel : ObservableObject {
// TLS is strongly recommended // TLS is strongly recommended
// Only use UDP if you don't have the choice // Only use UDP if you don't have the choice
var transport: TransportType var transport: TransportType
if (transportType == "TLS") { transport = TransportType.Tls } if transportType == "TLS" {
else if (transportType == "TCP") { transport = TransportType.Tcp } transport = TransportType.Tls
else { transport = TransportType.Udp } } 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 // 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 // The first one is how to connect to the proxy server, the second one stores the credentials
@ -58,7 +60,7 @@ class AccountLoginViewModel : ObservableObject {
// A SIP account is identified by an identity address that we can construct from the username and domain // 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)) 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 // We also need to configure where the proxy server is located
let address = try Factory.Instance.createAddress(addr: String("sip:" + domain)) let address = try Factory.Instance.createAddress(addr: String("sip:" + domain))

View file

@ -54,13 +54,15 @@ class Coordinator: NSObject, AVCaptureMetadataOutputObjectsDelegate {
func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) { 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. // Check if the metadataObjects array is not nil and it contains at least one object.
if metadataObjects.count == 0 { if metadataObjects.isEmpty {
scanResult = "Scan a QR code" scanResult = "Scan a QR code"
return return
} }
// Get the metadata object. // Get the metadata object.
let metadataObj = metadataObjects[0] as! AVMetadataMachineReadableCodeObject guard let metadataObj = metadataObjects[0] as? AVMetadataMachineReadableCodeObject else {
return
}
if metadataObj.type == AVMetadataObject.ObjectType.qr, if metadataObj.type == AVMetadataObject.ObjectType.qr,
let result = metadataObj.stringValue { let result = metadataObj.stringValue {
@ -68,7 +70,6 @@ class Coordinator: NSObject, AVCaptureMetadataOutputObjectsDelegate {
if let url = NSURL(string: result) { if let url = NSURL(string: result) {
if UIApplication.shared.canOpenURL(url as URL) { if UIApplication.shared.canOpenURL(url as URL) {
lastResult = result lastResult = result
//scanResult = result
do { do {
try coreContext.mCore.setProvisioninguri(newValue: result) try coreContext.mCore.setProvisioninguri(newValue: result)
coreContext.mCore.stop() coreContext.mCore.stop()

View file

@ -29,13 +29,13 @@ struct PopupLoadingView: View {
ProgressView() ProgressView()
.controlSize(.large) .controlSize(.large)
.progressViewStyle(CircularProgressViewStyle(tint: Color.orange_main_500)) .progressViewStyle(CircularProgressViewStyle(tint: Color.orangeMain500))
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.padding(.top) .padding(.top)
.padding(.bottom) .padding(.bottom)
Text("Opération en cours...") Text("Opération en cours...")
.tint(Color.gray_main2_600) .tint(Color.grayMain2c600)
.default_text_style(styleSize: 15) .default_text_style(styleSize: 15)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} }
@ -46,7 +46,7 @@ struct PopupLoadingView: View {
.padding(.horizontal) .padding(.horizontal)
.frame(maxHeight: .infinity) .frame(maxHeight: .infinity)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
.shadow(color: Color.orange_main_500, radius: 0, x: 0, y: 2) .shadow(color: Color.orangeMain500, radius: 0, x: 0, y: 2)
.frame(maxWidth: sharedMainViewModel.maxWidth) .frame(maxWidth: sharedMainViewModel.maxWidth)
.position(x: geometry.size.width / 2, y: geometry.size.height / 2) .position(x: geometry.size.width / 2, y: geometry.size.height / 2)
} }

View file

@ -31,10 +31,10 @@ struct PopupView: View {
var content: Text? var content: Text?
var titleFirstButton: Text? var titleFirstButton: Text?
var actionFirstButton: () -> () var actionFirstButton: () -> Void
var titleSecondButton: Text? var titleSecondButton: Text?
var actionSecondButton: () -> () var actionSecondButton: () -> Void
var body: some View { var body: some View {
GeometryReader { geometry in GeometryReader { geometry in
@ -44,10 +44,9 @@ struct PopupView: View {
.frame(alignment: .leading) .frame(alignment: .leading)
.padding(.bottom, 2) .padding(.bottom, 2)
if content != nil { if content != nil {
content content
.tint(Color.gray_main2_600) .tint(Color.grayMain2c600)
.default_text_style(styleSize: 15) .default_text_style(styleSize: 15)
.padding(.bottom, 20) .padding(.bottom, 20)
} }
@ -55,19 +54,19 @@ struct PopupView: View {
if titleFirstButton != nil { if titleFirstButton != nil {
Button(action: { Button(action: {
actionFirstButton() actionFirstButton()
}) { }, label: {
titleFirstButton titleFirstButton
.default_text_style_orange_600(styleSize: 20) .default_text_style_orange_600(styleSize: 20)
.frame(height: 35) .frame(height: 35)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} })
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 10) .padding(.vertical, 10)
.cornerRadius(60) .cornerRadius(60)
.overlay( .overlay(
RoundedRectangle(cornerRadius: 60) RoundedRectangle(cornerRadius: 60)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(Color.orange_main_500, lineWidth: 1) .stroke(Color.orangeMain500, lineWidth: 1)
) )
.padding(.bottom, 10) .padding(.bottom, 10)
} }
@ -75,15 +74,15 @@ struct PopupView: View {
if titleSecondButton != nil { if titleSecondButton != nil {
Button(action: { Button(action: {
actionSecondButton() actionSecondButton()
}) { }, label: {
titleSecondButton titleSecondButton
.default_text_style_white_600(styleSize: 20) .default_text_style_white_600(styleSize: 20)
.frame(height: 35) .frame(height: 35)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} })
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 10) .padding(.vertical, 10)
.background(Color.orange_main_500) .background(Color.orangeMain500)
.cornerRadius(60) .cornerRadius(60)
} }
} }
@ -93,7 +92,7 @@ struct PopupView: View {
.cornerRadius(20) .cornerRadius(20)
.padding(.horizontal) .padding(.horizontal)
.frame(maxHeight: .infinity) .frame(maxHeight: .infinity)
.shadow(color: Color.orange_main_500, radius: 0, x: 0, y: 2) .shadow(color: Color.orangeMain500, radius: 0, x: 0, y: 2)
.frame(maxWidth: sharedMainViewModel.maxWidth) .frame(maxWidth: sharedMainViewModel.maxWidth)
.position(x: geometry.size.width / 2, y: geometry.size.height / 2) .position(x: geometry.size.width / 2, y: geometry.size.height / 2)
} }
@ -101,6 +100,12 @@ struct PopupView: View {
} }
#Preview { #Preview {
PopupView(sharedMainViewModel: SharedMainViewModel(), isShowPopup: .constant(true), title: Text("Title"), content: Text("Content"), titleFirstButton: Text("Deny all"), actionFirstButton: {}, titleSecondButton: Text("Accept all"), actionSecondButton: {}) 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)) .background(.black.opacity(0.65))
} }

View file

@ -44,35 +44,35 @@ struct ToastView: ViewModifier {
case "Successful": case "Successful":
Text("QR code validated!") Text("QR code validated!")
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.foregroundStyle(Color.green_success_500) .foregroundStyle(Color.greenSuccess500)
.default_text_style(styleSize: 15) .default_text_style(styleSize: 15)
.padding(8) .padding(8)
case "Failed": case "Failed":
Text("Invalid QR code!") Text("Invalid QR code!")
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.foregroundStyle(Color.red_danger_500) .foregroundStyle(Color.redDanger500)
.default_text_style(styleSize: 15) .default_text_style(styleSize: 15)
.padding(8) .padding(8)
case "Invalide URI": case "Invalide URI":
Text("Invalide URI") Text("Invalide URI")
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.foregroundStyle(Color.red_danger_500) .foregroundStyle(Color.redDanger500)
.default_text_style(styleSize: 15) .default_text_style(styleSize: 15)
.padding(8) .padding(8)
case "Registration failed": case "Registration failed":
Text("The user name or password is incorrects") Text("The user name or password is incorrects")
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.foregroundStyle(Color.red_danger_500) .foregroundStyle(Color.redDanger500)
.default_text_style(styleSize: 15) .default_text_style(styleSize: 15)
.padding(8) .padding(8)
default: default:
Text("Error") Text("Error")
.multilineTextAlignment(.center) .multilineTextAlignment(.center)
.foregroundStyle(Color.red_danger_500) .foregroundStyle(Color.redDanger500)
.default_text_style(styleSize: 15) .default_text_style(styleSize: 15)
.padding(8) .padding(8)
} }
@ -83,7 +83,7 @@ struct ToastView: ViewModifier {
.overlay( .overlay(
RoundedRectangle(cornerRadius: 50) RoundedRectangle(cornerRadius: 50)
.inset(by: 0.5) .inset(by: 0.5)
.stroke(isShowing == "Successful" ? Color.green_success_500 : Color.red_danger_500, lineWidth: 1) .stroke(isShowing == "Successful" ? Color.greenSuccess500 : Color.redDanger500, lineWidth: 1)
) )
.onTapGesture { .onTapGesture {
isShowing = "" isShowing = ""

View file

@ -29,7 +29,7 @@ struct WelcomePage1Fragment: View{
Image("linphone") Image("linphone")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
.frame(width: 100, height: 100) .frame(width: 100, height: 100)
Text("Linphone") Text("Linphone")
.welcome_text_style_gray_800(styleSize: 30) .welcome_text_style_gray_800(styleSize: 30)

View file

@ -29,7 +29,7 @@ struct WelcomePage2Fragment: View {
Image("secure-image") Image("secure-image")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
.frame(width: 70, height: 100) .frame(width: 70, height: 100)
Text("Sécurisé") Text("Sécurisé")
.welcome_text_style_gray_800(styleSize: 30) .welcome_text_style_gray_800(styleSize: 30)

View file

@ -29,7 +29,7 @@ struct WelcomePage3Fragment: View {
Image("open-source") Image("open-source")
.renderingMode(.template) .renderingMode(.template)
.resizable() .resizable()
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
.frame(width: 100, height: 100) .frame(width: 100, height: 100)
Text("Open source") Text("Open source")
.welcome_text_style_gray_800(styleSize: 30) .welcome_text_style_gray_800(styleSize: 30)

View file

@ -99,15 +99,15 @@ struct WelcomeView: View{
} else if index == 2 { } else if index == 2 {
permissionManager.cameraRequestPermission() permissionManager.cameraRequestPermission()
} }
}) { }, label: {
Text(index == 2 ? "Start" : "Next") Text(index == 2 ? "Start" : "Next")
.default_text_style_white_600(styleSize: 20) .default_text_style_white_600(styleSize: 20)
.frame(height: 35) .frame(height: 35)
.frame(maxWidth: .infinity) .frame(maxWidth: .infinity)
} })
.padding(.horizontal, 20) .padding(.horizontal, 20)
.padding(.vertical, 10) .padding(.vertical, 10)
.background(Color.orange_main_500) .background(Color.orangeMain500)
.cornerRadius(60) .cornerRadius(60)
.padding(.horizontal) .padding(.horizontal)
.padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0) .padding(.bottom, geometry.safeAreaInsets.bottom.isEqual(to: 0.0) ? 20 : 0)
@ -126,7 +126,7 @@ struct WelcomeView: View{
} }
func setupAppearance() { func setupAppearance() {
UIPageControl.appearance().currentPageIndicatorTintColor = UIColor(Color.orange_main_500) UIPageControl.appearance().currentPageIndicatorTintColor = UIColor(Color.orangeMain500)
if #available(iOS 16.0, *) { if #available(iOS 16.0, *) {
let dotCurrentImage = UIImage(named: "current-dot") let dotCurrentImage = UIImage(named: "current-dot")
@ -140,7 +140,7 @@ struct WelcomeView: View{
UIPageControl.appearance().setIndicatorImage(dotImage, forPage: 1) UIPageControl.appearance().setIndicatorImage(dotImage, forPage: 1)
UIPageControl.appearance().setIndicatorImage(dotImage, forPage: 2) UIPageControl.appearance().setIndicatorImage(dotImage, forPage: 2)
} }
UIPageControl.appearance().pageIndicatorTintColor = UIColor(Color.gray_main2_200) UIPageControl.appearance().pageIndicatorTintColor = UIColor(Color.grayMain2c200)
} }
} }

View file

@ -22,70 +22,70 @@ import SwiftUI
extension Color { extension Color {
static let transparent_color = Color(hex: "#00000000") static let transparentColor = Color(hex: "#00000000")
static let black = Color(hex: "#000000") static let black = Color(hex: "#000000")
static let white = Color(hex: "#FFFFFF") static let white = Color(hex: "#FFFFFF")
static let orange_main_700 = Color(hex: "#B72D00") static let orangeMain700 = Color(hex: "#B72D00")
static let orange_main_500 = Color(hex: "#FF5E00") static let orangeMain500 = Color(hex: "#FF5E00")
static let orange_main_300 = Color(hex: "#FFB266") static let orangeMain300 = Color(hex: "#FFB266")
static let orange_main_100 = Color(hex: "#FFEACB") static let orangeMain100 = Color(hex: "#FFEACB")
static let orange_main_100_alpha_50 = Color(hex: "#80FFEACB") static let orangeMain100Alpha50 = Color(hex: "#80FFEACB")
static let gray_main2_800 = Color(hex: "#22334D") static let grayMain2c800 = Color(hex: "#22334D")
static let gray_main2_800_alpha_65 = Color(hex: "#A622334D") static let grayMain2c800Alpha65 = Color(hex: "#A622334D")
static let gray_main2_700 = Color(hex: "#364860") static let grayMain2c700 = Color(hex: "#364860")
static let gray_main2_600 = Color(hex: "#4E6074") static let grayMain2c600 = Color(hex: "#4E6074")
static let gray_main2_500 = Color(hex: "#6C7A87") static let grayMain2c500 = Color(hex: "#6C7A87")
static let gray_main2_400 = Color(hex: "#9AABB5") static let grayMain2c400 = Color(hex: "#9AABB5")
static let gray_main2_300 = Color(hex: "#C0D1D9") static let grayMain2c300 = Color(hex: "#C0D1D9")
static let gray_main2_200 = Color(hex: "#DFECF2") static let grayMain2c200 = Color(hex: "#DFECF2")
static let gray_main2_100 = Color(hex: "#EEF6F8") static let grayMain2c100 = Color(hex: "#EEF6F8")
static let gray_100 = Color(hex: "#F9F9F9") static let gray100 = Color(hex: "#F9F9F9")
static let gray_200 = Color(hex: "#EDEDED") static let gray200 = Color(hex: "#EDEDED")
static let gray_300 = Color(hex: "#C9C9C9") static let gray300 = Color(hex: "#C9C9C9")
static let gray_400 = Color(hex: "#949494") static let gray400 = Color(hex: "#949494")
static let gray_500 = Color(hex: "#4E4E4E") static let gray500 = Color(hex: "#4E4E4E")
static let gray_600 = Color(hex: "#2E3030") static let gray600 = Color(hex: "#2E3030")
static let gray_900 = Color(hex: "#070707") static let gray900 = Color(hex: "#070707")
static let red_danger_200 = Color(hex: "#F5CCBE") static let redDanger200 = Color(hex: "#F5CCBE")
static let red_danger_500 = Color(hex: "#DD5F5F") static let redDanger500 = Color(hex: "#DD5F5F")
static let red_danger_700 = Color(hex: "#9E3548") static let redDanger700 = Color(hex: "#9E3548")
static let green_success_500 = Color(hex: "#4FAE80") static let greenSuccess500 = Color(hex: "#4FAE80")
static let green_success_700 = Color(hex: "#377D71") static let greenSuccess700 = Color(hex: "#377D71")
static let green_success_200 = Color(hex: "#ACF5C1") static let greenSuccess200 = Color(hex: "#ACF5C1")
static let blue_info_500 = Color(hex: "#4AA8FF") static let blueInfo500 = Color(hex: "#4AA8FF")
static let orange_warning_600 = Color(hex: "#DBB820") static let orangeWarning600 = Color(hex: "#DBB820")
static let orange_away = Color(hex: "#FFA645") static let orangeAway = Color(hex: "#FFA645")
init(hex: String) { init(hex: String) {
let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted) let hex = hex.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
var int: UInt64 = 0 var int: UInt64 = 0
Scanner(string: hex).scanHexInt64(&int) Scanner(string: hex).scanHexInt64(&int)
let a, r, g, b: UInt64 let alpha, red, green, blue: UInt64
switch hex.count { switch hex.count {
case 3: // RGB (12-bit) case 3: // RGB (12-bit)
(a, r, g, b) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17) (alpha, red, green, blue) = (255, (int >> 8) * 17, (int >> 4 & 0xF) * 17, (int & 0xF) * 17)
case 6: // RGB (24-bit) case 6: // RGB (24-bit)
(a, r, g, b) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF) (alpha, red, green, blue) = (255, int >> 16, int >> 8 & 0xFF, int & 0xFF)
case 8: // ARGB (32-bit) case 8: // ARGB (32-bit)
(a, r, g, b) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF) (alpha, red, green, blue) = (int >> 24, int >> 16 & 0xFF, int >> 8 & 0xFF, int & 0xFF)
default: default:
(a, r, g, b) = (1, 1, 1, 0) (alpha, red, green, blue) = (1, 1, 1, 0)
} }
self.init( self.init(
.sRGB, .sRGB,
red: Double(r) / 255, red: Double(red) / 255,
green: Double(g) / 255, green: Double(green) / 255,
blue: Double(b) / 255, blue: Double(blue) / 255,
opacity: Double(a) / 255 opacity: Double(alpha) / 255
) )
} }
} }

View file

@ -24,32 +24,32 @@ extension View {
func default_text_style_300(styleSize: CGFloat) -> some View { func default_text_style_300(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Light", size: styleSize)) self.font(Font.custom("NotoSans-Light", size: styleSize))
.foregroundStyle(Color.gray_main2_600) .foregroundStyle(Color.grayMain2c600)
} }
func default_text_style(styleSize: CGFloat) -> some View { func default_text_style(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Regular", size: styleSize)) self.font(Font.custom("NotoSans-Regular", size: styleSize))
.foregroundStyle(Color.gray_main2_600) .foregroundStyle(Color.grayMain2c600)
} }
func default_text_style_500(styleSize: CGFloat) -> some View { func default_text_style_500(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Medium", size: styleSize)) self.font(Font.custom("NotoSans-Medium", size: styleSize))
.foregroundStyle(Color.gray_main2_600) .foregroundStyle(Color.grayMain2c600)
} }
func default_text_style_600(styleSize: CGFloat) -> some View { func default_text_style_600(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-SemiBold", size: styleSize)) self.font(Font.custom("NotoSans-SemiBold", size: styleSize))
.foregroundStyle(Color.gray_main2_600) .foregroundStyle(Color.grayMain2c600)
} }
func default_text_style_700(styleSize: CGFloat) -> some View { func default_text_style_700(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Bold", size: styleSize)) self.font(Font.custom("NotoSans-Bold", size: styleSize))
.foregroundStyle(Color.gray_main2_600) .foregroundStyle(Color.grayMain2c600)
} }
func default_text_style_800(styleSize: CGFloat) -> some View { func default_text_style_800(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize)) self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
.foregroundStyle(Color.gray_main2_600) .foregroundStyle(Color.grayMain2c600)
} }
func default_text_style_white_300(styleSize: CGFloat) -> some View { func default_text_style_white_300(styleSize: CGFloat) -> some View {
@ -84,32 +84,32 @@ extension View {
func default_text_style_orange_300(styleSize: CGFloat) -> some View { func default_text_style_orange_300(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Light", size: styleSize)) self.font(Font.custom("NotoSans-Light", size: styleSize))
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
} }
func default_text_style_orange(styleSize: CGFloat) -> some View { func default_text_style_orange(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Regular", size: styleSize)) self.font(Font.custom("NotoSans-Regular", size: styleSize))
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
} }
func default_text_style_orange_500(styleSize: CGFloat) -> some View { func default_text_style_orange_500(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Medium", size: styleSize)) self.font(Font.custom("NotoSans-Medium", size: styleSize))
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
} }
func default_text_style_orange_600(styleSize: CGFloat) -> some View { func default_text_style_orange_600(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-SemiBold", size: styleSize)) self.font(Font.custom("NotoSans-SemiBold", size: styleSize))
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
} }
func default_text_style_orange_700(styleSize: CGFloat) -> some View { func default_text_style_orange_700(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Bold", size: styleSize)) self.font(Font.custom("NotoSans-Bold", size: styleSize))
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
} }
func default_text_style_orange_800(styleSize: CGFloat) -> some View { func default_text_style_orange_800(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize)) self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
.foregroundStyle(Color.orange_main_500) .foregroundStyle(Color.orangeMain500)
} }
func welcome_text_style_white_800(styleSize: CGFloat) -> some View { func welcome_text_style_white_800(styleSize: CGFloat) -> some View {
@ -119,21 +119,21 @@ extension View {
func welcome_text_style_gray_800(styleSize: CGFloat) -> some View { func welcome_text_style_gray_800(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize)) self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
.foregroundStyle(Color.gray_main2_600) .foregroundStyle(Color.grayMain2c600)
} }
func welcome_text_style_gray(styleSize: CGFloat) -> some View { func welcome_text_style_gray(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Regular", size: styleSize)) self.font(Font.custom("NotoSans-Regular", size: styleSize))
.foregroundStyle(Color.gray_main2_600) .foregroundStyle(Color.grayMain2c600)
} }
func profile_mode_text_style_gray_800(styleSize: CGFloat) -> some View { func profile_mode_text_style_gray_800(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-ExtraBold", size: styleSize)) self.font(Font.custom("NotoSans-ExtraBold", size: styleSize))
.foregroundStyle(Color.gray_900) .foregroundStyle(Color.gray900)
} }
func profile_mode_text_style_gray(styleSize: CGFloat) -> some View { func profile_mode_text_style_gray(styleSize: CGFloat) -> some View {
self.font(Font.custom("NotoSans-Regular", size: styleSize)) self.font(Font.custom("NotoSans-Regular", size: styleSize))
.foregroundStyle(Color.gray_main2_600) .foregroundStyle(Color.grayMain2c600)
} }
} }

View file

@ -23,3 +23,11 @@ target 'Linphone' do
basic_pods basic_pods
end 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