From 33eb69664111f88832a0795ccf7a638bfdfb6b38 Mon Sep 17 00:00:00 2001 From: Vladimir Potekhin Date: Tue, 8 Oct 2024 17:32:38 +0300 Subject: [PATCH] chore: temporary change nav --- .../src/components/app/app.routes.ts | 67 ++++++++--------- .../common-page/common-page.component.html | 8 ++- .../common-page/common-page.component.less | 8 ++- .../dashboards-list.component.html | 13 ---- .../dashboards-list.component.ts | 46 ------------ .../src/components/list/list.component.html | 28 ++++++++ .../list.component.less} | 1 - .../src/components/list/list.component.ts | 72 +++++++++++++++++++ .../navigation/navigation.component.html | 14 ++-- .../dashboards/crypto/crypto.component.html | 15 ++++ .../src/dashboards/crypto/crypto.component.ts | 9 +++ .../dashboards/dashboards.component.html | 16 ----- .../dashboards/dashboards.component.ts | 40 ----------- .../cleaning.component.html | 0 .../cleaning.component.less | 0 .../cleaning.component.ts | 0 .../cleaning.service.ts | 0 .../{Cost => cost}/cost.component.html | 0 .../{Cost => cost}/cost.component.less | 0 .../{Cost => cost}/cost.component.ts | 0 .../components/{Cost => cost}/cost.service.ts | 0 .../lighting.component.html | 0 .../lighting.component.less | 0 .../lighting.component.ts | 0 .../lighting.service.ts | 0 .../{Safety => safety}/safety.component.html | 0 .../{Safety => safety}/safety.component.less | 0 .../{Safety => safety}/safety.component.ts | 0 .../{Safety => safety}/safety.service.ts | 0 .../src/dashboards/iot/iot.component.html | 15 ++++ .../src/dashboards/iot/iot.component.ts | 17 +++-- 31 files changed, 197 insertions(+), 172 deletions(-) delete mode 100644 apps/taiga-lumbermill/src/components/dashboards-list/dashboards-list.component.html delete mode 100644 apps/taiga-lumbermill/src/components/dashboards-list/dashboards-list.component.ts create mode 100644 apps/taiga-lumbermill/src/components/list/list.component.html rename apps/taiga-lumbermill/src/components/{dashboards-list/dashboards-list.component.less => list/list.component.less} (75%) create mode 100644 apps/taiga-lumbermill/src/components/list/list.component.ts delete mode 100644 apps/taiga-lumbermill/src/dashboards/dashboards/dashboards.component.html delete mode 100644 apps/taiga-lumbermill/src/dashboards/dashboards/dashboards.component.ts rename apps/taiga-lumbermill/src/dashboards/iot/components/{Cleaning => cleaning}/cleaning.component.html (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Cleaning => cleaning}/cleaning.component.less (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Cleaning => cleaning}/cleaning.component.ts (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Cleaning => cleaning}/cleaning.service.ts (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Cost => cost}/cost.component.html (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Cost => cost}/cost.component.less (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Cost => cost}/cost.component.ts (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Cost => cost}/cost.service.ts (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Lighting => lighting}/lighting.component.html (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Lighting => lighting}/lighting.component.less (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Lighting => lighting}/lighting.component.ts (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Lighting => lighting}/lighting.service.ts (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Safety => safety}/safety.component.html (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Safety => safety}/safety.component.less (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Safety => safety}/safety.component.ts (100%) rename apps/taiga-lumbermill/src/dashboards/iot/components/{Safety => safety}/safety.service.ts (100%) diff --git a/apps/taiga-lumbermill/src/components/app/app.routes.ts b/apps/taiga-lumbermill/src/components/app/app.routes.ts index bbbf3921b..e28a3502f 100644 --- a/apps/taiga-lumbermill/src/components/app/app.routes.ts +++ b/apps/taiga-lumbermill/src/components/app/app.routes.ts @@ -4,63 +4,54 @@ export const appRoutes: Route[] = [ { path: 'dashboards', loadComponent: async () => - import('../../dashboards/dashboards/dashboards.component').then( - (mod) => mod.DashboardsComponent, - ), - children: [ - { - path: '', - loadComponent: async () => - import( - '../../components/dashboards-list/dashboards-list.component' - ).then((mod) => mod.DashboardsListComponent), - data: {title: ''}, - }, - { - path: 'iot', - loadComponent: async () => - import('../../dashboards/iot/iot.component').then( - (mod) => mod.IotComponent, - ), - data: {title: 'Iot'}, - }, - { - path: 'crypto', - loadComponent: async () => - import('../../dashboards/crypto/crypto.component').then( - (mod) => mod.CryptoComponent, - ), - data: {title: 'Crypto'}, - }, - ], + import('../list/list.component').then((mod) => mod.ListComponent), }, { - path: 'theme', + path: 'dashboards/iot', loadComponent: async () => - import('../../features/theme-generator/theme-generator.component').then( - (mod) => mod.ThemeGeneratorComponent, - ), + import('../../dashboards/iot/iot.component').then((mod) => mod.IotComponent), + data: {title: 'Iot'}, }, { - path: '', + path: 'dashboards/crypto', loadComponent: async () => - import('../../components/common-page/common-page.component').then( - (mod) => mod.CommonPageComponent, + import('../../dashboards/crypto/crypto.component').then( + (mod) => mod.CryptoComponent, ), + data: {title: 'Crypto'}, + }, + { + path: 'pages', + loadComponent: async () => + import('../list/list.component').then((mod) => mod.ListComponent), }, { - path: 'login', + path: 'pages/login', loadComponent: async () => import('../../features/login/login.component').then( (mod) => mod.LoginComponent, ), }, { - path: 'sign-up', + path: 'pages/sign-up', loadComponent: async () => import('../../features/sign-up/sign-up.component').then( (mod) => mod.SignUpComponent, ), }, + { + path: 'color-generator', + loadComponent: async () => + import('../../features/theme-generator/theme-generator.component').then( + (mod) => mod.ThemeGeneratorComponent, + ), + }, + { + path: '', + loadComponent: async () => + import('../../components/common-page/common-page.component').then( + (mod) => mod.CommonPageComponent, + ), + }, {path: '**', redirectTo: 'dashboards'}, ]; diff --git a/apps/taiga-lumbermill/src/components/common-page/common-page.component.html b/apps/taiga-lumbermill/src/components/common-page/common-page.component.html index aadeef231..797cbdf81 100644 --- a/apps/taiga-lumbermill/src/components/common-page/common-page.component.html +++ b/apps/taiga-lumbermill/src/components/common-page/common-page.component.html @@ -46,9 +46,11 @@

-
Pages
Some common pages such as login, registration
- +