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
|
showDetailedStatus?: boolean
|
||||||
inRunningSection?: boolean
|
inRunningSection?: boolean
|
||||||
projectLabel?: string
|
projectLabel?: string
|
||||||
|
machineLabel?: string
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation()
|
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 { haptic } = usePlatform()
|
||||||
const [menuOpen, setMenuOpen] = useState(false)
|
const [menuOpen, setMenuOpen] = useState(false)
|
||||||
const [menuAnchorPoint, setMenuAnchorPoint] = useState<{ x: number; y: number }>({ x: 0, y: 0 })
|
const [menuAnchorPoint, setMenuAnchorPoint] = useState<{ x: number; y: number }>({ x: 0, y: 0 })
|
||||||
@@ -863,6 +864,7 @@ function SessionItem(props: {
|
|||||||
scheduleTooltipId={scheduleId}
|
scheduleTooltipId={scheduleId}
|
||||||
inRunningSection={inRunningSection}
|
inRunningSection={inRunningSection}
|
||||||
projectLabel={projectLabel}
|
projectLabel={projectLabel}
|
||||||
|
machineLabel={machineLabel}
|
||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@@ -1453,6 +1455,7 @@ export function SessionList(props: {
|
|||||||
showDetailedStatus={showDetailedStatus}
|
showDetailedStatus={showDetailedStatus}
|
||||||
inRunningSection
|
inRunningSection
|
||||||
projectLabel={getGroupDisplayName(s.metadata?.worktree?.basePath ?? s.metadata?.path ?? 'Other')}
|
projectLabel={getGroupDisplayName(s.metadata?.worktree?.basePath ?? s.metadata?.path ?? 'Other')}
|
||||||
|
machineLabel={resolveMachineLabel(s.metadata?.machineId ?? null)}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -115,6 +115,8 @@ export function SessionRowSummary(props: {
|
|||||||
inRunningSection?: boolean
|
inRunningSection?: boolean
|
||||||
/** Short project name shown under the title (pinned "in progress" rows). */
|
/** Short project name shown under the title (pinned "in progress" rows). */
|
||||||
projectLabel?: string
|
projectLabel?: string
|
||||||
|
/** Machine label shown next to the project name (pinned "in progress" rows). */
|
||||||
|
machineLabel?: string
|
||||||
}) {
|
}) {
|
||||||
const {
|
const {
|
||||||
session: s,
|
session: s,
|
||||||
@@ -127,6 +129,7 @@ export function SessionRowSummary(props: {
|
|||||||
className,
|
className,
|
||||||
inRunningSection = false,
|
inRunningSection = false,
|
||||||
projectLabel,
|
projectLabel,
|
||||||
|
machineLabel,
|
||||||
} = props
|
} = props
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const sessionName = getSessionTitle(s)
|
const sessionName = getSessionTitle(s)
|
||||||
@@ -245,9 +248,9 @@ export function SessionRowSummary(props: {
|
|||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{projectLabel ? (
|
{projectLabel || machineLabel ? (
|
||||||
<div className="truncate text-xs text-[var(--app-hint)]" title={projectLabel}>
|
<div className="truncate text-xs text-[var(--app-hint)]" title={[projectLabel, machineLabel].filter(Boolean).join(' · ')}>
|
||||||
{projectLabel}
|
{[projectLabel, machineLabel].filter(Boolean).join(' · ')}
|
||||||
</div>
|
</div>
|
||||||
) : showPath || worktreeLabel ? (
|
) : showPath || worktreeLabel ? (
|
||||||
<div
|
<div
|
||||||
|
|||||||
Reference in New Issue
Block a user