mirror of
https://github.com/bitwarden/browser
synced 2025-12-27 21:53:25 +00:00
Redefine cipher "share" to "move to organization" (#1039)
* Redefine cipher "share" to "move to organization" * Bump jslib Co-authored-by: = <=>
This commit is contained in:
@@ -101,8 +101,8 @@ export class EventService {
|
||||
humanReadableMsg = this.i18nService.t('deletedAttachmentForItem', this.getShortId(ev.cipherId));
|
||||
break;
|
||||
case EventType.Cipher_Shared:
|
||||
msg = this.i18nService.t('sharedItemId', this.formatCipherId(ev, options));
|
||||
humanReadableMsg = this.i18nService.t('sharedItemId', this.getShortId(ev.cipherId));
|
||||
msg = this.i18nService.t('movedItemIdToOrg', this.formatCipherId(ev, options));
|
||||
humanReadableMsg = this.i18nService.t('movedItemIdToOrg', this.getShortId(ev.cipherId));
|
||||
break;
|
||||
case EventType.Cipher_ClientViewed:
|
||||
msg = this.i18nService.t('viewedItemId', this.formatCipherId(ev, options));
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<td class="reduced-lh wrap">
|
||||
<a href="#" appStopClick (click)="selectCipher(c)" title="{{'editItem' | i18n}}">{{c.name}}</a>
|
||||
<ng-container *ngIf="!organization && c.organizationId">
|
||||
<i class="fa fa-share-alt" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<i class="fa fa-cube" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{'shared' | i18n}}</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="c.hasAttachments">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<span>{{c.name}}</span>
|
||||
</ng-template>
|
||||
<ng-container *ngIf="!organization && c.organizationId">
|
||||
<i class="fa fa-share-alt" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<i class="fa fa-cube" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{'shared' | i18n}}</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="c.hasAttachments">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<td class="reduced-lh wrap">
|
||||
<a href="#" appStopClick (click)="selectCipher(c)" title="{{'editItem' | i18n}}">{{c.name}}</a>
|
||||
<ng-container *ngIf="!organization && c.organizationId">
|
||||
<i class="fa fa-share-alt" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<i class="fa fa-cube" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{'shared' | i18n}}</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="c.hasAttachments">
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<span>{{c.name}}</span>
|
||||
</ng-template>
|
||||
<ng-container *ngIf="!organization && c.organizationId">
|
||||
<i class="fa fa-share-alt" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<i class="fa fa-cube" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{'shared' | i18n}}</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="c.hasAttachments">
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<td class="reduced-lh wrap">
|
||||
<a href="#" appStopClick (click)="selectCipher(c)" title="{{'editItem' | i18n}}">{{c.name}}</a>
|
||||
<ng-container *ngIf="!organization && c.organizationId">
|
||||
<i class="fa fa-share-alt" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<i class="fa fa-cube" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{'shared' | i18n}}</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="c.hasAttachments">
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<span>{{c.name}}</span>
|
||||
</ng-template>
|
||||
<ng-container *ngIf="!organization && c.organizationId">
|
||||
<i class="fa fa-share-alt" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<i class="fa fa-cube" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{'shared' | i18n}}</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="c.hasAttachments">
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
{{'moveSelected' | i18n}}
|
||||
</button>
|
||||
<button class="dropdown-item" appStopClick (click)="bulkShare()" *ngIf="!deleted && !organization">
|
||||
<i class="fa fa-fw fa-share-alt" aria-hidden="true"></i>
|
||||
{{'shareSelected' | i18n}}
|
||||
<i class="fa fa-fw fa-arrow-circle-o-right" aria-hidden="true"></i>
|
||||
{{'moveSelectedToOrg' | i18n}}
|
||||
</button>
|
||||
<button class="dropdown-item" (click)="bulkRestore()" *ngIf="deleted && !organization">
|
||||
<i class="fa fa-fw fa-undo" aria-hidden="true"></i>
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
<div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="shareSelectedTitle">
|
||||
<div class="modal fade" tabindex="-1" role="dialog" aria-modal="true" aria-labelledby="moveSelectedToOrgTitle">
|
||||
<div class="modal-dialog modal-dialog-scrollable" role="document">
|
||||
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title" id="shareSelectedTitle">
|
||||
{{'shareSelected' | i18n}}
|
||||
<h2 class="modal-title" id="moveSelectedToOrgTitle">
|
||||
{{'moveSelectedToOrg' | i18n}}
|
||||
</h2>
|
||||
<button type="button" class="close" data-dismiss="modal" appA11yTitle="{{'close' | i18n}}">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p>{{'shareManyDesc' | i18n}}</p>
|
||||
<p>{{'shareSelectedItemsCountDesc' | i18n: this.ciphers.length : shareableCiphers.length : nonShareableCount}}
|
||||
<p>{{'moveManyToOrgDesc' | i18n}}</p>
|
||||
<p>{{'moveSelectedItemsCountDesc' | i18n: this.ciphers.length : shareableCiphers.length : nonShareableCount}}
|
||||
</p>
|
||||
<div class="form-group">
|
||||
<label for="organization">{{'organization' | i18n}}</label>
|
||||
|
||||
@@ -71,7 +71,8 @@ export class BulkShareComponent implements OnInit {
|
||||
checkedCollectionIds);
|
||||
await this.formPromise;
|
||||
this.onShared.emit();
|
||||
this.toasterService.popAsync('success', null, this.i18nService.t('sharedItems'));
|
||||
const orgName = this.organizations.find(o => o.id === this.organizationId)?.name ?? this.i18nService.t('organization');
|
||||
this.toasterService.popAsync('success', null, this.i18nService.t('movedItemsToOrg', orgName));
|
||||
} catch { }
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<a href="#" appStopClick appStopProp (click)="selectCipher(c)"
|
||||
title="{{'editItem' | i18n}}">{{c.name}}</a>
|
||||
<ng-container *ngIf="!organization && c.organizationId">
|
||||
<i class="fa fa-share-alt" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<i class="fa fa-cube" appStopProp title="{{'shared' | i18n}}" aria-hidden="true"></i>
|
||||
<span class="sr-only">{{'shared' | i18n}}</span>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="c.hasAttachments">
|
||||
@@ -70,8 +70,8 @@
|
||||
</a>
|
||||
<a class="dropdown-item" href="#" appStopClick
|
||||
*ngIf="!organization && !c.organizationId && !c.isDeleted" (click)="share(c)">
|
||||
<i class="fa fa-fw fa-share-alt" aria-hidden="true"></i>
|
||||
{{'share' | i18n}}
|
||||
<i class="fa fa-fw fa-arrow-circle-o-right" aria-hidden="true"></i>
|
||||
{{'moveToOrganization' | i18n}}
|
||||
</a>
|
||||
<a class="dropdown-item" href="#" appStopClick *ngIf="c.organizationId && !c.isDeleted"
|
||||
(click)="collections(c)">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<form class="modal-content" #form (ngSubmit)="submit()" [appApiAction]="formPromise">
|
||||
<div class="modal-header">
|
||||
<h2 class="modal-title" id="shareTitle">
|
||||
{{'share' | i18n}}
|
||||
{{'moveToOrganization' | i18n}}
|
||||
<small *ngIf="cipher">{{cipher.name}}</small>
|
||||
</h2>
|
||||
<button type="button" class="close" data-dismiss="modal" appA11yTitle="{{'close' | i18n}}">
|
||||
@@ -14,7 +14,7 @@
|
||||
{{'noOrganizationsList' | i18n}}
|
||||
</div>
|
||||
<div class="modal-body" *ngIf="organizations && organizations.length">
|
||||
<p>{{'shareDesc' | i18n}}</p>
|
||||
<p>{{'moveToOrgDesc' | i18n}}</p>
|
||||
<div class="form-group">
|
||||
<label for="organization">{{'organization' | i18n}}</label>
|
||||
<select id="organization" name="OrganizationId" [(ngModel)]="organizationId" class="form-control"
|
||||
|
||||
Reference in New Issue
Block a user