fix(signing): remove Access Wi-Fi entitlement (unsupported on free teams)
- Drop com.apple.developer.networking.wifi-info from project.yml entitlements and NSLocationWhenInUseUsageDescription from Info.plist - SSID detection gracefully returns nil without the capability; all UI handles nil SSID already via optional chaining feat: branding, ring polish, sign-out UX, version/support - LoginView: replace title with "kisani." monospaced wordmark + UGREEN logo, show username then NAS display name after login - BackupView: "kisani." + UGREEN logo chip in toolbar; ring color is orange (in-progress), green (completed), destructive (failed), dim (idle) - BackupJob: cap progress at min(1.0, ...) to prevent >100% display - SettingsView sign-out dialog: two actions — "Sign Out" (lock only, keeps NAS) and "Sign Out & Forget NAS" (full clear); clearer message - SettingsView ACCOUNT section: App Version v1.0 + Support mailto rows - AppMenuView: About section with kisani. wordmark, version, support link Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,8 +27,6 @@
|
|||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>NSFaceIDUsageDescription</key>
|
<key>NSFaceIDUsageDescription</key>
|
||||||
<string>Sign in quickly with Face ID.</string>
|
<string>Sign in quickly with Face ID.</string>
|
||||||
<key>NSLocationWhenInUseUsageDescription</key>
|
|
||||||
<string>Used to detect your home Wi-Fi network name for automatic backup.</string>
|
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
<string>NASBackup needs access to your photos to back them up to your NAS.</string>
|
<string>NASBackup needs access to your photos to back them up to your NAS.</string>
|
||||||
<key>UIApplicationSceneManifest</key>
|
<key>UIApplicationSceneManifest</key>
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ final class BackupJob: ObservableObject {
|
|||||||
|
|
||||||
var progress: Double {
|
var progress: Double {
|
||||||
guard totalFiles > 0 else { return 0 }
|
guard totalFiles > 0 else { return 0 }
|
||||||
return Double(uploadedFiles + skippedFiles + failedFiles) / Double(totalFiles)
|
return min(1.0, Double(uploadedFiles + skippedFiles + failedFiles) / Double(totalFiles))
|
||||||
}
|
}
|
||||||
|
|
||||||
var eta: TimeInterval? {
|
var eta: TimeInterval? {
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ struct AppMenuView: View {
|
|||||||
if !errorEntries.isEmpty {
|
if !errorEntries.isEmpty {
|
||||||
errorsSection
|
errorsSection
|
||||||
}
|
}
|
||||||
|
aboutSection
|
||||||
}
|
}
|
||||||
.padding(.horizontal, AppTheme.hPad)
|
.padding(.horizontal, AppTheme.hPad)
|
||||||
.padding(.top, 8)
|
.padding(.top, 8)
|
||||||
@@ -248,6 +249,60 @@ struct AppMenuView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: — About
|
||||||
|
|
||||||
|
private var aboutSection: some View {
|
||||||
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
|
menuSectionLabel("ABOUT")
|
||||||
|
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
HStack(spacing: 12) {
|
||||||
|
Image("ugreen_logo")
|
||||||
|
.resizable()
|
||||||
|
.scaledToFit()
|
||||||
|
.frame(width: 28, height: 28)
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: 7, style: .continuous))
|
||||||
|
Text("kisani.")
|
||||||
|
.font(.system(size: 13, weight: .medium, design: .monospaced))
|
||||||
|
.foregroundStyle(AppTheme.ink)
|
||||||
|
.kerning(0.5)
|
||||||
|
Spacer()
|
||||||
|
Text("v1.0")
|
||||||
|
.font(AppTheme.micro())
|
||||||
|
.foregroundStyle(AppTheme.inkTertiary)
|
||||||
|
}
|
||||||
|
.padding(.horizontal, AppTheme.cardPad)
|
||||||
|
.padding(.vertical, 14)
|
||||||
|
|
||||||
|
menuHairline
|
||||||
|
|
||||||
|
Link(destination: URL(string: "mailto:apps@provoc.ug")!) {
|
||||||
|
HStack(spacing: 12) {
|
||||||
|
Image(systemName: "envelope")
|
||||||
|
.font(.system(size: 13, weight: .regular))
|
||||||
|
.foregroundStyle(AppTheme.inkSecondary)
|
||||||
|
.frame(width: 20)
|
||||||
|
Text("Support")
|
||||||
|
.font(AppTheme.body())
|
||||||
|
.foregroundStyle(AppTheme.ink)
|
||||||
|
Spacer()
|
||||||
|
Text("apps@provoc.ug")
|
||||||
|
.font(AppTheme.micro())
|
||||||
|
.foregroundStyle(AppTheme.inkTertiary)
|
||||||
|
Image(systemName: "arrow.up.right")
|
||||||
|
.font(.system(size: 10, weight: .medium))
|
||||||
|
.foregroundStyle(AppTheme.inkQuaternary)
|
||||||
|
}
|
||||||
|
.padding(.horizontal, AppTheme.cardPad)
|
||||||
|
.padding(.vertical, 14)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.background(AppTheme.surfaceRaised)
|
||||||
|
.clipShape(RoundedRectangle(cornerRadius: AppTheme.radius, style: .continuous))
|
||||||
|
.shadow(color: AppTheme.cardShadow, radius: 12, x: 0, y: 2)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: — Helpers
|
// MARK: — Helpers
|
||||||
|
|
||||||
private func menuSectionLabel(_ text: String) -> some View {
|
private func menuSectionLabel(_ text: String) -> some View {
|
||||||
|
|||||||
@@ -81,14 +81,15 @@ struct BackupView: View {
|
|||||||
|
|
||||||
private var logoChip: some View {
|
private var logoChip: some View {
|
||||||
HStack(spacing: 6) {
|
HStack(spacing: 6) {
|
||||||
Image("nas_logo_clean")
|
Image("ugreen_logo")
|
||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
.frame(width: 22, height: 22)
|
.frame(width: 22, height: 22)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 5, style: .continuous))
|
.clipShape(RoundedRectangle(cornerRadius: 5, style: .continuous))
|
||||||
Text("Kisani")
|
Text("kisani.")
|
||||||
.font(.system(size: 15, weight: .semibold))
|
.font(.system(size: 13, weight: .medium, design: .monospaced))
|
||||||
.foregroundStyle(AppTheme.ink)
|
.foregroundStyle(AppTheme.inkSecondary)
|
||||||
|
.kerning(0.5)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,7 +238,9 @@ struct BackupView: View {
|
|||||||
switch engine.job.status {
|
switch engine.job.status {
|
||||||
case .completed: return AppTheme.positive
|
case .completed: return AppTheme.positive
|
||||||
case .failed: return AppTheme.destructive
|
case .failed: return AppTheme.destructive
|
||||||
default: return AppTheme.ink
|
case .running, .paused,
|
||||||
|
.preparing: return Color(red: 1.0, green: 0.58, blue: 0.0)
|
||||||
|
default: return AppTheme.inkQuaternary.opacity(0.6)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,33 +14,28 @@ struct LoginView: View {
|
|||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
// ── App identity ──────────────────────────
|
// ── Brand + logo ──────────────────────────
|
||||||
VStack(spacing: 6) {
|
VStack(spacing: 20) {
|
||||||
Text("Kisani")
|
brandMark
|
||||||
.font(.system(size: 34, weight: .bold, design: .default))
|
|
||||||
.foregroundStyle(AppTheme.ink)
|
|
||||||
.opacity(appeared ? 1 : 0)
|
.opacity(appeared ? 1 : 0)
|
||||||
.offset(y: appeared ? 0 : 8)
|
.offset(y: appeared ? 0 : 10)
|
||||||
.animation(.spring(response: 0.44, dampingFraction: 0.82).delay(0.06), value: appeared)
|
.animation(.spring(response: 0.44, dampingFraction: 0.82).delay(0.06), value: appeared)
|
||||||
}
|
|
||||||
|
|
||||||
Spacer().frame(height: 28)
|
|
||||||
|
|
||||||
// ── Logo ──────────────────────────────────
|
|
||||||
logoView
|
logoView
|
||||||
.scaleEffect(appeared ? 1 : 0.88)
|
.scaleEffect(appeared ? 1 : 0.88)
|
||||||
.opacity(appeared ? 1 : 0)
|
.opacity(appeared ? 1 : 0)
|
||||||
.animation(.spring(response: 0.48, dampingFraction: 0.74).delay(0.12), value: appeared)
|
.animation(.spring(response: 0.48, dampingFraction: 0.74).delay(0.12), value: appeared)
|
||||||
|
}
|
||||||
|
|
||||||
Spacer().frame(height: 24)
|
Spacer().frame(height: 32)
|
||||||
|
|
||||||
// ── Session context ───────────────────────
|
// ── Session context ───────────────────────
|
||||||
if let conn = connection {
|
if let conn = connection {
|
||||||
VStack(spacing: 5) {
|
VStack(spacing: 4) {
|
||||||
Text(conn.displayName)
|
Text(conn.username)
|
||||||
.font(.system(size: 17, weight: .semibold))
|
.font(.system(size: 17, weight: .semibold))
|
||||||
.foregroundStyle(AppTheme.ink)
|
.foregroundStyle(AppTheme.ink)
|
||||||
Text(conn.username)
|
Text(conn.displayName)
|
||||||
.font(.system(size: 14, weight: .regular))
|
.font(.system(size: 14, weight: .regular))
|
||||||
.foregroundStyle(AppTheme.inkTertiary)
|
.foregroundStyle(AppTheme.inkTertiary)
|
||||||
}
|
}
|
||||||
@@ -49,7 +44,7 @@ struct LoginView: View {
|
|||||||
.animation(.spring(response: 0.4, dampingFraction: 0.8).delay(0.18), value: appeared)
|
.animation(.spring(response: 0.4, dampingFraction: 0.8).delay(0.18), value: appeared)
|
||||||
}
|
}
|
||||||
|
|
||||||
Spacer().frame(height: 44)
|
Spacer().frame(height: 40)
|
||||||
|
|
||||||
// ── Auth ──────────────────────────────────
|
// ── Auth ──────────────────────────────────
|
||||||
VStack(spacing: 14) {
|
VStack(spacing: 14) {
|
||||||
@@ -109,21 +104,29 @@ struct LoginView: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MARK: — Brand mark
|
||||||
|
|
||||||
|
private var brandMark: some View {
|
||||||
|
Text("kisani.")
|
||||||
|
.font(.system(size: 13, weight: .medium, design: .monospaced))
|
||||||
|
.foregroundStyle(AppTheme.inkTertiary)
|
||||||
|
.kerning(1.2)
|
||||||
|
}
|
||||||
|
|
||||||
// MARK: — Logo
|
// MARK: — Logo
|
||||||
|
|
||||||
private var logoView: some View {
|
private var logoView: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
// Subtle ring so logo edge is always legible against any background
|
|
||||||
RoundedRectangle(cornerRadius: 24, style: .continuous)
|
RoundedRectangle(cornerRadius: 24, style: .continuous)
|
||||||
.stroke(AppTheme.inkQuaternary, lineWidth: 0.5)
|
.stroke(AppTheme.inkQuaternary, lineWidth: 0.5)
|
||||||
.frame(width: 92, height: 92)
|
.frame(width: 92, height: 92)
|
||||||
|
|
||||||
Image("nas_logo_clean")
|
Image("ugreen_logo")
|
||||||
.resizable()
|
.resizable()
|
||||||
.scaledToFit()
|
.scaledToFit()
|
||||||
.frame(width: 90, height: 90)
|
.frame(width: 90, height: 90)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 22, style: .continuous))
|
.clipShape(RoundedRectangle(cornerRadius: 22, style: .continuous))
|
||||||
}
|
}
|
||||||
.shadow(color: .black.opacity(0.14), radius: 20, x: 0, y: 6)
|
.shadow(color: .black.opacity(0.12), radius: 20, x: 0, y: 6)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,10 +33,11 @@ struct SettingsView: View {
|
|||||||
isPresented: $showSignOutConfirm,
|
isPresented: $showSignOutConfirm,
|
||||||
titleVisibility: .visible
|
titleVisibility: .visible
|
||||||
) {
|
) {
|
||||||
|
Button("Sign Out", role: .destructive) { store.lock() }
|
||||||
Button("Sign Out & Forget NAS", role: .destructive) { store.signOut() }
|
Button("Sign Out & Forget NAS", role: .destructive) { store.signOut() }
|
||||||
Button("Cancel", role: .cancel) {}
|
Button("Cancel", role: .cancel) {}
|
||||||
} message: {
|
} message: {
|
||||||
Text("Your NAS connection and backup settings will be removed from this device.")
|
Text("\"Sign Out\" keeps your NAS saved and requires Face ID next time. \"Sign Out & Forget NAS\" removes everything from this device.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -463,6 +464,51 @@ struct SettingsView: View {
|
|||||||
VStack(alignment: .leading, spacing: 8) {
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
sectionLabel("ACCOUNT")
|
sectionLabel("ACCOUNT")
|
||||||
|
|
||||||
|
VStack(spacing: 0) {
|
||||||
|
// App version row
|
||||||
|
HStack(spacing: 12) {
|
||||||
|
Image(systemName: "info.circle")
|
||||||
|
.font(.system(size: 14, weight: .regular))
|
||||||
|
.foregroundStyle(AppTheme.inkSecondary)
|
||||||
|
.frame(width: 20)
|
||||||
|
Text("App version")
|
||||||
|
.font(AppTheme.body())
|
||||||
|
.foregroundStyle(AppTheme.ink)
|
||||||
|
Spacer()
|
||||||
|
Text("v1.0")
|
||||||
|
.font(AppTheme.caption())
|
||||||
|
.foregroundStyle(AppTheme.inkTertiary)
|
||||||
|
}
|
||||||
|
.padding(.horizontal, AppTheme.cardPad)
|
||||||
|
.padding(.vertical, 14)
|
||||||
|
|
||||||
|
hairline
|
||||||
|
|
||||||
|
// Support row
|
||||||
|
Link(destination: URL(string: "mailto:apps@provoc.ug")!) {
|
||||||
|
HStack(spacing: 12) {
|
||||||
|
Image(systemName: "envelope")
|
||||||
|
.font(.system(size: 14, weight: .regular))
|
||||||
|
.foregroundStyle(AppTheme.inkSecondary)
|
||||||
|
.frame(width: 20)
|
||||||
|
Text("Support")
|
||||||
|
.font(AppTheme.body())
|
||||||
|
.foregroundStyle(AppTheme.ink)
|
||||||
|
Spacer()
|
||||||
|
Text("apps@provoc.ug")
|
||||||
|
.font(AppTheme.caption())
|
||||||
|
.foregroundStyle(AppTheme.inkTertiary)
|
||||||
|
Image(systemName: "arrow.up.right")
|
||||||
|
.font(.system(size: 10, weight: .medium))
|
||||||
|
.foregroundStyle(AppTheme.inkQuaternary)
|
||||||
|
}
|
||||||
|
.padding(.horizontal, AppTheme.cardPad)
|
||||||
|
.padding(.vertical, 14)
|
||||||
|
}
|
||||||
|
|
||||||
|
hairline
|
||||||
|
|
||||||
|
// Sign Out button
|
||||||
Button(action: { showSignOutConfirm = true }) {
|
Button(action: { showSignOutConfirm = true }) {
|
||||||
HStack(spacing: 12) {
|
HStack(spacing: 12) {
|
||||||
Image(systemName: "rectangle.portrait.and.arrow.right")
|
Image(systemName: "rectangle.portrait.and.arrow.right")
|
||||||
@@ -476,12 +522,13 @@ struct SettingsView: View {
|
|||||||
}
|
}
|
||||||
.padding(.horizontal, AppTheme.cardPad)
|
.padding(.horizontal, AppTheme.cardPad)
|
||||||
.padding(.vertical, 14)
|
.padding(.vertical, 14)
|
||||||
|
}
|
||||||
|
.buttonStyle(ScaleButtonStyle())
|
||||||
|
}
|
||||||
.background(AppTheme.surfaceRaised)
|
.background(AppTheme.surfaceRaised)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: AppTheme.radius, style: .continuous))
|
.clipShape(RoundedRectangle(cornerRadius: AppTheme.radius, style: .continuous))
|
||||||
.shadow(color: AppTheme.cardShadow, radius: 12, x: 0, y: 2)
|
.shadow(color: AppTheme.cardShadow, radius: 12, x: 0, y: 2)
|
||||||
}
|
}
|
||||||
.buttonStyle(ScaleButtonStyle())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict/>
|
||||||
<key>com.apple.developer.networking.wifi-info</key>
|
|
||||||
<true/>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
</plist>
|
||||||
|
|||||||
@@ -65,12 +65,10 @@ targets:
|
|||||||
- fetch
|
- fetch
|
||||||
- processing
|
- processing
|
||||||
NSPhotoLibraryUsageDescription: NASBackup needs access to your photos to back them up to your NAS.
|
NSPhotoLibraryUsageDescription: NASBackup needs access to your photos to back them up to your NAS.
|
||||||
NSLocationWhenInUseUsageDescription: Used to detect your home Wi-Fi network name for automatic backup.
|
|
||||||
NSFaceIDUsageDescription: Sign in quickly with Face ID.
|
NSFaceIDUsageDescription: Sign in quickly with Face ID.
|
||||||
entitlements:
|
entitlements:
|
||||||
path: NASBackup.entitlements
|
path: NASBackup.entitlements
|
||||||
properties:
|
properties: {}
|
||||||
com.apple.developer.networking.wifi-info: true
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- package: SMBClient
|
- package: SMBClient
|
||||||
product: SMBClient
|
product: SMBClient
|
||||||
|
|||||||
Reference in New Issue
Block a user