mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
if #available mac
Removes if #available for anything less than macOS 11
This commit is contained in:
@@ -128,10 +128,8 @@ class AccountsFeedWranglerWindowController: NSWindowController {
|
||||
|
||||
// MARK: Autofill
|
||||
func enableAutofill() {
|
||||
if #available(macOS 11, *) {
|
||||
usernameTextField.contentType = .username
|
||||
passwordTextField.contentType = .password
|
||||
}
|
||||
usernameTextField.contentType = .username
|
||||
passwordTextField.contentType = .password
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -133,10 +133,8 @@ class AccountsFeedbinWindowController: NSWindowController {
|
||||
|
||||
// MARK: Autofill
|
||||
func enableAutofill() {
|
||||
if #available(macOS 11, *) {
|
||||
usernameTextField.contentType = .username
|
||||
passwordTextField.contentType = .password
|
||||
}
|
||||
usernameTextField.contentType = .username
|
||||
passwordTextField.contentType = .password
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -129,10 +129,8 @@ class AccountsNewsBlurWindowController: NSWindowController {
|
||||
|
||||
// MARK: Autofill
|
||||
func enableAutofill() {
|
||||
if #available(macOS 11, *) {
|
||||
usernameTextField.contentType = .username
|
||||
passwordTextField.contentType = .password
|
||||
}
|
||||
usernameTextField.contentType = .username
|
||||
passwordTextField.contentType = .password
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -197,10 +197,8 @@ class AccountsReaderAPIWindowController: NSWindowController {
|
||||
|
||||
// MARK: Autofill
|
||||
func enableAutofill() {
|
||||
if #available(macOS 11, *) {
|
||||
usernameTextField.contentType = .username
|
||||
passwordTextField.contentType = .password
|
||||
}
|
||||
usernameTextField.contentType = .username
|
||||
passwordTextField.contentType = .password
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -102,45 +102,25 @@ struct AddAccountsView: View {
|
||||
|
||||
HStack(spacing: 12) {
|
||||
Spacer()
|
||||
if #available(OSX 11.0, *) {
|
||||
Button(action: {
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Cancel")
|
||||
.frame(width: 76)
|
||||
})
|
||||
.help("Cancel")
|
||||
.keyboardShortcut(.cancelAction)
|
||||
|
||||
} else {
|
||||
Button(action: {
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Cancel")
|
||||
.frame(width: 76)
|
||||
})
|
||||
.accessibility(label: Text("Add Account"))
|
||||
}
|
||||
if #available(OSX 11.0, *) {
|
||||
Button(action: {
|
||||
addAccountDelegate?.presentSheetForAccount(selectedAccount)
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Continue")
|
||||
.frame(width: 76)
|
||||
})
|
||||
.help("Add Account")
|
||||
.keyboardShortcut(.defaultAction)
|
||||
|
||||
} else {
|
||||
Button(action: {
|
||||
addAccountDelegate?.presentSheetForAccount(selectedAccount)
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Continue")
|
||||
.frame(width: 76)
|
||||
})
|
||||
}
|
||||
|
||||
Button(action: {
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Cancel")
|
||||
.frame(width: 76)
|
||||
})
|
||||
.help("Cancel")
|
||||
.keyboardShortcut(.cancelAction)
|
||||
|
||||
Button(action: {
|
||||
addAccountDelegate?.presentSheetForAccount(selectedAccount)
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Continue")
|
||||
.frame(width: 76)
|
||||
})
|
||||
.help("Add Account")
|
||||
.keyboardShortcut(.defaultAction)
|
||||
}
|
||||
.padding(.top, 12)
|
||||
.padding(.bottom, 4)
|
||||
|
||||
@@ -34,46 +34,25 @@ struct EnableExtensionPointView: View {
|
||||
|
||||
HStack(spacing: 12) {
|
||||
Spacer()
|
||||
if #available(OSX 11.0, *) {
|
||||
Button(action: {
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Cancel")
|
||||
.frame(width: 80)
|
||||
})
|
||||
.help("Cancel")
|
||||
.keyboardShortcut(.cancelAction)
|
||||
|
||||
} else {
|
||||
Button(action: {
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Cancel")
|
||||
.frame(width: 80)
|
||||
})
|
||||
.accessibility(label: Text("Add Extension"))
|
||||
}
|
||||
if #available(OSX 11.0, *) {
|
||||
Button(action: {
|
||||
enabler?.enable(typeFromName(extensionPointTypeName))
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Continue")
|
||||
.frame(width: 80)
|
||||
})
|
||||
.help("Add Extension")
|
||||
.keyboardShortcut(.defaultAction)
|
||||
.disabled(disableContinue())
|
||||
} else {
|
||||
Button(action: {
|
||||
enabler?.enable(typeFromName(extensionPointTypeName))
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Continue")
|
||||
.frame(width: 80)
|
||||
})
|
||||
.disabled(disableContinue())
|
||||
}
|
||||
Button(action: {
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Cancel")
|
||||
.frame(width: 80)
|
||||
})
|
||||
.help("Cancel")
|
||||
.keyboardShortcut(.cancelAction)
|
||||
|
||||
Button(action: {
|
||||
enabler?.enable(typeFromName(extensionPointTypeName))
|
||||
parent?.dismiss(nil)
|
||||
}, label: {
|
||||
Text("Continue")
|
||||
.frame(width: 80)
|
||||
})
|
||||
.help("Add Extension")
|
||||
.keyboardShortcut(.defaultAction)
|
||||
.disabled(disableContinue())
|
||||
}
|
||||
.padding(.top, 12)
|
||||
.padding(.bottom, 4)
|
||||
|
||||
Reference in New Issue
Block a user