feat(transactions): add transaction detail page with live energy and cost estimation
feat(transactions): implement active transaction checks and idTag validation feat(id-tag): enhance idTag card with disabled state for active transactions fix(transactions): improve error handling and user feedback for transaction actions
This commit is contained in:
@@ -34,6 +34,7 @@ type IdTagCardProps = {
|
||||
idTag: string;
|
||||
balance: number;
|
||||
isSelected?: boolean;
|
||||
isDisabled?: boolean;
|
||||
/** 内容排列方式:余额、logo、卡号等信息元素的布局 */
|
||||
layout?: CardLayoutName;
|
||||
/** 卡底装饰风格:纹理、光效、几何图形等视觉元素 */
|
||||
@@ -45,6 +46,7 @@ export function IdTagCard({
|
||||
idTag,
|
||||
balance,
|
||||
isSelected = false,
|
||||
isDisabled = false,
|
||||
layout = "around",
|
||||
skin = "circles",
|
||||
onClick,
|
||||
@@ -55,10 +57,12 @@ export function IdTagCard({
|
||||
return (
|
||||
<button
|
||||
type="button"
|
||||
disabled={isDisabled}
|
||||
onClick={onClick}
|
||||
className={[
|
||||
"relative w-full overflow-hidden rounded-2xl cursor-pointer select-none",
|
||||
"relative w-full overflow-hidden rounded-2xl select-none",
|
||||
"aspect-[1.586/1] transition-all duration-200 active:scale-[0.97]",
|
||||
isDisabled ? "cursor-not-allowed opacity-45 grayscale-[0.25]" : "cursor-pointer",
|
||||
isSelected
|
||||
? "ring-3 ring-offset-2 ring-offset-background ring-accent shadow-2xl shadow-accent/25"
|
||||
: "ring-1 ring-black/8 hover:ring-accent/40 shadow-md hover:shadow-xl",
|
||||
|
||||
Reference in New Issue
Block a user