Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions GitStreak.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
/* Begin PBXBuildFile section */
1A2B3C4D5E6F7G8H9I0J1K2L /* GitStreakApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F7G8H9I0J1K2M /* GitStreakApp.swift */; };
1A2B3C4D5E6F7G8H9I0J1K2N /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F7G8H9I0J1K2O /* ContentView.swift */; };
2F37473F4A3E447A94D5BD80 /* AppConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29553B8F01694BF2B7DC3039 /* AppConstants.swift */; };
7B17ACAC872B4E6882454524 /* PrivacyPolicyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2BBE44C1AF9E4EDFB678D375 /* PrivacyPolicyView.swift */; };
7DAD5D8097AD443E8574373B /* TermsOfServiceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A992FC569EA64D0AB98A86A8 /* TermsOfServiceView.swift */; };
37824FFD043A4C92A86BE006 /* HelpSupportView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FDEDA15ABB534688910091EF /* HelpSupportView.swift */; };
1A2B3C4D5E6F7G8H9I0J1K2P /* GitStreakData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F7G8H9I0J1K2Q /* GitStreakData.swift */; };
1A2B3C4D5E6F7G8H9I0J1K2R /* StreakCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F7G8H9I0J1K2S /* StreakCardView.swift */; };
1A2B3C4D5E6F7G8H9I0J1K2T /* LevelProgressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2B3C4D5E6F7G8H9I0J1K2U /* LevelProgressView.swift */; };
Expand All @@ -34,6 +38,10 @@
/* Begin PBXFileReference section */
1A2B3C4D5E6F7G8H9I0J1K2M /* GitStreakApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitStreakApp.swift; sourceTree = "<group>"; };
1A2B3C4D5E6F7G8H9I0J1K2O /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
29553B8F01694BF2B7DC3039 /* AppConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppConstants.swift; sourceTree = "<group>"; };
2BBE44C1AF9E4EDFB678D375 /* PrivacyPolicyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrivacyPolicyView.swift; sourceTree = "<group>"; };
A992FC569EA64D0AB98A86A8 /* TermsOfServiceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TermsOfServiceView.swift; sourceTree = "<group>"; };
FDEDA15ABB534688910091EF /* HelpSupportView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HelpSupportView.swift; sourceTree = "<group>"; };
1A2B3C4D5E6F7G8H9I0J1K2Q /* GitStreakData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GitStreakData.swift; sourceTree = "<group>"; };
1A2B3C4D5E6F7G8H9I0J1K2S /* StreakCardView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StreakCardView.swift; sourceTree = "<group>"; };
1A2B3C4D5E6F7G8H9I0J1K2U /* LevelProgressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LevelProgressView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -84,6 +92,7 @@
children = (
1A2B3C4D5E6F7G8H9I0J1K2M /* GitStreakApp.swift */,
1A2B3C4D5E6F7G8H9I0J1K2O /* ContentView.swift */,
29553B8F01694BF2B7DC3039 /* AppConstants.swift */,
1A2B3C4D5E6F7G8H9I0J1K42 /* Models */,
1A2B3C4D5E6F7G8H9I0J1K43 /* Views */,
1A2B3C4D5E6F7G8H9I0J1K34 /* Assets.xcassets */,
Expand Down Expand Up @@ -119,6 +128,9 @@
1A2B3C4D5E6F7G8H9I0J1K30 /* AchievementsView.swift */,
1A2B3C4D5E6F7G8H9I0J1K3B /* AllCommitsView.swift */,
1A2B3C4D5E6F7G8H9I0J1K32 /* TabBarView.swift */,
2BBE44C1AF9E4EDFB678D375 /* PrivacyPolicyView.swift */,
A992FC569EA64D0AB98A86A8 /* TermsOfServiceView.swift */,
FDEDA15ABB534688910091EF /* HelpSupportView.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -237,6 +249,10 @@
buildActionMask = 2147483647;
files = (
1A2B3C4D5E6F7G8H9I0J1K2N /* ContentView.swift in Sources */,
2F37473F4A3E447A94D5BD80 /* AppConstants.swift in Sources */,
7B17ACAC872B4E6882454524 /* PrivacyPolicyView.swift in Sources */,
7DAD5D8097AD443E8574373B /* TermsOfServiceView.swift in Sources */,
37824FFD043A4C92A86BE006 /* HelpSupportView.swift in Sources */,
1A2B3C4D5E6F7G8H9I0J1K2P /* GitStreakData.swift in Sources */,
1A2B3C4D5E6F7G8H9I0J1K2R /* StreakCardView.swift in Sources */,
1A2B3C4D5E6F7G8H9I0J1K2T /* LevelProgressView.swift in Sources */,
Expand Down Expand Up @@ -392,7 +408,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"GitStreak/Preview Content\"";
DEVELOPMENT_TEAM = 389Y5DY6GV;
ENABLE_PREVIEWS = YES;
Expand Down Expand Up @@ -420,7 +436,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_ASSET_PATHS = "\"GitStreak/Preview Content\"";
DEVELOPMENT_TEAM = 389Y5DY6GV;
ENABLE_PREVIEWS = YES;
Expand All @@ -447,7 +463,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 389Y5DY6GV;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
Expand All @@ -466,7 +482,7 @@
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = 389Y5DY6GV;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 18.0;
Expand Down
23 changes: 23 additions & 0 deletions GitStreak/AppConstants.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Foundation

