fix(plugin): use ButtonItem for gamepad-navigable View Details

This commit is contained in:
2026-07-13 06:44:36 +08:00
parent a66c13daa0
commit 17d70f175d
@@ -1,5 +1,5 @@
import { useEffect, useState, useRef } from "react" import { useEffect, useState, useRef } from "react"
import { PanelSectionRow, staticClasses } from "@decky/ui" import { PanelSectionRow, ButtonItem, staticClasses } from "@decky/ui"
import { Router } from "@decky/ui" import { Router } from "@decky/ui"
import { import {
fetchPluginGame, fetchPluginGame,
@@ -130,22 +130,12 @@ export default function LibraryAppPanel({ appId, title, hardwareSlug, baseUrl }:
{detectedSlug ? detectedSlug : <span style={{ color: "#e0a030" }}> global</span>} {detectedSlug ? detectedSlug : <span style={{ color: "#e0a030" }}> global</span>}
</span> </span>
</span> </span>
{/* View Details — compact inline button */} {/* View Details — compact, gamepad-navigable */}
<button <span style={{ flexShrink: 0 }}>
onClick={() => openExternalUrl(gameUrl)} <ButtonItem layout="below" onClick={() => openExternalUrl(gameUrl)}>
style={{ View Details
flexShrink: 0, </ButtonItem>
background: "rgba(255,255,255,0.08)", </span>
border: "1px solid rgba(255,255,255,0.12)",
borderRadius: "6px",
color: "inherit",
fontSize: "12px",
padding: "4px 10px",
cursor: "pointer",
}}
>
View Details
</button>
</div> </div>
</PanelSectionRow> </PanelSectionRow>
) )