gui/components/ApiKeyField

A compact BYOK key field for one provider — used per-row inside the header Providers dropdown (once for the image provider, once for the text/rewrite provider). It targets the provider given by providerId (falling back to the active image provider) and only appears when that provider needs a key. The key is held in memory for the session only; the in-field Save icon persists it to this browser and the Clear icon removes a saved one. The "Get a key" link and an info tooltip are kept here too. Renders nothing for local / no-key / "none" providers.

Description:
  • A compact BYOK key field for one provider — used per-row inside the header Providers dropdown (once for the image provider, once for the text/rewrite provider). It targets the provider given by providerId (falling back to the active image provider) and only appears when that provider needs a key. The key is held in memory for the session only; the in-field Save icon persists it to this browser and the Clear icon removes a saved one. The "Get a key" link and an info tooltip are kept here too. Renders nothing for local / no-key / "none" providers.

Source:

(require("gui/components/ApiKeyField"))(props) → {JSX.Element|null}

Description:
  • A provider's API-key field.

Source:
Parameters:
Name Type Description
props object
Properties
Name Type Attributes Description
settings object

The current settings.

setSettings function

Update the settings.

providerId string <optional>

The provider whose key to edit (defaults to the active image provider). "none" / falsy renders nothing.

Returns:
Type
JSX.Element | null

Methods

(inner) InfoTip(props) → {JSX.Element|null}

Description:
  • A small info "i" with a tooltip.

Source:
Parameters:
Name Type Description
props object

{ text }.

Returns:
Type
JSX.Element | null