1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-10 05:30:01 +00:00

[PM-19339] Innovation Archive - Extension cleanup (#13947)

* Ensure archivedDate is not lost on cipher re-encryption

* Fix archived item header spacing
This commit is contained in:
Shane Melton
2025-03-21 11:46:31 -07:00
committed by GitHub
parent 7f3b9a078c
commit 1e9a21e831
2 changed files with 50 additions and 50 deletions

View File

@@ -14,60 +14,59 @@
</h2>
<span bitTypography="body1" slot="end">{{ archivedItems.length }}</span>
</bit-section-header>
</bit-section>
<bit-item-group>
@for (cipher of archivedItems; track cipher.id) {
<bit-item>
<button
bit-item-content
type="button"
[appA11yTitle]="'viewItemTitle' | i18n: cipher.name"
(click)="view(cipher)"
>
<div slot="start" class="tw-justify-start tw-w-7 tw-flex">
<app-vault-icon [cipher]="cipher"></app-vault-icon>
</div>
<span data-testid="item-name">{{ cipher.name }}</span>
@if (cipher.hasAttachments) {
<i class="bwi bwi-paperclip bwi-sm" [appA11yTitle]="'attachments' | i18n"></i>
}
<span slot="secondary">{{ cipher.subTitle }}</span>
</button>
<bit-item-action slot="end">
<bit-item-group>
@for (cipher of archivedItems; track cipher.id) {
<bit-item>
<button
bit-item-content
type="button"
bitIconButton="bwi-ellipsis-v"
size="small"
[attr.aria-label]="'moreOptionsLabel' | i18n: cipher.name"
[title]="'moreOptionsTitle' | i18n: cipher.name"
[bitMenuTriggerFor]="moreOptions"
></button>
<bit-menu #moreOptions>
<button type="button" bitMenuItem (click)="edit(cipher)">
{{ "edit" | i18n }}
</button>
<button type="button" bitMenuItem (click)="clone(cipher)">
{{ "clone" | i18n }}
</button>
<button type="button" bitMenuItem (click)="unarchive(cipher)">
{{ "unarchive" | i18n }}
</button>
[appA11yTitle]="'viewItemTitle' | i18n: cipher.name"
(click)="view(cipher)"
>
<div slot="start" class="tw-justify-start tw-w-7 tw-flex">
<app-vault-icon [cipher]="cipher"></app-vault-icon>
</div>
<span data-testid="item-name">{{ cipher.name }}</span>
@if (cipher.hasAttachments) {
<i class="bwi bwi-paperclip bwi-sm" [appA11yTitle]="'attachments' | i18n"></i>
}
<span slot="secondary">{{ cipher.subTitle }}</span>
</button>
<bit-item-action slot="end">
<button
type="button"
bitMenuItem
*appCanDeleteCipher="cipher"
(click)="delete(cipher)"
>
<span class="tw-text-danger">
{{ "delete" | i18n }}
</span>
</button>
</bit-menu>
</bit-item-action>
</bit-item>
}
</bit-item-group>
bitIconButton="bwi-ellipsis-v"
size="small"
[attr.aria-label]="'moreOptionsLabel' | i18n: cipher.name"
[title]="'moreOptionsTitle' | i18n: cipher.name"
[bitMenuTriggerFor]="moreOptions"
></button>
<bit-menu #moreOptions>
<button type="button" bitMenuItem (click)="edit(cipher)">
{{ "edit" | i18n }}
</button>
<button type="button" bitMenuItem (click)="clone(cipher)">
{{ "clone" | i18n }}
</button>
<button type="button" bitMenuItem (click)="unarchive(cipher)">
{{ "unarchive" | i18n }}
</button>
<button
type="button"
bitMenuItem
*appCanDeleteCipher="cipher"
(click)="delete(cipher)"
>
<span class="tw-text-danger">
{{ "delete" | i18n }}
</span>
</button>
</bit-menu>
</bit-item-action>
</bit-item>
}
</bit-item-group>
</bit-section>
} @else {
<bit-no-items class="tw-flex tw-h-full tw-items-center tw-justify-center">
<ng-container slot="title">

View File

@@ -224,6 +224,7 @@ export class CipherService implements CipherServiceAbstraction {
cipher.type = model.type;
cipher.collectionIds = model.collectionIds;
cipher.revisionDate = model.revisionDate;
cipher.archivedDate = model.archivedDate;
cipher.reprompt = model.reprompt;
cipher.edit = model.edit;