Skip to content
Original file line number Diff line number Diff line change
@@ -1,71 +1,71 @@
:host {
display: flex;
flex-direction: column;
align-items: center;
width: 100%;
}

.testConnections {
.section__label {
display: block;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
opacity: 0.45;
margin-bottom: 12px;
}

.demoGrid {
list-style: none;
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
grid-gap: 20px;
margin-top: 24px;
grid-template-columns: repeat(3, 1fr);
gap: 12px;
width: 100%;
padding: 0;
margin: 0;
}

@media (width <= 600px) {
.testConnections {
grid-template-columns: repeat(2, minmax(0, 1fr));
.demoGrid {
grid-template-columns: 1fr;
}
}

.testConnectionLink {
.demoCard {
display: flex;
align-items: center;
gap: 12px;
border-radius: 4px;
border-radius: 8px;
padding: 12px 16px;
text-decoration: none;
color: inherit;
transition: box-shadow 200ms, background 200ms, border 200ms;
box-shadow:
0px 1px 3px 0px rgba(0, 0, 0, 0.2),
0px 2px 2px 0px rgba(0, 0, 0, 0.12),
0px 0px 2px 0px rgba(0, 0, 0, 0.14);
color: inherit;
height: 48px;
padding: 0 12px;
text-decoration: none;
transition:
box-shadow 200ms,
background 200ms,
border 200ms;
}

@media (width <= 600px) {
.testConnectionLink {
justify-content: flex-start;
}
.demoCard:hover {
box-shadow:
0px 1px 5px 0px rgba(0, 0, 0, 0.2),
0px 3px 4px 0px rgba(0, 0, 0, 0.12),
0px 2px 4px 0px rgba(0, 0, 0, 0.14);
}

@media (prefers-color-scheme: light) {
.testConnectionLink {
.demoCard {
background: var(--mat-sidenav-content-background-color);
border: 1px solid var(--mat-sidenav-content-background-color);
}

.testConnectionLink:hover {
box-shadow:
0px 1px 3px 0px rgba(0, 0, 0, 0.2),
0px 2px 2px 0px rgba(0, 0, 0, 0.12),
0px 0px 2px 0px rgba(0, 0, 0, 0.14);
}
}

@media (prefers-color-scheme: dark) {
.testConnectionLink {
.demoCard {
background: #2a2a2a;
border: 1px solid #2a2a2a;
}

.testConnectionLink:hover {
.demoCard:hover {
background: var(--surface-dark-color);
border: 1px solid rgba(255, 255, 255, 0.75);
box-shadow:
Expand All @@ -74,55 +74,53 @@
0px 0px 2px 0px rgba(255, 255, 255, 0.12);
}

.testConnectionLink:hover .connection__goIcon {
.demoCard:hover .demoCard__arrow {
color: var(--color-accentedPalette-500);
}
}

.testConnectionLink:hover {
box-shadow:
0px 1px 5px 0px rgba(0, 0, 0, 0.2),
0px 3px 4px 0px rgba(0, 0, 0, 0.12),
0px 2px 4px 0px rgba(0, 0, 0, 0.14);
}

.testConnectionLink:active {
.demoCard:active {
background: rgba(0, 0, 0, 0.16);
}

.testConnectionLink__icon {
.demoCard__icon {
flex-shrink: 0;
height: 28px;
width: 28px;
}

@media (prefers-color-scheme: dark) {
.testConnectionLink__icon {
.demoCard__icon {
filter: brightness(0) invert(1);
}
}

.connection__goIcon {
margin-left: auto;
.demoCard__info {
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
}

@media (width <= 600px) {
.testConnectionLink .connection__goIcon {
display: none;
}
.demoCard__type {
font-size: 12px;
margin-top: -2px;
opacity: 0.55;
}

.testConnectionLink:hover .connection__goIcon,
.connection:hover .connection__goIcon {
opacity: 1;
.demoCard__arrow {
flex-shrink: 0;
margin-left: auto;
opacity: 0.65;
transition: opacity 200ms, color 200ms;
}

.testConnectionLink__info {
display: flex;
flex-direction: column;
.demoCard:hover .demoCard__arrow {
opacity: 1;
}

.testConnectionLink__type {
font-size: 12px;
margin-top: -2px;
@media (width <= 600px) {
.demoCard__arrow {
display: none;
}
}
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
<h1 *ngIf="!isDemo" class="mat-display-1">Explore demo panels</h1>
<h1 *ngIf="isDemo" class="mat-display-1">Try out a demo admin panel</h1>
@if (!isDemo) {
<h1 class="mat-display-1">Explore demo panels</h1>
} @else {
<h1 class="mat-display-1">Try out a demo admin panel</h1>
}

<ul class="testConnections">
<li *ngFor="let testConnectionItem of testConnections">
<a routerLink="/dashboard/{{testConnectionItem.connection.id}}" class="testConnectionLink"
attr.data-testid="{{testConnectionItem.connection.id}}-test-connection-list-item"
angulartics2On="click"
angularticsAction="Connections: open test db is clicked"
(click)="posthog.capture('Connections: open test db is clicked')"
[angularticsProperties]="{'dbType': testConnectionItem.connection.type}">
<img [src]="testDatabasesIcons[testConnectionItem.connection.type]"
class="testConnectionLink__icon"
[alt]="testConnectionItem.connection.type">
<div class="testConnectionLink__info">
<strong>{{ testConnectionItem.displayTitle }}</strong>
<span class="testConnectionLink__type">{{ testDatabasesNames[testConnectionItem.connection.type] }}</span>
</div>

<mat-icon class="connection__goIcon">arrow_forward</mat-icon>
</a>
</li>
</ul>
<ul class="demoGrid">
@for (testConnectionItem of testConnections; track testConnectionItem.connection.id) {
<li>
<a routerLink="/dashboard/{{testConnectionItem.connection.id}}" class="demoCard"
attr.data-testid="{{testConnectionItem.connection.id}}-test-connection-list-item"
angulartics2On="click"
angularticsAction="Connections: open test db is clicked"
(click)="posthog.capture('Connections: open test db is clicked')"
[angularticsProperties]="{'dbType': testConnectionItem.connection.type}">
<img [src]="testDatabasesIcons[testConnectionItem.connection.type]"
class="demoCard__icon"
[alt]="testConnectionItem.connection.type">
<div class="demoCard__info">
<strong>{{ $any(testConnectionItem).displayTitle }}</strong>
<span class="demoCard__type">{{ testDatabasesNames[testConnectionItem.connection.type] }}</span>
Comment on lines +19 to +21
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$any(testConnectionItem).displayTitle disables template type-checking. Consider changing testConnections to a typed view-model that includes displayTitle (or extend ConnectionItem) so this stays type-safe.

Copilot uses AI. Check for mistakes.
</div>
<mat-icon class="demoCard__arrow">arrow_forward</mat-icon>
</a>
</li>
}
</ul>
Loading
Loading