From 33dcac86377e91e399947fb60b3f2daad209f584 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Tue, 19 Nov 2024 12:50:57 -0500 Subject: [PATCH 1/4] inital modal popup --- src/App.vue | 13 +- .../edit/fields/helpers/ActionButton.vue | 30 +++ .../panels/edit/modals/HubStubCreateModal.vue | 251 ++++++++++++++++++ src/stores/profile.js | 27 +- 4 files changed, 312 insertions(+), 9 deletions(-) create mode 100644 src/components/panels/edit/modals/HubStubCreateModal.vue diff --git a/src/App.vue b/src/App.vue index 506984af..90c2c812 100644 --- a/src/App.vue +++ b/src/App.vue @@ -10,6 +10,8 @@ import TextMacroModal from "@/components/panels/edit/modals/TextMacroModal.vue"; import NonLatinBulkModal from "@/components/panels/edit/modals/NonLatinBulkModal.vue"; import NonLatinAgentModal from "@/components/panels/edit/modals/NonLatinAgentModal.vue"; import FieldColorsModal from "@/components/panels/edit/modals/FieldColorsModal.vue"; +import HubStubCreateModal from "@/components/panels/edit/modals/HubStubCreateModal.vue"; + @@ -42,7 +44,8 @@ export default { TextMacroModal, NonLatinBulkModal, NonLatinAgentModal, - FieldColorsModal + FieldColorsModal, + HubStubCreateModal }, data() { @@ -57,7 +60,7 @@ export default { ...mapStores(useConfigStore, useProfileStore, usePreferenceStore), // // gives read access to this.count and this.double ...mapState(useProfileStore, ['profilesLoaded', 'showValidateModal','profilesLoaded', 'showPostModal']), - ...mapWritableState(useProfileStore, ['showShelfListingModal']), + ...mapWritableState(useProfileStore, ['showShelfListingModal','showHubStubCreateModal']), ...mapState(usePreferenceStore, ['showPrefModal','catCode']), ...mapWritableState(usePreferenceStore, ['showLoginModal','showScriptshifterConfigModal','showDiacriticConfigModal','showTextMacroModal','showFieldColorsModal']), @@ -160,10 +163,12 @@ export default { - + + - diff --git a/src/components/panels/edit/fields/helpers/ActionButton.vue b/src/components/panels/edit/fields/helpers/ActionButton.vue index e49a46a2..66d46e5d 100644 --- a/src/components/panels/edit/fields/helpers/ActionButton.vue +++ b/src/components/panels/edit/fields/helpers/ActionButton.vue @@ -71,6 +71,7 @@ + + + + + - diff --git a/src/components/panels/edit/modals/ComplexLookupModal.vue b/src/components/panels/edit/modals/ComplexLookupModal.vue index a1266dfa..3f130031 100644 --- a/src/components/panels/edit/modals/ComplexLookupModal.vue +++ b/src/components/panels/edit/modals/ComplexLookupModal.vue @@ -74,6 +74,7 @@ let options = [] // add in the the defaul search ALL of everything possible //options.push({label: 'All', urls:null, processor:null}) + console.log("this.structure.valueConstraint",this.structure.valueConstraint) this.structure.valueConstraint.useValuesFrom.forEach((l)=>{ if (this.lookupConfig[l]){ this.lookupConfig[l].modes.forEach((mode)=>{ diff --git a/src/components/panels/edit/modals/HubStubCreateModal.vue b/src/components/panels/edit/modals/HubStubCreateModal.vue index df9bde64..2fcc17e3 100644 --- a/src/components/panels/edit/modals/HubStubCreateModal.vue +++ b/src/components/panels/edit/modals/HubStubCreateModal.vue @@ -2,16 +2,21 @@ import { usePreferenceStore } from '@/stores/preference' import { useConfigStore } from '@/stores/config' import { useProfileStore } from '@/stores/profile' + import ComplexLookupModal from "@/components/panels/edit/modals/ComplexLookupModal.vue"; import { mapStores, mapState, mapWritableState } from 'pinia' import { VueFinalModal } from 'vue-final-modal' import VueDragResize from 'vue3-drag-resize' + import utilsNetwork from '@/lib/utils_network'; + + export default { components: { VueFinalModal, VueDragResize, + ComplexLookupModal, }, data() { @@ -25,6 +30,15 @@ initalLeft: 400, + hubTitle:"", + hubCreator:null, + hubLang: null, + + langsLookup:[], + + displayModal:false, + + } }, @@ -65,10 +79,11 @@ }, - xxxxx(){ - - // this.profileStore.setBulkLang(nl.ptObj['@guid'],nl.node['@guid'],lang) + setPContributor(value){ + console.log(value) + this.displayModal=false + }, @@ -101,27 +116,18 @@ async mounted() { - - - // window.setTimeout(()=>{ - - - // this.nonLatinAgents = this.profileStore.returnAllNonLatinAgentOptions() - - - // for (let key in this.nonLatinAgents){ - - // if (this.nonLatinScriptAgents[key]){ - // this.localMap[key] = this.nonLatinScriptAgents[key] - // }else{ - // this.localMap[key] = utilsProfile.pickBestNonLatinScriptOption(this.defaultScript, this.nonLatinAgents[key].scripts) - // } - - // } - - - // },100) - + // ask for the url to use from the active profile for the bf:language property then request it and load the results + let useLookupUrl = this.profileStore.returnProfileLookupUrl("bf:language") + let langs = await utilsNetwork.loadSimpleLookup(useLookupUrl) + this.langsLookup=[] + for (let langUri in langs){ + if (langUri != 'metadata'){ + this.langsLookup.push({ + uri:langUri, + label:langs[langUri][0] + }) + } + } } @@ -159,8 +165,19 @@

Create Quick Hub

- + + + + + + + + {{activeHubStubData}} @@ -184,6 +201,17 @@