diff --git a/1_anytime Kopie 2.pxd/QuickLook/Icon.webp b/1_anytime Kopie 2.pxd/QuickLook/Icon.webp new file mode 100644 index 0000000..6810489 Binary files /dev/null and b/1_anytime Kopie 2.pxd/QuickLook/Icon.webp differ diff --git a/1_anytime Kopie 2.pxd/QuickLook/Thumbnail.webp b/1_anytime Kopie 2.pxd/QuickLook/Thumbnail.webp new file mode 100644 index 0000000..3429dd6 Binary files /dev/null and b/1_anytime Kopie 2.pxd/QuickLook/Thumbnail.webp differ diff --git a/1_anytime Kopie 2.pxd/data/08D88BE4-4D7C-40FB-8FAA-297487D85F4F-OriginalContentSource b/1_anytime Kopie 2.pxd/data/08D88BE4-4D7C-40FB-8FAA-297487D85F4F-OriginalContentSource new file mode 100644 index 0000000..0352e15 Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/08D88BE4-4D7C-40FB-8FAA-297487D85F4F-OriginalContentSource differ diff --git a/1_anytime Kopie 2.pxd/data/150B982A-62D4-471D-86CB-8E533536DB83 b/1_anytime Kopie 2.pxd/data/150B982A-62D4-471D-86CB-8E533536DB83 new file mode 100644 index 0000000..d343045 Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/150B982A-62D4-471D-86CB-8E533536DB83 differ diff --git a/1_anytime Kopie 2.pxd/data/19E05FA3-992C-47C8-AE6C-12DAD263AB24 b/1_anytime Kopie 2.pxd/data/19E05FA3-992C-47C8-AE6C-12DAD263AB24 new file mode 100644 index 0000000..d87cf2e Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/19E05FA3-992C-47C8-AE6C-12DAD263AB24 differ diff --git a/1_anytime Kopie 2.pxd/data/2ADDBD9F-3F82-4CC6-98E3-E045041BD996 b/1_anytime Kopie 2.pxd/data/2ADDBD9F-3F82-4CC6-98E3-E045041BD996 new file mode 100644 index 0000000..b377d40 Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/2ADDBD9F-3F82-4CC6-98E3-E045041BD996 differ diff --git a/1_anytime Kopie 2.pxd/data/6F247CB4-B75F-4704-8DED-6829C223D482 b/1_anytime Kopie 2.pxd/data/6F247CB4-B75F-4704-8DED-6829C223D482 new file mode 100644 index 0000000..66da804 Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/6F247CB4-B75F-4704-8DED-6829C223D482 differ diff --git a/1_anytime Kopie 2.pxd/data/99B3DBAB-E0AB-465E-BB81-B586F85BCADE b/1_anytime Kopie 2.pxd/data/99B3DBAB-E0AB-465E-BB81-B586F85BCADE new file mode 100644 index 0000000..cbd1ed4 Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/99B3DBAB-E0AB-465E-BB81-B586F85BCADE differ diff --git a/1_anytime Kopie 2.pxd/data/AA364677-42B5-40A8-92EC-776992CA10EF-OriginalContentSource b/1_anytime Kopie 2.pxd/data/AA364677-42B5-40A8-92EC-776992CA10EF-OriginalContentSource new file mode 100644 index 0000000..b21611a Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/AA364677-42B5-40A8-92EC-776992CA10EF-OriginalContentSource differ diff --git a/1_anytime Kopie 2.pxd/data/ABC1EE17-400A-4A62-BE9A-A77C0B325700 b/1_anytime Kopie 2.pxd/data/ABC1EE17-400A-4A62-BE9A-A77C0B325700 new file mode 100644 index 0000000..8988266 Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/ABC1EE17-400A-4A62-BE9A-A77C0B325700 differ diff --git a/1_anytime Kopie 2.pxd/data/BD557875-E08F-4D93-AD77-FED30D37AEF7-OriginalContentSource b/1_anytime Kopie 2.pxd/data/BD557875-E08F-4D93-AD77-FED30D37AEF7-OriginalContentSource new file mode 100644 index 0000000..c88a4ba Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/BD557875-E08F-4D93-AD77-FED30D37AEF7-OriginalContentSource differ diff --git a/1_anytime Kopie 2.pxd/data/BF79B105-0C31-4697-901D-90CF9A7BA95F-OriginalContentSource b/1_anytime Kopie 2.pxd/data/BF79B105-0C31-4697-901D-90CF9A7BA95F-OriginalContentSource new file mode 100644 index 0000000..4be9ee9 Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/BF79B105-0C31-4697-901D-90CF9A7BA95F-OriginalContentSource differ diff --git a/1_anytime Kopie 2.pxd/data/CA8F22A4-D62E-4992-BB2E-31ECBD22B9BD-OriginalContentSource b/1_anytime Kopie 2.pxd/data/CA8F22A4-D62E-4992-BB2E-31ECBD22B9BD-OriginalContentSource new file mode 100644 index 0000000..3e1868a Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/CA8F22A4-D62E-4992-BB2E-31ECBD22B9BD-OriginalContentSource differ diff --git a/1_anytime Kopie 2.pxd/data/F1B4C973-274A-4D7C-9BB7-5DD9ABBE5E9B-OriginalContentSource b/1_anytime Kopie 2.pxd/data/F1B4C973-274A-4D7C-9BB7-5DD9ABBE5E9B-OriginalContentSource new file mode 100644 index 0000000..3e1868a Binary files /dev/null and b/1_anytime Kopie 2.pxd/data/F1B4C973-274A-4D7C-9BB7-5DD9ABBE5E9B-OriginalContentSource differ diff --git a/1_anytime Kopie 2.pxd/metadata.info b/1_anytime Kopie 2.pxd/metadata.info new file mode 100644 index 0000000..5f3cd81 Binary files /dev/null and b/1_anytime Kopie 2.pxd/metadata.info differ diff --git a/NearDrop/AppDelegate.swift b/NearDrop/AppDelegate.swift index 7a89ff8..12479f7 100644 --- a/NearDrop/AppDelegate.swift +++ b/NearDrop/AppDelegate.swift @@ -200,6 +200,10 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele defer: false ) + plusWindow?.styleMask.insert(.fullSizeContentView) + plusWindow?.titleVisibility = .hidden + plusWindow?.titlebarAppearsTransparent = true + plusWindow?.center() plusWindow?.isReleasedWhenClosed = false plusWindow?.setFrameAutosaveName("PlusScreen") diff --git a/NearDrop/Assets.xcassets/Plain.imageset/Contents.json b/NearDrop/Assets.xcassets/Plain.imageset/Contents.json new file mode 100644 index 0000000..71c945a --- /dev/null +++ b/NearDrop/Assets.xcassets/Plain.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Plain.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/NearDrop/Assets.xcassets/Plain.imageset/Plain.png b/NearDrop/Assets.xcassets/Plain.imageset/Plain.png new file mode 100644 index 0000000..5815d01 Binary files /dev/null and b/NearDrop/Assets.xcassets/Plain.imageset/Plain.png differ diff --git a/NearDrop/IAP/GetPlusView.swift b/NearDrop/IAP/GetPlusView.swift index 1258ae4..0bc86e5 100644 --- a/NearDrop/IAP/GetPlusView.swift +++ b/NearDrop/IAP/GetPlusView.swift @@ -9,8 +9,8 @@ import SwiftUI import StoreKit import NearbyShare -let plusViewWidth: CGFloat = 440 -let plusViewHeight: CGFloat = 200 +let plusViewWidth: CGFloat = 600 +let plusViewHeight: CGFloat = 460 struct GetPlusView: View { @@ -41,64 +41,120 @@ struct GetPlusView: View { var body: some View { + let validPrice = price != "" + ZStack { - Color.defaultBackground - .edgesIgnoringSafeArea(.all) + ZStack { + if colorScheme == .dark { + Color.black.opacity(0.2) + + } + else { + Color.white + } + } + .ignoresSafeArea() - let validPrice = price != "" - - VStack(spacing: 12) { - Text("plusview_title") - .font(.title) - .bold() + VStack() { + // Top Image + let topHeight = 170.0 - Text("plusview_description") - .multilineTextAlignment(.center) - .padding() - .padding(.top, -10) - .alert(isPresented: $boughtSuccessAlert, content: { - Alert(title: Text("plusview_success_title"), message: Text("plusview_success_description"), dismissButton: .default(Text("plusview_success_button"), action: { - closeView() - })) - }) + ZStack { + + Color.gray.opacity(colorScheme == .light ? 0.1 : 0.12) + + Image(.plain) + .resizable() + .scaledToFit() + .padding(.top, topHeight * 0.23) + .padding(.bottom, topHeight * 0.07) + } + .edgesIgnoringSafeArea(.top) + .frame(height: topHeight) + - HStack(spacing: 10) { + Spacer() + + VStack { + // Headline Text + Text("plusview_title") + .font(.system(size: 32)) + .fontWeight(.semibold) + .multilineTextAlignment(.center) + .minimumScaleFactor(0.5) + .lineLimit(1) + + + // Subheadline + Text("plusview_description") + .font(.system(size: 15)) + .lineSpacing(5) + .multilineTextAlignment(.center) + .padding(.top) + .alert(isPresented: $boughtSuccessAlert, content: { + Alert(title: Text("plusview_success_title"), message: Text("plusview_success_description"), dismissButton: .default(Text("plusview_success_button"), action: { + closeView() + })) + }) + .minimumScaleFactor(0.5) + .opacity(0.8) + } + .padding(.horizontal, 40) + Spacer() + + + Divider() + + // Buttons + HStack { Button("plusview_restorepurchase") { restorePurchases() } - .keyboardShortcut(.cancelAction) - .alert(isPresented: $showRestoreError, content: { - Alert(title: Text("plusview_restorefailed"), message: Text(restoreError), dismissButton: .default(Text("plusview_restorefailed_proceed"))) - }) + .foregroundColor(.gray) + .buttonStyle(.borderless) .opacity(restoring ? 0 : 1) .overlay( ProgressView() - .scaleEffect(0.5) + .scaleEffect(0.6) .opacity(restoring ? 1 : 0) + .frame(maxWidth: .infinity, alignment: .leading) ) + .alert(isPresented: $showRestoreError, content: { + Alert(title: Text("plusview_restorefailed"), message: Text(restoreError), dismissButton: .default(Text("plusview_restorefailed_proceed"))) + }) + + Spacer() let priceString = validPrice ? " (\(price))" : "" Button("plusview_unlock_label".localized() + priceString) { buttonAction() } + .buttonStyle(.bordered) + .controlSize(.large) .keyboardShortcut(.defaultAction) + .opacity(buying ? 0 : 1) + .overlay( + ProgressView() + .scaleEffect(0.6) + .opacity(buying ? 1 : 0) + .frame(maxWidth: .infinity, alignment: .trailing) + ) + .padding(.horizontal) + .padding(.vertical, 10) .alert(isPresented: $warning, content: { Alert(title: Text("plusview_purchasefailed"), message: Text("plusview_purchasefaileddescription".localized() + (errorText != "" ? " Error: " : "") + errorText), dismissButton: .default(Text("plusview_restorefailed_proceed"))) }) + } - .opacity(buying || restoring ? 0 : 1) - .overlay( - ProgressView() - .scaleEffect(0.5) - .opacity(buying || restoring ? 1 : 0) - ) + .padding(.horizontal) + .padding(.bottom, 10) } + .onAppear { loadProducts(shouldBuy: false) } .animation(.default, value: validPrice) - .padding() } .frame(width: plusViewWidth, height: plusViewHeight) } diff --git a/Plain.png b/Plain.png new file mode 100644 index 0000000..5815d01 Binary files /dev/null and b/Plain.png differ diff --git a/QuickDrop.xcodeproj/project.pbxproj b/QuickDrop.xcodeproj/project.pbxproj index a10fef4..8e1cb7b 100644 --- a/QuickDrop.xcodeproj/project.pbxproj +++ b/QuickDrop.xcodeproj/project.pbxproj @@ -825,7 +825,7 @@ MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; - SHARED_BUILD = 35; + SHARED_BUILD = 36; SHARED_VERSION = 1.8; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -884,7 +884,7 @@ MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = macosx; - SHARED_BUILD = 35; + SHARED_BUILD = 36; SHARED_VERSION = 1.8; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_OPTIMIZATION_LEVEL = "-O"; diff --git a/QuickDrop.xcodeproj/xcshareddata/xcschemes/QuickDrop.xcscheme b/QuickDrop.xcodeproj/xcshareddata/xcschemes/QuickDrop.xcscheme index 3d12e57..10ab85a 100644 --- a/QuickDrop.xcodeproj/xcshareddata/xcschemes/QuickDrop.xcscheme +++ b/QuickDrop.xcodeproj/xcshareddata/xcschemes/QuickDrop.xcscheme @@ -34,7 +34,6 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - language = "en" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO"