2020-06-16 14:52:07 +02:00
|
|
|
import { BreakpointObserver } from '@angular/cdk/layout';
|
2020-05-13 14:41:43 +02:00
|
|
|
import { OverlayContainer } from '@angular/cdk/overlay';
|
2020-09-29 13:21:40 +02:00
|
|
|
import { DOCUMENT, ViewportScroller } from '@angular/common';
|
fix(console): text color shades, ui fixes, state handle restore (#3698)
* common project grant dialog, info box, label policy
* text styles, statehandler fix
* dialog, btn alignment, i18n
* search-user theme colors
* filter formfield sizing
* redirect uris
* shortcut layout
* settings grid type rest, shortcuts linking
* login policy, reset button consistency, metadata
* permission checks
2022-05-25 09:33:18 +02:00
|
|
|
import { Component, HostBinding, HostListener, Inject, OnDestroy, ViewChild } from '@angular/core';
|
2020-05-13 14:41:43 +02:00
|
|
|
import { MatIconRegistry } from '@angular/material/icon';
|
|
|
|
import { MatDrawer } from '@angular/material/sidenav';
|
|
|
|
import { DomSanitizer } from '@angular/platform-browser';
|
2021-08-31 08:25:24 +02:00
|
|
|
import { ActivatedRoute, Router, RouterOutlet } from '@angular/router';
|
2020-09-29 13:21:40 +02:00
|
|
|
import { LangChangeEvent, TranslateService } from '@ngx-translate/core';
|
2021-12-10 16:14:24 +01:00
|
|
|
import { Observable, of, Subject } from 'rxjs';
|
|
|
|
import { map, take, takeUntil } from 'rxjs/operators';
|
2021-10-21 08:29:13 +02:00
|
|
|
|
fix(console): formfield changes and ux (#1020)
* cnsl-formfield, cnsl-label, cnsl-input, ch prefix
* create user cnsl-fields, add cnsl-error
* replace user forms with cnsl-fields
* replace all other occurrences of mat-form-field with cnsl-fields
* improve hover, active, focus behavior, headlin styling
* user-grant refactor
* style cleanup
* stylelint
* fix detail layout flexstart, user table header
* input dir
* error, input directives instead components, on blur handler
* error directive, formfield content children
* formfield control directive
* use new field for new contact dialog
* formfield hint, error directive, scss
* hint or error binding, animation after view init
* avatar changes, policy header
* style lint
* lint
* input control within formfield, errorstatematcher
* use matformcontrol to merge with selects
* member table min width, lint
* lint
* implement from matformcontrol insteat custom, add selector
* find error
* add focus listener
* labelfloat
* fix input directive
* renaming
* rm logs
* user search overflow, org create i18n, meta cleanup
* sidenav shadow
* redirect to org table
* lint
* lint test files
* remove usage of formfieldmodule, use input module, layout optim
* replace formfieldmodule usage with inputmodule
* lint input dir, scss
* user grant, user table optimisations
* reorganize sidenav, project table empty, tooltips, avatar ch
* user grant tooltips, form field error directive accessor
* checkbox overflow fix, table dateblock, i18n tooltips
* app placeholder, i18n, optimize mobile layout
* change refresh table order, i18n, redirect chips
* stylelint
* chore(deps-dev): bump stylelint from 13.7.2 to 13.8.0 in /console (#1007)
* fix: add project validation (#996)
* fix: project add validation (#997)
* fix: add project validation
* fix: removed loop
* chore(deps-dev): bump stylelint from 13.7.2 to 13.8.0 in /console
Bumps [stylelint](https://github.com/stylelint/stylelint) from 13.7.2 to 13.8.0.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/13.7.2...13.8.0)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump @angular/cli from 11.0.1 to 11.0.2 in /console (#1006)
* fix: add project validation (#996)
* fix: project add validation (#997)
* fix: add project validation
* fix: removed loop
* chore(deps-dev): bump @angular/cli from 11.0.1 to 11.0.2 in /console
Bumps [@angular/cli](https://github.com/angular/angular-cli) from 11.0.1 to 11.0.2.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Commits](https://github.com/angular/angular-cli/compare/v11.0.1...v11.0.2)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps): bump google-proto-files from 2.2.0 to 2.3.0 in /console (#1005)
* fix: add project validation (#996)
* fix: project add validation (#997)
* fix: add project validation
* fix: removed loop
* chore(deps): bump google-proto-files from 2.2.0 to 2.3.0 in /console
Bumps [google-proto-files](https://github.com/googleapis/nodejs-proto-files) from 2.2.0 to 2.3.0.
- [Release notes](https://github.com/googleapis/nodejs-proto-files/releases)
- [Changelog](https://github.com/googleapis/nodejs-proto-files/blob/master/CHANGELOG.md)
- [Commits](https://github.com/googleapis/nodejs-proto-files/compare/v2.2.0...v2.3.0)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump @types/node from 14.14.6 to 14.14.9 in /console (#1004)
* fix: add project validation (#996)
* fix: project add validation (#997)
* fix: add project validation
* fix: removed loop
* chore(deps-dev): bump @types/node from 14.14.6 to 14.14.9 in /console
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 14.14.6 to 14.14.9.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump @angular/language-service from 11.0.0 to 11.0.2 in /console (#999)
* fix: add project validation (#996)
* fix: project add validation (#997)
* fix: add project validation
* fix: removed loop
* chore(deps-dev): bump @angular/language-service in /console
Bumps [@angular/language-service](https://github.com/angular/angular/tree/HEAD/packages/language-service) from 11.0.0 to 11.0.2.
- [Release notes](https://github.com/angular/angular/releases)
- [Changelog](https://github.com/angular/angular/blob/master/CHANGELOG.md)
- [Commits](https://github.com/angular/angular/commits/11.0.2/packages/language-service)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump @angular-devkit/build-angular from 0.1100.1 to 0.1100.2 in /console (#1003)
* fix: add project validation (#996)
* fix: project add validation (#997)
* fix: add project validation
* fix: removed loop
* chore(deps-dev): bump @angular-devkit/build-angular in /console
Bumps [@angular-devkit/build-angular](https://github.com/angular/angular-cli) from 0.1100.1 to 0.1100.2.
- [Release notes](https://github.com/angular/angular-cli/releases)
- [Commits](https://github.com/angular/angular-cli/commits)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Peintner <max@caos.ch>
* chore(deps-dev): bump prettier from 2.1.2 to 2.2.0 in /console (#1002)
* fix: add project validation (#996)
* fix: project add validation (#997)
* fix: add project validation
* fix: removed loop
* chore(deps-dev): bump prettier from 2.1.2 to 2.2.0 in /console
Bumps [prettier](https://github.com/prettier/prettier) from 2.1.2 to 2.2.0.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.1.2...2.2.0)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore(deps-dev): bump @types/jasmine from 3.6.1 to 3.6.2 in /console (#1001)
* fix: add project validation (#996)
* fix: project add validation (#997)
* fix: add project validation
* fix: removed loop
* chore(deps-dev): bump @types/jasmine from 3.6.1 to 3.6.2 in /console
Bumps [@types/jasmine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jasmine) from 3.6.1 to 3.6.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jasmine)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Peintner <max@caos.ch>
* chore(deps): bump file-saver from 2.0.2 to 2.0.5 in /console (#1000)
* fix: add project validation (#996)
* fix: project add validation (#997)
* fix: add project validation
* fix: removed loop
* chore(deps): bump file-saver from 2.0.2 to 2.0.5 in /console
Bumps [file-saver](https://github.com/eligrey/FileSaver.js) from 2.0.2 to 2.0.5.
- [Release notes](https://github.com/eligrey/FileSaver.js/releases)
- [Changelog](https://github.com/eligrey/FileSaver.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eligrey/FileSaver.js/commits)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Max Peintner <max@caos.ch>
* chore(deps-dev): bump jasmine-spec-reporter in /console (#974)
Bumps [jasmine-spec-reporter](https://github.com/bcaudan/jasmine-spec-reporter) from 5.0.2 to 6.0.0.
- [Release notes](https://github.com/bcaudan/jasmine-spec-reporter/releases)
- [Changelog](https://github.com/bcaudan/jasmine-spec-reporter/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bcaudan/jasmine-spec-reporter/compare/v5.0.2...v6.0.0)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* input field border improvements, primary color
* redirect form, conventional ux
* redirects inputs on app create
* fix dynamic suffix padding, user grant layout, lint
* input style accessor, contact view optim, ext idp, card fixes
* hide error on untouched formfield, border red on error touched
* fix change detector
* change, user, form validation, delete refresh
* safari font weight adjustment, change refresh emitter
* key validation
* remove tabls layout from projects
* app changes, refactor project, app state, meta layout
* add key dialog validation, startdate, rever change tabs
* stylelint
* Update console/src/assets/i18n/en.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/en.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/de.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/de.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/de.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/de.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/de.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/de.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/en.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/en.json
Co-authored-by: Florian Forster <florian@caos.ch>
* finnaly fix fckntimestamp picker
* optional key expiry
* small state badge
* Update console/src/assets/i18n/de.json
Co-authored-by: Florian Forster <florian@caos.ch>
* Update console/src/assets/i18n/de.json
Co-authored-by: Florian Forster <florian@caos.ch>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Silvan <silvan.reusser@gmail.com>
Co-authored-by: Florian Forster <florian@caos.ch>
2020-11-25 16:53:14 +01:00
|
|
|
import { accountCard, adminLineAnimation, navAnimations, routeAnimations, toolbarAnimation } from './animations';
|
2021-12-10 16:14:24 +01:00
|
|
|
import { Org } from './proto/generated/zitadel/org_pb';
|
2021-07-28 14:59:52 +02:00
|
|
|
import { LabelPolicy, PrivacyPolicy } from './proto/generated/zitadel/policy_pb';
|
2020-08-29 10:43:35 +02:00
|
|
|
import { AuthenticationService } from './services/authentication.service';
|
|
|
|
import { GrpcAuthService } from './services/grpc-auth.service';
|
2022-04-28 12:35:02 +02:00
|
|
|
import { KeyboardShortcutsService } from './services/keyboard-shortcuts/keyboard-shortcuts.service';
|
2020-08-29 10:43:35 +02:00
|
|
|
import { ManagementService } from './services/mgmt.service';
|
2022-04-28 12:35:02 +02:00
|
|
|
import { NavigationService } from './services/navigation.service';
|
|
|
|
import { OverlayWorkflowService } from './services/overlay/overlay-workflow.service';
|
fix(console): text color shades, ui fixes, state handle restore (#3698)
* common project grant dialog, info box, label policy
* text styles, statehandler fix
* dialog, btn alignment, i18n
* search-user theme colors
* filter formfield sizing
* redirect uris
* shortcut layout
* settings grid type rest, shortcuts linking
* login policy, reset button consistency, metadata
* permission checks
2022-05-25 09:33:18 +02:00
|
|
|
import { StorageService } from './services/storage.service';
|
2020-05-13 14:41:43 +02:00
|
|
|
import { ThemeService } from './services/theme.service';
|
|
|
|
import { UpdateService } from './services/update.service';
|
|
|
|
|
|
|
|
@Component({
|
2021-10-22 10:47:06 +02:00
|
|
|
selector: 'cnsl-root',
|
2021-07-28 14:59:52 +02:00
|
|
|
templateUrl: './app.component.html',
|
|
|
|
styleUrls: ['./app.component.scss'],
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
animations: [toolbarAnimation, ...navAnimations, accountCard, routeAnimations, adminLineAnimation],
|
2020-05-13 14:41:43 +02:00
|
|
|
})
|
fix(console): text color shades, ui fixes, state handle restore (#3698)
* common project grant dialog, info box, label policy
* text styles, statehandler fix
* dialog, btn alignment, i18n
* search-user theme colors
* filter formfield sizing
* redirect uris
* shortcut layout
* settings grid type rest, shortcuts linking
* login policy, reset button consistency, metadata
* permission checks
2022-05-25 09:33:18 +02:00
|
|
|
export class AppComponent implements OnDestroy {
|
2021-07-28 14:59:52 +02:00
|
|
|
@ViewChild('drawer') public drawer!: MatDrawer;
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
public isHandset$: Observable<boolean> = this.breakpointObserver.observe('(max-width: 599px)').pipe(
|
|
|
|
map((result) => {
|
2021-07-28 14:59:52 +02:00
|
|
|
return result.matches;
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
}),
|
|
|
|
);
|
2021-07-28 14:59:52 +02:00
|
|
|
@HostBinding('class') public componentCssClass: string = 'dark-theme';
|
|
|
|
|
2022-04-28 12:35:02 +02:00
|
|
|
public yoffset: number = 0;
|
|
|
|
@HostListener('window:scroll', ['$event']) onScroll(event: Event): void {
|
|
|
|
this.yoffset = this.viewPortScroller.getScrollPosition()[1];
|
|
|
|
}
|
2021-07-28 14:59:52 +02:00
|
|
|
public org!: Org.AsObject;
|
2022-04-28 12:35:02 +02:00
|
|
|
public orgs$: Observable<Org.AsObject[]> = of([]);
|
|
|
|
public showAccount: boolean = false;
|
2021-07-28 14:59:52 +02:00
|
|
|
public isDarkTheme: Observable<boolean> = of(true);
|
|
|
|
|
|
|
|
public showProjectSection: boolean = false;
|
|
|
|
|
2021-08-31 08:25:24 +02:00
|
|
|
private destroy$: Subject<void> = new Subject();
|
2021-07-28 14:59:52 +02:00
|
|
|
public labelpolicy!: LabelPolicy.AsObject;
|
|
|
|
|
|
|
|
public language: string = 'en';
|
|
|
|
public privacyPolicy!: PrivacyPolicy.AsObject;
|
|
|
|
constructor(
|
|
|
|
@Inject('windowObject') public window: Window,
|
2022-04-28 12:35:02 +02:00
|
|
|
public viewPortScroller: ViewportScroller,
|
2021-07-28 14:59:52 +02:00
|
|
|
public translate: TranslateService,
|
|
|
|
public authenticationService: AuthenticationService,
|
|
|
|
public authService: GrpcAuthService,
|
|
|
|
private breakpointObserver: BreakpointObserver,
|
|
|
|
public overlayContainer: OverlayContainer,
|
|
|
|
private themeService: ThemeService,
|
|
|
|
public mgmtService: ManagementService,
|
|
|
|
public matIconRegistry: MatIconRegistry,
|
|
|
|
public domSanitizer: DomSanitizer,
|
|
|
|
private router: Router,
|
|
|
|
update: UpdateService,
|
2022-04-28 12:35:02 +02:00
|
|
|
keyboardShortcuts: KeyboardShortcutsService,
|
2021-08-31 08:25:24 +02:00
|
|
|
private activatedRoute: ActivatedRoute,
|
2022-04-28 12:35:02 +02:00
|
|
|
private workflowService: OverlayWorkflowService,
|
|
|
|
private storageService: StorageService,
|
|
|
|
private navigationService: NavigationService,
|
2021-07-28 14:59:52 +02:00
|
|
|
@Inject(DOCUMENT) private document: Document,
|
|
|
|
) {
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
console.log(
|
|
|
|
'%cWait!',
|
|
|
|
'text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; color: #5469D4; font-size: 50px',
|
|
|
|
);
|
|
|
|
console.log(
|
|
|
|
'%cInserting something here could give attackers access to your zitadel account.',
|
|
|
|
'color: red; font-size: 18px',
|
|
|
|
);
|
|
|
|
console.log(
|
|
|
|
"%cIf you don't know exactly what you're doing, close the window and stay on the safe side",
|
|
|
|
'font-size: 16px',
|
|
|
|
);
|
2021-07-28 14:59:52 +02:00
|
|
|
console.log('%cIf you know exactly what you are doing, you should work for us', 'font-size: 16px');
|
|
|
|
this.setLanguage();
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_account_check_outline',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/account-check-outline.svg'),
|
|
|
|
);
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_account_cancel',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/account-cancel-outline.svg'),
|
|
|
|
);
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_light_on',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/lightbulb-on-outline.svg'),
|
|
|
|
);
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_content_copy',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/content-copy.svg'),
|
|
|
|
);
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_light_off',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/lightbulb-off-outline.svg'),
|
|
|
|
);
|
|
|
|
|
2022-05-20 11:23:16 +02:00
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'usb',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/usb-flash-drive-outline.svg'),
|
|
|
|
);
|
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.matIconRegistry.addSvgIcon('mdi_radar', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/radar.svg'));
|
2021-07-28 14:59:52 +02:00
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_lock_question',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/lock-question.svg'),
|
|
|
|
);
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_textbox_password',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/textbox-password.svg'),
|
|
|
|
);
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_lock_reset',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/lock-reset.svg'),
|
|
|
|
);
|
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.matIconRegistry.addSvgIcon('mdi_broom', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/broom.svg'));
|
2021-07-28 14:59:52 +02:00
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_pin_outline',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/pin-outline.svg'),
|
|
|
|
);
|
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.matIconRegistry.addSvgIcon('mdi_pin', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/pin.svg'));
|
2021-07-28 14:59:52 +02:00
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_format-letter-case-lower',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/format-letter-case-lower.svg'),
|
|
|
|
);
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_format-letter-case-upper',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/format-letter-case-upper.svg'),
|
|
|
|
);
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_counter',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/counter.svg'),
|
|
|
|
);
|
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.matIconRegistry.addSvgIcon('mdi_openid', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/openid.svg'));
|
2021-10-21 08:29:13 +02:00
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.matIconRegistry.addSvgIcon('mdi_jwt', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/jwt.svg'));
|
2021-10-21 08:29:13 +02:00
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.matIconRegistry.addSvgIcon('mdi_symbol', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/symbol.svg'));
|
2021-07-28 14:59:52 +02:00
|
|
|
|
2022-05-13 16:19:06 +02:00
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_shield_alert',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/shield-alert.svg'),
|
|
|
|
);
|
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_numeric',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/numeric.svg'),
|
|
|
|
);
|
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.matIconRegistry.addSvgIcon('mdi_api', this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/api.svg'));
|
2021-07-28 14:59:52 +02:00
|
|
|
|
feat(console): actions and flows (#2559)
* features, page, table, create dialog, i18n
* trigger actions service, add action dialog
* display flows, add flow dialog, duration pipe, i18n
* optim flow layout, action presets
* delete actions, flows, layout
* drag drop list, fix update
* lint
* stylelint
* fix template rest
* actions, drag, fix hasrole
* stylelint
* toast, i18n
* missing italian translations
* it
* fix ActionSearchQueries
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-16 08:18:03 +01:00
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_arrow_right_bottom',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/arrow-right-bottom.svg'),
|
|
|
|
);
|
|
|
|
|
|
|
|
this.matIconRegistry.addSvgIcon(
|
|
|
|
'mdi_arrow_decision',
|
|
|
|
this.domSanitizer.bypassSecurityTrustResourceUrl('assets/mdi/arrow-decision-outline.svg'),
|
|
|
|
);
|
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.activatedRoute.queryParams.pipe(takeUntil(this.destroy$)).subscribe((route) => {
|
|
|
|
const { org } = route;
|
|
|
|
if (org) {
|
2022-04-28 12:35:02 +02:00
|
|
|
this.authService
|
|
|
|
.getActiveOrg(org)
|
|
|
|
.then((queriedOrg) => {
|
|
|
|
this.org = queriedOrg;
|
|
|
|
})
|
|
|
|
.catch((error) => {
|
|
|
|
this.router.navigate(['/users/me']);
|
|
|
|
});
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
}
|
|
|
|
});
|
2021-08-31 08:25:24 +02:00
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
this.getProjectCount();
|
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.authService.activeOrgChanged.pipe(takeUntil(this.destroy$)).subscribe((org) => {
|
2021-07-28 14:59:52 +02:00
|
|
|
this.org = org;
|
|
|
|
this.getProjectCount();
|
|
|
|
});
|
|
|
|
|
2021-08-31 08:25:24 +02:00
|
|
|
this.authenticationService.authenticationChanged.pipe(takeUntil(this.destroy$)).subscribe((authenticated) => {
|
2021-07-28 14:59:52 +02:00
|
|
|
if (authenticated) {
|
2022-04-28 12:35:02 +02:00
|
|
|
this.authService
|
|
|
|
.getActiveOrg()
|
|
|
|
.then((org) => {
|
|
|
|
this.org = org;
|
|
|
|
|
fix(console): text color shades, ui fixes, state handle restore (#3698)
* common project grant dialog, info box, label policy
* text styles, statehandler fix
* dialog, btn alignment, i18n
* search-user theme colors
* filter formfield sizing
* redirect uris
* shortcut layout
* settings grid type rest, shortcuts linking
* login policy, reset button consistency, metadata
* permission checks
2022-05-25 09:33:18 +02:00
|
|
|
this.loadPrivateLabelling();
|
|
|
|
|
|
|
|
// TODO add when console storage is implemented
|
|
|
|
// this.startIntroWorkflow();
|
2022-04-28 12:35:02 +02:00
|
|
|
})
|
|
|
|
.catch((error) => {
|
|
|
|
this.router.navigate(['/users/me']);
|
|
|
|
});
|
2021-07-28 14:59:52 +02:00
|
|
|
}
|
|
|
|
});
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
this.isDarkTheme = this.themeService.isDarkTheme;
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.isDarkTheme.subscribe((dark) => this.onSetTheme(dark ? 'dark-theme' : 'light-theme'));
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
this.translate.onLangChange.subscribe((language: LangChangeEvent) => {
|
|
|
|
this.document.documentElement.lang = language.lang;
|
|
|
|
this.language = language.lang;
|
|
|
|
});
|
2022-04-28 12:35:02 +02:00
|
|
|
}
|
2020-09-29 13:21:40 +02:00
|
|
|
|
fix(console): text color shades, ui fixes, state handle restore (#3698)
* common project grant dialog, info box, label policy
* text styles, statehandler fix
* dialog, btn alignment, i18n
* search-user theme colors
* filter formfield sizing
* redirect uris
* shortcut layout
* settings grid type rest, shortcuts linking
* login policy, reset button consistency, metadata
* permission checks
2022-05-25 09:33:18 +02:00
|
|
|
// TODO implement Console storage
|
|
|
|
|
|
|
|
// private startIntroWorkflow(): void {
|
|
|
|
// setTimeout(() => {
|
|
|
|
// const cb = () => {
|
|
|
|
// this.storageService.setItem('intro-dismissed', true, StorageLocation.local);
|
|
|
|
// };
|
|
|
|
// const dismissed = this.storageService.getItem('intro-dismissed', StorageLocation.local);
|
|
|
|
// if (!dismissed) {
|
|
|
|
// this.workflowService.startWorkflow(IntroWorkflowOverlays, cb);
|
|
|
|
// }
|
|
|
|
// }, 1000);
|
|
|
|
// }
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
public ngOnDestroy(): void {
|
2021-08-31 08:25:24 +02:00
|
|
|
this.destroy$.next();
|
|
|
|
this.destroy$.complete();
|
2021-07-28 14:59:52 +02:00
|
|
|
}
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
public loadPrivateLabelling(): void {
|
|
|
|
const setDefaultColors = () => {
|
2022-04-28 12:35:02 +02:00
|
|
|
const darkPrimary = '#bbbafa';
|
|
|
|
const lightPrimary = '#5469d4';
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2022-04-28 12:35:02 +02:00
|
|
|
const darkWarn = '#ff3b5b';
|
feat(console): user metadata, rehaul detail pages (#2209)
* service, sidenav, i18n, dialog
* detail layout, user detail
* metadata dialog from
* dialog
* features
* formarray
* metadata component
* comp
* user metadata refresh
* use formarray, control, bulk save
* metadata revert, has feature directive
* lint
* lint
* typo
* info row user, warn color optim
* card cleanup, actions for user detail
* project, org, user, app rehaul
* lint
* scss
* digit fix
* features and project grid rehaul
* info-section layout, org domain info
* readd palette scss
* add svg email warn
* missing translation
* rm unused ts
* lockoutpolicy
* check for lockout feature
2021-09-13 13:38:57 +02:00
|
|
|
const lightWarn = '#cd3d56';
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2022-04-28 12:35:02 +02:00
|
|
|
const darkBackground = '#111827';
|
2021-07-28 14:59:52 +02:00
|
|
|
const lightBackground = '#fafafa';
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2022-01-21 16:08:32 +01:00
|
|
|
const darkText = '#ffffff';
|
|
|
|
const lightText = '#000000';
|
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
this.themeService.savePrimaryColor(darkPrimary, true);
|
|
|
|
this.themeService.savePrimaryColor(lightPrimary, false);
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
this.themeService.saveWarnColor(darkWarn, true);
|
|
|
|
this.themeService.saveWarnColor(lightWarn, false);
|
2020-05-13 14:41:43 +02:00
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
this.themeService.saveBackgroundColor(darkBackground, true);
|
|
|
|
this.themeService.saveBackgroundColor(lightBackground, false);
|
2022-01-21 16:08:32 +01:00
|
|
|
|
|
|
|
this.themeService.saveTextColor(darkText, true);
|
|
|
|
this.themeService.saveTextColor(lightText, false);
|
2021-07-28 14:59:52 +02:00
|
|
|
};
|
fix(console): hide granted project navigation if none, cache zitadel permissions, emit refresh on org change, cleanup contributors, styling (#511)
* fix iam member model
* fix org member model
* fix auth user loading
* copytoclipboard directive
* directive logs, load bar on init, create user
* typo
* welcome section, contributor spinner
* fix home link
* fix stepper flow
* show dialog on invalid token
* fix app table refresh, pin icons light theme
* cleanup contributor
* inherit parent color, animations
* use localized date pipe everywhere
* cmp styles refactor, dont show granted p if none
* fix navitem desc, fixed header
* change permissions, caching
* roles on org emit, use prom instead of hot obs
* dont calc 100vh
2020-07-28 09:09:18 +02:00
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
setDefaultColors();
|
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.mgmtService.getLabelPolicy().then((labelpolicy) => {
|
2021-07-28 14:59:52 +02:00
|
|
|
if (labelpolicy.policy) {
|
|
|
|
this.labelpolicy = labelpolicy.policy;
|
|
|
|
|
2022-01-21 16:08:32 +01:00
|
|
|
const isDark = (color: string) => this.themeService.isDark(color);
|
|
|
|
const isLight = (color: string) => this.themeService.isLight(color);
|
|
|
|
|
2022-04-28 12:35:02 +02:00
|
|
|
const darkPrimary = this.labelpolicy?.primaryColorDark || '#bbbafa';
|
|
|
|
const lightPrimary = this.labelpolicy?.primaryColor || '#5469d4';
|
2021-07-28 14:59:52 +02:00
|
|
|
|
2022-04-28 12:35:02 +02:00
|
|
|
const darkWarn = this.labelpolicy?.warnColorDark || '#ff3b5b';
|
feat(console): user metadata, rehaul detail pages (#2209)
* service, sidenav, i18n, dialog
* detail layout, user detail
* metadata dialog from
* dialog
* features
* formarray
* metadata component
* comp
* user metadata refresh
* use formarray, control, bulk save
* metadata revert, has feature directive
* lint
* lint
* typo
* info row user, warn color optim
* card cleanup, actions for user detail
* project, org, user, app rehaul
* lint
* scss
* digit fix
* features and project grid rehaul
* info-section layout, org domain info
* readd palette scss
* add svg email warn
* missing translation
* rm unused ts
* lockoutpolicy
* check for lockout feature
2021-09-13 13:38:57 +02:00
|
|
|
const lightWarn = this.labelpolicy?.warnColor || '#cd3d56';
|
2021-07-28 14:59:52 +02:00
|
|
|
|
2022-01-21 16:08:32 +01:00
|
|
|
let darkBackground = this.labelpolicy?.backgroundColorDark;
|
|
|
|
let lightBackground = this.labelpolicy?.backgroundColor;
|
|
|
|
|
|
|
|
let darkText = this.labelpolicy.fontColorDark;
|
|
|
|
let lightText = this.labelpolicy.fontColor;
|
2021-07-28 14:59:52 +02:00
|
|
|
|
|
|
|
this.themeService.savePrimaryColor(darkPrimary, true);
|
|
|
|
this.themeService.savePrimaryColor(lightPrimary, false);
|
|
|
|
|
|
|
|
this.themeService.saveWarnColor(darkWarn, true);
|
|
|
|
this.themeService.saveWarnColor(lightWarn, false);
|
|
|
|
|
2022-01-21 16:08:32 +01:00
|
|
|
if (darkBackground && !isDark(darkBackground)) {
|
|
|
|
console.info(
|
|
|
|
`Background (${darkBackground}) is not dark enough for a dark theme. Falling back to zitadel background`,
|
|
|
|
);
|
2022-04-28 12:35:02 +02:00
|
|
|
darkBackground = '#111827';
|
2022-01-21 16:08:32 +01:00
|
|
|
}
|
2022-04-28 12:35:02 +02:00
|
|
|
this.themeService.saveBackgroundColor(darkBackground || '#111827', true);
|
2022-01-21 16:08:32 +01:00
|
|
|
|
|
|
|
if (lightBackground && !isLight(lightBackground)) {
|
|
|
|
console.info(
|
|
|
|
`Background (${lightBackground}) is not light enough for a light theme. Falling back to zitadel background`,
|
|
|
|
);
|
|
|
|
lightBackground = '#fafafa';
|
|
|
|
}
|
|
|
|
this.themeService.saveBackgroundColor(lightBackground || '#fafafa', false);
|
|
|
|
|
|
|
|
if (darkText && !isLight(darkText)) {
|
|
|
|
console.info(
|
|
|
|
`Text color (${darkText}) is not light enough for a dark theme. Falling back to zitadel's text color`,
|
|
|
|
);
|
|
|
|
darkText = '#ffffff';
|
|
|
|
}
|
|
|
|
this.themeService.saveTextColor(darkText || '#ffffff', true);
|
|
|
|
|
|
|
|
if (lightText && !isDark(lightText)) {
|
|
|
|
console.info(
|
|
|
|
`Text color (${lightText}) is not dark enough for a light theme. Falling back to zitadel's text color`,
|
|
|
|
);
|
|
|
|
lightText = '#000000';
|
|
|
|
}
|
|
|
|
this.themeService.saveTextColor(lightText || '#000000', false);
|
2021-07-28 14:59:52 +02:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
public prepareRoute(outlet: RouterOutlet): boolean {
|
|
|
|
return outlet && outlet.activatedRouteData && outlet.activatedRouteData.animation;
|
|
|
|
}
|
|
|
|
|
|
|
|
public onSetTheme(theme: string): void {
|
|
|
|
localStorage.setItem('theme', theme);
|
2022-04-29 10:25:12 +02:00
|
|
|
this.overlayContainer.getContainerElement().classList.remove(theme === 'dark-theme' ? 'light-theme' : 'dark-theme');
|
2021-07-28 14:59:52 +02:00
|
|
|
this.overlayContainer.getContainerElement().classList.add(theme);
|
|
|
|
this.componentCssClass = theme;
|
|
|
|
}
|
|
|
|
|
2022-04-28 12:35:02 +02:00
|
|
|
public changedOrg(org: Org.AsObject): void {
|
|
|
|
this.loadPrivateLabelling();
|
|
|
|
this.authService.zitadelPermissionsChanged.pipe(take(1)).subscribe(() => {
|
2022-05-13 16:19:06 +02:00
|
|
|
this.router.navigate(['/org'], { fragment: org.id });
|
2022-04-28 12:35:02 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2021-07-28 14:59:52 +02:00
|
|
|
private setLanguage(): void {
|
|
|
|
this.translate.addLangs(['en', 'de']);
|
|
|
|
this.translate.setDefaultLang('en');
|
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
this.authService.user.subscribe((userprofile) => {
|
2021-07-28 14:59:52 +02:00
|
|
|
if (userprofile) {
|
2021-10-22 10:47:06 +02:00
|
|
|
// this.user = userprofile;
|
2021-07-28 14:59:52 +02:00
|
|
|
const cropped = navigator.language.split('-')[0] ?? 'en';
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
const fallbackLang = cropped.match(/en|de|it/) ? cropped : 'en';
|
2021-07-28 14:59:52 +02:00
|
|
|
|
feat: add it-IT to internationalization (#2439)
* login it
* deepl translations, corrections
* login, en typos
* it internal, typo fixes
* message texts, optim console texts, guide for internationalization
* missing console, fix de, en
* Add missing keys from main
* translate missing keys
* add it to console selection, change it policy descriptors
* add missing i18n from jwt idp, fixes
* add missing translations
* missing translations
* fix
* auth user language change, interceptor
* remove multiline operator
Co-authored-by: Livio Amstutz <livio.a@gmail.com>
2021-11-15 08:23:35 +01:00
|
|
|
const lang = userprofile?.human?.profile?.preferredLanguage.match(/en|de|it/)
|
|
|
|
? userprofile.human.profile?.preferredLanguage
|
|
|
|
: fallbackLang;
|
2021-07-28 14:59:52 +02:00
|
|
|
this.translate.use(lang);
|
|
|
|
this.language = lang;
|
|
|
|
this.document.documentElement.lang = lang;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
private getProjectCount(): void {
|
|
|
|
this.authService.isAllowed(['project.read']).subscribe((allowed) => {
|
|
|
|
if (allowed) {
|
|
|
|
this.mgmtService.listProjects(0, 0);
|
|
|
|
this.mgmtService.listGrantedProjects(0, 0);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2020-05-13 14:41:43 +02:00
|
|
|
}
|