diff --git a/apps/desktop/src/features/plugins/PluginResourcePanels.module.scss b/apps/desktop/src/features/plugins/PluginResourcePanels.module.scss index 666db8e..013bc20 100644 --- a/apps/desktop/src/features/plugins/PluginResourcePanels.module.scss +++ b/apps/desktop/src/features/plugins/PluginResourcePanels.module.scss @@ -162,6 +162,12 @@ } } +.actionBody { + display: flex; + flex-direction: column; + gap: 12px; +} + .actionDescription { color: var(--vscode-descriptionForeground); font-size: type.$font-size-xs; diff --git a/apps/desktop/src/features/plugins/PluginResourcePanels.tsx b/apps/desktop/src/features/plugins/PluginResourcePanels.tsx index 8a4fbcb..293ddcc 100644 --- a/apps/desktop/src/features/plugins/PluginResourcePanels.tsx +++ b/apps/desktop/src/features/plugins/PluginResourcePanels.tsx @@ -420,12 +420,13 @@ function ResourceActionModal({ action, cardAction, result, busy, error, onClose, const cardActions = cardAction ? [cardAction] : []; return <> - - {result?.description && {pluginText(result.description, locale)}} - {busy && {t("正在加载…")}} - {error && {error}} - {!busy && !error && result && result.cards.length === 0 && {t("没有可用的重置卡。")}} - {!busy && !error && result &&
+ +
+ {result?.description && {pluginText(result.description, locale)}} + {busy && {t("正在加载…")}} + {error && {error}} + {!busy && !error && result && result.cards.length === 0 && {t("没有可用的重置卡。")}} + {!busy && !error && result &&
{result.cards.map((card) =>
{pluginText(card.title, locale)} @@ -444,6 +445,7 @@ function ResourceActionModal({ action, cardAction, result, busy, error, onClose,
}
)}
} +
{pendingCard && cardAction && element.getClientRects().length > 0); } -export function Modal({ id, open, title, children, banner, busy, wide, fullHeight, role = "dialog", ariaDescribedBy, initialFocus = "first", onClose, onSubmit, secondaryAction, closeLabel = t("取消"), submitLabel = t("保存"), submitDisabled = false }: ModalProps) { +export function Modal({ id, open, title, children, banner, busy, wide, compact, fullHeight, role = "dialog", ariaDescribedBy, initialFocus = "first", onClose, onSubmit, secondaryAction, closeLabel = t("取消"), submitLabel = t("保存"), submitDisabled = false }: ModalProps) { const dialog = useRef(null); const submitButton = useRef(null); const closeRef = useRef(onClose); @@ -89,7 +90,7 @@ export function Modal({ id, open, title, children, banner, busy, wide, fullHeigh if (!open) return null; return createPortal(