@edgedev/create-edge-app 1.2.31 → 1.2.33
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/edge/components/myProfile.vue +21 -3
- package/package.json +1 -1
- package/pages/app.vue +12 -12
|
@@ -87,6 +87,24 @@ const filteredMetaFields = computed(() => {
|
|
|
87
87
|
return (props.metaFields || []).filter(field => !skipFields.has(field.field))
|
|
88
88
|
})
|
|
89
89
|
|
|
90
|
+
const profilePhotoField = computed(() => {
|
|
91
|
+
return (props.metaFields || []).find(field => field?.field === 'profilephoto') || {}
|
|
92
|
+
})
|
|
93
|
+
|
|
94
|
+
const profilePhotoSite = computed(() => {
|
|
95
|
+
const baseSite = String(profilePhotoField.value?.site || 'system-images').trim() || 'system-images'
|
|
96
|
+
const uid = edgeFirebase?.user?.uid
|
|
97
|
+
if (!uid)
|
|
98
|
+
return baseSite
|
|
99
|
+
return `${baseSite}-${uid}`
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
const profilePhotoTags = computed(() => {
|
|
103
|
+
if (Array.isArray(profilePhotoField.value?.tags) && profilePhotoField.value.tags.length)
|
|
104
|
+
return profilePhotoField.value.tags
|
|
105
|
+
return ['Headshots']
|
|
106
|
+
})
|
|
107
|
+
|
|
90
108
|
const initializeDefaults = (meta) => {
|
|
91
109
|
defaultFields.forEach((field) => {
|
|
92
110
|
if (!(field.field in meta))
|
|
@@ -249,8 +267,8 @@ const menuIcon = computed(() => {
|
|
|
249
267
|
v-model="state.meta.profilephoto"
|
|
250
268
|
label="Profile Photo"
|
|
251
269
|
dialog-title="Select Profile Photo"
|
|
252
|
-
:site="
|
|
253
|
-
:default-tags="
|
|
270
|
+
:site="profilePhotoSite"
|
|
271
|
+
:default-tags="profilePhotoTags"
|
|
254
272
|
height-class="h-full min-h-[180px]"
|
|
255
273
|
:include-cms-all="false"
|
|
256
274
|
/>
|
|
@@ -294,7 +312,7 @@ const menuIcon = computed(() => {
|
|
|
294
312
|
:model-value="getByPath(state.meta, field.field, '')"
|
|
295
313
|
:label="field?.label || 'Photo'"
|
|
296
314
|
:dialog-title="field?.dialogTitle || 'Select Image'"
|
|
297
|
-
:site="field?.site || '
|
|
315
|
+
:site="field?.site || 'system-images'"
|
|
298
316
|
:include-cms-all="false"
|
|
299
317
|
:default-tags="field?.tags || []"
|
|
300
318
|
:height-class="field?.heightClass || 'h-[160px]'"
|
package/package.json
CHANGED
package/pages/app.vue
CHANGED
|
@@ -260,18 +260,18 @@ edgeGlobal.edgeState.userRoles = [
|
|
|
260
260
|
},
|
|
261
261
|
]
|
|
262
262
|
|
|
263
|
-
edgeGlobal.edgeState.menuItems = [
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
]
|
|
263
|
+
// edgeGlobal.edgeState.menuItems = [
|
|
264
|
+
// {
|
|
265
|
+
// title: 'Dashboard',
|
|
266
|
+
// to: '/app/dashboard/things',
|
|
267
|
+
// icon: 'LayoutDashboard',
|
|
268
|
+
// },
|
|
269
|
+
// {
|
|
270
|
+
// title: 'Sub Things',
|
|
271
|
+
// to: '/app/dashboard/subthings',
|
|
272
|
+
// icon: 'Package',
|
|
273
|
+
// },
|
|
274
|
+
// ]
|
|
275
275
|
</script>
|
|
276
276
|
|
|
277
277
|
<template>
|