Secret Field
Saisir, enregistrer et effacer un secret tel qu’une clé d’API, avec un statut défini / non défini.
Disponible pour
Angular: disponible Vue: disponible React: disponible React Native: pas encore disponible
Utilisation
API key Not set
Stored in the system keychain and never logged.
Workspace token Not set
The keychain refused the write. Try again.
<div class="demo-stack" style="max-width: 28rem">
<sone-secret-field
label="API key"
placeholder="Paste your API key"
help="Stored in the system keychain and never logged."
clearable
[hasKey]="hasKey()"
[busy]="busy()"
(save)="save($event)"
(clear)="hasKey.set(false)"
/>
<sone-secret-field
label="Workspace token"
placeholder="tok_…"
setLabel="Token set ✓"
saveLabel="Save"
[hasKey]="false"
error="The keychain refused the write. Try again."
/>
</div>Importation
import {
SoneSecretFieldComponent,
} from "@surface-one/angular/secret-field";Référence de l’API
SoneSecretFieldComponentComposant
| Nom | Type | Par défaut |
|---|---|---|
hasKey | boolean | null | null |
busy | boolean | false |
error | string | null | null |
label | — | $localize`Status` |
placeholder | string | "" |
ariaLabel | string | null | null |
help | string | null | null |
setLabel | — | $localize`Key set ✓` |
unsetLabel | — | $localize`Not set` |
saveLabel | — | $localize`Save key` |
autocomplete | string | "off" |
clearable | boolean | false |
| Nom | Type |
|---|---|
saveThe parent must not log or store this outside the Keychain. | string |
clear | void |