Added a landing page for account.mycroft.ai.
parent
4110c13fc4
commit
efbb7b2ee5
|
@ -1,10 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
|
||||
import { AccountResolverService } from './core/guards/account-resolver.service';
|
||||
import { DashboardComponent } from './modules/dashboard/dashboard.component';
|
||||
import { PageNotFoundComponent } from 'page-not-found';
|
||||
|
||||
const routes: Routes = [
|
||||
{ path: '', redirectTo: '/profile', pathMatch: 'full' },
|
||||
{ path: 'dashboard', component: DashboardComponent, resolve: {account: AccountResolverService} },
|
||||
{ path: '', redirectTo: '/dashboard', pathMatch: 'full'},
|
||||
{ path: '**', component: PageNotFoundComponent }
|
||||
];
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import { NgModule } from '@angular/core';
|
|||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { DashboardModule } from './modules/dashboard/dashboard.module';
|
||||
import { GlobalnavModule } from 'globalnav';
|
||||
import { PageNotFoundModule } from 'page-not-found';
|
||||
import { DeviceModule } from './modules/device/device.module';
|
||||
|
@ -18,6 +19,7 @@ import { SkillModule } from './skill/skill.module';
|
|||
imports: [
|
||||
BrowserModule,
|
||||
BrowserAnimationsModule,
|
||||
DashboardModule,
|
||||
GlobalnavModule,
|
||||
HttpClientModule,
|
||||
DeviceModule,
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<iframe
|
||||
*ngIf="account.membership"
|
||||
src="https://mycroft.ai/tartarus-splash-member/"
|
||||
frameBorder="0"
|
||||
>
|
||||
</iframe>
|
||||
<iframe
|
||||
*ngIf="!account.membership"
|
||||
src="https://mycroft.ai/tartarus-splash-non-member/"
|
||||
frameBorder="0"
|
||||
>
|
||||
</iframe>
|
|
@ -0,0 +1,5 @@
|
|||
iframe {
|
||||
min-width: 350px;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
|
||||
import { Account } from '../../shared/models/account.model';
|
||||
|
||||
@Component({
|
||||
selector: 'account-dashboard',
|
||||
templateUrl: './dashboard.component.html',
|
||||
styleUrls: ['./dashboard.component.scss']
|
||||
})
|
||||
export class DashboardComponent implements OnInit {
|
||||
public account: Account;
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.route.data.subscribe(
|
||||
(data: {account: Account}) => { this.account = data.account; }
|
||||
);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
|
||||
import { DashboardComponent } from './dashboard.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
DashboardComponent
|
||||
],
|
||||
entryComponents: [
|
||||
DashboardComponent,
|
||||
],
|
||||
imports: [
|
||||
CommonModule
|
||||
]
|
||||
})
|
||||
export class DashboardModule { }
|
Loading…
Reference in New Issue