waibu 1.1.9 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ async function buildLocals ({ tpl, params = {}, opts = {} } = {}) {
15
15
  const { set, merge, pick, get, isEmpty, find } = this.lib._
16
16
  const { req, reply } = opts
17
17
 
18
- const appTitle = this.app.waibuMpa ? this.app.waibuMpa.getAppTitle(req.ns) : undefined
18
+ const appTitle = this.app.waibuMpa ? req.t(this.app.waibuMpa.getAppTitle(req.ns)) : ''
19
19
  params.page = merge(params.page ?? {}, { ns: req.ns, appTitle })
20
20
  set(params, 'menu.homes', buildHomesMenu.call(this))
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "waibu",
3
- "version": "1.1.9",
3
+ "version": "1.1.11",
4
4
  "description": "Web Framework for Bajo",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/plugin/factory.js CHANGED
@@ -292,7 +292,8 @@ async function factory (pkgName) {
292
292
  }
293
293
  const message = await render(tpl[0], locals, opts)
294
294
  if (tpl[1]) opts.messageText = await render(tpl[1], locals, opts)
295
- await this.app.masohi.send({ to, cc, bcc, from, subject, message, conn, options: opts })
295
+ const payload = { type: 'object', data: { to, cc, bcc, from, subject, message, conn, options: opts } }
296
+ await this.app.masohi.send({ payload, source: this.name }, false) // mail sent through worker
296
297
  }
297
298
 
298
299
  unescapeBlock = (content, start, end, startReplacer, endReplacer) => {