Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 BasicImage placeholder #7588

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/shared/DropUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
<div v-if="fileSizeFailed" class="help is-danger">
{{ $t('tooltip.failedMaxSize') }}
</div>
</transition>
<transition name="fade">
<div v-if="checkFailed" class="help is-danger">
{{ $t('tooltip.needToUploadNFTFile') }}
</div>
Expand Down
6 changes: 4 additions & 2 deletions components/shared/view/BasicImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
<figure class="image-wrapper image is-1by1" :class="customClass">
<transition name="fade">
<img
v-if="loaded"
v-if="imageSrc"
:src="imageSrc || placeholder"
:alt="alt"
:class="['has-ratio', { 'is-rounded': rounded }]"
@load="onImageLoad"
@error="onImageError" />
<slot v-else name="placeholder">
</transition>
<transition name="fade">
<slot v-if="!loaded" name="placeholder">
<NeoSkeleton full-size no-margin :circle="rounded" />
</slot>
</transition>
Expand Down