diff --git a/package.json b/package.json index d09b95d4..d9df876c 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "dev:prepare": "nuxt-module-build build --stub src/module && nuxt-module-build prepare src/module && nuxi prepare playground/docus", "release": "pnpm run lint && pnpm run test && pnpm run prepack && changelogen --release && npm publish && git push --follow-tags", "lint": "eslint .", - "typecheck": "nuxt typecheck", + "typecheck": "nuxt typecheck && vue-tsc -p src/app/tsconfig.app.json", "verify": "pnpm run lint && pnpm run typecheck && pnpm run test", "test": "vitest run", "test:watch": "vitest watch", diff --git a/src/app/src/app.vue b/src/app/src/app.vue index c69f0195..1d3571c1 100644 --- a/src/app/src/app.vue +++ b/src/app/src/app.vue @@ -33,13 +33,13 @@ function detectActiveDocuments() { } async function editContentFile(id: string) { - await context.activeTree.value.selectItemById(id) + await context.activeTree.value.selectItemByFsPath(id) ui.open() } async function open() { await router.push(`/${location.value.feature}`) - await context.activeTree.value.selectItemById(location.value.itemId) + await context.activeTree.value.selectItemByFsPath(location.value.fsPath) ui.open() } diff --git a/src/app/src/components/AppFooter.vue b/src/app/src/components/AppFooter.vue index f2773eaa..ee598e13 100644 --- a/src/app/src/components/AppFooter.vue +++ b/src/app/src/components/AppFooter.vue @@ -7,12 +7,12 @@ const { ui, host, git } = useStudio() const { preferences, updatePreference, unsetActiveLocation } = useStudioState() const user = host.user.get() -const showTechnicalMode = computed({ - get: () => preferences.value.showTechnicalMode, - set: (value) => { - updatePreference('showTechnicalMode', value) - }, -}) +// const showTechnicalMode = computed({ +// get: () => preferences.value.showTechnicalMode, +// set: (value) => { +// updatePreference('showTechnicalMode', value) +// }, +// }) const repositoryUrl = computed(() => git.getBranchUrl()) const userMenuItems = computed(() => [ @@ -55,7 +55,7 @@ function closeStudio() { :items="userMenuItems" :ui="{ content: 'w-full' }" > - diff --git a/src/app/src/components/header/HeaderMain.vue b/src/app/src/components/header/HeaderMain.vue index d9b38cab..9c73b51f 100644 --- a/src/app/src/components/header/HeaderMain.vue +++ b/src/app/src/components/header/HeaderMain.vue @@ -29,7 +29,7 @@ const current = computed({ await router.push({ name }) const currentItem = context.activeTree.value.currentItem.value - setLocation(name, currentItem?.id) + setLocation(name, currentItem.fsPath) // Ensure root item status is up to date when navigating by selecting computed if (currentItem.type === 'root') { diff --git a/src/app/src/components/header/HeaderReview.vue b/src/app/src/components/header/HeaderReview.vue index 7c425aa1..24b15739 100644 --- a/src/app/src/components/header/HeaderReview.vue +++ b/src/app/src/components/header/HeaderReview.vue @@ -78,7 +78,7 @@ async function publishChanges() { async function backToEditor() { router.push(`/${location.value.feature}`) - await context.activeTree.value.selectItemById(location.value.itemId) + await context.activeTree.value.selectItemByFsPath(location.value.fsPath) } // eslint-disable-next-line @typescript-eslint/ban-ts-comment diff --git a/src/app/src/components/media/MediaImageEditor.vue b/src/app/src/components/media/MediaImageEditor.vue index 2139afc2..8392f651 100644 --- a/src/app/src/components/media/MediaImageEditor.vue +++ b/src/app/src/components/media/MediaImageEditor.vue @@ -117,7 +117,7 @@ const githubPath = computed(() => {
- +
(() => { if (!isOneStepAction) { if (props.item.type === 'directory' && [StudioItemActionId.CreateDocument, StudioItemActionId.CreateDocumentFolder, StudioItemActionId.CreateMediaFolder].includes(action.id)) { // Navigate into folder before adding form creation - context.activeTree.value.selectItemById(props.item.id) + context.activeTree.value.selectItemByFsPath(props.item.fsPath) } action.handler!(props.item) diff --git a/src/app/src/components/shared/item/ItemActionsToolbar.vue b/src/app/src/components/shared/item/ItemActionsToolbar.vue index 0dc61168..8efd06c7 100644 --- a/src/app/src/components/shared/item/ItemActionsToolbar.vue +++ b/src/app/src/components/shared/item/ItemActionsToolbar.vue @@ -84,7 +84,7 @@ const actionHandler = (action: StudioAction & { isPending?: if (!action.isOneStepAction) { if (action.id === StudioItemActionId.RenameItem) { // Navigate to parent since rename form is displayed in the parent tree - context.activeTree.value.selectParentById(targetItem.id) + context.activeTree.value.selectParentByFsPath(targetItem.fsPath) } action.handler!(targetItem) @@ -138,8 +138,8 @@ onUnmounted(() => { :icon="action.icon" :disabled="action.disabled" size="sm" - :color="action.color" - :variant="action.variant" + :color="action.color as never" + :variant="action.variant as never" :loading="action.isLoading" @click="actionHandler(action, $event)" /> diff --git a/src/app/src/components/shared/item/ItemBadge.vue b/src/app/src/components/shared/item/ItemBadge.vue index a183a054..2ccb1cf4 100644 --- a/src/app/src/components/shared/item/ItemBadge.vue +++ b/src/app/src/components/shared/item/ItemBadge.vue @@ -13,7 +13,7 @@ defineProps({