Startup no longer moves the user: an unactivated app stays on the page it loaded instead of being sent to licensing/key, and an unregistered user is no longer sent to licensing/register. The banner in app.component reports the licence state and links to the licensing page - Register while the current user is not registered, Update key for free tier, and More details for a licence problem - so the licence page is somewhere the user goes rather than somewhere they are put. With nothing forcing the user onto licensing/register there is nothing to lock them onto it either, so LicensingGuard (canDeactivate) and its route hook go. A licence problem found while the user is already on a licensing page still opens the page that explains it (navigateWithinLicensing), which keeps the apply-key error flow - and its specs - unchanged. The licensing spec follows the new route through the banner for the expired, invalid and wrong-organisation cases, and updateLicenseKeyQuick waits for the reboot that applying keys triggers before the caller continues. Startup navigation is pinned by app.service.spec: an unactivated app on any page, licensing included, is left where it is.
17 lines
371 B
TypeScript
17 lines
371 B
TypeScript
import { NgModule } from '@angular/core'
|
|
import { RouterModule, Routes } from '@angular/router'
|
|
import { LicensingComponent } from './licensing.component'
|
|
|
|
const routes: Routes = [
|
|
{
|
|
path: ':action',
|
|
component: LicensingComponent
|
|
}
|
|
]
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forChild(routes)],
|
|
exports: [RouterModule]
|
|
})
|
|
export class LicensingRoutingModule {}
|