[fix] white config

This commit is contained in:
zhhe committed 2026-11-16 14:43:41 +08:00
1 parent 9607c6c3ce
commit d26e7e5f09
6 files changed
+71 -64

No files matched your search

+26 -20
View File
@@ -19984,13 +19984,13 @@ var remote_default = TYPERT_REMOTE;
// src/client/api.ts
function createApi(ctx) {
const methods = remote_default.methods;
const remote = ctx.remote["mail-gateway"];
return {
get: () => methods["mail-gateway/get"].invoke(ctx.remote, {}),
saveMailbox: (patch) => methods["mail-gateway/saveMailbox"].invoke(ctx.remote, { patch }),
saveWhitelist: (addresses) => methods["mail-gateway/saveWhitelist"].invoke(ctx.remote, { addresses }),
testConnection: (patch) => methods["mail-gateway/testConnection"].invoke(ctx.remote, { patch }),
status: () => methods["mail-gateway/status"].invoke(ctx.remote, {})
get: () => remote.get(),
saveMailbox: (patch) => remote.saveMailbox(patch),
saveWhitelist: (addresses) => remote.saveWhitelist(addresses),
testConnection: (patch) => remote.testConnection(patch),
status: () => remote.status()
};
}
@@ -20287,20 +20287,26 @@ var name = "dsh-mail-sender";
var inject = ["slots", "remote"];
async function apply(ctx) {
const disposeRemote = await ctx.remote.$mount(remote_default);
const api = createApi(ctx);
ctx.slots.inject(
"settings.section",
() => ctx.slots.register(
{
name: "settings.section",
id: "mail-gateway",
order: 120,
label: () => "\u90AE\u4EF6\u7F51\u5173",
inject: () => ({ api })
},
MailGatewaySection
)
);
ctx.plugin({
name: "dsh-mail-sender/ui",
inject: ["slots", "remote.mail-gateway"],
apply(ui) {
const api = createApi(ui);
ui.slots.inject(
"settings.section",
() => ui.slots.register(
{
name: "settings.section",
id: "mail-gateway",
order: 120,
label: () => "\u90AE\u4EF6\u7F51\u5173",
inject: () => ({ api })
},
MailGatewaySection
)
);
}
});
return disposeRemote;
}
Object.defineProperty(module.exports,Symbol.toStringTag,{value:"Module"});return module.exports}});