From 624ee76e71b0539cb24436d1e00c3745574147b0 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 4ef21f9943..aea89ff9a3 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 e86d0007c6af95230694c73f2f84280ed58f0e99 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 05692667b7..9b87e0c29f 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 c886c09cdb2878f2b0e53939f7afce9eab71e44f 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 aea89ff9a3..a3e499fc88 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 5ca58a6a4e..307ddf8db7 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 0d64a17d86e31c174f1cb3fcabdda05615115300 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 307ddf8db7..e7e8f76d53 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 a58df29208d3f34355fed499c0d3c85b08744f6b 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 a2ed4e4437..71d4c0dbec 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 14d3bcc8ff..4299089f5c 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",