mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-16 02:35:12 +00:00
fix(console): horizontal toggle for users, projects, improve UI/UX (#4047)
* fix(console): horizontal toggle for users, projects * improve input contrast * toggles, profile UI fix * lint * fix safari styles * fix button placement redirects * style lint Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
co-authored by
Livio Spring
parent
9ed972f308
commit
5b284f8c9b
@@ -80,7 +80,7 @@
|
||||
min-width: 320px;
|
||||
|
||||
.formfield {
|
||||
flex: 1;
|
||||
width: 500px;
|
||||
}
|
||||
|
||||
button {
|
||||
|
||||
@@ -9,22 +9,21 @@
|
||||
<p class="sub cnsl-secondary-text max-width-description">{{ 'PROJECT.PAGES.LISTDESCRIPTION' | translate }}</p>
|
||||
|
||||
<div class="projects-controls">
|
||||
<div class="project-type-actions">
|
||||
<button
|
||||
class="type-button"
|
||||
[ngClass]="{ active: (projectType$ | async) === ProjectType.PROJECTTYPE_OWNED }"
|
||||
(click)="setType(ProjectType.PROJECTTYPE_OWNED)"
|
||||
>
|
||||
{{ 'PROJECT.PAGES.TYPE.OWNED' | translate }} ({{ (mgmtService?.ownedProjectsCount | async) ?? 0 }})
|
||||
</button>
|
||||
<button
|
||||
class="type-button"
|
||||
[ngClass]="{ active: (projectType$ | async) === ProjectType.PROJECTTYPE_GRANTED }"
|
||||
(click)="setType(ProjectType.PROJECTTYPE_GRANTED)"
|
||||
>
|
||||
{{ 'PROJECT.PAGES.TYPE.GRANTED' | translate }} ({{ (mgmtService?.grantedProjectsCount | async) ?? 0 }})
|
||||
</button>
|
||||
<div class="project-toggle-group">
|
||||
<cnsl-nav-toggle
|
||||
label="{{ 'PROJECT.PAGES.TYPE.OWNED' | translate }}"
|
||||
[count]="mgmtService.ownedProjectsCount | async"
|
||||
(clicked)="setType(ProjectType.PROJECTTYPE_OWNED)"
|
||||
[active]="(projectType$ | async) === ProjectType.PROJECTTYPE_OWNED"
|
||||
></cnsl-nav-toggle>
|
||||
<cnsl-nav-toggle
|
||||
label="{{ 'PROJECT.PAGES.TYPE.GRANTED' | translate }}"
|
||||
[count]="mgmtService.grantedProjectsCount | async"
|
||||
(clicked)="setType(ProjectType.PROJECTTYPE_GRANTED)"
|
||||
[active]="(projectType$ | async) === ProjectType.PROJECTTYPE_GRANTED"
|
||||
></cnsl-nav-toggle>
|
||||
</div>
|
||||
|
||||
<span class="fill-space"></span>
|
||||
<button class="grid-btn" (click)="grid = !grid" mat-icon-button [attr.data-e2e]="'toggle-grid'">
|
||||
<i *ngIf="grid" class="show list view las la-th-list"></i>
|
||||
|
||||
@@ -23,34 +23,33 @@
|
||||
|
||||
.projects-controls {
|
||||
display: flex;
|
||||
padding-bottom: 0.5rem;
|
||||
align-items: center;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid map-get($foreground, dividers);
|
||||
|
||||
.project-type-actions {
|
||||
.project-toggle-group {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.type-button {
|
||||
border: none;
|
||||
background: none;
|
||||
text-align: left;
|
||||
padding: 0.75rem 0;
|
||||
opacity: 0.6;
|
||||
font-size: 15px;
|
||||
cursor: pointer;
|
||||
color: map-get($foreground, text);
|
||||
.toggle-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
&:first-child {
|
||||
margin-right: 1rem;
|
||||
i {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
.info-i {
|
||||
font-size: 1.2rem;
|
||||
margin-left: 0.5rem;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
&.active {
|
||||
font-weight: 600;
|
||||
opacity: 1;
|
||||
.current-dot {
|
||||
height: 8px;
|
||||
width: 8px;
|
||||
border-radius: 50%;
|
||||
background-color: rgb(84, 142, 230);
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import { ManagementService } from 'src/app/services/mgmt.service';
|
||||
export class ProjectsComponent {
|
||||
public zitadelProjectId: string = '';
|
||||
public projectType$: BehaviorSubject<any> = new BehaviorSubject(ProjectType.PROJECTTYPE_OWNED);
|
||||
public projectType: ProjectType = ProjectType.PROJECTTYPE_OWNED;
|
||||
public ProjectType: any = ProjectType;
|
||||
public grid: boolean = true;
|
||||
constructor(
|
||||
|
||||
@@ -15,6 +15,7 @@ import { ActionKeysModule } from 'src/app/modules/action-keys/action-keys.module
|
||||
import { CardModule } from 'src/app/modules/card/card.module';
|
||||
import { FilterProjectModule } from 'src/app/modules/filter-project/filter-project.module';
|
||||
import { InputModule } from 'src/app/modules/input/input.module';
|
||||
import { NavToggleModule } from 'src/app/modules/nav-toggle/nav-toggle.module';
|
||||
import { PaginatorModule } from 'src/app/modules/paginator/paginator.module';
|
||||
import { RefreshTableModule } from 'src/app/modules/refresh-table/refresh-table.module';
|
||||
import { SharedModule } from 'src/app/modules/shared/shared.module';
|
||||
@@ -55,6 +56,7 @@ import { ProjectsComponent } from './projects.component';
|
||||
LocalizedDatePipeModule,
|
||||
RefreshTableModule,
|
||||
MatRippleModule,
|
||||
NavToggleModule,
|
||||
],
|
||||
})
|
||||
export class ProjectsModule {}
|
||||
|
||||
Reference in New Issue
Block a user