mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
feat(web): show machine label on pinned running session rows
This commit is contained in:
@@ -766,9 +766,10 @@ function SessionItem(props: {
|
||||
showDetailedStatus?: boolean
|
||||
inRunningSection?: boolean
|
||||
projectLabel?: string
|
||||
machineLabel?: string
|
||||
}) {
|
||||
const { t } = useTranslation()
|
||||
const { session: s, onSelect, showPath = true, api, selected = false, showDetailedStatus = false, inRunningSection = false, projectLabel } = props
|
||||
const { session: s, onSelect, showPath = true, api, selected = false, showDetailedStatus = false, inRunningSection = false, projectLabel, machineLabel } = props
|
||||
const { haptic } = usePlatform()
|
||||
const [menuOpen, setMenuOpen] = useState(false)
|
||||
const [menuAnchorPoint, setMenuAnchorPoint] = useState<{ x: number; y: number }>({ x: 0, y: 0 })
|
||||
@@ -863,6 +864,7 @@ function SessionItem(props: {
|
||||
scheduleTooltipId={scheduleId}
|
||||
inRunningSection={inRunningSection}
|
||||
projectLabel={projectLabel}
|
||||
machineLabel={machineLabel}
|
||||
/>
|
||||
</button>
|
||||
|
||||
@@ -1453,6 +1455,7 @@ export function SessionList(props: {
|
||||
showDetailedStatus={showDetailedStatus}
|
||||
inRunningSection
|
||||
projectLabel={getGroupDisplayName(s.metadata?.worktree?.basePath ?? s.metadata?.path ?? 'Other')}
|
||||
machineLabel={resolveMachineLabel(s.metadata?.machineId ?? null)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -115,6 +115,8 @@ export function SessionRowSummary(props: {
|
||||
inRunningSection?: boolean
|
||||
/** Short project name shown under the title (pinned "in progress" rows). */
|
||||
projectLabel?: string
|
||||
/** Machine label shown next to the project name (pinned "in progress" rows). */
|
||||
machineLabel?: string
|
||||
}) {
|
||||
const {
|
||||
session: s,
|
||||
@@ -127,6 +129,7 @@ export function SessionRowSummary(props: {
|
||||
className,
|
||||
inRunningSection = false,
|
||||
projectLabel,
|
||||
machineLabel,
|
||||
} = props
|
||||
const { t } = useTranslation()
|
||||
const sessionName = getSessionTitle(s)
|
||||
@@ -245,9 +248,9 @@ export function SessionRowSummary(props: {
|
||||
) : null}
|
||||
</div>
|
||||
</div>
|
||||
{projectLabel ? (
|
||||
<div className="truncate text-xs text-[var(--app-hint)]" title={projectLabel}>
|
||||
{projectLabel}
|
||||
{projectLabel || machineLabel ? (
|
||||
<div className="truncate text-xs text-[var(--app-hint)]" title={[projectLabel, machineLabel].filter(Boolean).join(' · ')}>
|
||||
{[projectLabel, machineLabel].filter(Boolean).join(' · ')}
|
||||
</div>
|
||||
) : showPath || worktreeLabel ? (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user