mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-28 08:17:16 +00:00
26 lines
560 B
Swift
26 lines
560 B
Swift
//
|
||
// Account+CredentialsView.swift
|
||
// NetNewsWire-iOS
|
||
//
|
||
// Created by Brent Simmons on 11/25/26.
|
||
//
|
||
|
||
import SwiftUI
|
||
import Account
|
||
|
||
extension Account {
|
||
|
||
var hasCredentialsView: Bool {
|
||
type == .miniflux || CredentialsAccountView.accountTypes.contains(type)
|
||
}
|
||
|
||
/// The view for updating this account’s credentials.
|
||
@ViewBuilder func credentialsView() -> some View {
|
||
if type == .miniflux {
|
||
MinifluxAccountView(account: self, didAddAccount: nil)
|
||
} else {
|
||
CredentialsAccountView(accountType: type, account: self, didAddAccount: nil)
|
||
}
|
||
}
|
||
}
|