Skip to content

Commit d90ca9f

Browse files
committed
style(view): add new thin color view
1 parent ab39f30 commit d90ca9f

File tree

6 files changed

+23
-6
lines changed

6 files changed

+23
-6
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<!-- <h4>{{data.name}}</h4> -->
22
<ng-container *ngFor="let bucket of buckets|async; index as i">
3-
<inkapp-bucket [bucketData]="bucket" [index]="i+1"></inkapp-bucket>
3+
<inkapp-bucket [bucketData]="bucket" [index]="i+1" class="ink-color-container" [ngClass]="'ink-view-'+(settings|async)?.value"></inkapp-bucket>
44
</ng-container>

src/app/components/board/board.component.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { Component, OnInit, Input } from '@angular/core';
22
import { Store, Select } from '@ngxs/store';
3-
import { InkBucket, InkBoard, InkBoardMeta, InkBucketMeta } from '../../models';
3+
import { InkBucket, InkBoard, InkBoardMeta, InkBucketMeta, InkAppSettings } from '../../models';
44
import { Observable } from 'rxjs';
55
import { map, filter, tap } from 'rxjs/operators';
66
import { BucketService } from '../../services/bucket.service';
@@ -11,8 +11,9 @@ import { LoadBuckets } from '../../store/actions/bucket.action';
1111
templateUrl: './board.component.html'
1212
})
1313
export class BoardComponent implements OnInit {
14-
buckets: Observable<InkBucketMeta[]>;
1514
@Input() data: InkBoardMeta;
15+
buckets: Observable<InkBucketMeta[]>;
16+
settings: Observable<InkAppSettings>;
1617
constructor(private _store: Store, private _bucketService: BucketService) {}
1718

1819
ngOnInit() {
@@ -22,5 +23,6 @@ export class BoardComponent implements OnInit {
2223
this._bucketService.getBucketsInBoard(this.data._id).then(buckets => {
2324
this._store.dispatch(new LoadBuckets(buckets));
2425
});
26+
this.settings = this._store.select(s => s.settings).pipe(map(s => s.filter(x => x.key === 'view')[0]));
2527
}
2628
}

src/app/components/bucket/bucket.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<inkapp-magic-title [title]="bucketData.name" (changed)="onTitleChange($event)">
22
#{{index}}
33
</inkapp-magic-title>
4-
<div class="d-flex flex-wrap" [ngClass]="'ink-view-'+(settings|async)?.value">
4+
<div class="d-flex flex-wrap">
55
<ng-container *ngFor="let color of ink|async">
66
<inkapp-ink [inkData]="color" [bucketId]="bucketData._id"></inkapp-ink>
77
</ng-container>

src/app/components/bucket/bucket.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,9 @@ export class BucketComponent implements OnInit {
1717
@Input() index: number;
1818
@Input() bucketData: InkBucketMeta;
1919
ink: Observable<Ink>;
20-
settings: Observable<InkAppSettings>;
2120
view: InkAppView;
2221
constructor(private _store: Store, private _bucketService: BucketService, private _inkColorService: InkColorService) {
2322
this.ink = this._store.select(s => s.ink).pipe(map(x => x.filter(y => y.bucketId === this.bucketData._id)));
24-
this.settings = this._store.select(s => s.settings).pipe(map(s => s.filter(x => x.key === 'view')[0]));
2523
}
2624

2725
ngOnInit() {

src/styles/components/__index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
@import './header';
66
@import './settings-item';
77
@import './json-display';
8+
@import './color-container';
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.ink-color-container {
2+
&.ink-view-thin {
3+
border-bottom: 0;
4+
.ink-color-sticker {
5+
padding: 1rem 0;
6+
}
7+
.ink-color {
8+
height: 1rem !important;
9+
border-radius: 0;
10+
box-shadow: none;
11+
}
12+
.ink-name {
13+
font-size: 0.7rem;
14+
}
15+
}
16+
}

0 commit comments

Comments
 (0)