Merge remote-tracking branch 'origin/master'

master
Константин 2023-11-20 18:10:53 +03:00
commit b4016fea9f
19 changed files with 166 additions and 135 deletions

View File

@ -34,7 +34,10 @@
"src/favicon.ico",
"src/assets"
],
"styles": ["src/styles.scss"],
"styles": [
"src/styles.scss",
"node_modules/swiper/swiper-bundle.css"
],
"stylePreprocessorOptions": {
"includePaths": [
"src/assets/css"
@ -106,7 +109,10 @@
"src/vniigaz-v2/css"
]
},
"styles": ["src/styles.scss"],
"styles": [
"src/styles.scss",
"node_modules/swiper/swiper-bundle.css"
],
"index": "src/vniigaz-v2/index.html"
}
},
@ -146,7 +152,8 @@
"src/assets"
],
"styles": [
"src/styles.scss"
"src/styles.scss",
"node_modules/swiper/swiper-bundle.css"
],
"scripts": []
}

View File

@ -1,72 +1 @@
.area {
position: relative;
display: flex;
height: 100px;
padding: 16px;
border: var(--prime) dashed 1px;
border-radius: 4px;
overflow: hidden;
font-size: 20px;
&.hover {
background-color: #e0e0e0;
}
p {
margin: auto;
color: var(--second-dis);
text-align: center;
span {
color: var(--orange-2);
cursor: pointer;
}
}
input {
display: none;
}
.indicator {
display: flex;
flex-direction: column;
justify-content: center;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 16px;
background-color: #f7f7f7;
.label {
margin-bottom: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.progress {
height: 4px;
background-color: #dfdfdf;
overflow: hidden;
.fill {
width: 0;
height: 100%;
background-color: #3ca128;
}
}
}
}
.values {
.item {
background: transparent url('~src/assets/images/icons/document/document_60dp.svg') 0 0 no-repeat;
background-size: contain;
height: 60px;
padding-left: 72px;
font-size: 20px;
display: flex;
flex-direction: row;
align-items: center;
margin-top: 10px;
button{
margin-left: 10px;
}
}
}

View File

@ -5,11 +5,13 @@ import {FormFieldDocumentComponent} from "@app/_modules/form-fields/types/docume
import {FieldDocumentReadonlyComponent} from "@app/_modules/form-fields/types/document/readonly/field-document-readonly.component";
import {FieldDocumentSingleComponent} from "@app/_modules/form-fields/types/document/single/field-document-single.component";
import {FieldDocumentMultipleComponent} from "@app/_modules/form-fields/types/document/multiple/field-document-multiple.component";
import { WidjetModule } from '@app/_modules/widjet/widjet.module';
@NgModule({
imports: [
CommonModule,
ReactiveFormsModule
ReactiveFormsModule,
WidjetModule
],
declarations: [
FormFieldDocumentComponent,

View File

@ -11,7 +11,8 @@
</div>
<div class="values">
<div class="item" *ngFor="let asset of assets">
<file-ico [type]="asset.extension"></file-ico>
<a href="{{asset.links?.open}}" target="_blank">{{asset.name}}</a>
<button type="button" class="clear trash" (click)="removeValue(asset)"></button>
<ico ico="delete_24" (click)="removeValue(asset)"></ico>
</div>
</div>

View File

@ -2,7 +2,6 @@
<div class="jumbotron-content layout-corral">
<header-user-bar></header-user-bar>
<h1>{{name}}</h1>
{{currentPage|json}}
<div></div>
</div>
</div>

View File

@ -90,7 +90,6 @@ export class PagesMenuItemComponent {
}
select(){
console.log(this.item)
this.pagesService.menuSelectedLink = this.item.link
if (this.item.type.name == 'nav-page'){
this.toggle(!this.open)

View File

@ -34,7 +34,7 @@ export class PagesMenuComponent implements OnInit {
let fothersSonID = item.children.data.findIndex(
child => child.id == menuTree.id
)
item.children.data[fothersSonID] = menuTree
item.children.data[fothersSonID] = JSON.parse(JSON.stringify(menuTree))
return item
}, currentPage);
this.items = menuTree.children.data;

View File

@ -1,5 +1,8 @@
<div class="documents list default">
<div class="items">
<div class="item" *ngFor="let item of items"><a [href]="item.links?.open" target="_blank">{{item.name}}</a></div>
<div class="item" *ngFor="let item of items">
<file-ico [type]="item.extension"></file-ico>
<a [href]="item.links?.open" target="_blank">{{item.name}}</a>
</div>
</div>
</div>

View File

@ -1,9 +1,5 @@
<div *ngIf="items?.length">
<div class="first" [ngClass]="imageClass">
<img class="" [src]="items[0].links.full" (click)="show(0)"/>
</div>
<div *ngIf="imageType!=='carousel'&&!(imageType=='large-preview'&&items.length==1)"
class="items" [ngClass]="imageClass">
<div class="item" *ngFor="let item of items; let i = index">
@ -12,11 +8,11 @@
</div>
<div *ngIf="imageType==='carousel'" class="carousel" id="section-{{section.id}}">
<div *ngIf="imageType==='carousel'" id="section-{{section.id}}" class="carousel">
<div class="prev">
<img src="/assets/images/icons/left_50.svg"/>
</div>
<div class="content">
<div class="center">
<swiper [config]="config">
<ng-template ngFor let-item [ngForOf]="items">
<ng-template swiperSlide>

View File

@ -9,27 +9,8 @@
top:24px;
right: 24px;
}
.first{
display: none;
&.large-preview{
display: flex;
width: 100%;
max-width: 720px;
margin-bottom: 8px;
border-radius: 12px;
border: 1px solid rgba(45, 45, 45, 0.27);
overflow: hidden;
padding: 0;
img{
width: 100%;
}
}
}
.large img{
border-radius: 12px;
border: 1px solid rgba(45, 45, 45, 0.27);
}
.items {
display: flex;
@ -38,15 +19,16 @@
width: 100%;
gap: 8px;
&.small{
img{
border: 1px solid var(--second-dis);
}
display: flex;
flex-direction: column;
&.small{
.item{
margin-bottom: 16px;
img{
max-height: 273px;
max-width: 273px;
max-width: 273px;
}
}
}
@ -65,21 +47,6 @@
}
}
&.large-preview{
display: flex;
flex-direction: row;
.item{
width: 72px;
height: 52px;
border: 1px solid var(--prime);
img{
object-fit: cover;
width: 100%;
height: 100%;
}
}
}
.item {
position: relative;
@ -117,8 +84,8 @@
.center {
display: flex;
overflow: hidden;
max-width: 548px;
width: 100%;
height: 100%;
}
}
@ -132,7 +99,7 @@
img {
display: block;
width: 100%;
height: 300px;
height: 450px;
object-fit: cover;
}
}

View File

@ -46,10 +46,11 @@ export class ImagesSectionComponent {
return type.name;
}
get imageClass(){
console.log(this.imageType)
return {
small : this.imageType=='small',
large : this.imageType=='large',
'large-preview': this.imageType=='large-preview'
small : this.imageType=='tiles',
large : this.imageType=='full-width',
carousel: this.imageType=='carousel'
}
}
set photo(activePhoto: string) {

View File

@ -0,0 +1 @@
<img [src]="url">

View File

@ -0,0 +1,41 @@
import { Component, Input } from '@angular/core';
@Component({
selector: 'file-ico',
templateUrl: './file-ico.component.html',
styleUrls: ['./file-ico.component.scss']
})
export class FileIcoComponent {
typeList = {
PDF:'PDF',
DOC:'DOC',
DOCX:'DOC',
DOTM:'DOC',
DOTX:'DOC',
TXT:'DOC',
RTF:'DOC',
ODT:'DOC',
JPG:'JPG',
JPEG:'JPG',
JPE:'JPG',
JFIF :'JPG',
PPT:'PPT',
PPTX:'PPT',
XLS:'XLS',
XLSM:'XLS',
XLSB:'XLS',
XLSX:'XLS',
CSV:'XLS',
XML:'XLS',
}
@Input() type: 'string';
get url(){
let type = this.type.toUpperCase()
let svg = this.typeList[type]?
this.typeList[type]+'.svg':
'document_60dp.svg';
return `assets/images/icons/document/${svg}`
}
}

View File

@ -8,6 +8,7 @@ import {DropDownComponent } from "./drop-down/drop-down.component";
import { SliderComponent } from './slider/slider.component';
import { SwitchComponent } from './switch/switch.component';
import { LocaleComponent } from './locale/locale.component';
import { FileIcoComponent } from './file-ico/file-ico.component';
@NgModule({
@ -23,6 +24,7 @@ import { LocaleComponent } from './locale/locale.component';
SliderComponent,
SwitchComponent,
LocaleComponent,
FileIcoComponent,
],
exports: [
IcoComponent,
@ -30,7 +32,8 @@ import { LocaleComponent } from './locale/locale.component';
DropDownComponent,
SliderComponent,
SwitchComponent,
LocaleComponent
LocaleComponent,
FileIcoComponent
]
})
export class WidjetModule {

View File

@ -435,3 +435,10 @@ html-section ul{
}
}
file-ico{
width: 52px;
height: 60px;
display: inline-flex;
}

View File

@ -1,7 +1,4 @@
.documents.list.default {
background: transparent url('~src/assets/images/icons/document/document_pdf_60dp.svg') 0 0 no-repeat;
min-height: 60px;
padding-left: 72px;
font-size: 20px;
.title {
margin: 0 0 16px;
@ -9,6 +6,8 @@
}
.items {
.item {
display: flex;
gap: 8px;
margin: 0 0 16px;
a {
display: inline-block;

View File

@ -137,4 +137,77 @@ input, select, textarea {
}
.checkbox:disabled:not(:checked)+label::before {
background-image: url("~/src/assets/images/icons/checkbox/checbox_none_disabled_24dp.svg");
}
form-field-document{
.area {
position: relative;
display: flex;
height: 100px;
padding: 16px;
border: var(--prime) dashed 1px;
border-radius: 4px;
overflow: hidden;
font-size: 20px;
&.hover {
background-color: #e0e0e0;
}
p {
margin: auto;
color: var(--second-dis);
text-align: center;
span {
color: var(--orange-2);
cursor: pointer;
}
}
input {
display: none;
}
.indicator {
display: flex;
flex-direction: column;
justify-content: center;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
padding: 16px;
background-color: #f7f7f7;
.label {
margin-bottom: 4px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.progress {
height: 4px;
background-color: #dfdfdf;
overflow: hidden;
.fill {
width: 0;
height: 100%;
background-color: #3ca128;
}
}
}
}
.values {
.item {
height: 60px;
font-size: 20px;
display: flex;
flex-direction: row;
align-items: center;
margin-top: 10px;
gap:8px;
}
}
}

View File

@ -176,3 +176,6 @@ pages-menu-item{
}
}
.pages{
width: 100%;
}