diff --git a/src/components/CGallery/CGallery.scss b/src/components/CGallery/CGallery.scss index 9c9a074e..0e7557e9 100755 --- a/src/components/CGallery/CGallery.scss +++ b/src/components/CGallery/CGallery.scss @@ -42,14 +42,24 @@ $grayshadow: #555; width: 100%; max-width: 300px; min-width: 200px; - padding: 1rem 1rem; + padding: 0.5rem 0.5rem; height: 350px; margin: auto; } +.my-card-gallery-noModif { + width: 100%; + max-width: 300px; + min-width: 200px; + padding: 1rem 1rem; + height: 220px; +} + + + .my-card-gallery-view { width: 100px; height: 100px; - padding: 0.5rem 0.5rem; + padding: 0.25rem 0.25rem; margin: auto; } diff --git a/src/components/CGallery/CGallery.ts b/src/components/CGallery/CGallery.ts index b6c91a78..f9934792 100755 --- a/src/components/CGallery/CGallery.ts +++ b/src/components/CGallery/CGallery.ts @@ -19,6 +19,11 @@ export default defineComponent({ type: Boolean, required: true, }, + isInModif: { + type: Boolean, + required: false, + default: false, + }, single: { type: Boolean, required: false, @@ -29,6 +34,11 @@ export default defineComponent({ type: String, required: true, }, + imagebak: { + type: String, + required: false, + default: '', + }, imgGall: { type: Object as PropType, required: true, @@ -184,7 +194,7 @@ export default defineComponent({ } function getclass() { - return (props.edit || displayGall.value) ? 'my-card-gallery' : 'my-card-gallery-view' + ' text-center' + return (props.edit || displayGall.value) ? (props.isInModif ? 'my-card-gallery' : 'my-card-gallery-noModif') : 'my-card-gallery-view' + ' text-center' } function getclimg() { @@ -247,7 +257,12 @@ export default defineComponent({ } function getfullname(rec: any) { - return costanti.DIR_UPLOAD + props.directory + '/' + rec.imagefile + if (rec) { + return costanti.DIR_UPLOAD + props.directory + '/' + rec.imagefile + } else { + return props.imagebak + } + } function copytoclipboard(rec: any) { diff --git a/src/components/CGallery/CGallery.vue b/src/components/CGallery/CGallery.vue index 92d15568..a5fe0014 100755 --- a/src/components/CGallery/CGallery.vue +++ b/src/components/CGallery/CGallery.vue @@ -1,8 +1,9 @@