Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: remove passwords.can-share-organizations flag on folders display #76

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/app/vault/add-edit.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -375,12 +375,10 @@
{{'cancel' | i18n}}
</button>
<div class="right">
<ng-container *ifFlag="CAN_SHARE_ORGANIZATION">
<button appBlurClick type="button" (click)="share()" appA11yTitle="{{'shareItem' | i18n}}"
*ngIf="editMode && cipher && !cloneMode">
<i class="fa fa-share-alt fa-lg fa-fw" aria-hidden="true"></i>
</button>
</ng-container>
<button #deleteBtn appBlurClick type="button" (click)="delete()" class="danger"
appA11yTitle="{{'delete' | i18n}}" *ngIf="editMode && !cloneMode" [disabled]="deleteBtn.loading"
[appApiAction]="deletePromise">
Expand Down
3 changes: 0 additions & 3 deletions src/app/vault/add-edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,13 @@ import { BroadcasterService } from 'jslib/angular/services/broadcaster.service';

import { AddEditComponent as BaseAddEditComponent } from 'jslib/angular/components/add-edit.component';

import { CAN_SHARE_ORGANIZATION } from '../../cozy/flags';

const BroadcasterSubscriptionId = 'AddEditComponent';

@Component({
selector: 'app-vault-add-edit',
templateUrl: 'add-edit.component.html',
})
export class AddEditComponent extends BaseAddEditComponent implements OnChanges, OnDestroy {
CAN_SHARE_ORGANIZATION = CAN_SHARE_ORGANIZATION;
@ViewChild('form')
private form: NgForm;
constructor(cipherService: CipherService, folderService: FolderService,
Expand Down
2 changes: 2 additions & 0 deletions src/app/vault/ciphers.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
class="block primary" appA11yTitle="{{'addItem' | i18n}}" [disabled]="deleted">
<i class="fa fa-plus fa-lg" aria-hidden="true"></i>
</button>
<ng-container *ifFlag="CAN_SHARE_ORGANIZATION">
<app-sharing *ngIf="collectionId && !isCozyConnectors" [collectionId]="collectionId"></app-sharing>
</ng-container>
<app-bottom-menu
*ngIf="!isReadOnly"
[isTrashContext]="deleted"
Expand Down
3 changes: 3 additions & 0 deletions src/app/vault/ciphers.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import { CipherView } from 'jslib/models/view/cipherView';

import { UserService } from '../../services/user.service';

import { CAN_SHARE_ORGANIZATION } from '../../cozy/flags';

@Component({
selector: 'app-vault-ciphers',
templateUrl: 'ciphers.component.html',
Expand All @@ -22,6 +24,7 @@ export class CiphersComponent extends BaseCiphersComponent {

isReadOnly = false;
isCozyConnectors = false;
CAN_SHARE_ORGANIZATION = CAN_SHARE_ORGANIZATION;

constructor(searchService: SearchService, protected platformUtilsService: PlatformUtilsService,
protected i18nService: I18nService, protected cipherService: CipherService,
Expand Down
4 changes: 1 addition & 3 deletions src/app/vault/groupings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h2>{{'types' | i18n}}</h2>
<ng-container *ngIf="loaded">
<div class="heading">
<h2>{{'folders' | i18n}}</h2>
<button appBlurClick (click)="addFolder()" appA11yTitle="{{'addFolder' | i18n}}" *ifFlag="CAN_SHARE_ORGANIZATION">
<button appBlurClick (click)="addFolder()" appA11yTitle="{{'addFolder' | i18n}}">
<i class="fa fa-plus fa-fw" aria-hidden="true"></i>
</button>
</div>
Expand All @@ -113,10 +113,8 @@ <h2>{{'folders' | i18n}}</h2>
</ul>
</li>
</ng-template>
<ng-container *ifFlag="CAN_SHARE_ORGANIZATION">
<ng-container *ngTemplateOutlet="recursiveCollections; context:{ $implicit: nestedCollections }">
</ng-container>
</ng-container>

<li [ngClass]="{active: selectedTrash}">
<a href="#" appStopClick appBlurClick (click)="selectTrash()">
Expand Down