Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 28 additions & 8 deletions .github/workflows/ci-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
- master
tags:
- "v*"
pull_request:
branches:
- master
workflow_dispatch:

permissions:
Expand All @@ -18,8 +21,8 @@ concurrency:
cancel-in-progress: true

jobs:
build_pages:
if: github.ref == 'refs/heads/master'
ci:
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -45,6 +48,28 @@ jobs:
- name: Test
run: pnpm test -- --run

build_pages:
if: github.ref == 'refs/heads/master'
needs: ci
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- name: Install
run: pnpm install --frozen-lockfile

- name: Set base path
run: |
if [[ "${{ github.event.repository.name }}" == *.github.io ]]; then
Expand Down Expand Up @@ -80,6 +105,7 @@ jobs:

build_release:
if: startsWith(github.ref, 'refs/tags/')
needs: ci
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -99,12 +125,6 @@ jobs:
- name: Install
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm lint

- name: Test
run: pnpm test -- --run

- name: Set release env
run: |
echo "NEXT_PUBLIC_BASE_PATH=/web" >> $GITHUB_ENV
Expand Down
9 changes: 5 additions & 4 deletions components/dashboard/device-list-mobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ import {
import { useI18n } from "@/lib/i18n";
import { performDeviceAction } from "@/lib/device-actions";
import { AppConfig, DeviceSummaryModel, MetricsStatusThreshold } from "@/lib/types";
import { formatDateTime, formatTemperature } from "@/lib/format";
import { formatDateTime, formatTemperature, summaryAgeClass } from "@/lib/format";
import { cn } from "@/lib/utils";
import {
deviceHref,
getDeviceCardData,
Expand Down Expand Up @@ -125,9 +126,9 @@ export function DeviceListMobile({ summary, settings, showArchived, onAction }:
<div className="mt-3 grid grid-cols-2 gap-3 text-sm">
<div>
<p className="text-[11px] uppercase text-muted-foreground">{t("dashboard.devices.last_updated")}</p>
<p className="text-base font-semibold">
{formatDateTime(deviceSummary.smart?.collector_date)}
</p>
<p className={cn("text-base font-semibold", summaryAgeClass(deviceSummary.smart))}>
{formatDateTime(deviceSummary.smart?.collector_date)}
</p>
</div>
<div>
<p className="text-[11px] uppercase text-muted-foreground">{t("dashboard.devices.temp")}</p>
Expand Down