diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index a8a5cbafd1..5d85819d54 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1915,6 +1915,12 @@ pages: text: "タイトル" default: "デフォルト値" + counter: "カウンター" + _counter: + name: "変数名" + text: "タイトル" + inc: "増加値" + _button: text: "タイトル" action: "ボタンを押したときの動作" diff --git a/src/client/app/common/scripts/collect-page-vars.ts b/src/client/app/common/scripts/collect-page-vars.ts index 683f9b73a5..4c40d5d88e 100644 --- a/src/client/app/common/scripts/collect-page-vars.ts +++ b/src/client/app/common/scripts/collect-page-vars.ts @@ -26,6 +26,12 @@ export function collectPageVars(content) { type: 'boolean', value: x.default || false }); + } else if (x.type === 'counter') { + pageVars.push({ + name: x.name, + type: 'number', + value: 0 + }); } else if (x.children) { collect(x.children); } diff --git a/src/client/app/common/views/components/page-editor/els/page-editor.el.button.vue b/src/client/app/common/views/components/page-editor/els/page-editor.el.button.vue index 3e2d3fe19d..f89279f05a 100644 --- a/src/client/app/common/views/components/page-editor/els/page-editor.el.button.vue +++ b/src/client/app/common/views/components/page-editor/els/page-editor.el.button.vue @@ -1,5 +1,5 @@