Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
c5439d1
chore: add new dashboard
MishaZhem Aug 13, 2024
aa0ffa5
chore: add new data
MishaZhem Aug 13, 2024
c7c6f49
chore: add more columns
MishaZhem Aug 13, 2024
c09e9ae
chore: add all columns
MishaZhem Aug 13, 2024
34aa365
chore: add scroll
MishaZhem Aug 13, 2024
22a865f
chore: add more columns
MishaZhem Aug 13, 2024
1bdd2ff
chore: add same icons
MishaZhem Aug 13, 2024
1a75088
chore: add sort
MishaZhem Aug 13, 2024
57dbfe4
chore: add search
MishaZhem Aug 13, 2024
c638812
chore: add sort for name
MishaZhem Aug 13, 2024
607b3d2
chore: add sort for everything
MishaZhem Aug 13, 2024
c098bf8
chore: add interface
MishaZhem Aug 13, 2024
33c8e18
chore: add dropdown
MishaZhem Aug 14, 2024
aa0034e
chore: add action bar
MishaZhem Aug 14, 2024
6d754b7
chore: add admin page
MishaZhem Aug 14, 2024
29ea8ac
chore: change layout for admin page
MishaZhem Aug 14, 2024
de2acaf
chore: change layout and images
MishaZhem Aug 14, 2024
ff9fdec
chore: change for mobile
MishaZhem Aug 14, 2024
8d889c4
fix: fix cspell
MishaZhem Aug 14, 2024
42338a6
chore: change for mobile
MishaZhem Aug 14, 2024
d7c04c1
chore: change action-bar
MishaZhem Aug 14, 2024
ae5d693
chore: add calendar
MishaZhem Aug 14, 2024
3e88d46
Merge branch 'main' into space-zoo
MishaZhem Aug 15, 2024
7cd7e97
Merge branch 'main' into space-zoo
MishaZhem Aug 15, 2024
dcf5a4f
chore: add expand calendar
MishaZhem Aug 15, 2024
870ca31
fix: fix deploy
MishaZhem Aug 15, 2024
d9987e5
chore: add calendar range
MishaZhem Aug 15, 2024
8d13707
chore: add links
MishaZhem Aug 16, 2024
8f3ed30
chore: add tabs
MishaZhem Aug 16, 2024
ec5cc53
chore: add events
MishaZhem Aug 16, 2024
0ed762f
chore: add marker
MishaZhem Aug 16, 2024
fa821a9
chore: add markers
MishaZhem Aug 16, 2024
285435e
chore: add marks
MishaZhem Aug 16, 2024
01e9b78
Merge branch 'main' into space-zoo
MishaZhem Aug 19, 2024
c4ef828
fix: fix day
MishaZhem Aug 19, 2024
8f71525
chore: add diferent days
MishaZhem Aug 19, 2024
80a1099
chore: add ring chart
MishaZhem Aug 19, 2024
2c8619e
chore: repeat every month calendar
MishaZhem Aug 19, 2024
6540c05
chore: add animal page
MishaZhem Aug 19, 2024
ce752f4
chore: add process circle
MishaZhem Aug 19, 2024
335c700
chore: add process
MishaZhem Aug 19, 2024
f465c6c
chore: change status after process
MishaZhem Aug 19, 2024
846f850
fix: fix cspell
MishaZhem Aug 19, 2024
ba926c3
chore: update table
MishaZhem Aug 22, 2024
6e4fbb4
Merge branch 'main' into space-zoo
MishaZhem Aug 22, 2024
3089ed3
chore: add more buttons
MishaZhem Aug 22, 2024
e952513
chore: add search button
MishaZhem Aug 22, 2024
b7ef570
chore: add footer for table
MishaZhem Aug 22, 2024
dee74bd
fix: fix cspell
MishaZhem Aug 22, 2024
bc6d0a7
fix: fix build
MishaZhem Aug 23, 2024
eb124ca
Merge branch 'main' into space-zoo
MishaZhem Aug 23, 2024
e6b16e9
Merge branch 'main' into space-zoo
MishaZhem Aug 23, 2024
b071cb3
chore: remove extra packages
MishaZhem Aug 23, 2024
8e4c986
chore: remove extra code
MishaZhem Aug 23, 2024
28063a6
chore: increase maximumError
MishaZhem Aug 26, 2024
14610e7
chore: remove extra code
MishaZhem Aug 26, 2024
b015936
chore: change space-zoo
MishaZhem Aug 26, 2024
8e0b48a
chore: update taiga ui
MishaZhem Aug 27, 2024
b0f0b7a
chore: use search taiga
MishaZhem Aug 27, 2024
d3fc35c
chore: remove extra code
MishaZhem Aug 27, 2024
70026c5
chore: add tui-scrollbar
MishaZhem Aug 27, 2024
80cd172
Merge branch 'main' into space-zoo
MishaZhem Aug 27, 2024
b8b2f3a
fix: fix build
MishaZhem Aug 27, 2024
39333fb
chore: add search component
MishaZhem Aug 28, 2024
4eb0cb8
chore: add table footer
MishaZhem Aug 28, 2024
a9a3212
chore: add sort for footer table
MishaZhem Aug 28, 2024
d8b2e37
chore: add sort for table
MishaZhem Aug 28, 2024
204bbdb
chore: change admin layout
MishaZhem Aug 28, 2024
9b1ad95
chore: add all actions
MishaZhem Aug 28, 2024
5ca99be
chore: add progress filter
MishaZhem Aug 28, 2024
d4abe9a
chore: update animal page
MishaZhem Aug 29, 2024
841552a
chore: remove extra images
MishaZhem Aug 29, 2024
0f8364f
chore: add filter button
MishaZhem Aug 29, 2024
71fb37b
chore: calc page
MishaZhem Aug 29, 2024
db0b8bb
fix: fix action bar
MishaZhem Aug 29, 2024
c44341a
fix: fix clear button
MishaZhem Aug 29, 2024
f50f4bc
chore: remove tags if complete
MishaZhem Aug 29, 2024
d871842
fix: fix cspell
MishaZhem Aug 29, 2024
874b33f
chore: change animal page layout for mobile
MishaZhem Aug 29, 2024
3798f5d
chore: add exit button on animal page
MishaZhem Aug 29, 2024
cbed7f2
chore: change calendar
MishaZhem Aug 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
"maxtemp",
"Tiko",
"Create",
"Greenplum",
"hamcejdc",
"Сleaning",
"NFTTABLE",
"Unstake",
"Unstaking"
Expand Down
2 changes: 1 addition & 1 deletion apps/taiga-lumbermill/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
"maximumError": "1.2mb"
},
{
"type": "anyComponentStyle",
Expand Down
43 changes: 43 additions & 0 deletions apps/taiga-lumbermill/src/components/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,49 @@ export const appRoutes: Route[] = [
),
data: {title: 'Crypto'},
},
{
path: 'space-zoo',
loadComponent: async () =>
import('../../dashboards/space-zoo/space-zoo.component').then(
(mod) => mod.SpaceZooComponent,
),
data: {
title: 'Space zoo',
links: [
{
name: 'Main',
to: 'space-zoo',
},
{
name: 'Table',
to: 'space-zoo/table',
},
],
},
children: [
{
path: '',
loadComponent: async () =>
import(
'../../dashboards/space-zoo/components/administrator/administrator.component'
).then((mod) => mod.AdministratorComponent),
},
{
path: 'table',
loadComponent: async () =>
import(
'../../dashboards/space-zoo/components/table/table.component'
).then((mod) => mod.TableComponent),
},
{
path: 'animal/:id',
loadComponent: async () =>
import(
'../../dashboards/space-zoo/components/animal/animal.component'
).then((mod) => mod.AnimalComponent),
},
],
},
],
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ export const INITIAL_DATA: DashboardsData[] = [
link: '/dashboards/crypto',
description: 'Crypto token dashboard',
},
{
title: 'Space zoo Dashboard',
link: '/dashboards/space-zoo',
description: 'Space zoo dashboard',
},
];

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[style.position]="'sticky'"
>
@let title = (data$ | async) ?? '';
@let links = (links$ | async) ?? [];
<a [routerLink]="title ? '/dashboards' : '/'">
<tui-icon icon="@tui.chevron-left" />
Back
Expand All @@ -11,6 +12,16 @@
<span tuiNavigationLogo>
<span tuiFade>{{ title }} dashboard</span>
</span>
<hr />
<tui-tabs [style.margin-left]="'auto'">
@for (link of links; track $index) {
<button
routerLinkActive
tuiTab
[routerLink]="link.to"
>
{{ link.name }}
</button>
}
</tui-tabs>
</nav>
<router-outlet />
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import {
ActivationEnd,
Router,
RouterLink,
RouterLinkActive,
RouterOutlet,
} from '@angular/router';
import {TuiIcon, TuiSurface, TuiTitle} from '@taiga-ui/core';
import {TuiFade, TuiTabs} from '@taiga-ui/kit';
import {TuiCardLarge, TuiHeader, TuiNavigation} from '@taiga-ui/layout';
import {filter, map, startWith} from 'rxjs';

