zitadel/console/src/app/modules/org-context/org-context.component.html

80 lines
2.6 KiB
HTML
Raw Normal View History

<div class="org-context-card" cdkTrapFocus>
2021-12-10 16:14:24 +01:00
<div class="spinner-w">
<mat-spinner diameter="20" *ngIf="orgLoading$ | async" color="accent"> </mat-spinner>
2021-12-10 16:14:24 +01:00
</div>
<div class="filter-wrapper">
<input
cnslInput
class="filter-input"
[formControl]="filterControl"
autocomplete="off"
(click)="$event.stopPropagation()"
placeholder="{{ 'ORG.PAGES.FILTERPLACEHOLDER' | translate }}"
#input
/>
2021-12-10 16:14:24 +01:00
</div>
<div class="org-wrapper">
<button
class="org-button-with-pin"
mat-button
[ngClass]="{
chore(console): dependencies, type checks (#4264) * cli, core * material cdk * schematics * chore(deps): bump ngx-color from 7.3.3 to 8.0.2 in /console (#4228) Bumps [ngx-color](https://github.com/scttcper/ngx-color) from 7.3.3 to 8.0.2. - [Release notes](https://github.com/scttcper/ngx-color/releases) - [Commits](https://github.com/scttcper/ngx-color/compare/v7.3.3...v8.0.2) --- updated-dependencies: - dependency-name: ngx-color dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * eslint-plugin * chore(deps): bump moment from 2.29.3 to 2.29.4 in /console (#3926) Bumps [moment](https://github.com/moment/moment) from 2.29.3 to 2.29.4. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](https://github.com/moment/moment/compare/2.29.3...2.29.4) --- updated-dependencies: - dependency-name: moment dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump codemirror from 5.65.6 to 6.0.1 in /console (#3928) Bumps [codemirror](https://github.com/codemirror/basic-setup) from 5.65.6 to 6.0.1. - [Release notes](https://github.com/codemirror/basic-setup/releases) - [Changelog](https://github.com/codemirror/basic-setup/blob/main/CHANGELOG.md) - [Commits](https://github.com/codemirror/basic-setup/commits/6.0.1) --- updated-dependencies: - dependency-name: codemirror dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * lock * use codemirror 5 * remove redundant null undefined checks * i18n, undefined checks * remove redundant null and undefined checks * checks Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Livio Spring <livio.a@gmail.com>
2022-08-30 07:43:23 +02:00
active: pinnedorg.id === org.id,
'border-bottom': pinned.selected.length && i === pinned.selected.length - 1
}"
[disabled]="!pinnedorg.id"
*ngFor="let pinnedorg of pinned.selected; index as i"
(click)="setActiveOrg(pinnedorg)"
>
<div class="org-flex-row">
<span class="org-span">{{ pinnedorg?.name ? pinnedorg.name : 'NO NAME' }}</span>
<template [ngTemplateOutlet]="toggleButton" [ngTemplateOutletContext]="{ key: pinnedorg }"></template>
</div>
2021-12-10 16:14:24 +01:00
</button>
<ng-container *ngFor="let temporg of orgs$ | async">
<button
*ngIf="!pinned.isSelected(temporg)"
class="org-button-with-pin"
mat-button
chore(console): dependencies, type checks (#4264) * cli, core * material cdk * schematics * chore(deps): bump ngx-color from 7.3.3 to 8.0.2 in /console (#4228) Bumps [ngx-color](https://github.com/scttcper/ngx-color) from 7.3.3 to 8.0.2. - [Release notes](https://github.com/scttcper/ngx-color/releases) - [Commits](https://github.com/scttcper/ngx-color/compare/v7.3.3...v8.0.2) --- updated-dependencies: - dependency-name: ngx-color dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * eslint-plugin * chore(deps): bump moment from 2.29.3 to 2.29.4 in /console (#3926) Bumps [moment](https://github.com/moment/moment) from 2.29.3 to 2.29.4. - [Release notes](https://github.com/moment/moment/releases) - [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md) - [Commits](https://github.com/moment/moment/compare/2.29.3...2.29.4) --- updated-dependencies: - dependency-name: moment dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump codemirror from 5.65.6 to 6.0.1 in /console (#3928) Bumps [codemirror](https://github.com/codemirror/basic-setup) from 5.65.6 to 6.0.1. - [Release notes](https://github.com/codemirror/basic-setup/releases) - [Changelog](https://github.com/codemirror/basic-setup/blob/main/CHANGELOG.md) - [Commits](https://github.com/codemirror/basic-setup/commits/6.0.1) --- updated-dependencies: - dependency-name: codemirror dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * lock * use codemirror 5 * remove redundant null undefined checks * i18n, undefined checks * remove redundant null and undefined checks * checks Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Livio Spring <livio.a@gmail.com>
2022-08-30 07:43:23 +02:00
[ngClass]="{ active: temporg.id === org.id }"
[disabled]="!temporg.id"
(click)="setActiveOrg(temporg)"
>
<div class="org-flex-row">
<span class="org-span">{{ temporg?.name ? temporg.name : 'NO NAME' }}</span>
<template [ngTemplateOutlet]="toggleButton" [ngTemplateOutletContext]="{ key: temporg }"></template>
</div>
</button>
</ng-container>
2021-12-10 16:14:24 +01:00
</div>
<ng-template cnslHasRole [hasRole]="['iam.read']">
<button mat-button class="show-all" [routerLink]="['/orgs']" (click)="closedCard.emit()">
{{ 'MENU.SHOWORGS' | translate }}
</button>
</ng-template>
2021-12-10 16:14:24 +01:00
<ng-template cnslHasRole [hasRole]="['org.create', 'iam.write']">
<button mat-button [routerLink]="['/orgs/create']" (click)="closedCard.emit()">
<div class="cnsl-action-button">
<mat-icon class="avatar">add</mat-icon>
<span>{{ 'MENU.NEWORG' | translate }}</span>
</div>
2021-12-10 16:14:24 +01:00
</button>
</ng-template>
</div>
<ng-template #toggleButton let-key="key">
<button
matTooltip="{{ 'ACTIONS.PIN' | translate }}"
[ngClass]="{ selected: pinned.isSelected(key) }"
(click)="toggle(key, $event)"
class="edit-button"
mat-icon-button
>
<mat-icon *ngIf="pinned.isSelected(key)" svgIcon="mdi_pin"></mat-icon>
<mat-icon svgIcon="mdi_pin_outline" *ngIf="!pinned.isSelected(key)"></mat-icon>
</button>
</ng-template>