mirror of
https://github.com/maxgoedjen/secretive.git
synced 2026-03-24 10:07:24 +01:00
Agent and bump
This commit is contained in:
@@ -64,15 +64,15 @@ extension ContentView {
|
||||
}
|
||||
}
|
||||
|
||||
var updateNoticeContent: (String, Color)? {
|
||||
var updateNoticeContent: (LocalizedStringKey, Color)? {
|
||||
guard let update = updater.update else { return nil }
|
||||
if update.critical {
|
||||
return ("Critical Security Update Required", .red)
|
||||
return ("update_critical_notice_title", .red)
|
||||
} else {
|
||||
if updater.testBuild {
|
||||
return ("Test Build", .blue)
|
||||
return ("update_test_notice_title", .blue)
|
||||
} else {
|
||||
return ("Update Available", .orange)
|
||||
return ("update_normal_notice_title", .orange)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,25 +23,12 @@ struct CreateSecretView<StoreType: SecretStoreModifiable>: View {
|
||||
TextField("create_secret_name_placeholder", text: $name)
|
||||
.focusable()
|
||||
}
|
||||
if #available(macOS 12.0, *) {
|
||||
ThumbnailPickerView(items: [
|
||||
ThumbnailPickerView.Item(value: true, name: "create_secret_require_authentication_title", description: "create_secret_require_authentication_description", thumbnail: AuthenticationView()),
|
||||
ThumbnailPickerView.Item(value: false, name: "create_secret_notify_title",
|
||||
description: "create_secret_notify_description",
|
||||
thumbnail: NotificationView())
|
||||
], selection: $requiresAuthentication)
|
||||
} else {
|
||||
HStack {
|
||||
VStack(spacing: 20) {
|
||||
Picker("", selection: $requiresAuthentication) {
|
||||
Text("create_secret_legacy_require_authentication_description").tag(true)
|
||||
Text("create_secret_legacy_notify_description").tag(false)
|
||||
}
|
||||
.pickerStyle(RadioGroupPickerStyle())
|
||||
Spacer(minLength: 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
ThumbnailPickerView(items: [
|
||||
ThumbnailPickerView.Item(value: true, name: "create_secret_require_authentication_title", description: "create_secret_require_authentication_description", thumbnail: AuthenticationView()),
|
||||
ThumbnailPickerView.Item(value: false, name: "create_secret_notify_title",
|
||||
description: "create_secret_notify_description",
|
||||
thumbnail: NotificationView())
|
||||
], selection: $requiresAuthentication)
|
||||
}
|
||||
}
|
||||
HStack {
|
||||
@@ -138,7 +125,6 @@ extension ThumbnailPickerView {
|
||||
|
||||
}
|
||||
|
||||
@available(macOS 12.0, *)
|
||||
struct SystemBackgroundView: View {
|
||||
|
||||
let anchor: UnitPoint
|
||||
@@ -157,7 +143,6 @@ struct SystemBackgroundView: View {
|
||||
}
|
||||
}
|
||||
|
||||
@available(macOS 12.0, *)
|
||||
struct AuthenticationView: View {
|
||||
|
||||
var body: some View {
|
||||
@@ -203,7 +188,6 @@ struct AuthenticationView: View {
|
||||
|
||||
}
|
||||
|
||||
@available(macOS 12.0, *)
|
||||
struct NotificationView: View {
|
||||
|
||||
var body: some View {
|
||||
@@ -253,14 +237,10 @@ struct CreateSecretView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
CreateSecretView(store: Preview.StoreModifiable(), showing: .constant(true))
|
||||
if #available(macOS 12.0, *) {
|
||||
AuthenticationView().environment(\.colorScheme, .dark)
|
||||
AuthenticationView().environment(\.colorScheme, .light)
|
||||
NotificationView().environment(\.colorScheme, .dark)
|
||||
NotificationView().environment(\.colorScheme, .light)
|
||||
} else {
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user