feat: localizable dialog title for enter section title (#14401)

* feat: localizable dialog title for enter section title

* refactor: define `getPageBlockList` in separated file and import instead of provide/inject
This commit is contained in:
anatawa12
2024-08-16 21:47:44 +09:00
committed by GitHub
parent 6db3c50e32
commit 748a7e8f6a
5 changed files with 23 additions and 13 deletions

View File

@@ -29,6 +29,7 @@ import * as os from '@/os.js';
import { i18n } from '@/i18n.js';
import { deepClone } from '@/scripts/clone.js';
import MkButton from '@/components/MkButton.vue';
import { getPageBlockList } from '@/pages/page-editor/common.js';
const XBlocks = defineAsyncComponent(() => import('../page-editor.blocks.vue'));
@@ -53,11 +54,9 @@ watch(children, () => {
deep: true,
});
const getPageBlockList = inject<(any) => any>('getPageBlockList');
async function rename() {
const { canceled, result: title } = await os.inputText({
title: 'Enter title',
title: i18n.ts._pages.enterSectionTitle,
default: props.modelValue.title,
});
if (canceled) return;