mirror of
https://github.com/zitadel/zitadel.git
synced 2025-07-31 08:13:57 +00:00
fix(console): app integration without context (#7541)
* fix: app integration without context * cleanup --------- Co-authored-by: Silvan <silvan.reusser@gmail.com>
This commit is contained in:
parent
266abcb23b
commit
1db10a4286
@ -3,7 +3,7 @@
|
||||
{{ 'QUICKSTART.DIALOG.CHANGE.DESCRIPTION' | translate }}
|
||||
<div class="framework-change-block">
|
||||
<cnsl-framework-autocomplete
|
||||
[frameworkId]="data.framework.id"
|
||||
[frameworkId]="data.framework?.id"
|
||||
[frameworks]="data.frameworks"
|
||||
(selectionChanged)="findFramework($event)"
|
||||
></cnsl-framework-autocomplete>
|
||||
|
@ -1,12 +1,19 @@
|
||||
<div class="framework-change-wrapper">
|
||||
<div class="framework-card-wrapper">
|
||||
<div class="framework-card card" *ngIf="framework | async as framework">
|
||||
<div [routerLink]="['/app-create']" [queryParams]="{ id: framework.docsLink }" class="">
|
||||
<div class="framework-card card" *ngIf="framework | async as framework; else frameworkFallback">
|
||||
<div>
|
||||
<img class="dark-only" *ngIf="framework.imgSrcDark" [src]="framework.imgSrcDark" />
|
||||
<img class="light-only" *ngIf="framework.imgSrcLight" [src]="framework.imgSrcLight" />
|
||||
</div>
|
||||
<span>{{ framework.title }}</span>
|
||||
</div>
|
||||
|
||||
<ng-template #frameworkFallback>
|
||||
<div class="framework-card card">
|
||||
<span>{{ 'QUICKSTART.SELECT_FRAMEWORK' | translate }}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<button (click)="openDialog()" mat-stroked-button>
|
||||
{{ 'ACTIONS.CHANGE' | translate }}
|
||||
</button>
|
||||
|
@ -132,9 +132,13 @@ export class AppCreateComponent implements OnDestroy {
|
||||
.addProject(project.toObject())
|
||||
.then((resp: AddProjectResponse.AsObject) => {
|
||||
this.error.set('');
|
||||
this.router.navigate(['/projects', resp.id, 'apps', 'integrate'], {
|
||||
queryParams: { framework: this.framework()?.id },
|
||||
});
|
||||
if (this.customFramework()) {
|
||||
this.router.navigate(['/projects', resp.id, 'apps', 'create']);
|
||||
} else if (this.framework()) {
|
||||
this.router.navigate(['/projects', resp.id, 'apps', 'integrate'], {
|
||||
queryParams: { framework: this.framework()?.id },
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
const { message } = error;
|
||||
|
@ -124,7 +124,7 @@
|
||||
<div class="app-integrate-actions">
|
||||
<button
|
||||
mat-raised-button
|
||||
[disabled]="loading"
|
||||
[disabled]="loading || !framework()"
|
||||
class="create-button"
|
||||
color="primary"
|
||||
(click)="createApp()"
|
||||
|
Loading…
x
Reference in New Issue
Block a user