diff --git a/QuickDrop.xcodeproj/project.pbxproj b/QuickDrop.xcodeproj/project.pbxproj index 9d3a0cc..6654033 100644 --- a/QuickDrop.xcodeproj/project.pbxproj +++ b/QuickDrop.xcodeproj/project.pbxproj @@ -1743,8 +1743,8 @@ MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; - SHARED_BUILD = 118; - SHARED_VERSION = 2.12.1; + SHARED_BUILD = 119; + SHARED_VERSION = 2.12.2; STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_EMIT_LOC_STRINGS = YES; @@ -1806,8 +1806,8 @@ MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; SDKROOT = macosx; - SHARED_BUILD = 118; - SHARED_VERSION = 2.12.1; + SHARED_BUILD = 119; + SHARED_VERSION = 2.12.2; STRING_CATALOG_GENERATE_SYMBOLS = YES; SWIFT_COMPILATION_MODE = wholemodule; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index e987b65..04866f2 100644 --- a/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/QuickDrop.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -52,7 +52,7 @@ "location" : "https://github.com/leonboe1/LUI.git", "state" : { "branch" : "main", - "revision" : "b35bcccf183c075d8d58d5b5763702b29a779b32" + "revision" : "ecd2793fdf678fa80de2f528589b3c11cac4f1d4" } }, { diff --git a/QuickDrop/Localizable.xcstrings b/QuickDrop/Localizable.xcstrings index 7f37a17..b5acb27 100644 --- a/QuickDrop/Localizable.xcstrings +++ b/QuickDrop/Localizable.xcstrings @@ -2569,229 +2569,229 @@ "ar" : { "stringUnit" : { "state" : "translated", - "value" : "قبول تلقائي من هذا الجهاز" + "value" : "دائماً قبول من هذا الجهاز" } }, "ca" : { "stringUnit" : { "state" : "translated", - "value" : "Acceptar automàticament d'aquest dispositiu" + "value" : "Accepta sempre d'aquest dispositiu" } }, "cs" : { "stringUnit" : { "state" : "translated", - "value" : "Automaticky přijímat z tohoto zařízení" + "value" : "Vždy přijímat z tohoto zařízení" } }, "da" : { "stringUnit" : { "state" : "translated", - "value" : "Accepter automatisk fra denne enhed" + "value" : "Accepter altid fra denne enhed" } }, "de" : { "stringUnit" : { "state" : "translated", - "value" : "Automatisch von diesem Gerät annehmen" + "value" : "Von diesem Gerät immer akzeptieren" } }, "el" : { "stringUnit" : { "state" : "translated", - "value" : "Αυτόματη αποδοχή από αυτή τη συσκευή" + "value" : "Να γίνεται πάντα αποδοχή από αυτή τη συσκευή" } }, "en" : { "stringUnit" : { "state" : "translated", - "value" : "Automatically accept from this device" + "value" : "Always accept from this device" } }, "en-AU" : { "stringUnit" : { "state" : "translated", - "value" : "Auto accept from this device" + "value" : "Always accept from this device" } }, "en-CA" : { "stringUnit" : { "state" : "translated", - "value" : "Automatically accept from this device" + "value" : "Always accept from this device" } }, "en-GB" : { "stringUnit" : { "state" : "translated", - "value" : "Automatically accept from this device" + "value" : "Always accept from this device" } }, "es" : { "stringUnit" : { "state" : "translated", - "value" : "Aceptar automáticamente desde este dispositivo" + "value" : "Aceptar siempre desde este dispositivo" } }, "es-419" : { "stringUnit" : { "state" : "translated", - "value" : "Aceptar automáticamente de este dispositivo" + "value" : "Aceptar siempre de este dispositivo" } }, "fi" : { "stringUnit" : { "state" : "translated", - "value" : "Hyväksy automaattisesti tältä laitteelta" + "value" : "Hyväksy aina tältä laitteelta" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Accepter automatiquement depuis cet appareil" + "value" : "Toujours accepter depuis cet appareil" } }, "fr-CA" : { "stringUnit" : { "state" : "translated", - "value" : "Accepter automatiquement cet appareil" + "value" : "Toujours accepter de cet appareil" } }, "he" : { "stringUnit" : { "state" : "translated", - "value" : "קבל אוטומטית ממכשיר זה" + "value" : "תמיד לאשר מהמכשיר הזה" } }, "hi" : { "stringUnit" : { "state" : "translated", - "value" : "इस डिवाइस से स्वचालित रूप से स्वीकार करें" + "value" : "इस डिवाइस से हमेशा स्वीकृत करें" } }, "hr" : { "stringUnit" : { "state" : "translated", - "value" : "Automatski prihvati s ovog uređaja" + "value" : "Uvijek prihvati s ovog uređaja" } }, "hu" : { "stringUnit" : { "state" : "translated", - "value" : "Automatikusan fogadás erről az eszközről" + "value" : "Mindig fogadjon erről az eszközről" } }, "id" : { "stringUnit" : { "state" : "translated", - "value" : "Terima otomatis dari perangkat ini" + "value" : "Selalu terima dari perangkat ini" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Accetta automaticamente da questo dispositivo" + "value" : "Accetta sempre da questo dispositivo" } }, "ja" : { "stringUnit" : { "state" : "translated", - "value" : "このデバイスから自動的に受け入れる" + "value" : "このデバイスからは常に受信する" } }, "ko" : { "stringUnit" : { "state" : "translated", - "value" : "이 장치로부터 자동으로 수락" + "value" : "이 기기에서 항상 허용" } }, "ms" : { "stringUnit" : { "state" : "translated", - "value" : "Terima secara automatik dari peranti ini" + "value" : "Sentiasa terima dari peranti ini" } }, "nb" : { "stringUnit" : { "state" : "translated", - "value" : "Godta automatisk fra denne enheten" + "value" : "Godta alltid fra denne enheten" } }, "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Automatisch accepteren van dit apparaat" + "value" : "Altijd accepteren van dit apparaat" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Automatycznie akceptuj z tego urządzenia" + "value" : "Zawsze akceptuj z tego urządzenia" } }, "pt-BR" : { "stringUnit" : { "state" : "translated", - "value" : "Aceitar automaticamente deste dispositivo" + "value" : "Sempre aceitar deste dispositivo" } }, "pt-PT" : { "stringUnit" : { "state" : "translated", - "value" : "Aceitar automaticamente deste dispositivo" + "value" : "Aceitar sempre deste dispositivo" } }, "ro" : { "stringUnit" : { "state" : "translated", - "value" : "Acceptă automat de pe acest dispozitiv" + "value" : "Acceptă întotdeauna de pe acest dispozitiv" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Автоматически принимать файлы с этого устройства" + "value" : "Всегда принимать с этого устройства" } }, "sv" : { "stringUnit" : { "state" : "translated", - "value" : "Acceptera automatiskt från den här enheten" + "value" : "Acceptera alltid från denna enhet" } }, "th" : { "stringUnit" : { "state" : "translated", - "value" : "ยอมรับอัตโนมัติจากอุปกรณ์นี้" + "value" : "ยอมรับเสมอจากอุปกรณ์นี้" } }, "tr" : { "stringUnit" : { "state" : "translated", - "value" : "Bu cihazdan gelenleri otomatik kabul et" + "value" : "Bu cihazdan her zaman kabul et" } }, "uk" : { "stringUnit" : { "state" : "translated", - "value" : "Автоматично приймати з цього пристрою" + "value" : "Завжди приймати з цього пристрою" } }, "vi" : { "stringUnit" : { "state" : "translated", - "value" : "Tự động chấp nhận từ thiết bị này" + "value" : "Luôn chấp nhận từ thiết bị này" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "自动接受来自此设备的文件" + "value" : "始终接受来自此设备的文件" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "自動接受來自此裝置的傳輸" + "value" : "總是允許此裝置" } } } diff --git a/QuickDrop/View/Toast/QuickDropToastView.swift b/QuickDrop/View/Toast/QuickDropToastView.swift index 2f5a56e..269e6ba 100644 --- a/QuickDrop/View/Toast/QuickDropToastView.swift +++ b/QuickDrop/View/Toast/QuickDropToastView.swift @@ -12,6 +12,7 @@ import SwiftUI let toastViewSize = CGSize(width: 420, height: 75) let actionColumnWidth: CGFloat = 120 let actionColumnWidthEnd: CGFloat = 165 +let toastCornerRadius: CGFloat = 20 struct QuickDropToastView: View { @ObservedObject var settings = Settings.sharedInstance @@ -64,7 +65,7 @@ struct QuickDropToastView: View { let iconSize = 39.0 - AppIconView(hasPlusIcon: false, size: iconSize) + AppIconView(hasPlusIcon: false, size: iconSize, supportsDarkModeShadow: false) .frame(width: iconSize, height: iconSize) VStack(alignment: .leading, spacing: 2) { @@ -190,7 +191,7 @@ struct QuickDropToastView: View { } .padding(.leading, 16) - .frame(height: toastViewSize.height) + .frame(width: toastViewSize.width, height: toastViewSize.height) .contentShape(Rectangle()) .onHover { hovering in withAnimation(.easeInOut(duration: 0.15)) { @@ -214,11 +215,10 @@ struct QuickDropToastView: View { startAutoHideIfPossible() } .background( - VisualEffectView(material: .hudWindow) - .clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous)) + VisualEffectView(material: .hudWindow, cornerRadius: toastCornerRadius) ) .overlay( - RoundedRectangle(cornerRadius: 16, style: .continuous) + RoundedRectangle(cornerRadius: toastCornerRadius, style: .continuous) .stroke(Color.black.opacity(0.03), lineWidth: 1) ) .overlay(alignment: .topTrailing) { @@ -282,7 +282,7 @@ fileprivate struct ToastButtonLabel: View { var body: some View { Text(title.localized()) - .font(.system(size: 13, weight: .semibold)) + .font(.system(size: 12.5, weight: .medium)) .foregroundColor(.mainColor.opacity(0.75)) .lineLimit(1) .frame(maxWidth: .infinity, maxHeight: .infinity) @@ -336,6 +336,7 @@ struct VisualEffectView: NSViewRepresentable { var material: NSVisualEffectView.Material = .hudWindow var blendingMode: NSVisualEffectView.BlendingMode = .withinWindow var state: NSVisualEffectView.State = .active + var cornerRadius: CGFloat = 0 func makeNSView(context: Context) -> NSVisualEffectView { let v = NSVisualEffectView() @@ -343,6 +344,11 @@ struct VisualEffectView: NSViewRepresentable { v.blendingMode = blendingMode v.state = state v.isEmphasized = true + if cornerRadius > 0 { + v.wantsLayer = true + v.layer?.cornerRadius = cornerRadius + v.layer?.masksToBounds = true + } return v } @@ -350,6 +356,14 @@ struct VisualEffectView: NSViewRepresentable { v.material = material v.blendingMode = blendingMode v.state = state + if cornerRadius > 0 { + v.wantsLayer = true + v.layer?.cornerRadius = cornerRadius + v.layer?.masksToBounds = true + } else { + v.layer?.cornerRadius = 0 + v.layer?.masksToBounds = false + } } } @@ -383,25 +397,6 @@ struct CapsuleProgress: View { // MARK: - Preview struct QuickDropToastView_Previews: PreviewProvider { - struct Demo: View { - @State var model = ReceiveModel(controlPlusScreen: { _ in }) - - var body: some View { - QuickDropToastView( - receiveModel: model, - onCancel: { } - ) - .frame(width: toastViewSize.width, height: toastViewSize.height) - .clipped() - .padding(100) - .background(Color.black.opacity(0.2)) - .onAppear { - model.progress = 1 - model.toastActions = .init(completionMessageKey: "Saved", autoHideDelay: 10, openFilesAction: {}, importPhotosAction: {}, closeToastAction: {}) - } - } - } - struct ConsentDemo: View { @State var model = ReceiveModel(controlPlusScreen: { _ in })