diff --git a/locales/index.d.ts b/locales/index.d.ts index 3dbe46c7b2f6..01bec41d9e9f 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -8830,6 +8830,14 @@ export interface Locale extends ILocale { * ボタン */ "button": string; + /** + * 動的ブロック + */ + "dynamic": string; + /** + * このブロックは廃止されています。今後は{play}を利用してください。 + */ + "dynamicDescription": ParameterizedString<"play">; /** * ノート埋め込み */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index aa765d13108f..4ba9ea0221b1 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -2331,6 +2331,8 @@ _pages: section: "セクション" image: "画像" button: "ボタン" + dynamic: "動的ブロック" + dynamicDescription: "このブロックは廃止されています。今後は{play}を利用してください。" note: "ノート埋め込み" _note: @@ -2625,4 +2627,3 @@ _mediaControls: pip: "ピクチャインピクチャ" playbackRate: "再生速度" loop: "ループ再生" - \ No newline at end of file diff --git a/packages/frontend/src/components/page/page.block.vue b/packages/frontend/src/components/page/page.block.vue index 164720ac6bd0..c7f72dce8cf4 100644 --- a/packages/frontend/src/components/page/page.block.vue +++ b/packages/frontend/src/components/page/page.block.vue @@ -14,6 +14,7 @@ import XText from './page.text.vue'; import XSection from './page.section.vue'; import XImage from './page.image.vue'; import XNote from './page.note.vue'; +import XDynamic from './page.dynamic.vue'; function getComponent(type: string) { switch (type) { @@ -21,6 +22,20 @@ function getComponent(type: string) { case 'section': return XSection; case 'image': return XImage; case 'note': return XNote; + + // 動的ページの代替用ブロック + case 'button': + case 'if': + case 'textarea': + case 'post': + case 'canvas': + case 'numberInput': + case 'textInput': + case 'switch': + case 'radioButton': + case 'counter': + return XDynamic; + default: return null; } } diff --git a/packages/frontend/src/components/page/page.dynamic.vue b/packages/frontend/src/components/page/page.dynamic.vue new file mode 100644 index 000000000000..8c511a690da4 --- /dev/null +++ b/packages/frontend/src/components/page/page.dynamic.vue @@ -0,0 +1,43 @@ + + + + + + {{ i18n.ts._pages.blocks.dynamic }} + + + Play + + + + + + + + diff --git a/packages/frontend/src/components/page/page.text.vue b/packages/frontend/src/components/page/page.text.vue index 4e501bd6999e..e0c7956f6e34 100644 --- a/packages/frontend/src/components/page/page.text.vue +++ b/packages/frontend/src/components/page/page.text.vue @@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only - +