mirror of
https://github.com/yattee/yattee.git
synced 2026-05-13 10:55:03 +00:00
Generalize Yattee Server credentials manager to BasicAuthCredentialsManager
Renames YatteeServerCredentialsManager → BasicAuthCredentialsManager so the same Keychain-backed username/password storage can be reused for any instance type that sits behind a reverse proxy requiring HTTP Basic Auth. Adds a one-time migration that moves existing items from the legacy 'com.yattee.yatteeserver' Keychain service to 'com.yattee.basicauth', preserving the iCloud-sync attribute. No behavior change for end users.
This commit is contained in:
@@ -76,13 +76,13 @@ struct InstanceBrowseView: View {
|
||||
/// Auth header for Yattee Server instances (when browsing a Yattee Server directly)
|
||||
private var yatteeServerAuthHeader: String? {
|
||||
guard instance.type == .yatteeServer else { return nil }
|
||||
return appEnvironment?.yatteeServerCredentialsManager.basicAuthHeader(for: instance)
|
||||
return appEnvironment?.basicAuthCredentialsManager.basicAuthHeader(for: instance)
|
||||
}
|
||||
|
||||
/// Auth header for avatar loading (uses Yattee Server for YouTube channel avatars)
|
||||
private var avatarAuthHeader: String? {
|
||||
guard let server = yatteeServer else { return nil }
|
||||
return appEnvironment?.yatteeServerCredentialsManager.basicAuthHeader(for: server)
|
||||
return appEnvironment?.basicAuthCredentialsManager.basicAuthHeader(for: server)
|
||||
}
|
||||
|
||||
enum BrowseTab: String, CaseIterable, Identifiable {
|
||||
|
||||
Reference in New Issue
Block a user