Secret Field
API キーなどのシークレットを入力・保存・消去し、設定済み / 未設定のステータスを表示します。
対応フレームワーク
Angular: 対応 Vue: 対応 React: 対応 React Native: 未対応
使い方
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>インポート
import {
SoneSecretFieldComponent,
} from "@surface-one/angular/secret-field";API リファレンス
SoneSecretFieldComponentコンポーネント
| 名前 | 型 | デフォルト |
|---|---|---|
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 |
| 名前 | 型 |
|---|---|
saveThe parent must not log or store this outside the Keychain. | string |
clear | void |