mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-16 10:45:12 +00:00
feat: rehauled console (#3525)
* new console * move npm ci to angular build * rel path for assets * local grpc copy * login policy, rm clear views, features rel path * lock Co-authored-by: Livio Amstutz <[email protected]>
This commit is contained in:
co-authored by
Livio Amstutz
parent
00f7dbe875
commit
08ae39ae19
@@ -0,0 +1,17 @@
|
||||
<div class="context_intro_overlay">
|
||||
<div class="overlay-info-row">
|
||||
<span class="info">INFO <span *ngIf="data.number && data.count">{{data.number}}/{{data.count}}</span></span>
|
||||
<button mat-icon-button (click)="workflowService.reset()">
|
||||
<mat-icon>close</mat-icon>
|
||||
</button>
|
||||
</div>
|
||||
<p>{{data.i18nText | translate}}</p>
|
||||
<div class="overlay-actions">
|
||||
<button (click)="workflowService.nextStep()" *ngIf="workflowService.nextPossible && !workflowService.isLast"
|
||||
mat-stroked-button>{{'ACTIONS.NEXT' | translate}}</button>
|
||||
|
||||
<button *ngIf="workflowService.isLast" (click)="workflowService.nextStep()" color="primary"
|
||||
mat-raised-button>{{'ACTIONS.FINISHED' |
|
||||
translate}}</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,99 @@
|
||||
@mixin info-overlay-theme($theme) {
|
||||
$primary: map-get($theme, primary);
|
||||
$warn: map-get($theme, warn);
|
||||
$background: map-get($theme, background);
|
||||
$accent: map-get($theme, accent);
|
||||
$primary-color: mat.get-color-from-palette($primary, 500);
|
||||
|
||||
$warn-color: mat.get-color-from-palette($warn, 500);
|
||||
$accent-color: mat.get-color-from-palette($accent, 500);
|
||||
$foreground: map-get($theme, foreground);
|
||||
$is-dark-theme: map-get($theme, is-dark);
|
||||
$back: map-get($background, background);
|
||||
|
||||
.cnsl-overlay-backdrop {
|
||||
background-color: if($is-dark-theme, #00000080, #ffffff80);
|
||||
backdrop-filter: blur(2px);
|
||||
}
|
||||
|
||||
.cnsl-overlay-panel {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: map-get($background, cards);
|
||||
border-radius: 6px;
|
||||
padding: 1rem;
|
||||
font-size: 14px;
|
||||
width: 300px;
|
||||
border: 1px solid if($is-dark-theme, rgba(#8795a1, 0.2), rgba(#8795a1, 0.2));
|
||||
|
||||
&::before {
|
||||
visibility: hidden;
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 0.75rem solid transparent;
|
||||
border-top: none;
|
||||
border-radius: 4px;
|
||||
border-bottom-color: map-get($background, cards);
|
||||
}
|
||||
}
|
||||
|
||||
.context_intro_overlay {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
color: map-get($foreground, base);
|
||||
|
||||
&.top-left {
|
||||
&::before {
|
||||
visibility: visible;
|
||||
bottom: 100%;
|
||||
left: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
&.top-right {
|
||||
&::before {
|
||||
visibility: visible;
|
||||
bottom: 100%;
|
||||
right: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.overlay-info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin: -1rem -1rem 0.5rem 0;
|
||||
align-items: center;
|
||||
|
||||
.info {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
color: $primary-color;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
word-wrap: break-word;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
font-style: italic;
|
||||
line-height: 1.3rem;
|
||||
}
|
||||
|
||||
.overlay-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 0.5rem;
|
||||
justify-content: flex-end;
|
||||
|
||||
button {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { InfoOverlayComponent } from './info-overlay.component';
|
||||
|
||||
describe('InfoOverlayComponent', () => {
|
||||
let component: InfoOverlayComponent;
|
||||
let fixture: ComponentFixture<InfoOverlayComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ InfoOverlayComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(InfoOverlayComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,13 @@
|
||||
import { Component, Inject, InjectionToken } from '@angular/core';
|
||||
import { OverlayWorkflowService } from 'src/app/services/overlay/overlay-workflow.service';
|
||||
|
||||
export const OVERLAY_DATA = new InjectionToken<any>('OVERLAY_DATA');
|
||||
|
||||
@Component({
|
||||
selector: 'cnsl-info-overlay',
|
||||
templateUrl: './info-overlay.component.html',
|
||||
styleUrls: ['./info-overlay.component.scss'],
|
||||
})
|
||||
export class InfoOverlayComponent {
|
||||
constructor(public workflowService: OverlayWorkflowService, @Inject(OVERLAY_DATA) public data: any) {}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
import { InfoOverlayComponent } from './info-overlay.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [InfoOverlayComponent],
|
||||
imports: [CommonModule, MatButtonModule, MatIconModule, TranslateModule],
|
||||
exports: [InfoOverlayComponent],
|
||||
})
|
||||
export class InfoOverlayModule {}
|
||||
Reference in New Issue
Block a user