1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-21 16:18:28 +01:00

[PM-1914] Migrate all dialogs to use the new bitDialogFooter default styling (#5256)

This commit is contained in:
Oscar Hinton 2023-05-01 17:59:29 +02:00 committed by GitHub
parent b39b525db8
commit 7ed0a4bbf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 48 additions and 48 deletions

View File

@ -65,7 +65,7 @@
</bit-tab> </bit-tab>
</bit-tab-group> </bit-tab-group>
</div> </div>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button bitButton buttonType="primary" bitFormButton type="submit"> <button bitButton buttonType="primary" bitFormButton type="submit">
{{ "save" | i18n }} {{ "save" | i18n }}
</button> </button>
@ -87,6 +87,6 @@
[bitAction]="delete" [bitAction]="delete"
[appA11yTitle]="'delete' | i18n" [appA11yTitle]="'delete' | i18n"
></button> ></button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -325,7 +325,7 @@
></bit-tab> ></bit-tab>
</bit-tab-group> </bit-tab-group>
</div> </div>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button type="submit" bitButton bitFormButton buttonType="primary" [disabled]="loading"> <button type="submit" bitButton bitFormButton buttonType="primary" [disabled]="loading">
{{ "save" | i18n }} {{ "save" | i18n }}
</button> </button>
@ -373,6 +373,6 @@
[disabled]="loading" [disabled]="loading"
></button> ></button>
</div> </div>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -149,7 +149,7 @@ const DialogAccessSelectorTemplate: Story<AccessSelectorComponent> = (
[showMemberRoles]="showMemberRoles" [showMemberRoles]="showMemberRoles"
></bit-access-selector> ></bit-access-selector>
</span> </span>
<div bitDialogFooter class="tw-flex tw-items-center tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button bitButton buttonType="primary">Save</button> <button bitButton buttonType="primary">Save</button>
<button bitButton buttonType="secondary">Cancel</button> <button bitButton buttonType="secondary">Cancel</button>
<button <button
@ -159,7 +159,7 @@ const DialogAccessSelectorTemplate: Story<AccessSelectorComponent> = (
size="default" size="default"
title="Delete" title="Delete"
aria-label="Delete"></button> aria-label="Delete"></button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
`, `,
}); });

View File

