mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-19 10:52:04 +00:00
fix: a11y
This commit is contained in:
+2
-4
@@ -30,7 +30,7 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select"
|
||||
import { formatDateTime } from "@/lib/utils"
|
||||
import { formatDateTime, getNameTag } from "@/lib/utils"
|
||||
import {
|
||||
useAttachVolume,
|
||||
useDeleteVolume,
|
||||
@@ -319,9 +319,7 @@ function VolumeDetail() {
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{runningInstances.map((instance) => {
|
||||
const name = instance.Tags?.find(
|
||||
(t) => t.Key === "Name",
|
||||
)?.Value
|
||||
const name = getNameTag(instance.Tags)
|
||||
return (
|
||||
<SelectItem
|
||||
key={instance.InstanceId}
|
||||
|
||||
+4
-2
@@ -47,8 +47,8 @@ export function ObjectListItem({
|
||||
link.remove()
|
||||
URL.revokeObjectURL(url)
|
||||
}
|
||||
} catch {
|
||||
throw new Error("Failed to download object")
|
||||
} catch (error) {
|
||||
throw new Error("Failed to download object", { cause: error })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ export function ObjectListItem({
|
||||
{formatSize(object.Size ?? 0)}
|
||||
</div>
|
||||
<button
|
||||
aria-label={`Download ${displayName}`}
|
||||
className="rounded-md p-2 transition-colors hover:bg-accent"
|
||||
onClick={downloadObject}
|
||||
type="button"
|
||||
@@ -95,6 +96,7 @@ export function ObjectListItem({
|
||||
<Download className="size-4" />
|
||||
</button>
|
||||
<button
|
||||
aria-label={`Delete ${displayName}`}
|
||||
className="rounded-md p-2 text-destructive transition-colors hover:bg-accent"
|
||||
onClick={() => setShowDeleteDialog(true)}
|
||||
type="button"
|
||||
|
||||
Reference in New Issue
Block a user