Skip to content

Commit

Permalink
Merge pull request #548 from DigitalExcellence/release/v1.5.1
Browse files Browse the repository at this point in the history
Release v1.5.1
  • Loading branch information
niraymak authored Jun 30, 2021
2 parents c069e45 + f742656 commit 2a68761
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 25 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Security

## Release v.1.5.1-beta - 30-06-2021

### Changed

- Gifs are now supported for project images and highlight images - [#546](https://github.com/DigitalExcellence/dex-frontend/issues/546)

## Release v.1.5.0-beta - 30-06-2021

### Added
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dex-frontend",
"version": "1.5.0-beta",
"version": "1.5.1-beta",
"scripts": {
"ng": "ng",
"config": "ts-node set-env.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/app/error-handler/sentry.error-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {environment} from 'src/environments/environment';

Sentry.init({
dsn: environment.sentryDsnUrl,
release: 'dex-frontend@1.5.0-beta'
release: 'dex-frontend@1.5.1-beta'
});

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class ProjectImagesComponent extends WizardStepBaseComponent implements O
/**
* File uploader variables
*/
public acceptedTypes = ['image/png', 'image/jpg', 'image/jpeg'];
public acceptedTypes = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'];
public acceptMultiple = true;

public uploadingFiles = false;
Expand Down
3 changes: 2 additions & 1 deletion src/app/modules/project/details/details.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ export class DetailsComponent implements OnInit {
projectId: this.project.id,
startDate: highlightFormResult.startDate,
description: highlightFormResult.description,
endDate: highlightFormResult.endDate
endDate: highlightFormResult.endDate,
imageId: highlightFormResult.imageId
};

if (highlightFormResult.indeterminate) {
Expand Down
18 changes: 9 additions & 9 deletions src/app/modules/project/edit/edit.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@
<div class="offset-2 col-8">
<h1>Edit project</h1>

<ng-container *ngIf="projectLoading">
<ng-container *ngIf="projectLoading; else projectLoaded">
<p>Project is being loaded</p>
</ng-container>
<div [hidden]="projectLoading">
<ng-template #projectLoaded>
<div [hidden]="!project">
<form [formGroup]="editProjectForm" class="project-form">
<div class="row">
<div class="col-6">
<app-file-uploader
#projectIconFileUploader
[acceptMultiple]="false"
[acceptedTypes]="acceptedTypes"
[hidden]="true"
[recommendedHeight]="512"
<app-file-uploader
#projectIconFileUploader
[acceptMultiple]="false"
[acceptedTypes]="acceptedTypes"
[hidden]="true"
[recommendedHeight]="512"
[recommendedWidth]="512"
[showPreview]="false">
</app-file-uploader>
Expand Down Expand Up @@ -229,6 +229,6 @@ <h3>Collaborators</h3>
<div [hidden]="project">
<p>No project could be found with id: {{invalidId}}</p>
</div>
</div>
</ng-template>
</div>
</div>
19 changes: 9 additions & 10 deletions src/app/modules/project/edit/edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* If not, see https://www.gnu.org/licenses/lgpl-3.0.txt
*/

import { AfterViewInit, Component, OnInit, ViewChild } from '@angular/core';
import { Component, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { finalize } from 'rxjs/operators';
Expand All @@ -42,14 +42,14 @@ import { UploadFile } from 'src/app/models/domain/uploadFile';
templateUrl: './edit.component.html',
styleUrls: ['./edit.component.scss'],
})
export class EditComponent implements OnInit, AfterViewInit {
export class EditComponent implements OnInit {
/**
* Configuration for file-picker
*/
@ViewChild(CallToActionsEditComponent) callToActions: CallToActionsEditComponent;
@ViewChild('projectIconFileUploader') projectIconFileUploader: FileUploaderComponent;
@ViewChild('projectImagesFileUploader') projectImagesFileUploader: FileUploaderComponent;
public acceptedTypes = ['image/png', 'image/jpg', 'image/jpeg'];
public acceptedTypes = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'];

public uploadingFiles = false;

Expand Down Expand Up @@ -132,24 +132,23 @@ export class EditComponent implements OnInit, AfterViewInit {
.subscribe(
(projectResult) => {
this.project = projectResult;
console.log(this.project);
this.collaborators = this.project.collaborators;

this.categories = this.categories.map(category => ({
...category,
selected: !!this.project.categories?.find(c => c.name === category.name)
}));

setTimeout(() => {
this.projectIconFileUploader.setFiles([this.project.projectIcon]);
this.projectImagesFileUploader.setFiles(this.project.images);
}, 1);
}
);
});
}

ngAfterViewInit() {
setTimeout(() => {
this.projectIconFileUploader.setFiles([this.project.projectIcon]);
this.projectImagesFileUploader.setFiles(this.project.images);
}, 5);
}

public onCategoryClick(category): void {
this.categories = this.categories.map(cat => (
cat.name === category.name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export class ModalHighlightFormComponent implements OnInit, AfterViewInit {
/**
* File uploader variables
*/
public acceptedTypes = ['image/png', 'image/jpg', 'image/jpeg'];
public acceptedTypes = ['image/png', 'image/jpg', 'image/jpeg', 'image/gif'];
public acceptMultiple = false;

constructor(
Expand Down

0 comments on commit 2a68761

Please sign in to comment.