diff options
author | vnugent <public@vaughnnugent.com> | 2023-08-27 22:28:34 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-08-27 22:28:34 -0400 |
commit | afdeeb686f3aa022bec19084a337e233c622b4e3 (patch) | |
tree | f781d4b60e149244e58b58b44715a9a83c9d1fc1 /front-end/src/views/Blog | |
parent | 51a65e9196f35393817ba94721503afdfa76fb60 (diff) |
pre backend update client performance bufs and fixes
Diffstat (limited to 'front-end/src/views/Blog')
-rw-r--r-- | front-end/src/views/Blog/ckeditor/Editor.vue | 4 | ||||
-rw-r--r-- | front-end/src/views/Blog/form-helpers/channels.ts | 3 | ||||
-rw-r--r-- | front-end/src/views/Blog/index.vue | 16 |
3 files changed, 15 insertions, 8 deletions
diff --git a/front-end/src/views/Blog/ckeditor/Editor.vue b/front-end/src/views/Blog/ckeditor/Editor.vue index ee16742..3cd9a8c 100644 --- a/front-end/src/views/Blog/ckeditor/Editor.vue +++ b/front-end/src/views/Blog/ckeditor/Editor.vue @@ -112,7 +112,7 @@ const recoverMd = () => { mdBuffer.value = md; } -tryOnMounted(() => +tryOnMounted(() => defer(() => //Load the editor once the component is mounted apiCall(async ({ toaster }) => { @@ -142,7 +142,7 @@ tryOnMounted(() => //Call initial load hook defer(() => emit('load', editor)); }) -) +)) </script> diff --git a/front-end/src/views/Blog/form-helpers/channels.ts b/front-end/src/views/Blog/form-helpers/channels.ts index cd33a20..7b98d4e 100644 --- a/front-end/src/views/Blog/form-helpers/channels.ts +++ b/front-end/src/views/Blog/form-helpers/channels.ts @@ -16,6 +16,7 @@ import { MaybeRef, computed, watch, Ref } from 'vue' import { helpers, required, maxLength, numeric } from "@vuelidate/validators" import { useVuelidateWrapper } from '@vnuge/vnlib.browser'; +import { defer } from 'lodash-es' import { BlogChannel, ChannelFeed } from '@vnuge/cmnext-admin'; import useVuelidate from "@vuelidate/core" @@ -203,7 +204,7 @@ export const getChannelForm = (editMode?: Ref<boolean>) => { watch(v$, updateExample); - updateExample(); + defer(() => updateExample()); const { validate } = useVuelidateWrapper(v$); return { v$, validate, reset: v$.value.$reset }; diff --git a/front-end/src/views/Blog/index.vue b/front-end/src/views/Blog/index.vue index b5fa0d4..5d2d8cc 100644 --- a/front-end/src/views/Blog/index.vue +++ b/front-end/src/views/Blog/index.vue @@ -125,10 +125,12 @@ import Content from './components/Content.vue'; usePageGuard(); useTitle('CMNext Admin') -//Load scripts -const ckEditorTag = useScriptTag("https://cdn.ckeditor.com/ckeditor5/35.4.0/super-build/ckeditor.js") -//Store the wait result on the window for the editor script to wait -window.editorLoadResult = ckEditorTag.load(true); +if(!window.CKEDITOR){ + //Load scripts + const ckEditorTag = useScriptTag("https://cdn.ckeditor.com/ckeditor5/35.4.0/super-build/ckeditor.js") + //Store the wait result on the window for the editor script to wait + window.editorLoadResult = ckEditorTag.load(true); +} const { userName, getProfile } = useUser() @@ -241,7 +243,7 @@ const onTabChange = (id:number) => tabIdQ.value = id.toString(10) } &:disabled{ - @apply text-rose-400 border-transparent; + @apply text-rose-400; } } @@ -258,6 +260,10 @@ const onTabChange = (id:number) => tabIdQ.value = id.toString(10) .dynamic-form.input-label{ @apply col-span-2 text-right m-auto mr-2; } + + .dynamic-form.dynamic-input.input:disabled + .dynamic-form.field-description { + @apply hidden; + } } } |