@fish-under-sea/magpie-neartoken 0.1.7 → 0.1.8
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.
- package/package.json +1 -1
- package/page/app.js +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fish-under-sea/magpie-neartoken",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "NearToken for magpie: a provider whose sign-in is the site's own device authorization, models listed per billing group with their multiplier, balance and vouchers on magpie's usage card, plus a page for spending and top-ups.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.mjs",
|
package/page/app.js
CHANGED
|
@@ -77,7 +77,15 @@
|
|
|
77
77
|
/** showError 把宿主的话放到页脚的一条提示上,不弹窗。 */
|
|
78
78
|
let lastError = ''
|
|
79
79
|
function showError(error) {
|
|
80
|
-
|
|
80
|
+
const said = String(error && error.message ? error.message : error)
|
|
81
|
+
lastError = said
|
|
82
|
+
// 宿主侧仍在建 key+URL 供应商时,会撞上 magpie 的内置订阅 id。
|
|
83
|
+
// 这不是页面能修的,给一句能照做的指引。
|
|
84
|
+
if (/is the id of the .* subscription/i.test(said)) {
|
|
85
|
+
lastError = '宿主侧还没适配:magpie 把 neartoken 当内置订阅的 id,普通供应商不能占它。' +
|
|
86
|
+
'请先到 magpie 的供应商页里用 NearToken 自己的登录(插件已提供),' +
|
|
87
|
+
'或等宿主按 issue #22 适配后再回这里连接。'
|
|
88
|
+
}
|
|
81
89
|
render()
|
|
82
90
|
}
|
|
83
91
|
|