Fix minor issues

This commit is contained in:
schmelczerandras 2019-08-27 14:58:43 +02:00
commit 72eaca7a3b
7 changed files with 49 additions and 36 deletions

View file

@ -69,7 +69,7 @@
text-align: left; text-align: left;
@media (max-width: $mobile-width) { @media (max-width: $mobile-width) {
font-size: var(--small-font-size); font-size: calc(var(--small-font-size) / 2 + var(--medium-font-size) / 2);
} }
position: relative; position: relative;

View file

@ -6,10 +6,12 @@
<img src="assets/plus-sign.svg" alt="add item" (click)="addBlock()" /> <img src="assets/plus-sign.svg" alt="add item" (click)="addBlock()" />
<div class="block-container {{ isFalling ? 'falling' : '' }}"> <div class="block-container-container">
<div class="block-container falling">
<app-block *ngFor="let block of drawableBlocks" [block]="block" [tower]="tower"></app-block> <app-block *ngFor="let block of drawableBlocks" [block]="block" [tower]="tower"></app-block>
</div> </div>
</div> </div>
</div>
<label for="tower-name" class="hidden">Card name</label> <label for="tower-name" class="hidden">Card name</label>
<input <input

View file

@ -108,15 +108,19 @@
} }
} }
.block-container-container {
position: relative;
flex: 1;
.block-container { .block-container {
display: flex; display: flex;
flex-flow: row wrap; flex-flow: row wrap;
justify-content: flex-start; justify-content: flex-start;
align-content: flex-start; align-content: flex-start;
align-items: flex-end; align-items: flex-end;
position: absolute;
bottom: 0;
width: 100%;
transform: scaleY(-1); transform: scaleY(-1);
flex: 1;
&.falling > *:last-child { &.falling > *:last-child {
animation: falling 1.5s cubic-bezier(0.5, 0, 1, 0) forwards; animation: falling 1.5s cubic-bezier(0.5, 0, 1, 0) forwards;
@ -137,6 +141,7 @@
} }
} }
} }
}
input[type='text'] { input[type='text'] {
font-size: var(--small-font-size); font-size: var(--small-font-size);

View file

@ -29,7 +29,9 @@ export class TowerComponent {
} }
get tasks(): Block[] { get tasks(): Block[] {
return this.tower.blocks.filter(block => !block.isDone); return this.tower.blocks.filter(
block => this.dateRange.from <= block.created && block.created <= this.dateRange.to && !block.isDone
);
} }
@Input() tower: Tower; @Input() tower: Tower;

View file

@ -43,6 +43,7 @@ $slider-size: 40px;
transform: translateY(-$slider-size / 2 + $line-height / 2) scale(1.1); transform: translateY(-$slider-size / 2 + $line-height / 2) scale(1.1);
} }
} }
cursor: pointer; cursor: pointer;
position: relative; position: relative;

View file

@ -50,6 +50,7 @@
transition: box-shadow $long-animation-time, left $long-animation-time, transform $long-animation-time; transition: box-shadow $long-animation-time, left $long-animation-time, transform $long-animation-time;
} }
@media (min-width: $mobile-width) {
&:hover:after { &:hover:after {
box-shadow: $shadow; box-shadow: $shadow;
transform: translateX(2px); transform: translateX(2px);
@ -58,6 +59,7 @@
&.on:hover:after { &.on:hover:after {
transform: translateX(-2px); transform: translateX(-2px);
} }
}
&.on:after { &.on:after {
left: $size; left: $size;

View file

@ -1,4 +1,4 @@
import { Injectable } from '@angular/core'; import { ApplicationRef, Injectable } from '@angular/core';
import { StoreService } from './store.service'; import { StoreService } from './store.service';
import { Page } from '../model/page'; import { Page } from '../model/page';
@ -22,7 +22,7 @@ export class DataService {
private hasLoaded = new Promise(resolve => (this.afterLoadFinished = resolve)); private hasLoaded = new Promise(resolve => (this.afterLoadFinished = resolve));
private afterLoadFinished: () => void; private afterLoadFinished: () => void;
constructor(private storeService: StoreService) { constructor(private storeService: StoreService, private applicationRef: ApplicationRef) {
this.init(); this.init();
} }
@ -72,6 +72,7 @@ export class DataService {
private update() { private update() {
this.subscribers.map(f => f()); this.subscribers.map(f => f());
this.applicationRef.tick();
} }
private loadActiveIndex() { private loadActiveIndex() {