From afdeeb686f3aa022bec19084a337e233c622b4e3 Mon Sep 17 00:00:00 2001 From: vnugent Date: Sun, 27 Aug 2023 22:28:34 -0400 Subject: pre backend update client performance bufs and fixes --- front-end/src/views/Blog/ckeditor/Editor.vue | 4 +-- front-end/src/views/Blog/form-helpers/channels.ts | 3 +- front-end/src/views/Blog/index.vue | 16 ++++++--- front-end/src/views/Login/components/Social.vue | 12 +++---- front-end/src/views/Login/index.vue | 41 ++++++++++++----------- front-end/src/views/Login/pki/index.vue | 22 +++--------- front-end/src/views/Login/social/[type].vue | 2 +- 7 files changed, 48 insertions(+), 52 deletions(-) (limited to 'front-end/src/views') 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)); }) -) +)) 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) => { 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; + } } } diff --git a/front-end/src/views/Login/components/Social.vue b/front-end/src/views/Login/components/Social.vue index 6eb65e7..5824226 100644 --- a/front-end/src/views/Login/components/Social.vue +++ b/front-end/src/views/Login/components/Social.vue @@ -17,18 +17,18 @@