mirror of
https://github.com/frappe/books.git
synced 2024-11-08 14:50:56 +00:00
fix(ux): documentation path
- remove unnecessary injects
This commit is contained in:
parent
e1920bd55e
commit
440419b367
@ -112,6 +112,8 @@ import FormHeader from 'src/components/FormHeader.vue';
|
||||
import StatusBadge from 'src/components/StatusBadge.vue';
|
||||
import { handleErrorWithDialog } from 'src/errorHandling';
|
||||
import { getErrorMessage } from 'src/utils';
|
||||
import { docsPathMap } from 'src/utils/misc';
|
||||
import { docsPathRef, focusedDocsRef } from 'src/utils/refs';
|
||||
import { ActionGroup, UIGroupedFields } from 'src/utils/types';
|
||||
import {
|
||||
getFieldsGroupedByTabAndSection,
|
||||
@ -155,8 +157,17 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
await this.setDoc();
|
||||
focusedDocsRef.add(this.docOrNull);
|
||||
this.updateGroupedFields();
|
||||
},
|
||||
activated(): void {
|
||||
docsPathRef.value = docsPathMap[this.schemaName] ?? '';
|
||||
focusedDocsRef.add(this.docOrNull);
|
||||
},
|
||||
deactivated(): void {
|
||||
docsPathRef.value = '';
|
||||
focusedDocsRef.add(this.docOrNull);
|
||||
},
|
||||
computed: {
|
||||
hasDoc(): boolean {
|
||||
return !!this.docOrNull;
|
||||
|
@ -338,7 +338,6 @@ export default {
|
||||
LinkedEntryWidget,
|
||||
Barcode,
|
||||
},
|
||||
inject: ['shortcuts'],
|
||||
provide() {
|
||||
return {
|
||||
schemaName: this.schemaName,
|
||||
|
@ -132,7 +132,6 @@ export default {
|
||||
DropdownWithActions,
|
||||
},
|
||||
emits: ['close'],
|
||||
inject: ['shortcuts'],
|
||||
provide() {
|
||||
return {
|
||||
schemaName: this.schemaName,
|
||||
|
@ -80,6 +80,8 @@ import { handleErrorWithDialog } from 'src/errorHandling';
|
||||
import { getErrorMessage } from 'src/utils';
|
||||
import { evaluateHidden } from 'src/utils/doc';
|
||||
import { reloadWindow } from 'src/utils/ipcCalls';
|
||||
import { docsPathMap } from 'src/utils/misc';
|
||||
import { docsPathRef } from 'src/utils/refs';
|
||||
import { UIGroupedFields } from 'src/utils/types';
|
||||
import { showToast } from 'src/utils/ui';
|
||||
import { computed, defineComponent, nextTick } from 'vue';
|
||||
@ -113,6 +115,12 @@ export default defineComponent({
|
||||
|
||||
this.update();
|
||||
},
|
||||
activated(): void {
|
||||
docsPathRef.value = docsPathMap.Settings ?? '';
|
||||
},
|
||||
deactivated(): void {
|
||||
docsPathRef.value = '';
|
||||
},
|
||||
methods: {
|
||||
async sync(): Promise<void> {
|
||||
const syncableDocs = this.schemas
|
||||
|
Loading…
Reference in New Issue
Block a user