mirror of
https://github.com/yattee/yattee.git
synced 2026-07-31 12:22:00 +00:00
Show missing-credentials indicator for remote server sources
After reinstalling the app and importing sources from iCloud, remote server instances with Keychain-only credentials showed no indication that login is needed, unlike WebDAV/SMB sources. - Show the orange key icon for Yattee Server instances without stored basic auth credentials (auth is always required for this type) - Persist usesBasicAuth/usesAccountLogin flags on Instance (synced via iCloud) so missing Invidious/Piped/PeerTube credentials are detectable too; maintained on credential save/delete, login/logout, and legacy migration - Centralize the check in AppEnvironment.needsCredentials(for:) used by SourcesListView, MediaSourcesView, and SourceRow - Backfill the flags at launch from credentials currently in the Keychain so existing setups publish them without a re-login
This commit is contained in:
@@ -753,7 +753,8 @@ struct AddRemoteServerView: View {
|
||||
type: type,
|
||||
url: url,
|
||||
name: name.isEmpty ? nil : name,
|
||||
allowInvalidCertificates: allowInvalidCertificates
|
||||
allowInvalidCertificates: allowInvalidCertificates,
|
||||
usesBasicAuth: true
|
||||
)
|
||||
|
||||
appEnvironment.basicAuthCredentialsManager.setCredentials(
|
||||
@@ -783,14 +784,16 @@ struct AddRemoteServerView: View {
|
||||
|
||||
// For other instance types: optionally store HTTP Basic Auth credentials
|
||||
// (used when the instance is fronted by a reverse proxy that requires basic auth).
|
||||
let hasBasicAuth = !basicAuthUsername.isEmpty && !basicAuthPassword.isEmpty
|
||||
let instance = Instance(
|
||||
type: type,
|
||||
url: url,
|
||||
name: name.isEmpty ? nil : name,
|
||||
allowInvalidCertificates: allowInvalidCertificates
|
||||
allowInvalidCertificates: allowInvalidCertificates,
|
||||
usesBasicAuth: hasBasicAuth
|
||||
)
|
||||
|
||||
if !basicAuthUsername.isEmpty, !basicAuthPassword.isEmpty {
|
||||
if hasBasicAuth {
|
||||
appEnvironment.basicAuthCredentialsManager.setCredentials(
|
||||
username: basicAuthUsername,
|
||||
password: basicAuthPassword,
|
||||
|
||||
Reference in New Issue
Block a user