[ACA-2044] custom library icon consistency (#826)

* add custom library icon

* isLibrary custom type guard

* meaningfull cutom class name

* update isLibrary check for trash

* use custom image for libraries in trash

* remove duplicate subscriber

* change image source color

* remove custom class

* remove library image class

* remove custom type guard
This commit is contained in:
Cilibiu Bogdan
2018-11-26 21:36:33 +02:00
committed by Denys Vuika
parent 18b4c1bc8a
commit 647117b488
7 changed files with 14 additions and 10 deletions

View File

@@ -73,7 +73,14 @@ export abstract class PageComponent implements OnInit, OnDestroy {
} }
static isLibrary(entry) { static isLibrary(entry) {
return Boolean(entry.role && entry.visibility); return (
(entry.guid &&
entry.id &&
entry.preset &&
entry.title &&
entry.visibility) ||
entry.nodeType === 'st:site'
);
} }
constructor( constructor(

View File

@@ -36,6 +36,7 @@
[selectionMode]="'single'" [selectionMode]="'single'"
[sorting]="[ 'name', 'asc' ]" [sorting]="[ 'name', 'asc' ]"
[node]="data" [node]="data"
[imageResolver]="imageResolver"
(node-dblclick)="navigateTo($event.detail?.node)" (node-dblclick)="navigateTo($event.detail?.node)"
(name-click)="navigateTo($event.detail?.node)"> (name-click)="navigateTo($event.detail?.node)">

View File

@@ -20,6 +20,7 @@
currentFolderId="-trashcan-" currentFolderId="-trashcan-"
selectionMode="multiple" selectionMode="multiple"
[navigate]="false" [navigate]="false"
[imageResolver]="imageResolver"
[sorting]="[ 'archivedAt', 'desc' ]"> [sorting]="[ 'archivedAt', 'desc' ]">
<empty-folder-content> <empty-folder-content>

View File

@@ -59,7 +59,6 @@ export class TrashcanComponent extends PageComponent implements OnInit {
this.subscriptions.push( this.subscriptions.push(
this.content.nodesRestored.subscribe(() => this.reload()), this.content.nodesRestored.subscribe(() => this.reload()),
this.content.nodesPurged.subscribe(() => this.reload()), this.content.nodesPurged.subscribe(() => this.reload()),
this.content.nodesRestored.subscribe(() => this.reload()),
this.breakpointObserver this.breakpointObserver
.observe([Breakpoints.HandsetPortrait, Breakpoints.HandsetLandscape]) .observe([Breakpoints.HandsetPortrait, Breakpoints.HandsetLandscape])

View File

@@ -15,11 +15,6 @@
overflow-y: scroll; overflow-y: scroll;
} }
.custom-image-cell img {
filter: invert(91%) sepia(25%) saturate(1431%) hue-rotate(6deg)
brightness(101%) contrast(82%);
}
.adf-data-table { .adf-data-table {
border: none !important; border: none !important;

View File

@@ -1071,7 +1071,7 @@
"id": "app.libraries.thumbnail", "id": "app.libraries.thumbnail",
"key": "$thumbnail", "key": "$thumbnail",
"type": "image", "type": "image",
"class": "image-table-cell custom-image-cell", "class": "image-table-cell",
"sortable": false, "sortable": false,
"desktopOnly": false "desktopOnly": false
}, },
@@ -1109,7 +1109,7 @@
"id": "app.favorite.libraries.thumbnail", "id": "app.favorite.libraries.thumbnail",
"key": "$thumbnail", "key": "$thumbnail",
"type": "image", "type": "image",
"class": "image-table-cell custom-image-cell", "class": "image-table-cell",
"sortable": false, "sortable": false,
"desktopOnly": false "desktopOnly": false
}, },

View File

@@ -1 +1,2 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M0 0h24v24H0z" fill="none"/><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z"/></svg> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
<path d="M0 0h24v24H0z" fill="none"/><path fill="#D9E021" d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z"/></svg>

Before

Width:  |  Height:  |  Size: 292 B

After

Width:  |  Height:  |  Size: 308 B