@mixd-id/web-scaffold 0.1.240411098 → 0.1.240411100

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.240411098",
4
+ "version": "0.1.240411100",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -15,6 +15,7 @@
15
15
  :preset-key="presetKey"
16
16
  :use-assistant="useAssistant"
17
17
  :use-sharing="useSharing"
18
+ :sharing-key="sharingKey"
18
19
  @apply="load">
19
20
 
20
21
  <template #toolbar>
@@ -276,6 +277,7 @@ export default{
276
277
  config: Object,
277
278
  defaultConfig: Function,
278
279
  presetKey: String,
280
+ sharingKey: String,
279
281
  subscribeKey: String,
280
282
  controller: String,
281
283
  title: String,
@@ -50,7 +50,10 @@
50
50
  </ContextMenu>
51
51
  </div>
52
52
 
53
- <div class="flex-1 overflow-y-auto p-2 pt-5">
53
+ <div v-if="loadingState === 1" class="flex-1 flex items-center justify-center">
54
+ <svg class="animate-spin aspect-square w-[24px] h-[24px]" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path></svg>
55
+ </div>
56
+ <div v-else class="flex-1 overflow-y-auto p-2 pt-5">
54
57
  <TreeView v-model="items">
55
58
 
56
59
  <template #item="{ item }">
@@ -615,6 +618,7 @@ const items = ref([])
615
618
  const env = ref([])
616
619
 
617
620
  const isSending = ref(false)
621
+ const loadingState = ref(1)
618
622
 
619
623
  const envEdit = useTemplateRef('envEdit')
620
624
  const workspaceEdit = useTemplateRef('workspaceEdit')
@@ -1102,6 +1106,7 @@ function load(){
1102
1106
  workspaces.value = res.workspaces || []
1103
1107
  env.value = res.env || []
1104
1108
  })
1109
+ .finally(_ => loadingState.value = 0)
1105
1110
  }
1106
1111
 
1107
1112
  async function saveWorkspace(workspace) {
@@ -646,6 +646,8 @@ export default{
646
646
 
647
647
  presetKey: String,
648
648
 
649
+ sharingKey: String,
650
+
649
651
  enumCache: Object,
650
652
 
651
653
  useAssistant: {
@@ -672,7 +674,7 @@ export default{
672
674
  addSharing(item) {
673
675
  const obj = {
674
676
  ...item,
675
- key: this.presetKey,
677
+ key: this.sharingKey ?? this.presetKey,
676
678
  presetUid: this.preset.uid
677
679
  }
678
680