mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-11-17 01:44:23 +08:00
fix: keep user and limit drag handles beside names
This commit is contained in:
@@ -58,7 +58,7 @@ export function OrderItem({
|
|||||||
{...attributes}
|
{...attributes}
|
||||||
{...listeners}
|
{...listeners}
|
||||||
aria-label={`拖动排序:${label}`}
|
aria-label={`拖动排序:${label}`}
|
||||||
className="shrink-0 rounded p-1 text-default-500 hover:bg-default-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary disabled:opacity-40 disabled:cursor-not-allowed cursor-grab active:cursor-grabbing"
|
className={`inline-flex items-center justify-center shrink-0 rounded text-default-500 hover:bg-default-100 focus-visible:outline focus-visible:outline-2 focus-visible:outline-primary disabled:opacity-40 disabled:cursor-not-allowed cursor-grab active:cursor-grabbing ${row ? "p-1" : "h-8 w-8 [@media(pointer:coarse)]:h-11 [@media(pointer:coarse)]:w-11"}`}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
style={{ touchAction: "none" }}
|
style={{ touchAction: "none" }}
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -358,14 +358,18 @@ export default function LimitPage() {
|
|||||||
>
|
>
|
||||||
<Card className="shadow-sm overflow-hidden h-full">
|
<Card className="shadow-sm overflow-hidden h-full">
|
||||||
<CardHeader className="pb-2 md:pb-2">
|
<CardHeader className="pb-2 md:pb-2">
|
||||||
|
<div className="flex items-center gap-2 w-full min-w-0">
|
||||||
|
<div className="flex items-center gap-1 flex-1 min-w-0">
|
||||||
<OrderHandle />
|
<OrderHandle />
|
||||||
<div className="flex justify-between items-start w-full">
|
<h3
|
||||||
<div>
|
className="font-semibold text-foreground truncate"
|
||||||
<h3 className="font-semibold text-foreground">
|
title={rule.name}
|
||||||
|
>
|
||||||
{rule.name}
|
{rule.name}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<Chip
|
<Chip
|
||||||
|
className="shrink-0"
|
||||||
color={rule.status === 1 ? "success" : "danger"}
|
color={rule.status === 1 ? "success" : "danger"}
|
||||||
size="sm"
|
size="sm"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
|
|||||||
@@ -1316,25 +1316,30 @@ export default function UserPage() {
|
|||||||
>
|
>
|
||||||
<Card className="overflow-hidden h-full">
|
<Card className="overflow-hidden h-full">
|
||||||
<CardHeader className="pb-2 md:pb-2">
|
<CardHeader className="pb-2 md:pb-2">
|
||||||
<OrderHandle />
|
<div className="flex flex-wrap items-start gap-2 w-full">
|
||||||
<div className="flex justify-between items-start w-full">
|
<div className="flex items-center gap-3 grow basis-44 min-w-0">
|
||||||
<div className="flex items-center gap-3 flex-1 min-w-0">
|
|
||||||
<div className="flex items-center justify-center shrink-0 w-10 h-10 rounded-full bg-primary text-white font-bold text-sm relative">
|
<div className="flex items-center justify-center shrink-0 w-10 h-10 rounded-full bg-primary text-white font-bold text-sm relative">
|
||||||
{(user.name || user.user).slice(0, 2).toUpperCase()}
|
{(user.name || user.user).slice(0, 2).toUpperCase()}
|
||||||
<span
|
<span
|
||||||
className={`absolute bottom-0 right-0 w-3 h-3 border-2 border-white dark:border-zinc-900 rounded-full ${userStatus.color === "success" ? "bg-success" : "bg-danger"}`}
|
className={`absolute bottom-0 right-0 w-3 h-3 border-2 border-white dark:border-zinc-900 rounded-full ${userStatus.color === "success" ? "bg-success" : "bg-danger"}`}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col min-w-0">
|
<div className="flex flex-col flex-1 min-w-0">
|
||||||
<h3 className="font-semibold text-foreground truncate text-sm">
|
<div className="flex items-center gap-1 min-w-0">
|
||||||
|
<OrderHandle />
|
||||||
|
<h3
|
||||||
|
className="font-semibold text-foreground truncate text-sm"
|
||||||
|
title={user.name || user.user}
|
||||||
|
>
|
||||||
{user.name || user.user}
|
{user.name || user.user}
|
||||||
</h3>
|
</h3>
|
||||||
|
</div>
|
||||||
<p className="text-xs text-default-500 truncate">
|
<p className="text-xs text-default-500 truncate">
|
||||||
@{user.user}
|
@{user.user}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-1.5 ml-2">
|
<div className="flex flex-wrap items-center gap-1.5 ml-auto max-w-full shrink-0">
|
||||||
<Chip
|
<Chip
|
||||||
className="text-xs"
|
className="text-xs"
|
||||||
color={userStatus.color}
|
color={userStatus.color}
|
||||||
|
|||||||
Reference in New Issue
Block a user