Merge branch 'master' of code-repo.d4science.org:MaDgIK/openaire-library

This commit is contained in:
argirok 2021-11-30 12:51:57 +02:00
commit e336bfbad4
7 changed files with 30 additions and 17 deletions

View File

@ -25,6 +25,7 @@ export class CustomizationOptions {
color: string; //background color: string; //background
imageUrl: string; imageUrl: string;
imageFile: string; imageFile: string;
position:string;
} }
}; };
buttons: { buttons: {
@ -49,7 +50,8 @@ export class CustomizationOptions {
form : { form : {
color: CustomizationOptions.getRGBA(this.identity.mainColor,0.15), color: CustomizationOptions.getRGBA(this.identity.mainColor,0.15),
imageUrl : null, imageUrl : null,
imageFile : null imageFile : null,
position: null
} }
}; };
@ -104,6 +106,9 @@ export class CustomizationOptions {
if(!current.backgrounds.form){ if(!current.backgrounds.form){
current.backgrounds.form = Object.assign({}, updated.backgrounds.form); current.backgrounds.form = Object.assign({}, updated.backgrounds.form);
} }
if(!current.backgrounds.form.position){
current.backgrounds.form.position = "center bottom"
}
if(!current.buttons){ if(!current.buttons){
current.buttons = Object.assign({}, updated.buttons); current.buttons = Object.assign({}, updated.buttons);
} }

View File

@ -52,7 +52,7 @@
<button (click)="login()" class=" uk-button uk-button-primary">Login</button> <button (click)="login()" class=" uk-button uk-button-primary">Login</button>
</div> </div>
</form--> </form-->
<div *ngIf="errorCode == '1'" class="uk-alert uk-alert-warning"> <div *ngIf="errorCode == '1' || !loggedIn" class="uk-alert uk-alert-warning">
The requested page requires authentication. The requested page requires authentication.
<span *ngIf="!loggedIn">Please <a class="uk-link" (click)="logIn()"> sign in</a> to continue. <span *ngIf="!loggedIn">Please <a class="uk-link" (click)="logIn()"> sign in</a> to continue.
</span> </span>

View File

@ -13,15 +13,11 @@ export class UtilitiesService {
uploadPhoto(url: string, photo: File): Observable<any> { uploadPhoto(url: string, photo: File): Observable<any> {
const formData = new FormData(); const formData = new FormData();
formData.append('photo', photo); formData.append('photo', photo);
return this.http.post(url, formData, CustomOptions.getAuthOptions()); return this.http.post(url, formData, {withCredentials: true});
} }
deletePhoto(url: string) { deletePhoto(url: string): Observable<any> {
return this.http.delete(url, CustomOptions.getAuthOptions()); return this.http.delete(url, {withCredentials: true});
}
getTiny(url: string) {
return this.http.get(url, {responseType: 'text'});
} }
} }

View File

@ -272,7 +272,7 @@
class="uk-responsive-height"> class="uk-responsive-height">
<ng-container *ngIf="(mobile && !header.logoSmallUrl) || (!mobile && !header.logoUrl)"> <ng-container *ngIf="(mobile && !header.logoSmallUrl) || (!mobile && !header.logoUrl)">
<div class="multi-line-ellipsis lines-2" [style.max-width]="(!mobile)?'25vw':null" [title]="header.title"> <div class="multi-line-ellipsis lines-2" [style.max-width]="(!mobile)?'25vw':null" [title]="header.title">
<p>{{header.title}}</p> <p class="uk-margin-remove">{{header.title}}</p>
</div> </div>
</ng-container> </ng-container>
</a> </a>
@ -284,7 +284,7 @@
class="uk-responsive-height"> class="uk-responsive-height">
<ng-container *ngIf="(mobile && !header.logoSmallUrl) || (!mobile && !header.logoUrl)"> <ng-container *ngIf="(mobile && !header.logoSmallUrl) || (!mobile && !header.logoUrl)">
<div class="multi-line-ellipsis lines-2" [style.max-width]="(!mobile)?'25vw':null" [title]="header.title"> <div class="multi-line-ellipsis lines-2" [style.max-width]="(!mobile)?'25vw':null" [title]="header.title">
<p>{{header.title}}</p> <p class="uk-margin-remove">{{header.title}}</p>
</div> </div>
</ng-container> </ng-container>
</a> </a>

View File

@ -110,6 +110,18 @@ import {Component} from "@angular/core";
<icon name="check_circle_outlined"></icon> <icon name="check_circle_outlined"></icon>
<div class="uk-text-bold uk-margin-small-top">check_circle_outlined</div> <div class="uk-text-bold uk-margin-small-top">check_circle_outlined</div>
</div> </div>
<div class="uk-text-center">
<icon name="reset"></icon>
<div class="uk-text-bold uk-margin-small-top">reset</div>
</div>
<div class="uk-text-center">
<icon name="send"></icon>
<div class="uk-text-bold uk-margin-small-top">send</div>
</div>
<div class="uk-text-center">
<icon name="print"></icon>
<div class="uk-text-bold uk-margin-small-top">print</div>
</div>
</div> </div>
<div class="uk-margin-medium-top"> <div class="uk-margin-medium-top">
<h4 class="uk-text-bold">Usage</h4> <h4 class="uk-text-bold">Usage</h4>

View File

@ -15,8 +15,8 @@ import {
database, done, database, done,
earth, earth,
edit, group, lock, mail, person_add, photo, edit, group, lock, mail, person_add, photo,
preview, refresh, preview, print, refresh,
remove, remove_circle, remove_circle_outline, search remove, remove_circle, remove_circle_outline, reset, search, send
} from "../icons"; } from "../icons";
@NgModule({ @NgModule({
@ -30,7 +30,7 @@ export class IconsPreviewModule {
constructor(private iconsService: IconsService) { constructor(private iconsService: IconsService) {
this.iconsService.registerIcons([arrow_left, arrow_right, arrow_up, arrow_down, book, database, cog, earth, edit, this.iconsService.registerIcons([arrow_left, arrow_right, arrow_up, arrow_down, book, database, cog, earth, edit,
remove, preview, bullet, remove_circle, remove_circle_outline, person_add, cloud_upload, add, group, lock, search, remove, preview, bullet, remove_circle, remove_circle_outline, person_add, cloud_upload, add, group, lock, search,
refresh, close, done, mail, photo, check_circle_outlined refresh, close, done, mail, photo, check_circle_outlined, reset, send, print
]) ])
} }
} }

View File

@ -132,8 +132,6 @@ export const check_circle_outlined = {
data: '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 24 24" width="20"><path d="M0 0h24v24H0V0zm0 0h24v24H0V0z" fill="none"/><path d="M16.59 7.58L10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></svg>' data: '<svg xmlns="http://www.w3.org/2000/svg" height="20" viewBox="0 0 24 24" width="20"><path d="M0 0h24v24H0V0zm0 0h24v24H0V0z" fill="none"/><path d="M16.59 7.58L10 14.17l-3.59-3.58L5 12l5 5 8-8zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/></svg>'
} }
/** Add new icon under this line to be sure that it will be added on preview */
export const reset = { export const reset = {
name: 'reset', name: 'reset',
data: '<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="#000" points="1 2 2 2 2 6 6 6 6 7 1 7 1 2"></polyline><path fill="none" stroke="#000" stroke-width="1.1" d="M2.1,6.548 C3.391,3.29 6.746,1 10.5,1 C15.5,1 19.5,5 19.5,10 C19.5,15 15.5,19 10.5,19 C5.5,19 1.5,15 1.5,10"></path></svg>' data: '<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><polyline fill="#000" points="1 2 2 2 2 6 6 6 6 7 1 7 1 2"></polyline><path fill="none" stroke="#000" stroke-width="1.1" d="M2.1,6.548 C3.391,3.29 6.746,1 10.5,1 C15.5,1 19.5,5 19.5,10 C19.5,15 15.5,19 10.5,19 C5.5,19 1.5,15 1.5,10"></path></svg>'
@ -148,3 +146,5 @@ export const print = {
name: 'print', name: 'print',
data: '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/></svg>' data: '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"/></svg>'
} }
/** Add new icon under this line to be sure that it will be added on preview */