1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-18 11:05:41 +01:00

Redefine cipher "share" to "move to organization" (#1903)

* Redefine cipher "share" to "move to organization"

* PR review

* update jslib
This commit is contained in:
Matt Gibson 2021-06-22 16:44:06 -04:00 committed by GitHub
parent f35f3550a7
commit 2be717d0fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 36 additions and 23 deletions

2
jslib

@ -1 +1 @@
Subproject commit 78ae9383fbc1035bd27c022756cfa1f510ae16c9
Subproject commit 18bf616e2e0821a46b1cb71737d80b099a64b237

View File

@ -150,6 +150,9 @@
"save": {
"message": "Save"
},
"move": {
"message": "Move"
},
"addFolder": {
"message": "Add Folder"
},
@ -628,23 +631,33 @@
"shared": {
"message": "Shared"
},
"shareVault": {
"message": "Share Your Vault"
"learnOrg": {
"message": "Learn about Organizations"
},
"shareVaultConfirmation": {
"message": "Bitwarden allows you to share your vault with others by using an organization account. Would you like to visit the bitwarden.com website to learn more?"
"learnOrgConfirmation": {
"message": "Bitwarden allows you to share your vault items with others by using an organization. Would you like to visit the bitwarden.com website to learn more?"
},
"shareItem": {
"message": "Share Item"
"moveToOrganization": {
"message": "Move to Organization"
},
"share": {
"message": "Share"
},
"sharedItem": {
"message": "Shared Item"
"movedItemToOrg": {
"message": "$ITEMNAME$ moved to $ORGNAME$",
"placeholders": {
"itemname": {
"content": "$1",
"example": "Secret Item"
},
"orgname": {
"content": "$2",
"example": "Company Name"
}
}
},
"shareDesc": {
"message": "Choose an organization that you wish to share this item with. Sharing transfers ownership of the item to the organization. You will no longer be the direct owner of this item once it has been shared."
"moveToOrgDesc": {
"message": "Choose an organization that you wish to move this item to. Moving to an organization transfers ownership of the item to that organization. You will no longer be the direct owner of this item once it has been moved."
},
"learnMore": {
"message": "Learn more"

View File

@ -6,7 +6,7 @@
<span class="text">
{{cipher.name}}
<ng-container *ngIf="cipher.organizationId">
<i class="fa fa-share-alt text-muted" title="{{'shared' | i18n}}" aria-hidden="true"></i>
<i class="fa fa-cube text-muted" title="{{'shared' | i18n}}" aria-hidden="true"></i>
<span class="sr-only">{{'shared' | i18n}}</span>
</ng-container>
<ng-container *ngIf="cipher.hasAttachments">

View File

@ -102,11 +102,6 @@
<div class="row-main">{{'exportVault' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon" aria-hidden="true"></i>
</a>
<a class="box-content-row box-content-row-flex text-default" href="#" appStopClick appBlurClick
(click)="share()">
<div class="row-main">{{'shareVault' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon" aria-hidden="true"></i>
</a>
<a class="box-content-row box-content-row-flex text-default" href="#" appStopClick appBlurClick
(click)="webVault()">
<div class="row-main">{{'bitWebVault' | i18n}}</div>
@ -126,6 +121,11 @@
<div class="row-main">{{'about' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon" aria-hidden="true"></i>
</a>
<a class="box-content-row box-content-row-flex text-default" href="#" appStopClick appBlurClick
(click)="share()">
<div class="row-main">{{'learnOrg' | i18n}}</div>
<i class="fa fa-chevron-right fa-lg row-sub-icon" aria-hidden="true"></i>
</a>
<a class="box-content-row box-content-row-flex text-default" href="#" appStopClick appBlurClick
(click)="help()">
<div class="row-main">{{'helpFeedback' | i18n}}</div>

View File

@ -310,7 +310,7 @@ export class SettingsComponent implements OnInit {
async share() {
const confirmed = await this.platformUtilsService.showDialog(
this.i18nService.t('shareVaultConfirmation'), this.i18nService.t('shareVault'),
this.i18nService.t('learnOrgConfirmation'), this.i18nService.t('learnOrg'),
this.i18nService.t('yes'), this.i18nService.t('cancel'));
if (confirmed) {
BrowserApi.createNewTab('https://help.bitwarden.com/article/what-is-an-organization/');

View File

@ -4,12 +4,12 @@
<button type="button" appBlurClick (click)="cancel()">{{'cancel' | i18n}}</button>
</div>
<div class="center">
<span class="title">{{'share' | i18n}}</span>
<span class="title">{{'moveToOrganization' | i18n}}</span>
</div>
<div class="right">
<button type="submit" appBlurClick [disabled]="form.loading || !canSave"
*ngIf="organizations && organizations.length">
<span [hidden]="form.loading">{{'save' | i18n}}</span>
<span [hidden]="form.loading">{{'move' | i18n}}</span>
<i class="fa fa-spinner fa-lg fa-spin" [hidden]="!form.loading" aria-hidden="true"></i>
</button>
</div>
@ -31,7 +31,7 @@
</div>
</div>
<div class="box-footer">
{{'shareDesc' | i18n}}
{{'moveToOrgDesc' | i18n}}
</div>
</div>
<div class="box" *ngIf="organizations && organizations.length">

View File

@ -304,9 +304,9 @@
<a class="box-content-row" href="#" appStopClick appBlurClick (click)="share()" *ngIf="!cipher.organizationId">
<div class="row-main text-primary">
<div class="icon text-primary" aria-hidden="true">
<i class="fa fa-share-alt fa-lg fa-fw"></i>
<i class="fa fa-arrow-circle-o-right fa-lg fa-fw"></i>
</div>
<span>{{'shareItem' | i18n}}</span>
<span>{{'moveToOrganization' | i18n}}</span>
</div>
</a>
<a class="box-content-row" href="#" appStopClick appBlurClick (click)="restore()" *ngIf="cipher.isDeleted">