This commit is contained in:
Çetin
2024-12-30 12:42:25 +03:00
parent 695219ba90
commit d4fb168043
5 changed files with 157 additions and 12 deletions

View File

@@ -4,18 +4,17 @@ import {AppLayoutComponent} from './layout/app.layout.component';
export const routes: Routes = [
{
path: '', component: AppLayoutComponent,
// children:
// [
children:
[
// { path: '', loadChildren: () => import('./demo/components/dashboard/dashboard.module').then(m => m.DashboardModule) },
// { path: 'uikit', loadChildren: () => import('./demo/components/uikit/uikit.module').then(m => m.UIkitModule) },
// { path: 'utilities', loadChildren: () => import('./demo/components/utilities/utilities.module').then(m => m.UtilitiesModule) },
// { path: 'documentation', loadChildren: () => import('./demo/components/documentation/documentation.module').then(m => m.DocumentationModule) },
// { path: 'blocks', loadChildren: () => import('./demo/components/primeblocks/primeblocks.module').then(m => m.PrimeBlocksModule) },
// { path: 'pages', loadChildren: () => import('./demo/components/pages/pages.module').then(m => m.PagesModule) }
// ]
]
},
// { path: 'auth', loadChildren: () => import('./demo/components/auth/auth.module').then(m => m.AuthModule) },
// { path: 'landing', loadChildren: () => import('./demo/components/landing/landing.module').then(m => m.LandingModule) },
// { path: 'notfound', component: NotfoundComponent },
{ path: 'auth', loadChildren: () => import('./demo/components/auth/routes')},
{ path: '**', redirectTo: '/notfound' },
];

View File

@@ -0,0 +1,34 @@
import { Component } from '@angular/core';
import {ButtonModule} from 'primeng/button';
import {RouterModule} from '@angular/router';
import {RippleModule} from 'primeng/ripple';
@Component({
selector: 'app-access',
standalone: true,
imports: [
ButtonModule,
RouterModule,
RippleModule
],
template: `
<div class="surface-ground flex align-items-center justify-content-center min-h-screen min-w-screen overflow-hidden">
<div class="flex flex-column align-items-center justify-content-center">
<img src="assets/demo/images/access/logo-orange.svg" alt="Sakai logo" class="mb-5 w-6rem flex-shrink-0">
<div style="border-radius:56px; padding:0.3rem; background: linear-gradient(180deg, rgba(247, 149, 48, 0.4) 10%, rgba(247, 149, 48, 0) 30%);">
<div class="w-full surface-card py-8 px-5 sm:px-8 flex flex-column align-items-center" style="border-radius:53px">
<div class="grid flex flex-column align-items-center">
<div class="flex justify-content-center align-items-center bg-orange-500 border-circle" style="width:3.2rem; height:3.2rem;">
<i class="text-50 pi pi-fw pi-lock text-2xl"></i>
</div>
<h1 class="text-900 font-bold text-4xl lg:text-5xl mb-2">Access Denied</h1>
<span class="text-600 mb-5">You do not have the necessary permisions. Please contact admins.</span>
<img src="assets/demo/images/access/asset-access.svg" alt="Access denied" class="mb-5" width="80%">
<button pButton pRipple icon="pi pi-arrow-left" label="Go to Dashboard" class="p-button-text" [routerLink]="['/']"></button>
</div>
</div>
</div>
</div>
</div>`
})
export class Access { }

View File

