Skip to content

Commit

Permalink
chore: Add music
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaZhem committed Jul 19, 2024
1 parent e58aeda commit 8b00de6
Show file tree
Hide file tree
Showing 6 changed files with 130 additions and 0 deletions.
Binary file added apps/taiga-lumbermill/public/music_1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<div
tuiAppearance="whiteblock"
tuiCardLarge="normal"
class="card"
>
<header tuiHeader>
<h2
tuiTitle
[style.text-align]="'center'"
>
Music
</h2>
</header>
<div class="info">
<img
src="/music_1.jpg"
class="logo"
/>
<h2 class="tui-space_top-4 tui-space_bottom-2">Believer</h2>
<p
class="tui-space_top-0 tui-space_bottom-0"
[style.color]="'var(--tui-text-primary)'"
>
Imagine Dragons
</p>
</div>
<div>
<input
size="m"
tuiSlider
type="range"
value="60"
[formControl]="play"
/>
<div class="numbers">
<p class="tui-space_top-0 tui-space_bottom-0">00:013</p>
<p class="tui-space_top-0 tui-space_bottom-0">00:52</p>
</div>
</div>
<div class="buttons">
<tui-icon icon="@tui.shuffle" />
<tui-icon icon="@tui.skip-back" />
<tui-icon icon="@tui.circle-play" />
<tui-icon icon="@tui.skip-forward" />
<tui-icon icon="@tui.repeat" />
</div>
<hr />
<div class="volume">
<tui-icon icon="@tui.volume-1" />
<input
size="m"
tuiSlider
type="range"
value="60"
[formControl]="volume"
[style.color]="'var(--tui-status-info)'"
/>
<tui-icon icon="@tui.volume-2" />
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.numbers {
display: flex;
justify-content: space-between;
color: var(--tui-text-primary);
}

.buttons {
display: flex;
align-items: center;
justify-content: space-around;
}

.volume {
display: flex;
align-items: center;
gap: 0.5rem;
}

.info {
display: flex;
flex-direction: column;
align-items: center;
}

.logo {
border-radius: 0.5rem;
width: 9rem;
height: 9rem;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import {CommonModule} from '@angular/common';
import {ChangeDetectionStrategy, Component} from '@angular/core';
import {FormControl, FormsModule, ReactiveFormsModule} from '@angular/forms';
import {TuiAppearance, TuiIcon, TuiTitle} from '@taiga-ui/core';
import {TuiHeader} from '@taiga-ui/experimental';
import {TuiSliderComponent} from '@taiga-ui/kit';
import {TuiCardLarge} from '@taiga-ui/layout';

// import {MusicService} from './music.service';

@Component({
standalone: true,
selector: 'lmb-music',
imports: [
CommonModule,
TuiAppearance,
TuiCardLarge,
TuiTitle,
TuiHeader,
TuiSliderComponent,
FormsModule,
ReactiveFormsModule,
TuiIcon,
],
templateUrl: './music.component.html',
styleUrl: './music.component.less',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MusicComponent {
protected value = 4;
protected play = new FormControl(60);
protected volume = new FormControl(0);
}
6 changes: 6 additions & 0 deletions apps/taiga-lumbermill/src/dashboards/iot/iot.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,11 @@
<lmb-cleaning />
</div>
</div>
<div class="row">
<div class="grow"></div>
<div class="grow">
<lmb-music />
</div>
</div>
</div>
</div>
2 changes: 2 additions & 0 deletions apps/taiga-lumbermill/src/dashboards/iot/iot.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {ControlPanelComponent} from './components/control-panel/control-panel.co
import {CostComponent} from './components/Cost/cost.component';
import {ElectricityComponent} from './components/electricity/electricity.component';
import {LightingComponent} from './components/Lighting/lighting.component';
import {MusicComponent} from './components/music/music.component';
import {SafetyComponent} from './components/Safety/safety.component';

@Component({
Expand All @@ -23,6 +24,7 @@ import {SafetyComponent} from './components/Safety/safety.component';
LightingComponent,
CleaningComponent,
ControlPanelComponent,
MusicComponent,
TuiAppearance,
TuiCardLarge,
],
Expand Down

0 comments on commit 8b00de6

Please sign in to comment.