@ -73,7 +73,7 @@
</bit-tab> </bit-tab>
</bit-tab-group> </bit-tab-group>
</div> </div>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button type="submit" bitButton bitFormButton buttonType="primary" [disabled]="loading"> <button type="submit" bitButton bitFormButton buttonType="primary" [disabled]="loading">
{{ "save" | i18n }} {{ "save" | i18n }}
</button> </button>
@ -98,6 +98,6 @@
[bitAction]="delete" [bitAction]="delete"
[disabled]="loading" [disabled]="loading"
></button> ></button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -39,12 +39,12 @@
</div> </div>
</form> </form>
</span> </span>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button bitButton buttonType="primary" type="submit" [loading]="loading" form="form"> <button bitButton buttonType="primary" type="submit" [loading]="loading" form="form">
<span>{{ "changeKdf" | i18n }}</span> <span>{{ "changeKdf" | i18n }}</span>
</button> </button>
<button bitButton buttonType="secondary" type="button" data-dismiss="modal"> <button bitButton buttonType="secondary" type="button" data-dismiss="modal">
{{ "cancel" | i18n }} {{ "cancel" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>

View File

@ -24,9 +24,9 @@
</bit-table> </bit-table>
</div> </div>
<div bitDialogFooter> <ng-container bitDialogFooter>
<button bitButton bitDialogClose buttonType="primary" type="button"> <button bitButton bitDialogClose buttonType="primary" type="button">
{{ "ok" | i18n }} {{ "ok" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>

View File

@ -16,10 +16,10 @@
{{ "permanentlyDeleteSelectedItemsDesc" | i18n : cipherIds.length }} {{ "permanentlyDeleteSelectedItemsDesc" | i18n : cipherIds.length }}
</ng-container> </ng-container>
</span> </span>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button bitButton type="submit" buttonType="danger" [bitAction]="submit"> <button bitButton type="submit" buttonType="danger" [bitAction]="submit">
{{ (permanent ? "permanentlyDelete" : "delete") | i18n }} {{ (permanent ? "permanentlyDelete" : "delete") | i18n }}
</button> </button>
<button bitButton type="button" (click)="cancel()">{{ "cancel" | i18n }}</button> <button bitButton type="button" (click)="cancel()">{{ "cancel" | i18n }}</button>
</div> </ng-container>
</bit-simple-dialog> </bit-simple-dialog>

View File

@ -12,13 +12,13 @@
</select> </select>
</bit-form-field> </bit-form-field>
</span> </span>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button bitButton bitFormButton type="submit" buttonType="primary"> <button bitButton bitFormButton type="submit" buttonType="primary">
{{ "save" | i18n }} {{ "save" | i18n }}
</button> </button>
<button bitButton bitFormButton type="button" buttonType="secondary" (click)="cancel()"> <button bitButton bitFormButton type="button" buttonType="secondary" (click)="cancel()">
{{ "cancel" | i18n }} {{ "cancel" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -5,10 +5,10 @@
<span bitDialogContent> <span bitDialogContent>
{{ "restoreSelectedItemsDesc" | i18n : cipherIds.length }} {{ "restoreSelectedItemsDesc" | i18n : cipherIds.length }}
</span> </span>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button bitButton type="submit" buttonType="primary" [bitAction]="submit"> <button bitButton type="submit" buttonType="primary" [bitAction]="submit">
{{ "restore" | i18n }} {{ "restore" | i18n }}
</button> </button>
<button bitButton type="button" (click)="cancel()">{{ "cancel" | i18n }}</button> <button bitButton type="button" (click)="cancel()">{{ "cancel" | i18n }}</button>
</div> </ng-container>
</bit-simple-dialog> </bit-simple-dialog>

View File

@ -62,12 +62,12 @@
</tbody> </tbody>
</table> </table>
</span> </span>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button bitButton type="submit" buttonType="primary" [bitAction]="submit"> <button bitButton type="submit" buttonType="primary" [bitAction]="submit">
{{ "save" | i18n }} {{ "save" | i18n }}
</button> </button>
<button bitButton type="button" buttonType="secondary" (click)="cancel()"> <button bitButton type="button" buttonType="secondary" (click)="cancel()">
{{ "cancel" | i18n }} {{ "cancel" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>

View File

@ -49,7 +49,7 @@
{{ "automaticDomainVerificationProcess" | i18n }} {{ "automaticDomainVerificationProcess" | i18n }}
</bit-callout> </bit-callout>
</div> </div>
<div bitDialogFooter class="tw-flex tw-flex-row tw-items-center tw-gap-2"> <ng-container bitDialogFooter>
<button type="submit" bitButton bitFormButton buttonType="primary"> <button type="submit" bitButton bitFormButton buttonType="primary">
<span *ngIf="!data?.orgDomain?.verifiedDate">{{ "verifyDomain" | i18n }}</span> <span *ngIf="!data?.orgDomain?.verifiedDate">{{ "verifyDomain" | i18n }}</span>
<span *ngIf="data?.orgDomain?.verifiedDate">{{ "reverifyDomain" | i18n }}</span> <span *ngIf="data?.orgDomain?.verifiedDate">{{ "reverifyDomain" | i18n }}</span>
@ -70,6 +70,6 @@
type="submit" type="submit"
bitFormButton bitFormButton
></button> ></button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -23,13 +23,13 @@
</bit-form-field> </bit-form-field>
</div> </div>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button type="submit" bitButton buttonType="danger" bitFormButton> <button type="submit" bitButton buttonType="danger" bitFormButton>
{{ title | i18n }} {{ title | i18n }}
</button> </button>
<button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose> <button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose>
{{ "cancel" | i18n }} {{ "cancel" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -10,13 +10,13 @@
<input formControlName="name" maxlength="1000" bitInput /> <input formControlName="name" maxlength="1000" bitInput />
</bit-form-field> </bit-form-field>
</span> </span>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button type="submit" bitButton buttonType="primary" bitFormButton> <button type="submit" bitButton buttonType="primary" bitFormButton>
{{ "save" | i18n }} {{ "save" | i18n }}
</button> </button>
<button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose> <button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose>
{{ "cancel" | i18n }} {{ "cancel" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -6,12 +6,12 @@
</div> </div>
{{ "deleteItemConfirmation" | i18n }} {{ "deleteItemConfirmation" | i18n }}
</span> </span>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button type="button" bitButton buttonType="primary" [bitAction]="delete"> <button type="button" bitButton buttonType="primary" [bitAction]="delete">
{{ submitButtonText | i18n }} {{ submitButtonText | i18n }}
</button> </button>
<button type="button" bitButton buttonType="secondary" bitDialogClose> <button type="button" bitButton buttonType="secondary" bitDialogClose>
{{ "close" | i18n }} {{ "close" | i18n }}
</button> </button>
</div> </ng-container>
</bit-simple-dialog> </bit-simple-dialog>

View File

@ -44,7 +44,7 @@
<input formControlName="newProjectName" maxlength="1000" bitInput /> <input formControlName="newProjectName" maxlength="1000" bitInput />
</bit-form-field> </bit-form-field>
</div> </div>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button type="submit" bitButton buttonType="primary" bitFormButton> <button type="submit" bitButton buttonType="primary" bitFormButton>
{{ "save" | i18n }} {{ "save" | i18n }}
</button> </button>
@ -67,6 +67,6 @@
bitFormButton bitFormButton
(click)="openDeleteSecretDialog()" (click)="openDeleteSecretDialog()"
></button> ></button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -32,13 +32,13 @@
></sm-expiration-options> ></sm-expiration-options>
</div> </div>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button class="tw-normal-case" type="submit" bitButton buttonType="primary" bitFormButton> <button class="tw-normal-case" type="submit" bitButton buttonType="primary" bitFormButton>
{{ "newAccessToken" | i18n }} {{ "newAccessToken" | i18n }}
</button> </button>
<button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose> <button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose>
{{ "cancel" | i18n }} {{ "cancel" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -23,10 +23,10 @@
{{ data.expirationDate === null ? ("never" | i18n) : (data.expirationDate | date : "medium") }} {{ data.expirationDate === null ? ("never" | i18n) : (data.expirationDate | date : "medium") }}
</div> </div>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button type="button" bitButton buttonType="primary" (click)="copyAccessToken()"> <button type="button" bitButton buttonType="primary" (click)="copyAccessToken()">
<i class="bwi bwi-clone" aria-hidden="true"></i> <i class="bwi bwi-clone" aria-hidden="true"></i>
{{ "copyToken" | i18n }} {{ "copyToken" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>

View File

@ -23,13 +23,13 @@
</bit-form-field> </bit-form-field>
</div> </div>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button type="submit" bitButton buttonType="danger" bitFormButton> <button type="submit" bitButton buttonType="danger" bitFormButton>
{{ title }} {{ title }}
</button> </button>
<button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose> <button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose>
{{ "cancel" | i18n }} {{ "cancel" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -12,13 +12,13 @@
</bit-form-field> </bit-form-field>
</div> </div>
</div> </div>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button type="submit" bitButton buttonType="primary" bitFormButton> <button type="submit" bitButton buttonType="primary" bitFormButton>
{{ "save" | i18n }} {{ "save" | i18n }}
</button> </button>
<button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose> <button type="button" bitButton buttonType="secondary" bitFormButton bitDialogClose>
{{ "cancel" | i18n }} {{ "cancel" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>
</form> </form>

View File

@ -21,9 +21,9 @@
</ng-template> </ng-template>
</bit-table> </bit-table>
</span> </span>
<div bitDialogFooter> <ng-container bitDialogFooter>
<button bitButton bitDialogClose buttonType="primary" type="button"> <button bitButton bitDialogClose buttonType="primary" type="button">
{{ "ok" | i18n }} {{ "ok" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>

View File

@ -3,12 +3,12 @@
<span bitDialogContent> <span bitDialogContent>
{{ data.message | i18n }} {{ data.message | i18n }}
</span> </span>
<div bitDialogFooter class="tw-flex tw-flex-row tw-gap-2"> <ng-container bitDialogFooter>
<button type="button" bitButton buttonType="danger" [bitAction]="removeAccess"> <button type="button" bitButton buttonType="danger" [bitAction]="removeAccess">
{{ "removeAccess" | i18n }} {{ "removeAccess" | i18n }}
</button> </button>
<button type="button" bitButton buttonType="secondary" [bitAction]="cancel"> <button type="button" bitButton buttonType="secondary" [bitAction]="cancel">
{{ "cancel" | i18n }} {{ "cancel" | i18n }}
</button> </button>
</div> </ng-container>
</bit-simple-dialog> </bit-simple-dialog>

View File

@ -25,9 +25,9 @@
</bit-table> </bit-table>
</div> </div>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button bitButton buttonType="primary" bitDialogClose type="button"> <button bitButton buttonType="primary" bitDialogClose type="button">
{{ "close" | i18n }} {{ "close" | i18n }}
</button> </button>
</div> </ng-container>
</bit-dialog> </bit-dialog>

View File

@ -7,12 +7,12 @@
: ("hardDeleteSecretsConfirmation" | i18n) : ("hardDeleteSecretsConfirmation" | i18n)
}} }}
</span> </span>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button type="button" bitButton buttonType="primary" [bitAction]="delete"> <button type="button" bitButton buttonType="primary" [bitAction]="delete">
{{ submitButtonText | i18n }} {{ submitButtonText | i18n }}
</button> </button>
<button type="button" bitButton buttonType="secondary" bitDialogClose> <button type="button" bitButton buttonType="secondary" bitDialogClose>
{{ "close" | i18n }} {{ "close" | i18n }}
</button> </button>
</div> </ng-container>
</bit-simple-dialog> </bit-simple-dialog>

View File

@ -5,12 +5,12 @@
data.secretIds.length === 1 ? ("restoreSecretPrompt" | i18n) : ("restoreSecretsPrompt" | i18n) data.secretIds.length === 1 ? ("restoreSecretPrompt" | i18n) : ("restoreSecretsPrompt" | i18n)
}} }}
</span> </span>
<div bitDialogFooter class="tw-flex tw-gap-2"> <ng-container bitDialogFooter>
<button type="button" bitButton buttonType="primary" [bitAction]="restore"> <button type="button" bitButton buttonType="primary" [bitAction]="restore">
{{ title | i18n }} {{ title | i18n }}
</button> </button>
<button type="button" bitButton buttonType="secondary" bitDialogClose> <button type="button" bitButton buttonType="secondary" bitDialogClose>
{{ "close" | i18n }} {{ "close" | i18n }}
</button> </button>
</div> </ng-container>
</bit-simple-dialog> </bit-simple-dialog>