From a676d3c9478feac0d7cea5b6ba190d4b302916e1 Mon Sep 17 00:00:00 2001 From: FineArchs <133759614+FineArchs@users.noreply.github.com> Date: Sat, 30 Sep 2023 00:23:40 +0900 Subject: [PATCH 1/3] add HOST_URL --- packages/frontend/src/scripts/aiscript/api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/scripts/aiscript/api.ts b/packages/frontend/src/scripts/aiscript/api.ts index f049a51b933f..c5b6b2b226f4 100644 --- a/packages/frontend/src/scripts/aiscript/api.ts +++ b/packages/frontend/src/scripts/aiscript/api.ts @@ -8,7 +8,7 @@ import * as os from '@/os.js'; import { $i } from '@/account.js'; import { miLocalStorage } from '@/local-storage.js'; import { customEmojis } from '@/custom-emojis.js'; -import { lang } from '@/config.js'; +import { url, lang } from '@/config.js'; export function createAiScriptEnv(opts) { return { @@ -17,6 +17,7 @@ export function createAiScriptEnv(opts) { USER_USERNAME: $i ? values.STR($i.username) : values.NULL, CUSTOM_EMOJIS: utils.jsToVal(customEmojis.value), LOCALE: values.STR(lang), + HOST_URL: values.STR(url), 'Mk:dialog': values.FN_NATIVE(async ([title, text, type]) => { await os.alert({ type: type ? type.value : 'info', From 5531069d8082664dfad335908522c10bd2f92927 Mon Sep 17 00:00:00 2001 From: FineArchs <133759614+FineArchs@users.noreply.github.com> Date: Sat, 30 Sep 2023 00:31:11 +0900 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 698b4aceadf8..aa6a1c606056 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,16 @@ - --> +## 2023.x.x (unreleased) + +### General +- + +### Client +- Feat: AiScriptでホストのアドレスを参照する定数`HOST_URL`を追加 + +### Server +- ## 2023.9.2 From 3980bf3dd10bfe4c74c0f82958aef4b5c86ef661 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 30 Sep 2023 09:38:56 +0900 Subject: [PATCH 3/3] tweak --- CHANGELOG.md | 11 +---------- packages/frontend/src/scripts/aiscript/api.ts | 2 +- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd098450acc6..ee2f11b15640 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,22 +11,13 @@ - --> -## 2023.x.x (unreleased) - -### General -- - -### Client -- Feat: AiScriptでホストのアドレスを参照する定数`HOST_URL`を追加 - -### Server -- ## 2023.9.3 ### General - Enhance: ノートの翻訳機能の利用可否をロールで設定可能に ### Client +- Enhance: AiScriptでホストのアドレスを参照する定数`SERVER_URL`を追加 - Enhance: モデレーションログ機能の強化 - Enhance: ローカリゼーションの更新 diff --git a/packages/frontend/src/scripts/aiscript/api.ts b/packages/frontend/src/scripts/aiscript/api.ts index c5b6b2b226f4..032853f7ad30 100644 --- a/packages/frontend/src/scripts/aiscript/api.ts +++ b/packages/frontend/src/scripts/aiscript/api.ts @@ -17,7 +17,7 @@ export function createAiScriptEnv(opts) { USER_USERNAME: $i ? values.STR($i.username) : values.NULL, CUSTOM_EMOJIS: utils.jsToVal(customEmojis.value), LOCALE: values.STR(lang), - HOST_URL: values.STR(url), + SERVER_URL: values.STR(url), 'Mk:dialog': values.FN_NATIVE(async ([title, text, type]) => { await os.alert({ type: type ? type.value : 'info',