added redirection to url root
This commit is contained in:
parent
a23db9b30e
commit
bbfb4bc026
|
@ -101,7 +101,7 @@ export class AddNewAccountComponent implements OnInit {
|
||||||
if (instanceApps.length !== 0) {
|
if (instanceApps.length !== 0) {
|
||||||
return Promise.resolve(instanceApps[0].app);
|
return Promise.resolve(instanceApps[0].app);
|
||||||
} else {
|
} else {
|
||||||
const redirect_uri = this.getLocalHostname() + '/register';
|
const redirect_uri = this.getLocalHostname();
|
||||||
return this.authService.createNewApplication(instance, 'Sengi', redirect_uri, 'read write follow', 'https://nicolasconstant.github.io/sengi/')
|
return this.authService.createNewApplication(instance, 'Sengi', redirect_uri, 'read write follow', 'https://nicolasconstant.github.io/sengi/')
|
||||||
.then((appData: AppData) => {
|
.then((appData: AppData) => {
|
||||||
return this.saveNewApp(instance, appData)
|
return this.saveNewApp(instance, appData)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { Component, OnInit, OnDestroy, QueryList, ViewChildren, ElementRef } from "@angular/core";
|
import { Component, OnInit, OnDestroy, QueryList, ViewChildren, ElementRef } from "@angular/core";
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { Observable, Subscription } from "rxjs";
|
import { Observable, Subscription } from "rxjs";
|
||||||
import { Select } from "@ngxs/store";
|
import { Select } from "@ngxs/store";
|
||||||
import scrollIntoView from "smooth-scroll-into-view-if-needed";
|
import scrollIntoView from "smooth-scroll-into-view-if-needed";
|
||||||
|
@ -19,10 +20,20 @@ export class StreamsMainDisplayComponent implements OnInit, OnDestroy {
|
||||||
private columnSelectedSub: Subscription;
|
private columnSelectedSub: Subscription;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
private readonly router: Router,
|
||||||
|
private readonly activatedRoute: ActivatedRoute,
|
||||||
private readonly navigationService: NavigationService) {
|
private readonly navigationService: NavigationService) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.activatedRoute.queryParams.subscribe(params => {
|
||||||
|
const code = params['code'];
|
||||||
|
if (code) {
|
||||||
|
this.router.navigate(['/register'], { queryParams: { code: code} });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
this.columnSelectedSub = this.navigationService.columnSelectedSubject.subscribe((columnIndex: number) => {
|
this.columnSelectedSub = this.navigationService.columnSelectedSubject.subscribe((columnIndex: number) => {
|
||||||
this.focusOnColumn(columnIndex);
|
this.focusOnColumn(columnIndex);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue