Merge remote-tracking branch 'origin/master'
# Conflicts: # src/app/_modules/administration/site-pages/administrate-site-pages.component.htmlmaster
commit
02281a3d07
|
|
@ -0,0 +1,21 @@
|
|||
<modal (close)="close()">
|
||||
<div [ngSwitch]="url"header>
|
||||
<h3 *ngSwitchCase="'login'">Вход в систему</h3>
|
||||
<h3 *ngSwitchCase="'signup'">Регистрация</h3>
|
||||
<h3 *ngSwitchCase="'password/forget'">Восстановление пароля</h3>
|
||||
<h3 *ngSwitchCase="'password/reset'">Сброс пароля</h3>
|
||||
</div>
|
||||
<div class="authentication">
|
||||
|
||||
<div class="form">
|
||||
<div class="center" [ngSwitch]="url">
|
||||
<auth-form-login *ngSwitchCase="'login'"></auth-form-login>
|
||||
<auth-form-signup *ngSwitchCase="'signup'"></auth-form-signup>
|
||||
<auth-form-password-forget *ngSwitchCase="'password/forget'"></auth-form-password-forget>
|
||||
<auth-form-password-reset *ngSwitchCase="'password/reset'"></auth-form-password-reset>
|
||||
<p *ngSwitchDefault>{{url}} is undefined</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</modal>
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
import { Component } from '@angular/core';
|
||||
import {Router} from "@angular/router";
|
||||
|
||||
@Component({
|
||||
selector: 'auth-modal',
|
||||
templateUrl: './auth-modal.component.html',
|
||||
styleUrls: ['./auth-modal.component.scss']
|
||||
})
|
||||
export class AuthModalComponent {
|
||||
constructor(private router: Router) {
|
||||
}
|
||||
|
||||
get url() {
|
||||
let str = this.router.url
|
||||
return str.substring(
|
||||
str.indexOf(':') + 1,
|
||||
str.lastIndexOf(')')
|
||||
);
|
||||
}
|
||||
|
||||
close() {
|
||||
this.router.navigate([{outlets: {auth: null}}]).then();
|
||||
}
|
||||
}
|
||||
|
|
@ -9,12 +9,18 @@ import {AuthFormPasswordResetComponent} from "@app/_modules/auth/forms/reset/aut
|
|||
import {AuthFormSignupComponent} from "@app/_modules/auth/forms/signup/auth-form-signup.component";
|
||||
import {AuthPageComponent} from "@app/_modules/auth/page/auth-page.component";
|
||||
import {NotAuthGuard} from "@app/_helpers/not-auth.guard";
|
||||
import { AuthModalComponent } from './auth-modal/auth-modal.component';
|
||||
import { WidjetModule } from '../widjet/widjet.module';
|
||||
|
||||
const routes = [
|
||||
{path: 'login', component: AuthPageComponent, canActivate: [NotAuthGuard]},
|
||||
{path: 'login', component: AuthModalComponent, canActivate: [NotAuthGuard], outlet: 'auth'},
|
||||
{path: 'signup', component: AuthPageComponent, canActivate: [NotAuthGuard]},
|
||||
{path: 'signup', component: AuthModalComponent, canActivate: [NotAuthGuard], outlet: 'auth'},
|
||||
{path: 'password/forget', component: AuthPageComponent, canActivate: [NotAuthGuard]},
|
||||
{path: 'password/reset/:token/:email', component: AuthPageComponent, canActivate: [NotAuthGuard]}
|
||||
{path: 'password/forget', component: AuthModalComponent, canActivate: [NotAuthGuard], outlet: 'auth'},
|
||||
{path: 'password/reset/:token/:email', component: AuthPageComponent, canActivate: [NotAuthGuard]},
|
||||
{path: 'password/reset/:token/:email', component: AuthPageComponent, canActivate: [NotAuthGuard], outlet: 'auth'}
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
|
@ -23,17 +29,20 @@ const routes = [
|
|||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
CommonModule,
|
||||
WidjetModule,
|
||||
RouterModule.forRoot(routes)
|
||||
],
|
||||
exports: [
|
||||
|
||||
],
|
||||
declarations: [
|
||||
AuthModalComponent,
|
||||
AuthPageComponent,
|
||||
AuthFormLoginComponent,
|
||||
AuthFormSignupComponent,
|
||||
AuthFormPasswordForgetComponent,
|
||||
AuthFormPasswordResetComponent
|
||||
AuthFormPasswordResetComponent,
|
||||
AuthModalComponent
|
||||
],
|
||||
})
|
||||
export class AuthModule {}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
<h2>Восстановление пароля</h2>
|
||||
<div class="body" *ngIf="!success">
|
||||
<form [formGroup]="form" (submit)="onSubmit()">
|
||||
<div class="field" [class.invalid]="email.invalid && email.touched">
|
||||
|
|
@ -8,7 +7,7 @@
|
|||
<div *ngIf="error" class="error">{{error}}</div>
|
||||
<div class="description">Если указанный адрес зарегистрирован, то на него будет выслан новый пароль</div>
|
||||
<div class="bottom">
|
||||
<button type="button" class="btn secondary" routerLink="/login">Авторизоваться</button>
|
||||
<button type="button" class="btn secondary" (click)="login()">Авторизоваться</button>
|
||||
<button *ngIf="!success" [disabled]="loading" type="submit" class="btn">Запросить</button>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {AuthenticationService} from '@app/_services';
|
|||
@Component({
|
||||
selector: 'auth-form-password-forget',
|
||||
templateUrl: 'auth-form-password-forget.component.html',
|
||||
styleUrls: ['auth-form-password-forget.component.scss', '../forms.component.scss']
|
||||
styleUrls: ['auth-form-password-forget.component.scss']
|
||||
})
|
||||
export class AuthFormPasswordForgetComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
|
|
@ -47,4 +47,11 @@ export class AuthFormPasswordForgetComponent implements OnInit {
|
|||
let trans = {'The given data was invalid.': 'Указанный адрес почты не найден'};
|
||||
this.error = trans[error] || error;
|
||||
}
|
||||
|
||||
login(){
|
||||
this.router.navigate(
|
||||
[ {outlets: {auth: 'login'}}],
|
||||
{skipLocationChange: true}
|
||||
).then();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,88 +0,0 @@
|
|||
h2 {
|
||||
margin: 0 0 24px;
|
||||
font-size: 24px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.field {
|
||||
margin: 0 0 16px;
|
||||
|
||||
label {
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 12px;
|
||||
margin: 0 0 12px;
|
||||
&:last-child {margin: 0;}
|
||||
label {
|
||||
font-size: 0.875rem;
|
||||
color: #86898E;
|
||||
a {
|
||||
color: #F9B417;
|
||||
}
|
||||
}
|
||||
input {
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.error {
|
||||
margin: 0 0 16px;
|
||||
font-size: 14px;
|
||||
color: #D91519;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
row-gap: 18px;
|
||||
.remember {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
input {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #86898E;
|
||||
}
|
||||
}
|
||||
.forget {
|
||||
margin-left: auto;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 24px;
|
||||
margin: 24px 0 0;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.bottom {
|
||||
flex-direction: column-reverse;
|
||||
button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
<form [formGroup]="form" (submit)="onSubmit()">
|
||||
<h2>Вход в систему</h2>
|
||||
<form [formGroup]="form" (submit)="onSubmit()">
|
||||
<div class="field" [class.invalid]="username.invalid && username.touched">
|
||||
<label for="username">Логин</label>
|
||||
<input id="username" formControlName="username" type="email" />
|
||||
|
|
@ -14,7 +13,10 @@
|
|||
<input id="remember" type="checkbox" />
|
||||
<label for="remember">Запомнить меня</label>
|
||||
</div>
|
||||
<a class="forget" routerLink="/password/forget">Забыли пароль?</a>
|
||||
<div class="forget">
|
||||
<a (click)="forget()">Забыли пароль?</a>
|
||||
<a (click)="signup()">Регистрация</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<button [disabled]="loading" type="submit" class="btn">Войти</button>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import {AuthenticationService} from '@app/_services';
|
|||
@Component({
|
||||
selector: 'auth-form-login',
|
||||
templateUrl: 'auth-form-login.component.html',
|
||||
styleUrls: ['auth-form-login.component.scss', '../forms.component.scss']
|
||||
styleUrls: ['auth-form-login.component.scss']
|
||||
})
|
||||
export class AuthFormLoginComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
|
|
@ -49,4 +49,18 @@ export class AuthFormLoginComponent implements OnInit {
|
|||
let trans = {'The user credentials were incorrect.': 'Имя пользователя или пароль указаны неверно.'};
|
||||
this.error = trans[error] || error;
|
||||
}
|
||||
|
||||
forget(){
|
||||
this.router.navigate(
|
||||
[ {outlets: {auth: 'password/forget'}}],
|
||||
{skipLocationChange: true}
|
||||
).then();
|
||||
}
|
||||
|
||||
signup(){
|
||||
this.router.navigate(
|
||||
[ {outlets: {auth: 'signup'}}],
|
||||
{skipLocationChange: true}
|
||||
).then();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<form [formGroup]="form" (submit)="onSubmit()">
|
||||
<h2>Сброс пароля</h2>
|
||||
<div class="field password">
|
||||
<label for="password">Укажите новый пароль</label>
|
||||
<input id="password" formControlName="password" type="password" />
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {AuthenticationService} from '@app/_services';
|
|||
@Component({
|
||||
selector: 'auth-form-password-reset',
|
||||
templateUrl: 'auth-form-password-reset.component.html',
|
||||
styleUrls: ['auth-form-password-reset.component.scss', '../forms.component.scss']
|
||||
styleUrls: ['auth-form-password-reset.component.scss']
|
||||
})
|
||||
export class AuthFormPasswordResetComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<form [formGroup]="form" (submit)="onSubmit()">
|
||||
<h2>Регистрация</h2>
|
||||
<div class="body">
|
||||
<div class="field" [class.invalid]="email.invalid && email.touched">
|
||||
<label for="email">Электронная почта*</label>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import {Subscription} from "rxjs";
|
|||
@Component({
|
||||
selector: 'auth-form-signup',
|
||||
templateUrl: 'auth-form-signup.component.html',
|
||||
styleUrls: ['auth-form-signup.component.scss', '../forms.component.scss']
|
||||
styleUrls: ['auth-form-signup.component.scss']
|
||||
})
|
||||
export class AuthFormSignupComponent implements OnInit {
|
||||
form: FormGroup;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<div class="authentication">
|
||||
<div class="logo">
|
||||
<div class="center">
|
||||
<img src="assets/images/logo.svg" /><br />
|
||||
<p>Реестр средств измерений</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form">
|
||||
<div class="center" [ngSwitch]="url">
|
||||
<div [ngSwitch]="url"header>
|
||||
<h3 *ngSwitchCase="'login'">Вход в систему</h3>
|
||||
<h3 *ngSwitchCase="'signup'">Регистрация</h3>
|
||||
<h3 *ngSwitchCase="'password/forget'">Восстановление пароля</h3>
|
||||
<h3 *ngSwitchCase="'password/reset'">Сброс пароля</h3>
|
||||
</div>
|
||||
<auth-form-login *ngSwitchCase="'login'"></auth-form-login>
|
||||
<auth-form-signup *ngSwitchCase="'signup'"></auth-form-signup>
|
||||
<auth-form-password-forget *ngSwitchCase="'password/forget'"></auth-form-password-forget>
|
||||
|
|
|
|||
|
|
@ -1,46 +0,0 @@
|
|||
.authentication {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
.logo {
|
||||
display: flex;
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
height: 100%;
|
||||
border-right: #E0E0E0 solid 1px;
|
||||
text-align: center;
|
||||
color: #0071BB;
|
||||
}
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.center {
|
||||
width: 100%;
|
||||
max-width: 416px;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 959px) {
|
||||
.authentication {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
.logo {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-right: none;
|
||||
}
|
||||
.form {
|
||||
flex-grow: 0;
|
||||
}
|
||||
::ng-deep h2 {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ import {Router} from "@angular/router";
|
|||
templateUrl: 'auth-page.component.html',
|
||||
styleUrls: ['auth-page.component.scss']
|
||||
})
|
||||
export class AuthPageComponent implements OnInit {
|
||||
export class AuthPageComponent {
|
||||
constructor(private router: Router) {
|
||||
}
|
||||
|
||||
|
|
@ -14,8 +14,5 @@ export class AuthPageComponent implements OnInit {
|
|||
return this.router.url.split('?')[0].split('(')[0].split('/').slice(1, 3).join('/');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {AuthenticationService} from "@app/_services";
|
||||
import {Subscription} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'footer',
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import {Component, Input} from '@angular/core';
|
||||
import {AuthenticationService} from "@app/_services";
|
||||
import {Router} from "@angular/router";
|
||||
import {Subscription} from "rxjs";
|
||||
import { PagesService } from '@app/_services/pages.service';
|
||||
|
||||
|
||||
|
|
@ -13,7 +12,6 @@ import { PagesService } from '@app/_services/pages.service';
|
|||
export class HeaderUserBarComponent {
|
||||
public menuItems = <any>[];
|
||||
public ddHidden = true;
|
||||
subscriptionUser: Subscription;
|
||||
|
||||
constructor(public authService: AuthenticationService, private router: Router, private pagesService: PagesService) {
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ export class JumbotronComponent {
|
|||
){}
|
||||
|
||||
get currentPage(){
|
||||
|
||||
return this.pagesService.currentPage
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,32 +1,41 @@
|
|||
<div class="item" [class.deleted]="isDeleted" [class.hidden]="isHidden" [class.home]="!parent" (click)="touched = true">
|
||||
<div class="item" [class.hidden]="isHidden" [class.home]="!parent" (click)="touched = true">
|
||||
<div class="bar">
|
||||
<div class="left">
|
||||
<drop-down ico="chevron_right_24" [angle]="[0,90]" *ngIf="hasChildren" (toggle)="active=$event"></drop-down>
|
||||
</div>
|
||||
<div class="mid">
|
||||
<div class="mid" [class.deleted]="isDeleted">
|
||||
<div class="info">
|
||||
<div class="logo">
|
||||
<div class="logo" *ngIf="parent">
|
||||
<ico ico="web_page_24" color="#FFF"></ico>
|
||||
</div>
|
||||
<div class="name"><p><a [routerLink]="page.link" target="_blank">{{page.name}}</a></p></div>
|
||||
<div class="logo" *ngIf="!parent">
|
||||
<ico ico="home_24" color="#FFF"></ico>
|
||||
</div>
|
||||
<div class="name">
|
||||
<a [routerLink]="page.link" target="_blank">{{page.name}}</a>
|
||||
<a [routerLink]="page.link" target="_blank" *ngIf="page.h1">{{page.h1}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<a *ngIf="parent && !isDeleted" class="clear clone" title="Копировать" (click)="clone()">
|
||||
<ico ico="add_circle_24"></ico>
|
||||
</a>
|
||||
<a *ngIf="!isDeleted" class="clear add-child" title="Добавить страницу" (click)="add()">
|
||||
<ico ico="add_web_page_24"></ico>
|
||||
</a>
|
||||
<a *ngIf="!isDeleted" class="clear edit" title="Редактировать" (click)="edit()">
|
||||
<ico ico="edit_24"></ico>
|
||||
</a>
|
||||
<a *ngIf="isDeleted" class="clear restore" title="Восстановить" (click)="restore()">
|
||||
<ico ico="visibility_on_24"></ico>
|
||||
</a>
|
||||
<a *ngIf="page.slug" class="clear close-blue" title="{{isDeleted ? 'Удалить безвозвратно' : 'Удалить'}}" (click)="delete()">
|
||||
<ico ico="delete_24"></ico>
|
||||
</a>
|
||||
<div *ngIf="parent && !isDeleted" title="Копировать" (click)="clone()">
|
||||
<ico ico="copy_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="!isDeleted" title="Добавить страницу" (click)="add()">
|
||||
<ico ico="webpage_plus_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="!isDeleted" title="Редактировать" (click)="edit()">
|
||||
<ico ico="edit_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="isDeleted" title="Восстановить" (click)="restore()">
|
||||
<ico ico="visibility_on_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="isDeleted" title="Удалить безвозвратно" (click)="delete()">
|
||||
<ico ico="delete_24" class="page-control"></ico>
|
||||
</div>
|
||||
<div *ngIf="!isDeleted" title="Удалить" (click)="delete()">
|
||||
<ico ico="visibility_off_24" class="page-control"></ico>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="items" *ngIf="active">
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ export class PagesTreeItemComponent {
|
|||
|
||||
|
||||
fetch() {
|
||||
let include = ['children'];
|
||||
let include = ['children','locale'];
|
||||
this.pagesService.show(this.page.id, {include: include.join(','), withTrashed: true}).subscribe(res => {
|
||||
this.page = res.data;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
<p>modal works!</p>
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ModalComponent } from './modal.component';
|
||||
|
||||
describe('ModalComponent', () => {
|
||||
let component: ModalComponent;
|
||||
let fixture: ComponentFixture<ModalComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ ModalComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(ModalComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-modal',
|
||||
templateUrl: './modal.component.html',
|
||||
styleUrls: ['./modal.component.scss']
|
||||
})
|
||||
export class ModalComponent {
|
||||
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
$bull: 18px;
|
||||
$offset: 2px;
|
||||
$track: 20px;
|
||||
|
||||
div{
|
||||
border: 1px solid var(--second);
|
||||
display: inline-flex;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,9 @@ export class AuthenticationService {
|
|||
|
||||
|
||||
popup(path: any) {
|
||||
this.router.navigate([path]).then();
|
||||
//this.router.navigate([ {outlets: {auth: path}}], {skipLocationChange: true}).then();
|
||||
this.router.navigate(
|
||||
[ {outlets: {auth: path}}],
|
||||
{skipLocationChange: true}
|
||||
).then();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -233,4 +233,147 @@ form-field-document{
|
|||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
auth-page{
|
||||
.authentication {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.logo {
|
||||
display: flex;
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
height: 100%;
|
||||
border-right: #E0E0E0 solid 1px;
|
||||
text-align: center;
|
||||
color: #0071BB;
|
||||
}
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.center {
|
||||
width: 100%;
|
||||
max-width: 416px;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 959px) {
|
||||
.authentication {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
.logo {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-right: none;
|
||||
}
|
||||
.form {
|
||||
flex-grow: 0;
|
||||
}
|
||||
::ng-deep h2 {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
auth-page, auth-modal{
|
||||
h2 {
|
||||
margin: 0 0 24px;
|
||||
font-size: 24px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.field {
|
||||
margin: 0 0 16px;
|
||||
|
||||
label {
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 12px;
|
||||
margin: 0 0 12px;
|
||||
&:last-child {margin: 0;}
|
||||
label {
|
||||
font-size: 0.875rem;
|
||||
color: #86898E;
|
||||
a {
|
||||
color: #F9B417;
|
||||
}
|
||||
}
|
||||
input {
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.error {
|
||||
margin: 0 0 16px;
|
||||
font-size: 14px;
|
||||
color: #D91519;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
row-gap: 18px;
|
||||
.remember {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
input {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #86898E;
|
||||
}
|
||||
}
|
||||
.forget {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-basis: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 24px;
|
||||
margin: 24px 0 0;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.bottom {
|
||||
flex-direction: column-reverse;
|
||||
button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ export const environment = {
|
|||
production: false,
|
||||
apiUrl: 'http://api.nircms.lc',
|
||||
clientId: 2,
|
||||
clientSecret: 'gVk3jjKq6rWWM52025xgXlw2XGW1UACowyMIyhRR',
|
||||
clientSecret: 'E4BoAclC9X3gre4Wr4XXmU3Y7sXTEtFSk3iCSkIm',
|
||||
project: null,
|
||||
licence: 'POUFLO4YW7SU',
|
||||
defaultLocale: 'ru'
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ export const environment = {
|
|||
production: false,
|
||||
apiUrl: 'http://api.nircms.lc',
|
||||
clientId: 2,
|
||||
clientSecret: 'v49Z7dwUb1cobcTIJ5JQVJBzOFcNyJMzMmiDspUm',
|
||||
clientSecret: 'E4BoAclC9X3gre4Wr4XXmU3Y7sXTEtFSk3iCSkIm',
|
||||
project: 'vniigaz-v2',
|
||||
licence: 'POUFLO4YW7SU',
|
||||
defaultLocale: 'ru'
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<div class="block">
|
||||
<div class="logo">
|
||||
<img src="assets/images/logo_vniigaz_wt_280x110.svg" alt="">
|
||||
<div *ngIf="!user">
|
||||
<div *ngIf="!isLoggedIn">
|
||||
<a (click)="login()">Вход в личный кабинет</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import {Component} from '@angular/core';
|
||||
import {AuthenticationService} from "@app/_services";
|
||||
import {Subscription} from "rxjs";
|
||||
|
||||
@Component({
|
||||
selector: 'footer',
|
||||
|
|
@ -8,19 +7,18 @@ import {Subscription} from "rxjs";
|
|||
styleUrls: ['footer.component.scss']
|
||||
})
|
||||
export class FooterComponent {
|
||||
subscription: Subscription;
|
||||
public user: any;
|
||||
constructor(public authenticationService: AuthenticationService) {
|
||||
this.subscription = this.authenticationService.user.subscribe(user => {
|
||||
this.user = user;
|
||||
});
|
||||
constructor(public authService: AuthenticationService) {
|
||||
}
|
||||
|
||||
get isLoggedIn() {
|
||||
return this.authService.isLoggedIn;
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
login() {
|
||||
this.authenticationService.popup('login');
|
||||
this.authService.popup('login');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export class JumbotronComponent {
|
|||
}
|
||||
|
||||
get bgStyle(){
|
||||
let height = 150;
|
||||
let height = 70;
|
||||
let pictURL:string;
|
||||
if (this.contentPage){
|
||||
height = 150;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
.administration-page{
|
||||
font-size: 20px;
|
||||
font-family: PT Sans;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
h2{
|
||||
color: var(--second-act);
|
||||
margin-bottom: 48px;
|
||||
|
|
@ -9,14 +13,40 @@
|
|||
|
||||
|
||||
.site-admin-control{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
cursor: pointer;
|
||||
|
||||
.site-admin-control-toggle{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
cursor: pointer;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
.site-admin-page-block{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
height: 64px;
|
||||
border-top: 1px solid var(--second-dis);
|
||||
border-bottom: 1px solid var(--second-dis);
|
||||
div{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.site-admin-company{
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
ico.page-lable{
|
||||
background-color: var(--prime);
|
||||
border-radius: 20px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 12px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
administrate-site-pages>pages-tree{
|
||||
|
|
@ -24,7 +54,15 @@ administrate-site-pages>pages-tree{
|
|||
margin-bottom: 128px;
|
||||
}
|
||||
|
||||
|
||||
ico.page-control{
|
||||
cursor: pointer;
|
||||
svg{
|
||||
color:var(--second);
|
||||
&:hover{
|
||||
color: var(--second-act);
|
||||
}
|
||||
}
|
||||
}
|
||||
pages-tree{
|
||||
|
||||
.item:not(.home){
|
||||
|
|
@ -56,18 +94,20 @@ pages-tree{
|
|||
.item {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
font-family: PT Sans;
|
||||
font-size: 16px;
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
line-height: 24px;
|
||||
.bar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 16px 0;
|
||||
border-bottom: #E0E0E0 solid 1px;
|
||||
border-bottom: solid var(--second-dis) 1px;
|
||||
height: 64px;
|
||||
.left {
|
||||
flex-shrink: 0;
|
||||
width: 40px;
|
||||
height: 24px;
|
||||
cursor: pointer;
|
||||
|
||||
width: 24px;
|
||||
}
|
||||
.mid {
|
||||
flex-grow: 1;
|
||||
|
|
@ -97,16 +137,15 @@ pages-tree{
|
|||
}
|
||||
}
|
||||
.name {
|
||||
p {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
a {
|
||||
color: var(--grey-7);
|
||||
color: var(--dadk);
|
||||
&:nth-child(2){
|
||||
color: var(--second);
|
||||
}
|
||||
}
|
||||
&.sub {
|
||||
font-size: 0.875rem;
|
||||
color: #7f7f7f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -419,6 +419,7 @@ modal{
|
|||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 10000;
|
||||
.modal-overlay{
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
|
|
@ -449,6 +450,9 @@ modal{
|
|||
h4{
|
||||
margin: 0;
|
||||
}
|
||||
ico{
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.modal-body{
|
||||
padding: 36px 24px;
|
||||
|
|
|
|||
|
|
@ -293,4 +293,146 @@ form-field-document{
|
|||
margin: 0 0 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
auth-page{
|
||||
.authentication {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.logo {
|
||||
display: flex;
|
||||
width: 50%;
|
||||
flex-shrink: 0;
|
||||
height: 100%;
|
||||
border-right: #E0E0E0 solid 1px;
|
||||
text-align: center;
|
||||
color: #0071BB;
|
||||
}
|
||||
|
||||
.form {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.center {
|
||||
width: 100%;
|
||||
max-width: 416px;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 959px) {
|
||||
.authentication {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
.logo {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
border-right: none;
|
||||
}
|
||||
.form {
|
||||
flex-grow: 0;
|
||||
}
|
||||
::ng-deep h2 {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
auth-page, auth-modal{
|
||||
h2 {
|
||||
margin: 0 0 24px;
|
||||
font-size: 24px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.field {
|
||||
margin: 0 0 16px;
|
||||
|
||||
label {
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: 12px;
|
||||
margin: 0 0 12px;
|
||||
&:last-child {margin: 0;}
|
||||
label {
|
||||
font-size: 0.875rem;
|
||||
color: #86898E;
|
||||
a {
|
||||
color: #F9B417;
|
||||
}
|
||||
}
|
||||
input {
|
||||
flex-shrink: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.error {
|
||||
margin: 0 0 16px;
|
||||
font-size: 14px;
|
||||
color: #D91519;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
flex-wrap: wrap;
|
||||
row-gap: 18px;
|
||||
.remember {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
input {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 8px;
|
||||
border-radius: 2px;
|
||||
border: 1px solid #86898E;
|
||||
}
|
||||
}
|
||||
.forget {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-basis: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 24px;
|
||||
margin: 24px 0 0;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 600px) {
|
||||
.bottom {
|
||||
flex-direction: column-reverse;
|
||||
button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M18.9999 11.0275L19 11C19 7.13401 15.866 4 12 4C8.77697 4 6.0627 6.17824 5.24901 9.1429C2.81415 9.70924 1 11.8928 1 14.5C1 17.5376 3.46243 20 6.5 20H18.5C20.9853 20 23 17.9853 23 15.5C23 13.1837 21.2499 11.2762 18.9999 11.0275ZM17 11V13H18.5C19.8807 13 21 14.1193 21 15.5C21 16.8807 19.8807 18 18.5 18H6.5C4.567 18 3 16.433 3 14.5C3 12.567 4.567 11 6.5 11H7C7 8.23858 9.23858 6 12 6C14.7614 6 17 8.23858 17 11Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 596 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.99609 4H17.9961V16H8.99609V4ZM6.99609 4C6.99609 2.89543 7.89152 2 8.99609 2H17.9961C19.1007 2 19.9961 2.89543 19.9961 4V16C19.9961 17.1046 19.1007 18 17.9961 18H8.99609C7.89152 18 6.99609 17.1046 6.99609 16V4ZM4.99609 20H13.9961H15.9961C15.9961 21.1046 15.1007 22 13.9961 22H4.99609C3.89152 22 2.99609 21.1046 2.99609 20V8C2.99609 6.89543 3.89152 6 4.99609 6V8L4.99609 20Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 561 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 4.65754L18 9.90754V19H6V9.90754L12 4.65754ZM20 9L12 2L4 9V21H20V9ZM11 15V13H13V15H11ZM9 17V11H15V17H9Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 290 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M12 4.65754L18 9.90754V19H6V9.90754L12 4.65754ZM20 9L12 2L4 9V21H20V9ZM11 13V11H13V13H15V15H13V17H11V15H9V13H11Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 296 B |
|
|
@ -0,0 +1,3 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" id="ico">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M3.99609 18V8H19.9961V18H3.99609ZM3.99609 4C2.89152 4 1.99609 4.89543 1.99609 6V18C1.99609 19.1046 2.89152 20 3.99609 20H19.9961C21.1007 20 21.9961 19.1046 21.9961 18V6C21.9961 4.89543 21.1007 4 19.9961 4H3.99609ZM10.9961 10H12.9961V12H14.9961V14H12.9961V16H10.9961V14H8.99609V12H10.9961V10Z" fill="currentColor"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 475 B |
Loading…
Reference in New Issue