Fix vanishing scrollbar in grid by replacing the progress spinner with 'something'
Signed-off-by: trivernis <trivernis@protonmail.com>pull/14/head
parent
4d56e37db2
commit
f83770cf9f
@ -1,11 +1,11 @@
|
|||||||
<mat-card #card (click)="clickEvent.emit(this)" (dblclick)="dblClickEvent.emit(this)"
|
<div (click)="this.onClick()" (dblclick)="dblClickEvent.emit(this)"
|
||||||
[class.selected]="this.entry.selected | async">
|
[class.loading]="this.loading"
|
||||||
<mat-card-content>
|
[class.selected]="this.entry.selected | async" class="file-card-inner">
|
||||||
<app-busy-indicator [busy]="this.loading">
|
<app-middle-centered *ngIf="this.loading">
|
||||||
<app-file-thumbnail *ngIf="!loading"
|
<div class="loading-indicator"></div>
|
||||||
|
</app-middle-centered>
|
||||||
|
<app-file-thumbnail *ngIf="!this.loading"
|
||||||
[fileChanged]="this.fileChanged"
|
[fileChanged]="this.fileChanged"
|
||||||
[file]="this.entry.data"
|
[file]="this.entry.data"
|
||||||
class=".entry-image"></app-file-thumbnail>
|
class="entry-image"></app-file-thumbnail>
|
||||||
</app-busy-indicator>
|
</div>
|
||||||
</mat-card-content>
|
|
||||||
</mat-card>
|
|
||||||
|
@ -1,28 +1,68 @@
|
|||||||
@import "src/colors";
|
@import "src/colors";
|
||||||
|
|
||||||
mat-card {
|
:host {
|
||||||
height: calc(100% - 32px);
|
display: block;
|
||||||
width: calc(100% - 32px);
|
overflow: hidden;
|
||||||
user-select: none;
|
border-radius: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: $background-lighter-05;
|
user-select: none;
|
||||||
}
|
position: relative;
|
||||||
|
|
||||||
mat-card.selected {
|
|
||||||
background: $primary-darker-10;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mat-card-content {
|
.file-card-inner {
|
||||||
|
background-color: $background-lighter-05;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
app-busy-indicator {
|
&.selected {
|
||||||
height: 100%;
|
background-color: $primary-darker-10;
|
||||||
width: 100%;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.entry-image {
|
.entry-image {
|
||||||
width: 100%;
|
margin: 10px;
|
||||||
height: 100%;
|
height: calc(100% - 20px);
|
||||||
|
width: calc(100% - 20px);
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.loading-indicator {
|
||||||
|
display: block;
|
||||||
|
background-color: $primary;
|
||||||
|
animation-name: pulse;
|
||||||
|
animation-duration: 3s;
|
||||||
|
border-radius: 1em;
|
||||||
|
width: 2em;
|
||||||
|
height: 2em;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-timing-function: ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
2% {
|
||||||
|
border-radius: 1em;
|
||||||
|
width: 2em;
|
||||||
|
height: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
48% {
|
||||||
|
border-radius: 2em;
|
||||||
|
width: 4em;
|
||||||
|
height: 4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
52% {
|
||||||
|
border-radius: 2em;
|
||||||
|
width: 4em;
|
||||||
|
height: 4em;
|
||||||
|
}
|
||||||
|
|
||||||
|
98% {
|
||||||
|
border-radius: 1em;
|
||||||
|
width: 2em;
|
||||||
|
height: 2em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue