Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.0 #4

Merged
merged 2 commits into from
Feb 13, 2024
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
36 changes: 18 additions & 18 deletions Cami.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -898,10 +898,10 @@
GENERATE_PROFILING_CODE = YES;
INFOPLIST_KEY_CFBundleDisplayName = Cami;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthday information in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthdays information in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Aemi Studio. All Rights Reserved.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit, delete, save or send those information away.";
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 14.0;
Expand Down Expand Up @@ -1026,10 +1026,10 @@
GENERATE_PROFILING_CODE = YES;
INFOPLIST_KEY_CFBundleDisplayName = Cami;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthday information in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthdays information in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Aemi Studio. All Rights Reserved.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit, delete, save or send those information away.";
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 14.0;
Expand Down Expand Up @@ -1074,10 +1074,10 @@
INFOPLIST_KEY_CFBundleDisplayName = Cami;
INFOPLIST_KEY_CLKComplicationPrincipalClass = "";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthday information in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthdays information in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Aemi Studio. All Rights Reserved.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit, delete, save or send those information away.";
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
Expand Down Expand Up @@ -1132,10 +1132,10 @@
INFOPLIST_KEY_CFBundleDisplayName = Cami;
INFOPLIST_KEY_CLKComplicationPrincipalClass = "";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthday information in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthdays information in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Aemi Studio. All Rights Reserved.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit, delete, save or send those information away.";
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES;
"INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES;
"INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES;
Expand Down Expand Up @@ -1183,10 +1183,10 @@
INFOPLIST_KEY_CFBundleDisplayName = CamiWidget;
INFOPLIST_KEY_CLKComplicationPrincipalClass = "";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthday information in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthdays information in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Aemi Studio. All Rights Reserved.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_UIRequiredDeviceCapabilities = "";
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -1231,10 +1231,10 @@
INFOPLIST_KEY_CFBundleDisplayName = CamiWidget;
INFOPLIST_KEY_CLKComplicationPrincipalClass = "";
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthday information in widgets.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSCalendarsUsageDescription = "Cami ONLY uses your on-device calendar information to display events in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSContactsUsageDescription = "Cami ONLY uses your on-device contacts information to display birthdays information in widgets.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_NSHumanReadableCopyright = "© 2024 Aemi Studio. All Rights Reserved.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit or delete or send those information away.";
INFOPLIST_KEY_NSRemindersUsageDescription = "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\nCami DOES NOT edit, delete, save or send those information away.";
INFOPLIST_KEY_UIRequiredDeviceCapabilities = "";
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
65 changes: 42 additions & 23 deletions Cami/View/ButtonInnerBody.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ struct ButtonInnerBody: View {
var label: String
var description: String?
var systemImage: String?
var radius: Double?
var border: Bool? = false
var radius: Double = 16
var border: Bool = false
var opacity: Double = 0.1
var alignment: TextAlignment? = .leading
var halignment: HorizontalAlignment {
return switch alignment {
Expand All @@ -31,40 +32,62 @@ struct ButtonInnerBody: View {
HStack {
VStack(alignment: halignment, spacing: 3) {
Group {
Text(label)
.font(.title3)
.fontWeight(.medium)
.foregroundStyle(.tint)
.accessibilityHidden(true)
if opacity < 1.0 {
Text(label)
.font(.title3)
.fontWeight(.medium)
.foregroundStyle(.tint)
} else {
Text(label)
.font(.title3)
.fontWeight(.medium)
.foregroundStyle(.white)
}

if let description = description {
Text(description)
.font(.body)
.fontWeight(.regular)
.foregroundStyle(.tint.opacity(0.8))
if opacity < 1 {
Text(description)
.font(.body)
.fontWeight(.regular)
.foregroundStyle(.tint.opacity(0.8))
} else {
Text(description)
.font(.body)
.fontWeight(.regular)
.foregroundStyle(.white.opacity(0.8))
}
}
}
.accessibilityHidden(true)
.multilineTextAlignment(alignment ?? .leading)
}
if noIcon != true {
Spacer()
VStack(alignment: .center) {
Image(systemName: systemImage ?? "arrow.up.forward.square")
.font(.title3)
.fontWeight(.semibold)
.foregroundStyle(.tint)
.accessibilityHidden(true)
if opacity < 1 {
Image(systemName: systemImage ?? "arrow.up.forward.square")
.font(.title3)
.fontWeight(.semibold)
.foregroundStyle(.tint)
.accessibilityHidden(true)
} else {
Image(systemName: systemImage ?? "arrow.up.forward.square")
.font(.title3)
.fontWeight(.semibold)
.foregroundStyle(.white)
.accessibilityHidden(true)
}
}
}
}
.frame(maxWidth: .infinity)
.padding()
.background(.ultraThinMaterial.opacity(0.5))
.background(.tint.quinary.opacity(0.5))
.clipShape(RoundedRectangle(cornerRadius: radius ?? 16))
.background(.tint.opacity(opacity))
.clipShape(RoundedRectangle(cornerRadius: radius))
.overlay {
if border == true {
RoundedRectangle(cornerRadius: radius ?? 16)
RoundedRectangle(cornerRadius: radius)
.stroke(.tint, lineWidth: 0.5)
.foregroundStyle(.clear)
} else {
Expand All @@ -73,7 +96,3 @@ struct ButtonInnerBody: View {
}
}
}

#Preview {
ButtonInnerBody(label: "Button")
}
58 changes: 45 additions & 13 deletions Cami/View/OnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,51 @@ struct OnboardingView: View {
.tint(.red)
}
} else {
Button {
areSettingsPresented.toggle()
} label: {
// swiftlint:disable line_length
ButtonInnerBody(
label: "Grant Access",
description: "Cami needs you to grant it access to your calendar and contacts information to work properly.",
systemImage: "checkmark.circle.badge.questionmark",
radius: 8,
border: true
)
.tint(.orange)
// swiftlint:enable line_length
VStack(alignment: .leading, spacing: 16) {
VStack(alignment: .leading, spacing: 3) {
HStack {
Text("Set Up Cami")
.font(.title3)
.fontWeight(.medium)
.foregroundStyle(.tint)
Spacer()
}
HStack {
Text("""
Cami needs access to your calendars to work properly.
It can also use your contacts information to display birthdays in widgets.
""")
.font(.body)
.fontWeight(.regular)
.foregroundStyle(.tint.opacity(0.8))

Spacer()
}
}
.frame(maxWidth: .infinity)
.multilineTextAlignment(.leading)

Button {
areSettingsPresented.toggle()
} label: {
ButtonInnerBody(
label: "Continue",
systemImage: "arrow.forward.square",
radius: 8,
border: false,
opacity: 1
)
}
}
.frame(maxWidth: .infinity)
.padding()
.background(.ultraThinMaterial.opacity(0.5))
.background(.tint.opacity(0.1))
.clipShape(RoundedRectangle(cornerRadius: 12))
.overlay {
RoundedRectangle(cornerRadius: 12)
.stroke(.tint, lineWidth: 0.5)
.foregroundStyle(.clear)
}
}
} else {
Expand Down
5 changes: 3 additions & 2 deletions Cami/View/Settings/PermissionAccessButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ struct PermissionAccessButton: View {
PermissionModel.center.post(name: self.name, object: self)
} label: {
ButtonInnerBody(
label: "Authorize",
label: "Continue",
systemImage: "arrow.forward.square",
radius: 8,
border: true,
noIcon: true
opacity: 1.0
)
.tint(.blue)
}
Expand Down
2 changes: 1 addition & 1 deletion Cami/View/Settings/PermissionSettingsFallbackButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
struct PermissionSettingsFallbackButton: View {

var description: String = ""
var radius: Double? = 8.0
var radius: Double = 8.0

var body: some View {
Button {
Expand Down
6 changes: 3 additions & 3 deletions Cami/View/Settings/PermissionsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct PermissionsView: View {
title: "Calendars",
label: "Access to calendars authorized",
notificationName: .requestCalendarsAccess,
description: "Cami ONLY uses your calendars informations to display events in widgets.",
description: "Cami ONLY uses your on-device calendar information to display events in widgets.\n\nCami DOES NOT edit, delete, save or send those information away.",
restrictedDescription: "Review Cami access to your calendars."
)

Expand All @@ -46,7 +46,7 @@ struct PermissionsView: View {
title: "Contacts",
label: "Access to contacts authorized",
notificationName: .requestContactsAccess,
description: "Cami ONLY uses your contacts informations to display birthday information in widgets.",
description: "Cami ONLY uses your on-device contacts information to display birthdays information in widgets.\n\nCami DOES NOT edit, delete, save or send those information away.",
restrictedDescription: "Review Cami access to your contacts."
)

Expand All @@ -56,7 +56,7 @@ struct PermissionsView: View {
title: "Reminders",
label: "Access to reminders authorized",
notificationName: .requestRemindersAccess,
description: "Cami ONLY uses your reminders informations to display them in widgets.",
description: "Cami ONLY uses your on-device reminders information to display them in widgets and the application.\n\nCami DOES NOT edit, delete, save or send those information away.",
restrictedDescription: "Review Cami access to your reminders."
)
}
Expand Down
Loading
Loading