1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-28 18:43:26 +00:00
Files
browser/libs/auth/src/angular/self-hosted-env-config-dialog/self-hosted-env-config-dialog.component.html
Alec Rippberger 9da80a6cba [PM-8115] Desktop, Extension UI Refresh: Self-hosted Setup Dialog (#11597)
* Reimplement RegistrationSelfHostedEnvConfigDialogComponent

* Update EnvironmentSelectorComponent text based on feature flag.

* Initialize RegistrationSelfHostedEnvConfigDialog with existing values if self hosted

* Cleanup debug

* Add comment

* Remove changes to home and login components

* Remove changes to desktop login component

* Remove changes to browser home component

* Simplify accessing string.

* Add environment selector service.

* Cleanup unused imports in environment-selector

* Launch new env selector dialog from desktop

* Fix lint errors

* Address PR feedback: move dialog component, remove EnvironmentSelectorService, remove unused translation string

* Remove changes to AnonLayout

* PM-8115 - Export Re-usable component from Libs/auth for clean import elsewhere in clients.

* Remove unused accessingString variable

* Add success toast

---------

Co-authored-by: Jared Snider <jsnider@bitwarden.com>
2024-10-28 16:12:57 -05:00

108 lines
3.2 KiB
HTML

<form [formGroup]="formGroup" [bitSubmit]="submit">
<bit-dialog>
<span bitDialogTitle> Self-hosted environment</span>
<ng-container bitDialogContent>
<bit-form-field>
<bit-label>{{ "baseUrl" | i18n }}</bit-label>
<input
id="self_hosted_env_settings_form_input_base_url"
bitInput
type="text"
formControlName="baseUrl"
appAutofocus
appInputVerbatim
/>
<bit-hint>{{ "selfHostedBaseUrlHint" | i18n }}</bit-hint>
</bit-form-field>
<button bitLink linkType="primary" type="button" (click)="showCustomEnv = !showCustomEnv">
<i
class="bwi bwi-fw bwi-sm"
[ngClass]="{ 'bwi-angle-right': !showCustomEnv, 'bwi-angle-down': showCustomEnv }"
aria-hidden="true"
></i>
{{ "customEnvironment" | i18n }}
</button>
<ng-container *ngIf="showCustomEnv">
<p bitTypography="body1" class="tw-text-muted tw-mt-3">
{{ "selfHostedCustomEnvHeader" | i18n }}
</p>
<bit-form-field>
<bit-label>{{ "webVaultUrl" | i18n }}</bit-label>
<input
id="self_hosted_env_settings_form_input_web_vault_url"
bitInput
type="text"
formControlName="webVaultUrl"
appInputVerbatim
/>
</bit-form-field>
<bit-form-field>
<bit-label>{{ "apiUrl" | i18n }}</bit-label>
<input
id="self_hosted_env_settings_form_input_api_url"
bitInput
type="text"
formControlName="apiUrl"
appInputVerbatim
/>
</bit-form-field>
<bit-form-field>
<bit-label>{{ "identityUrl" | i18n }}</bit-label>
<input
id="self_hosted_env_settings_form_input_identity_url"
bitInput
type="text"
formControlName="identityUrl"
appInputVerbatim
/>
</bit-form-field>
<bit-form-field>
<bit-label>{{ "notificationsUrl" | i18n }}</bit-label>
<input
id="self_hosted_env_settings_form_input_notifications_url"
bitInput
type="text"
formControlName="notificationsUrl"
appInputVerbatim
/>
</bit-form-field>
<bit-form-field>
<bit-label>{{ "iconsUrl" | i18n }}</bit-label>
<input
id="self_hosted_env_settings_form_input_icons_url"
bitInput
type="text"
formControlName="iconsUrl"
appInputVerbatim
/>
</bit-form-field>
</ng-container>
<span
*ngIf="showErrorSummary"
class="tw-block tw-text-danger tw-mt-2"
aria-live="assertive"
role="alert"
>
<i class="bwi bwi-error"></i> {{ "selfHostedEnvFormInvalid" | i18n }}
</span>
</ng-container>
<ng-container bitDialogFooter>
<button type="submit" bitButton bitFormButton buttonType="primary">
{{ "save" | i18n }}
</button>
<button type="button" bitButton bitFormButton buttonType="secondary" (click)="cancel()">
{{ "cancel" | i18n }}
</button>
</ng-container>
</bit-dialog>
</form>