Skip to content

Commit

Permalink
- Release v0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
KhubaibKhan4 committed Feb 4, 2025
1 parent 20432d4 commit d0186eb
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 44 deletions.
22 changes: 11 additions & 11 deletions Notes.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
objects = {

/* Begin PBXFileReference section */
49BA1F862CBD8E700099CDCB /* Notes.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Notes.app; sourceTree = BUILT_PRODUCTS_DIR; };
49BA1F862CBD8E700099CDCB /* CloudNote AI.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "CloudNote AI.app"; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */
Expand Down Expand Up @@ -67,7 +67,7 @@
49BA1F872CBD8E700099CDCB /* Products */ = {
isa = PBXGroup;
children = (
49BA1F862CBD8E700099CDCB /* Notes.app */,
49BA1F862CBD8E700099CDCB /* CloudNote AI.app */,
);
name = Products;
sourceTree = "<group>";
Expand All @@ -93,7 +93,7 @@
);
name = Notes;
productName = Notes;
productReference = 49BA1F862CBD8E700099CDCB /* Notes.app */;
productReference = 49BA1F862CBD8E700099CDCB /* CloudNote AI.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
Expand Down Expand Up @@ -314,11 +314,11 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Notes/Preview Content\"";
DEVELOPMENT_TEAM = X2MJP5MGGS;
DEVELOPMENT_TEAM = XWNB8PG966;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Notes/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = NoteSync;
INFOPLIST_KEY_CFBundleDisplayName = "CloudNote AI";
INFOPLIST_KEY_NSCameraUsageDescription = "Provide us the Camera Permission to Take Images and Record Videos to Store in Notes App.";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "Provide us the Location Permission to Provide the realtime location inside the app.";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "Provide us the Location Permission to Provide the realtime location inside the app.";
Expand All @@ -333,8 +333,8 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.codespacepro.Notes.note;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = com.brikmas.aipowerednotes.sync.notes;
PRODUCT_NAME = "CloudNote AI";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -349,11 +349,11 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Notes/Preview Content\"";
DEVELOPMENT_TEAM = X2MJP5MGGS;
DEVELOPMENT_TEAM = XWNB8PG966;
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = Notes/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = NoteSync;
INFOPLIST_KEY_CFBundleDisplayName = "CloudNote AI";
INFOPLIST_KEY_NSCameraUsageDescription = "Provide us the Camera Permission to Take Images and Record Videos to Store in Notes App.";
INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "Provide us the Location Permission to Provide the realtime location inside the app.";
INFOPLIST_KEY_NSLocationAlwaysUsageDescription = "Provide us the Location Permission to Provide the realtime location inside the app.";
Expand All @@ -368,8 +368,8 @@
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.codespacepro.Notes.note;
PRODUCT_NAME = "$(TARGET_NAME)";
PRODUCT_BUNDLE_IDENTIFIER = com.brikmas.aipowerednotes.sync.notes;
PRODUCT_NAME = "CloudNote AI";
SWIFT_EMIT_LOC_STRINGS = YES;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
Binary file not shown.
20 changes: 13 additions & 7 deletions Notes/presentation/screens/setting/SettingScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ struct SettingScreen: View {
@Environment(\.colorScheme) private var colorScheme

@State private var themeText: String = "Light Mode"
@State private var appVersion: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "Unknown"

@EnvironmentObject private var appManager: AppManager

Expand All @@ -26,7 +27,7 @@ struct SettingScreen: View {
Group {
Section("Localization") {
NavigationLink(destination: CountrySelectorView(), label: {
Label("Languages", systemImage: "globe")
Label("Languages: \(appManager.languageName)", systemImage: "globe")
})
}

Expand All @@ -36,11 +37,7 @@ struct SettingScreen: View {
}.toggleStyle(.switch)
.onChange(of: appManager.isDark) { oldValue, newValue in
print("Color Scheme Changed \(newValue)")
if newValue {
themeText = "Dark Mode"
}else {
themeText = "Light Mode"
}
themeText = newValue ? "Dark Mode" : "Light Mode"
appManager.isDark = newValue
}
}
Expand All @@ -59,12 +56,21 @@ struct SettingScreen: View {
}
}

Section("App Version") {
HStack {
Label("App Version", systemImage: "info.circle")
Spacer()
Text(appVersion)
.foregroundColor(.gray)
}
}

}.onAppear {
themeText = appManager.isDark ? "Dark Mode" : "Light Mode"
}
}
.preferredColorScheme(appManager.isDark ? .dark : .light)
.navigationTitle("Setting")
.navigationTitle("Settings")
}
}
}
43 changes: 17 additions & 26 deletions Notes/presentation/screens/setting/SettingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ struct CountrySelectorView: View {
@State private var selectedCountry: Country? = nil
@State private var countries: [Country] = [
Country(name: "United States", flag: "🇺🇸", language: "English", languageCode: "en"),
Country(name: "Canada", flag: "🇨🇦", language: "French", languageCode: "en, fr"),
Country(name: "Canada", flag: "🇨🇦", language: "French", languageCode: "fr"),
Country(name: "United Kingdom", flag: "🇬🇧", language: "English", languageCode: "en"),
Country(name: "India", flag: "🇮🇳", language: "Hindi", languageCode: "hi, en"),
Country(name: "India", flag: "🇮🇳", language: "Hindi", languageCode: "hi"),
Country(name: "Germany", flag: "🇩🇪", language: "German", languageCode: "de"),
Country(name: "Australia", flag: "🇦🇺", language: "English", languageCode: "en"),
Country(name: "Japan", flag: "🇯🇵", language: "Japanese", languageCode: "ja"),
Expand All @@ -32,16 +32,16 @@ struct CountrySelectorView: View {
Country(name: "Norway", flag: "🇳🇴", language: "Norwegian", languageCode: "no"),
Country(name: "Netherlands", flag: "🇳🇱", language: "Dutch", languageCode: "nl"),
Country(name: "Turkey", flag: "🇹🇷", language: "Turkish", languageCode: "tr"),
Country(name: "South Africa", flag: "🇿🇦", language: "Afrikaans", languageCode: "af, en"),
Country(name: "South Africa", flag: "🇿🇦", language: "Afrikaans", languageCode: "af"),
Country(name: "Egypt", flag: "🇪🇬", language: "Arabic", languageCode: "ar"),
Country(name: "Thailand", flag: "🇹🇭", language: "Thai", languageCode: "th"),
Country(name: "Vietnam", flag: "🇻🇳", language: "Vietnamese", languageCode: "vi"),
Country(name: "Argentina", flag: "🇦🇷", language: "Spanish", languageCode: "es"),
Country(name: "Nigeria", flag: "🇳🇬", language: "English", languageCode: "en"),
Country(name: "Indonesia", flag: "🇮🇩", language: "Indonesian", languageCode: "id"),
Country(name: "Pakistan", flag: "🇵🇰", language: "Urdu", languageCode: "ur, en"),
Country(name: "Pakistan", flag: "🇵🇰", language: "Urdu", languageCode: "ur"),
Country(name: "Bangladesh", flag: "🇧🇩", language: "Bengali", languageCode: "bn"),
Country(name: "Philippines", flag: "🇵🇭", language: "Filipino", languageCode: "fil, en"),
Country(name: "Philippines", flag: "🇵🇭", language: "Filipino", languageCode: "fil"),
Country(name: "Malaysia", flag: "🇲🇾", language: "Malay", languageCode: "ms"),
Country(name: "Iran", flag: "🇮🇷", language: "Persian", languageCode: "fa"),
Country(name: "Iraq", flag: "🇮🇶", language: "Kurdish", languageCode: "ar, ku"),
Expand All @@ -54,15 +54,15 @@ struct CountrySelectorView: View {
Country(name: "Ukraine", flag: "🇺🇦", language: "Ukrainian", languageCode: "uk"),
Country(name: "Greece", flag: "🇬🇷", language: "Greek", languageCode: "el"),
Country(name: "Serbia", flag: "🇷🇸", language: "Serbian", languageCode: "sr"),
Country(name: "Switzerland", flag: "🇨🇭", language: "French", languageCode: "de, fr, it"),
Country(name: "Switzerland", flag: "🇨🇭", language: "French", languageCode: "de"),
Country(name: "Denmark", flag: "🇩🇰", language: "Danish", languageCode: "da"),
Country(name: "Finland", flag: "🇫🇮", language: "Finnish", languageCode: "fi, sv"),
Country(name: "Iceland", flag: "🇮🇸", language: "Icelandic", languageCode: "is"),
Country(name: "Estonia", flag: "🇪🇪", language: "Estonian", languageCode: "et"),
Country(name: "Latvia", flag: "🇱🇻", language: "Latvian", languageCode: "lv"),
Country(name: "Lithuania", flag: "🇱🇹", language: "Lithuanian", languageCode: "lt"),
Country(name: "Belarus", flag: "🇧🇾", language: "Russian", languageCode: "be, ru"),
Country(name: "Kazakhstan", flag: "🇰🇿", language: "Russian", languageCode: "kk, ru"),
Country(name: "Belarus", flag: "🇧🇾", language: "Russian", languageCode: "be"),
Country(name: "Kazakhstan", flag: "🇰🇿", language: "Russian", languageCode: "kk"),
]


Expand All @@ -84,21 +84,6 @@ struct CountrySelectorView: View {

var body: some View {
VStack {
if let selectedCountry = selectedCountry {
HStack {
Text(selectedCountry.flag)
.font(.largeTitle)
Text(selectedCountry.language)
.font(.title)
.bold()
}
.padding()
} else {
Text("Select a language")
.font(.title2)
.foregroundColor(.gray)
.padding()
}

TextField("Search countries", text: $searchText)
.padding(10)
Expand All @@ -111,9 +96,9 @@ struct CountrySelectorView: View {
Text(country.flag)
.font(.largeTitle)
VStack(alignment: .leading) {
Text(country.name)
Text(country.language)
.font(.headline)
Text("\(country.language) (\(country.languageCode))")
Text("\(country.languageCode)")
.font(.subheadline)
.foregroundColor(.gray)
}
Expand All @@ -133,7 +118,13 @@ struct CountrySelectorView: View {
.listStyle(PlainListStyle())
.padding()
}
.navigationTitle("Select Country")
.navigationTitle("Select Language")
.onAppear {
if let selected = countries.first(where: { $0.languageCode == appManager.appLanguage }) {
selectedCountry = selected
}
}

}
}

Expand Down

0 comments on commit d0186eb

Please sign in to comment.