mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
* Hide edit/delete when user only has read access * Wire up read/write for secret response * Remove variable * Resolve changes after merge * SM-671: Fix small bug in sm/SM-574 branch to pass secret instead of secret id on deletion (#5096) --------- Co-authored-by: Colton Hurst <colton@coltonhurst.com>
64 lines
2.1 KiB
HTML
64 lines
2.1 KiB
HTML
<form [formGroup]="formGroup" [bitSubmit]="submit">
|
|
<bit-dialog dialogSize="default">
|
|
<ng-container bitDialogTitle>{{ title | i18n }}</ng-container>
|
|
<div bitDialogContent class="tw-relative">
|
|
<div
|
|
*ngIf="showSpinner"
|
|
class="tw-absolute tw-flex tw-h-full tw-w-full tw-items-center tw-justify-center tw-bg-text-contrast"
|
|
>
|
|
<i class="bwi bwi-spinner bwi-spin bwi-3x"></i>
|
|
</div>
|
|
<div class="tw-flex tw-gap-4 tw-pt-4">
|
|
<bit-form-field class="tw-w-1/3">
|
|
<bit-label for="secret-name">{{ "name" | i18n }}</bit-label>
|
|
<input formControlName="name" bitInput />
|
|
</bit-form-field>
|
|
<bit-form-field class="tw-w-full">
|
|
<bit-label>{{ "value" | i18n }}</bit-label>
|
|
<textarea bitInput rows="4" formControlName="value"></textarea>
|
|
</bit-form-field>
|
|
</div>
|
|
<bit-form-field>
|
|
<bit-label>{{ "notes" | i18n }}</bit-label>
|
|
<textarea bitInput rows="4" formControlName="notes"></textarea>
|
|
</bit-form-field>
|
|
|
|
<hr />
|
|
|
|
<bit-form-field class="tw-mt-3 tw-mb-0">
|
|
<bit-label>{{ "project" | i18n }}</bit-label>
|
|
<select bitInput name="project" formControlName="project">
|
|
<option value="">{{ "selectPlaceholder" | i18n }}</option>
|
|
<option *ngFor="let f of projects" [value]="f.id">
|
|
{{ f.name }}
|
|
</option>
|
|
</select>
|
|
</bit-form-field>
|
|
</div>
|
|
<div bitDialogFooter class="tw-flex tw-gap-2">
|
|
<button type="submit" bitButton buttonType="primary" bitFormButton>
|
|
{{ "save" | i18n }}
|
|
</button>
|
|
<button
|
|
type="button"
|
|
bitButton
|
|
buttonType="secondary"
|
|
bitFormButton
|
|
bitDialogClose
|
|
[disabled]="false"
|
|
>
|
|
{{ "cancel" | i18n }}
|
|
</button>
|
|
<button
|
|
*ngIf="deleteButtonIsVisible"
|
|
class="tw-ml-auto"
|
|
type="button"
|
|
bitIconButton="bwi-trash"
|
|
buttonType="danger"
|
|
bitFormButton
|
|
(click)="openDeleteSecretDialog()"
|
|
></button>
|
|
</div>
|
|
</bit-dialog>
|
|
</form>
|