Skip to content

Commit

Permalink
Happy logo spinner (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
femans authored Oct 29, 2022
1 parent 4572018 commit e52085e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/components/detailViewComponents/ImageDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import getResourceURL from "@/helpers/resourceURL";
import GenericDetail from "@/components/detailViewComponents/GenericDetail.vue";
import { useBlurExplicit } from "@/composables/BlurExplicitImagesComposable";
import ImageSpinner from "@/components/shared/imageSpinner.vue";
const { blurExplicit } = useBlurExplicit();
</script>

Expand All @@ -22,9 +23,7 @@ const { blurExplicit } = useBlurExplicit();
:class="{ blurExplicit: blurExplicit(file) }"
>
<template #placeholder>
<v-row class="fill-height ma-0" align="center" justify="center">
<v-progress-circular indeterminate color="ipfsPrimary" />
</v-row>
<image-spinner />
</template>
<NsfwTooltip :file="file" />
</v-img>
Expand Down
3 changes: 2 additions & 1 deletion src/components/searchViewComponents/BaseList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { batchSize, maxPages } from "@/helpers/ApiHelper";
import { useDisplay } from "vuetify";
import { useStore } from "vuex";
const store = useStore();
import ImageSpinner from "@/components/shared/imageSpinner.vue";
const route = useRoute();
const { smAndDown, smAndUp } = useDisplay();
Expand Down Expand Up @@ -183,7 +184,7 @@ const queryPage = computed({
</v-row>

<v-row v-if="loading" dense justify="center">
<v-progress-circular color="ipfsPrimary" indeterminate />
<image-spinner />
</v-row>
<!-- PAGINATION -->
<!-- TODO: pagination panel falls behind social media bar without margin-bottom -->
Expand Down
5 changes: 2 additions & 3 deletions src/components/searchViewComponents/ImageList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import TileList from "@/components/searchViewComponents/TileList.vue";
import { imports } from "@/composables/useFileListComposable";
import { useBlurExplicit } from "@/composables/BlurExplicitImagesComposable";
import { Types } from "@/helpers/typeHelper";
import ImageSpinner from "@/components/shared/imageSpinner.vue";
const fileType = Types.images;
Expand All @@ -26,9 +27,7 @@ const { blurExplicit } = useBlurExplicit();
:data-nsfw="hit.nsfw"
class="rounded grey lighten-2"
>
<template #placeholder>
<v-row class="fill-height ma-0" align="center" justify="center"> </v-row>
</template>
<template #placeholder> <image-spinner /></template>
<NsfwTooltip :file="hit" />
</v-img>
</hover-card>
Expand Down
19 changes: 19 additions & 0 deletions src/components/shared/imageSpinner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<template>
<v-row class="fill-height ma-0" align="center" justify="center">
<v-img class="spinner" src="/assets/logo-hexagon-black.png" />
</v-row>
</template>

<style scoped>
.spinner {
width: 50%;
height: 50%;
max-width: 120px;
animation: spin 4s linear infinite;
}
@keyframes spin {
100% {
transform: rotate(360deg);
}
}
</style>

0 comments on commit e52085e

Please sign in to comment.