struct AppConstants {
// MARK: - Legal Document Dates
static let privacyPolicyLastUpdated = "August 27, 2025"
static let termsOfServiceEffectiveDate = "August 27, 2025"

// MARK: - Contact Information
static let supportEmail = "gitstreakapp@gmail.com"

// MARK: - External URLs
static let githubIssuesURL = "https://github.com/popand/gitstreak/issues"
static let githubTokenGenerationURL = "https://github.com/settings/tokens/new?scopes=repo,user&description=GitStreak%20App"

// MARK: - App Information
static var appVersion: String {
return Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? "Unknown"
}

static var buildNumber: String {
return Bundle.main.infoDictionary?["CFBundleVersion"] as? String ?? "Unknown"
}
}
107 changes: 102 additions & 5 deletions GitStreak/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ struct SettingsView: View {
@State private var isAuthenticating = false
@State private var showError = false
@State private var errorMessage = ""
@State private var showingPrivacyPolicy = false
@State private var showingTermsOfService = false
@State private var showingHelpSupport = false

var body: some View {
NavigationView {
Expand All @@ -307,6 +310,91 @@ struct SettingsView: View {
} else {
authenticationView
}

// Legal & Support Section
VStack(spacing: 12) {
Text("Resources")
.font(.system(size: 15, weight: .semibold))
.foregroundColor(.primary)
.frame(maxWidth: .infinity, alignment: .leading)

VStack(spacing: 0) {
// Help & Support
Button(action: { showingHelpSupport = true }) {
HStack {
Image(systemName: "questionmark.circle.fill")
.font(.system(size: 20))
.foregroundColor(.blue)
.frame(width: 28)

Text("Help & Support")
.font(.system(size: 14))
.foregroundColor(.primary)

Spacer()

Image(systemName: "chevron.right")
.font(.system(size: 12, weight: .semibold))
.foregroundColor(.secondary.opacity(0.5))
}
.padding(.horizontal, 16)
.padding(.vertical, 14)
}

Divider()
.padding(.leading, 60)

// Privacy Policy
Button(action: { showingPrivacyPolicy = true }) {
HStack {
Image(systemName: "lock.shield.fill")
.font(.system(size: 20))
.foregroundColor(.green)
.frame(width: 28)

Text("Privacy Policy")
.font(.system(size: 14))
.foregroundColor(.primary)

Spacer()

Image(systemName: "chevron.right")
.font(.system(size: 12, weight: .semibold))
.foregroundColor(.secondary.opacity(0.5))
}
.padding(.horizontal, 16)
.padding(.vertical, 14)
}

Divider()
.padding(.leading, 60)

// Terms of Service
Button(action: { showingTermsOfService = true }) {
HStack {
Image(systemName: "doc.text.fill")
.font(.system(size: 20))
.foregroundColor(.purple)
.frame(width: 28)

Text("Terms of Service")
.font(.system(size: 14))
.foregroundColor(.primary)

Spacer()

Image(systemName: "chevron.right")
.font(.system(size: 12, weight: .semibold))
.foregroundColor(.secondary.opacity(0.5))
}
.padding(.horizontal, 16)
.padding(.vertical, 14)
}
}
.background(Color(.systemBackground))
.cornerRadius(12)
}
.padding(.top, 8)
}
.padding(.horizontal, 20)
.padding(.top, 16)
Expand All @@ -317,11 +405,11 @@ struct SettingsView: View {
.navigationBarTitleDisplayMode(.large)
.toolbar {
ToolbarItem(placement: .navigationBarTrailing) {
Button(action: { dismiss() }) {
Text("Done")
.fontWeight(.semibold)
.foregroundColor(.blue)
Button("Done") {
dismiss()
}
.fontWeight(.semibold)
.foregroundColor(.blue)
}
}
}
Expand All @@ -330,6 +418,15 @@ struct SettingsView: View {
} message: {
Text(errorMessage)
}
.sheet(isPresented: $showingPrivacyPolicy) {
PrivacyPolicyView()
}
.sheet(isPresented: $showingTermsOfService) {
TermsOfServiceView()
}
.sheet(isPresented: $showingHelpSupport) {
HelpSupportView()
}
}

private var authenticatedView: some View {
Expand Down Expand Up @@ -593,7 +690,7 @@ struct SettingsView: View {
}

Button(action: {
if let url = URL(string: "https://github.com/settings/tokens/new?scopes=repo,user&description=GitStreak%20App") {
if let url = URL(string: AppConstants.githubTokenGenerationURL) {
UIApplication.shared.open(url)
}
}) {
Expand Down
Loading