feat(studio): registry credentials panel in Settings (v0.44.0)
The hub install path now reads `~/.fai/registry-token` as a fallback when `FAI_REGISTRY_TOKEN` is unset (platform v0.10.92). Studio now writes that file directly: a fresh operator pastes the PAT into Settings → Registry credentials, hits Save, and the next install attempt resolves the auth wall without any shell or env-var setup. The token never round-trips back into Studio after save — status is shown only as "Configured (40 chars)" / "Not set" with no display of the secret itself. The Clear action deletes the file. On Unix the file is chmod-ed to 0600 (owner-only read/write); Windows leaves the default user ACL in place. Storage is strictly local: `~/.fai/registry-token`, never sent to a remote service. The hint text under the field says so to make the data flow explicit. Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
01f3f773cf
commit
878f0a4e28
8 changed files with 464 additions and 6 deletions
|
|
@ -1131,6 +1131,49 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
return 'Could not open file: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get registryCredentialsHeader => 'REGISTRY CREDENTIALS';
|
||||
|
||||
@override
|
||||
String get registryCredentialsBlurb =>
|
||||
'Token used to download .fai modules from a registry behind a signin wall (Forgejo, GitHub-private). Stored at ~/.fai/registry-token, mode 0600. The FAI_REGISTRY_TOKEN env var still wins when set.';
|
||||
|
||||
@override
|
||||
String registryTokenStatusConfigured(int chars) {
|
||||
return 'Configured ($chars chars)';
|
||||
}
|
||||
|
||||
@override
|
||||
String get registryTokenStatusNotSet => 'Not set';
|
||||
|
||||
@override
|
||||
String get registryTokenFieldLabel => 'Token';
|
||||
|
||||
@override
|
||||
String get registryTokenFieldHint =>
|
||||
'Paste your Forgejo or GitHub personal access token';
|
||||
|
||||
@override
|
||||
String get registryTokenSaveButton => 'Save';
|
||||
|
||||
@override
|
||||
String get registryTokenClearButton => 'Clear';
|
||||
|
||||
@override
|
||||
String get registryTokenStorageHint =>
|
||||
'Saved locally to ~/.fai/registry-token. Never sent to a remote service.';
|
||||
|
||||
@override
|
||||
String get registryTokenSavedToast => 'Registry token saved.';
|
||||
|
||||
@override
|
||||
String get registryTokenClearedToast => 'Registry token cleared.';
|
||||
|
||||
@override
|
||||
String registryTokenSaveFailedToast(String error) {
|
||||
return 'Could not save: $error';
|
||||
}
|
||||
|
||||
@override
|
||||
String get welcomeChecklistAllSetTitle => 'You\'re set up.';
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue