New Plus Window
No files matched your search
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 527 KiB |
|
After Width: | Height: | Size: 3.2 MiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
@@ -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")
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.1 MiB |
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = "en"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
|
||||