fix: v2.1.1 列表操作列溢出与分页器对齐
- /mailboxes 地址列保持自适应(不设宽度吸收剩余空间),操作列 150→210 修复按钮被卡片右缘裁切 - /domains 操作列 200→260、/accounts 100→110,带图标按钮一行放下 - 分页器(总条数/页码/条数下拉)整体居中紧凑,条数下拉不再贴最右侧
This commit is contained in:
@@ -161,7 +161,7 @@ export function AccountsPage() {
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 100,
|
||||
width: 110,
|
||||
render: (_: unknown, row: AccountRow) => (
|
||||
<Space>
|
||||
<Button
|
||||
|
||||
@@ -128,7 +128,7 @@ export function DomainsPage() {
|
||||
{ title: "邮箱数", dataIndex: "mailbox_count", width: 80 },
|
||||
{
|
||||
title: "操作",
|
||||
width: 200,
|
||||
width: 260,
|
||||
render: (_: unknown, row: DomainRow) => (
|
||||
<Space onClick={(e) => e.stopPropagation()}>
|
||||
{row.status !== "active" ? (
|
||||
|
||||
@@ -82,6 +82,7 @@ export function MailboxesPage() {
|
||||
pagination={false}
|
||||
columns={[
|
||||
{
|
||||
// 地址列不设宽度:吸收剩余空间自适应(tableLayout fixed)
|
||||
title: "地址",
|
||||
dataIndex: "address",
|
||||
render: (v: string, row: MailboxRow) => (
|
||||
@@ -113,7 +114,7 @@ export function MailboxesPage() {
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: 150,
|
||||
width: 210,
|
||||
render: (_: unknown, row: MailboxRow) => (
|
||||
<Space>
|
||||
<Button size="small" icon={<ApiOutlined />} onClick={() => setWebhookTarget(row)}>
|
||||
|
||||
@@ -132,6 +132,20 @@ body,
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 分页器:整体居中且紧凑(总条数 / 页码 / 条数选择连排,条数下拉不再贴最右侧) */
|
||||
.ant-table-pagination {
|
||||
justify-content: center !important;
|
||||
}
|
||||
|
||||
.ant-table-pagination .ant-pagination-total-text {
|
||||
margin-inline-end: 0 !important;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.ant-table-pagination .ant-pagination-options {
|
||||
margin-inline-start: 16px !important;
|
||||
}
|
||||
|
||||
.mono {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||||
font-size: 12.5px;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "wmailhub",
|
||||
"version": "2.1.0",
|
||||
"version": "2.1.1",
|
||||
"description": "WmailHub - 基于 Cloudflare Email Workers 的轻量邮件接收与转发平台(Console 直连 Email Worker)",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
||||
@@ -51,8 +51,9 @@ const recipient = "hello@example.test";
|
||||
const sender = "e2e@example.org";
|
||||
|
||||
// Phase 1: authorize
|
||||
const authorizeBody = JSON.stringify({ recipient, sender, message_id: "md-e2e-1@example.org" });
|
||||
const auth = await signWorkerRequest(secret, worker_id, "POST", `${CONSOLE}/internal/email/authorize`,
|
||||
JSON.stringify({ recipient, sender, message_id: "md-e2e-1@example.org" }));
|
||||
new TextEncoder().encode(authorizeBody));
|
||||
const authResp = await fetch(`${CONSOLE}/internal/email/authorize`, {
|
||||
method: "POST",
|
||||
headers: { ...auth, "Content-Type": "application/json" },
|
||||
@@ -63,7 +64,7 @@ console.log("authorize:", authResp.status, JSON.stringify(decision));
|
||||
if (decision.decision !== "accept") throw new Error("not accepted");
|
||||
|
||||
// Phase 2: ingest(raw MIME)
|
||||
const ingestAuth = await signWorkerRequest(secret, worker_id, "POST", `${CONSOLE}/internal/email/ingest`, mime);
|
||||
const ingestAuth = await signWorkerRequest(secret, worker_id, "POST", `${CONSOLE}/internal/email/ingest`, new TextEncoder().encode(mime));
|
||||
const ingestResp = await fetch(`${CONSOLE}/internal/email/ingest`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
@@ -72,7 +73,7 @@ const ingestResp = await fetch(`${CONSOLE}/internal/email/ingest`, {
|
||||
"X-WmailHub-Recipient": recipient,
|
||||
"X-WmailHub-Sender": sender,
|
||||
},
|
||||
body: mime,
|
||||
body: mime, // string 直发,签名时才转字节
|
||||
});
|
||||
const ingestData = (await ingestResp.json()) as { ok: boolean; id: string; webhook: string | null };
|
||||
console.log("ingest:", ingestResp.status, JSON.stringify(ingestData));
|
||||
|
||||
Reference in New Issue
Block a user