Expand All @@ -18,13 +20,16 @@ import {filter, map, startWith} from 'rxjs';
AsyncPipe,
CommonModule,
RouterLink,
RouterLinkActive,
RouterOutlet,
TuiCardLarge,
TuiFade,
TuiHeader,
TuiIcon,
TuiIcon,
TuiNavigation,
TuiSurface,
TuiTabs,
TuiTitle,
],
templateUrl: './dashboards.component.html',
Expand All @@ -37,4 +42,10 @@ export class DashboardsComponent {
map((event) => event.snapshot.firstChild?.data['title']),
startWith(this.activatedRoute.snapshot.firstChild?.data['title']),
);

protected links$ = inject(Router).events.pipe(
filter((e): e is ActivationEnd => e instanceof ActivationEnd),
map((event) => event.snapshot.firstChild?.data['links']),
startWith(this.activatedRoute.snapshot.firstChild?.data['links']),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<div class="top">
<div class="column">
<div class="info">
<tui-avatar
src="@tui.user"
[size]="'xxl'"
[style.border-radius]="'9rem'"
[style.height]="'9rem'"
[style.width]="'9rem'"
/>
<header tuiHeader>
<h3 tuiTitle>
Administrator
<div
[style.align-items]="'center'"
[style.display]="'flex'"
[style.gap]="'0.5rem'"
>
<span tuiSubtitle>Status:</span>
<tui-badge
appearance="success"
tuiStatus
>
Online
</tui-badge>
</div>
<span tuiSubtitle>Number of animals: {{ animals.length }}</span>
</h3>
</header>
</div>
<tui-ring-chart
size="xl"
[style.margin-left]="'auto'"
[style.margin-right]="'auto'"
[value]="value"
[(activeItemIndex)]="indexRingChart"
>
<span>{{ sum | tuiAmount: 'RUB' | async }}</span>
<div>{{ label }}</div>
</tui-ring-chart>

<ng-template
#content
let-index
>
<span>{{ value[index] | tuiAmount: 'RUB' | async }}</span>
<div>{{ labels[index] }}</div>
</ng-template>
</div>

<div>
<div
tuiAppearance="whiteblock"
tuiCardLarge="normal"
class="card-animals"
>
@for (animal of animals; track $index) {
<button
tuiAppearance="whiteblock"
tuiCardLarge="normal"
tuiSurface="elevated"
[routerLink]="'animal/' + $index"
>
<tui-avatar
class="avatar"
[size]="'m'"
[src]="animal.src"
/>
<header tuiHeader>
<h2
tuiTitle
[style.text-align]="'center'"
>
{{ animal.title }}
</h2>
</header>
<div
[style.display]="'flex'"
[style.flex-direction]="'column'"
[style.gap]="'0.5rem'"
>
<tui-badge
tuiStatus
[appearance]="animal.health === 'good' ? 'success' : 'warning'"
>
{{ animal.health }}
</tui-badge>
@for (tag of animal.tags; track $index) {
<tui-badge appearance="primary">{{ tag }}</tui-badge>
}
</div>
</button>
}
</div>
</div>
</div>
<div class="events">
<div>
<button
iconEnd="@tui.panel-top-open"
tuiLink
(click)="[(expanded = !expanded), onDayClick(null)]"
>
Open Calendar
</button>
<tui-expand [expanded]="expanded">
<ng-template tuiExpandContent>
<tui-calendar-range
class="calendar"
[items]="items"
[markerHandler]="marker"
[value]="calendarValue()"
(valueChange)="onDayClick($event)"
/>
</ng-template>
</tui-expand>
</div>
@if (calendarValue()) {
<div
tuiCardLarge
tuiSurface="elevated"
[style.margin-left]="'auto'"
[style.margin-right]="'auto'"
>
<h3 tuiTitle="m">Events</h3>
<button
*ngFor="let item of eventsCalendar()"
tuiCell
>
<tui-avatar
appearance="accent"
[src]="item.icon"
/>
<span tuiTitle>
{{ item.title }}
<span tuiSubtitle>{{ item.subtitle }} {{ item.time }}</span>
</span>
</button>
</div>
}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
:host {
display: flex;
flex-direction: column;
}

.events {
display: flex;
padding: 1rem;
justify-content: space-between;
align-items: center;
}

.top {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 1rem;
gap: 1rem;

@media (max-width: 92rem) {
justify-content: center;
}
}

.info {
display: flex;
align-items: center;
justify-content: center;
gap: 2rem;
text-align: center;

@media (max-width: 92rem) {
justify-content: center;
}
}

.calendar {
@media (max-width: 43.75rem) {
margin-left: auto;
margin-right: auto;
}
}

.card-animals[tuiAppearance][data-appearance='whiteblock'] {
display: flex;
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
gap: 2rem;
max-width: 100%;

&:last-child {
margin-top: 0;
}
}

.column {
display: flex;
flex-direction: column;
gap: 1rem;

@media (max-width: 92rem) {
margin-left: auto;
margin-right: auto;
}
}

tui-ring-chart {
--tui-chart-categorical-00: #c779d0;
--tui-chart-categorical-01: #feac5e;
--tui-chart-categorical-02: #ff5f6d;
--tui-chart-categorical-03: #4bc0c8;
--tui-chart-categorical-04: #9795cd;
}

.avatar {
border-radius: 4.5rem;
height: 9rem;
width: 9rem;
}
Loading