Skip to content

Commit

Permalink
chore(spa): change spacing to var introduced in !1052
Browse files Browse the repository at this point in the history
Signed-off-by: Timon Masberg <[email protected]>
  • Loading branch information
timonmasberg committed Sep 20, 2024
1 parent 50dd8d8 commit 21649d0
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ import { alertGroupMinUnitsValidator } from '../rescue-station/rescue-station-ed
}
.actions {
margin-top: 10px;
margin-top: var(--base-spacing);
display: flex;
justify-content: flex-end;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { DeploymentUnitComponent } from '../unit/deployment-unit.component';
.alert-group {
display: flex;
flex-direction: column;
gap: 4px;
gap: calc(var(--base-spacing) / 2);
}
.name {
Expand All @@ -38,7 +38,7 @@ import { DeploymentUnitComponent } from '../unit/deployment-unit.component';
nz-card {
.ant-card-body {
padding: 4px 8px;
padding: calc(var(--base-spacing) / 2) var(--base-spacing);
background-color: #fafafa;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ import { NzSpinComponent } from 'ng-zorro-antd/spin';
position: absolute;
top: 0;
right: 0;
padding: 4px 16px 4px;
padding: calc(var(--base-spacing) / 2) calc(var(--base-spacing) * 2)
calc(var(--base-spacing) / 2);
}
.ant-input {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

display: flex;
flex-direction: column;
gap: 5px;
gap: calc(var(--base-spacing) / 2);
height: 100%;

.header-bar {
Expand All @@ -24,7 +24,7 @@
}

div > :not(:last-child) {
margin-right: 5px;
margin-right: calc(var(--base-spacing) / 2);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,24 @@ const STATUS_SORT_ORDER: Readonly<Record<number, number>> = Object.freeze({
}
.ant-card-body {
padding: 18px;
padding: calc(var(--base-spacing) * 2);
display: flex;
flex-direction: column;
flex-grow: 1;
height: 100%;
}
.sub-header {
margin-bottom: 10px;
margin-bottom: var(--base-spacing);
}
.assignments {
display: flex;
flex-direction: column;
gap: 4px;
gap: calc(var(--base-spacing) / 2);
width: 100%;
overflow-y: auto;
padding-right: 4px;
padding-right: calc(var(--base-spacing) / 2);
box-sizing: content-box;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ import { RescueStationDeploymentCardHeaderComponent } from './rescue-station/res
:host {
display: flex;
flex-direction: row;
gap: 5px;
gap: calc(var(--base-spacing) / 2);
height: 100%;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import { NameSearchWrapperComponent } from './name-search-wrapper.component';
display: flex;
flex-direction: column;
flex-wrap: wrap;
gap: 5px;
gap: calc(var(--base-spacing) / 2);
height: 100%;
.empty-state {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,30 @@ import { StatusBadgeComponent } from './status-badge.component';
(click)="$event.stopPropagation()"
nz-popover
[nzPopoverBackdrop]="true"
[nzBodyStyle]="{ padding: '4px 8px' }"
[nzPopoverTitle]="unit().callSign + ' - ' + unit().name"
[nzPopoverContent]="notePopoverContent"
nzPopoverTrigger="click"
>
<div class="card-body">
<div class="header-row">
<span>
{{ unit().callSign }}
@if (unit().note) {
<i nz-icon nzType="info-circle" [nz-tooltip]="unit().note"> </i>
}
</span>
<krd-status-badge [status]="unit().status?.status" />
</div>
<div class="name">
<span>{{ unit().name }}</span>
</div>
<div class="header-row">
<span>
{{ unit().callSign }}
@if (unit().note) {
<i nz-icon nzType="info-circle" [nz-tooltip]="unit().note"> </i>
}
</span>
<krd-status-badge [status]="unit().status?.status" />
</div>
<div class="name">
<span>{{ unit().name }}</span>
</div>
</nz-card>
`,
styles: `
nz-card {
.card-body {
.ant-card-body {
display: flex;
flex-direction: column;
padding: calc(var(--base-spacing) / 2) var(--base-spacing);
}
.header-row {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ import { AlertGroupSelectionComponent } from './alert-group-selection.component'
overflow: auto;
display: flex;
flex-direction: column;
gap: 5px;
gap: calc(var(--base-spacing) / 2);
}
nz-card {
.ant-card-body {
padding: 5px;
padding: calc(var(--base-spacing) / 2);
}
margin-top: 5px;
margin-top: calc(var(--base-spacing) / 2);
}
nz-form-item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { Unit } from '@kordis/shared/model';
display: flex;
flex-direction: row;
align-items: center;
gap: 5px;
gap: calc(var(--base-spacing) / 2);
}
`,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import { Subject, map, of, startWith, takeUntil } from 'rxjs';
display: flex;
flex-direction: row;
align-items: center;
gap: 5px;
gap: calc(var(--base-spacing) / 2);
}
.ant-form-item {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import { StatusBadgeComponent } from '../../../../deployment/unit/status-badge.c
.call-sign {
font-weight: 500;
margin-right: 5px;
margin-right: calc(var(--base-spacing) / 2);
}
.name {
Expand All @@ -50,7 +50,7 @@ import { StatusBadgeComponent } from '../../../../deployment/unit/status-badge.c
.assignment-note {
font-size: 0.8em;
margin: -5px 0;
margin: calc(-1 * var(--base-spacing) / 2) 0;
}
}
`,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.form {
display: flex;
flex-direction: column;
gap: 10px;
gap: var(--base-spacing);

.form-item {
display: flex;
Expand All @@ -15,7 +15,7 @@
}

.actions {
margin-top: 10px;
margin-top: var(--base-spacing);
display: flex;
}

Expand All @@ -28,13 +28,13 @@
}

nz-card {
margin-bottom: 5px;
margin-bottom: calc(var(--base-spacing) / 2);

.ant-card-body {
padding: 10px;
padding: var(--base-spacing);
}
}

nz-alert {
margin-top: 5px;
margin-top: calc(var(--base-spacing) / 2);
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import { GraphqlService, gql } from '@kordis/spa/core/graphql';
.actions {
display: flex;
justify-content: flex-end;
margin-top: 10px;
margin-top: var(--base-spacing);
}
`,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down

0 comments on commit 21649d0

Please sign in to comment.