From bb455b2c458e5232aac09023d884456fa72df746 Mon Sep 17 00:00:00 2001 From: Kataev Denis Date: Thu, 29 Sep 2022 10:09:15 +0400 Subject: [PATCH] =?UTF-8?q?dev=20#12401=20=D0=A1=D1=82=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=86=D0=B0=20404=20=D0=B8=20=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/app.module.ts | 9 ++++-- .../ref-system/ref-system.component.ts | 2 +- .../pages/not-found/not-found.component.html | 8 ++++++ .../pages/not-found/not-found.component.scss | 28 +++++++++++++++++++ .../not-found/not-found.component.spec.ts | 23 +++++++++++++++ .../pages/not-found/not-found.component.ts | 15 ++++++++++ src/index.html | 2 +- 7 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 src/app/pages/not-found/not-found.component.html create mode 100644 src/app/pages/not-found/not-found.component.scss create mode 100644 src/app/pages/not-found/not-found.component.spec.ts create mode 100644 src/app/pages/not-found/not-found.component.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index b1e15c8..9a1f050 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -32,6 +32,7 @@ import { QRCodeModule } from 'angularx-qrcode'; import { ShareButtonsModule } from 'ngx-sharebuttons/buttons'; import { ShareIconsModule } from 'ngx-sharebuttons/icons'; import { MessagingService } from './services/messaging.service'; +import { NotFoundComponent } from './pages/not-found/not-found.component'; @NgModule({ declarations: [ @@ -47,16 +48,18 @@ import { MessagingService } from './services/messaging.service'; OrderInfoComponent, FooterButtonsComponent, UserDataComponent, - RefSystemComponent + RefSystemComponent, + NotFoundComponent ], imports: [ BrowserModule, AppRoutingModule, RouterModule.forRoot([ { - path: '**', + path: '', component: MainComponent - } + }, + { path: '**', component: NotFoundComponent } ]), InputMaskModule, ProgressSpinnerModule, diff --git a/src/app/pages/account/ref-system/ref-system.component.ts b/src/app/pages/account/ref-system/ref-system.component.ts index 9ac9d31..dd7d489 100644 --- a/src/app/pages/account/ref-system/ref-system.component.ts +++ b/src/app/pages/account/ref-system/ref-system.component.ts @@ -35,7 +35,7 @@ export class RefSystemComponent implements OnInit { if (navigator.share) { navigator.share({ title: document.title, - text: "Fashion Logica", + text: "Fashionlogica", url: this.refUrl }) .then(() => console.log('Successful share')) diff --git a/src/app/pages/not-found/not-found.component.html b/src/app/pages/not-found/not-found.component.html new file mode 100644 index 0000000..5ea0511 --- /dev/null +++ b/src/app/pages/not-found/not-found.component.html @@ -0,0 +1,8 @@ +
+ +
+

404

+

Упс, что-то пошло не так!

+ +
+
diff --git a/src/app/pages/not-found/not-found.component.scss b/src/app/pages/not-found/not-found.component.scss new file mode 100644 index 0000000..0f45331 --- /dev/null +++ b/src/app/pages/not-found/not-found.component.scss @@ -0,0 +1,28 @@ +:host { + .not-found-page { + &__container { + text-align: center; + margin-top: 32px; + h1 { + font-size: 108px; + font-weight: 600; + color: #09467f; + } + p { + margin: 16px 0; + font-size: 14px; + } + button { + background-color: #09467f; + color: #fff; + border-radius: 8px; + display: flex; + justify-content: center; + align-items: center; + padding: 12px; + margin: 0 auto; + border: 0; + } + } + } +} diff --git a/src/app/pages/not-found/not-found.component.spec.ts b/src/app/pages/not-found/not-found.component.spec.ts new file mode 100644 index 0000000..4ab46fe --- /dev/null +++ b/src/app/pages/not-found/not-found.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NotFoundComponent } from './not-found.component'; + +describe('NotFoundComponent', () => { + let component: NotFoundComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ NotFoundComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(NotFoundComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/not-found/not-found.component.ts b/src/app/pages/not-found/not-found.component.ts new file mode 100644 index 0000000..7cb4124 --- /dev/null +++ b/src/app/pages/not-found/not-found.component.ts @@ -0,0 +1,15 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-not-found', + templateUrl: './not-found.component.html', + styleUrls: ['./not-found.component.scss'] +}) +export class NotFoundComponent implements OnInit { + + constructor() { } + + ngOnInit(): void { + } + +} diff --git a/src/index.html b/src/index.html index 1c60836..c890b74 100644 --- a/src/index.html +++ b/src/index.html @@ -2,7 +2,7 @@ - Fashion logica + Fashionlogica