@@ -0,0 +1,30 @@
import { Component } from '@angular/core';
import {ButtonModule} from 'primeng/button';
import {RippleModule} from 'primeng/ripple';
import {RouterModule} from '@angular/router';
@Component({
selector: 'app-error',
imports: [ButtonModule, RippleModule, RouterModule],
standalone: true,
template: `
<div class="surface-ground flex align-items-center justify-content-center min-h-screen min-w-screen overflow-hidden">
<div class="flex flex-column align-items-center justify-content-center">
<img src="assets/demo/images/error/logo-error.svg" alt="Sakai logo" class="mb-5 w-6rem flex-shrink-0">
<div style="border-radius:56px; padding:0.3rem; background: linear-gradient(180deg, rgba(233, 30, 99, 0.4) 10%, rgba(33, 150, 243, 0) 30%);">
<div class="w-full surface-card py-8 px-5 sm:px-8 flex flex-column align-items-center" style="border-radius:53px">
<div class="grid flex flex-column align-items-center">
<div class="flex justify-content-center align-items-center bg-pink-500 border-circle" style="height:3.2rem; width:3.2rem;">
<i class="pi pi-fw pi-exclamation-circle text-2xl text-white"></i>
</div>
<h1 class="text-900 font-bold text-5xl mb-2">Error Occured</h1>
<span class="text-600 mb-5">Requested resource is not available.</span>
<img src="assets/demo/images/error/asset-error.svg" alt="Error" class="mb-5" width="80%">
<button pButton pRipple icon="pi pi-arrow-left" label="Go to Dashboard" class="p-button-text" [routerLink]="['/']"></button>
</div>
</div>
</div>
</div>
</div>`
})
export class Error { }

View File

@@ -0,0 +1,72 @@
import {Component, inject} from '@angular/core';
import { ButtonModule} from 'primeng/button';
import { CheckboxModule} from 'primeng/checkbox';
import { InputTextModule} from 'primeng/inputtext';
import { PasswordModule} from 'primeng/password';
import {FormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
import { RippleModule} from 'primeng/ripple';
import {LayoutService} from '../../../layout/service/app.layout.service';
@Component({
selector: 'app-login',
standalone: true,
imports: [
ButtonModule,
CheckboxModule,
InputTextModule,
PasswordModule,
FormsModule,
RouterModule,
RippleModule,
],
template: `
<div class="surface-ground flex align-items-center justify-content-center min-h-screen min-w-screen overflow-hidden">
<div class="flex flex-column align-items-center justify-content-center">
<img src="assets/layout/images/{{layoutService.config().colorScheme === 'light' ? 'logo-dark' : 'logo-white'}}.svg" alt="Sakai logo" class="mb-5 w-6rem flex-shrink-0">
<div style="border-radius:56px; padding:0.3rem; background: linear-gradient(180deg, var(--primary-color) 10%, rgba(33, 150, 243, 0) 30%);">
<div class="w-full surface-card py-8 px-5 sm:px-8" style="border-radius:53px">
<div class="text-center mb-5">
<img src="assets/demo/images/login/avatar.png" alt="Image" height="50" class="mb-3">
<div class="text-900 text-3xl font-medium mb-3">Welcome, Isabel!</div>
<span class="text-600 font-medium">Sign in to continue</span>
</div>
<div>
<label for="email1" class="block text-900 text-xl font-medium mb-2">Email</label>
<input id="email1" type="text" placeholder="Email address" pInputText class="w-full md:w-30rem mb-5" style="padding:1rem">
<label for="password1" class="block text-900 font-medium text-xl mb-2">Password</label>
<p-password id="password1" [(ngModel)]="password" placeholder="Password" [toggleMask]="true" styleClass="mb-5" inputStyleClass="w-full p-3 md:w-30rem"></p-password>
<div class="flex align-items-center justify-content-between mb-5 gap-5">
<div class="flex align-items-center">
<p-checkbox id="rememberme1" [binary]="true" styleClass="mr-2"></p-checkbox>
<label for="rememberme1">Remember me</label>
</div>
<a class="font-medium no-underline ml-2 text-right cursor-pointer" style="color: var(--primary-color)">Forgot password?</a>
</div>
<button pButton pRipple label="Sign In" class="w-full p-3 text-xl" [routerLink]="['/']"></button>
</div>
</div>
</div>
</div>
</div>
`,
styles: [`
:host ::ng-deep .pi-eye,
:host ::ng-deep .pi-eye-slash {
transform:scale(1.6);
margin-right: 1rem;
color: var(--primary-color) !important;
}
`]
})
export class Login {
valCheck: string[] = ['remember'];
password!: string;
layoutService = inject(LayoutService);
}

View File

@@ -0,0 +1,10 @@
import { Routes } from '@angular/router';
import { Access } from './access';
import { Login } from './login';
import { Error } from './error';
export default [
{ path: 'access', component: Access},
{ path: 'error', component: Error},
{ path: 'login', component: Login},
] as Routes;