From da4f41da1985ced4fadf59c28edc12d8f4652a29 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 29 Apr 2019 11:00:41 +0900 Subject: [PATCH 1/5] Fix bug --- src/client/app/common/scripts/aiscript.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/app/common/scripts/aiscript.ts b/src/client/app/common/scripts/aiscript.ts index 4ef21f994..aea89ff9a 100644 --- a/src/client/app/common/scripts/aiscript.ts +++ b/src/client/app/common/scripts/aiscript.ts @@ -445,7 +445,7 @@ export class AiScript { } if (AiScript.envVarsDef[name]) { - return this.envVars[name].value; + return this.envVars[name]; } throw new Error(`Script: No such variable '${name}'`); From f29a03d64afa55ed1fa3be351bcabe40138ba344 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 29 Apr 2019 11:03:05 +0900 Subject: [PATCH 2/5] Fix error --- src/client/app/desktop/views/components/ui.header.account.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/app/desktop/views/components/ui.header.account.vue b/src/client/app/desktop/views/components/ui.header.account.vue index 05692667b..9b87e0c29 100644 --- a/src/client/app/desktop/views/components/ui.header.account.vue +++ b/src/client/app/desktop/views/components/ui.header.account.vue @@ -35,7 +35,7 @@

-
  • +
  • {{ $t('@.pages') }} From 0544a78daa529e700630e6c91fad35013a09ba50 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 29 Apr 2019 11:08:35 +0900 Subject: [PATCH 3/5] =?UTF-8?q?MisskeyPages=E3=81=A7=E5=80=A4=E3=81=8C0?= =?UTF-8?q?=E3=81=AE=E5=A4=89=E6=95=B0=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client/app/common/scripts/aiscript.ts | 6 ++++-- src/client/app/common/views/pages/page/page.vue | 7 +++++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/client/app/common/scripts/aiscript.ts b/src/client/app/common/scripts/aiscript.ts index aea89ff9a..a3e499fc8 100644 --- a/src/client/app/common/scripts/aiscript.ts +++ b/src/client/app/common/scripts/aiscript.ts @@ -316,8 +316,10 @@ export class AiScript { @autobind private interpolate(str: string, values: { name: string, value: any }[]) { - return str.replace(/\{(.+?)\}/g, match => - (this.getVariableValue(match.slice(1, -1).trim(), values) || '').toString()); + return str.replace(/\{(.+?)\}/g, match => { + const v = this.getVariableValue(match.slice(1, -1).trim(), values); + return v == null ? 'NULL' : v.toString(); + }); } @autobind diff --git a/src/client/app/common/views/pages/page/page.vue b/src/client/app/common/views/pages/page/page.vue index 5ca58a6a4..307ddf8db 100644 --- a/src/client/app/common/views/pages/page/page.vue +++ b/src/client/app/common/views/pages/page/page.vue @@ -31,6 +31,7 @@ class Script { constructor(aiScript) { this.aiScript = aiScript; this.vars = this.aiScript.evaluateVars(); + console.log(this.vars); } public reEval() { @@ -38,8 +39,10 @@ class Script { } public interpolate(str: string) { - return str.replace(/\{(.+?)\}/g, match => - (this.vars.find(x => x.name === match.slice(1, -1).trim()).value || '').toString()); + return str.replace(/\{(.+?)\}/g, match => { + const v = this.vars.find(x => x.name === match.slice(1, -1).trim()).value; + return v == null ? 'NULL' : v.toString(); + }); } } From 36c37244720ac8560b57c83a86ea0546f4c5e774 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 29 Apr 2019 11:10:50 +0900 Subject: [PATCH 4/5] Update page.vue --- src/client/app/common/views/pages/page/page.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/client/app/common/views/pages/page/page.vue b/src/client/app/common/views/pages/page/page.vue index 307ddf8db..e7e8f76d5 100644 --- a/src/client/app/common/views/pages/page/page.vue +++ b/src/client/app/common/views/pages/page/page.vue @@ -31,7 +31,6 @@ class Script { constructor(aiScript) { this.aiScript = aiScript; this.vars = this.aiScript.evaluateVars(); - console.log(this.vars); } public reEval() { From 1d40afe1b8318ac78ac49d5baa61669b678dd759 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 29 Apr 2019 11:10:59 +0900 Subject: [PATCH 5/5] 11.5.1 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ed4e443..71d4c0dbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -42,6 +42,12 @@ mongodb: 8. master ブランチに戻す 9. enjoy +11.5.1 (2019/04/29) +------------------- +### Fixes +* MisskeyPagesで環境変数を別の変数内で使えない問題を修正 +* MisskeyPagesで値が0の変数が表示されない問題を修正 + 11.5.0 (2019/04/29) ------------------- ### 注意 diff --git a/package.json b/package.json index 14d3bcc8f..4299089f5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "misskey", "author": "syuilo ", - "version": "11.5.0", + "version": "11.5.1", "codename": "daybreak", "repository": { "type": "git",