Skip to content

Commit

Permalink
Change loading spinners
Browse files Browse the repository at this point in the history
  • Loading branch information
LucHeart committed Sep 27, 2023
1 parent 99b4f44 commit 7809171
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 33 deletions.
24 changes: 24 additions & 0 deletions src/assets/images/Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions src/assets/images/IconLoadingSpin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/views/dashboard/shockers/own/Own.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<i class="fa-solid fa-plus"></i>
</div>

<loading v-if="loadingShockers"/>

<b-container>
<b-row v-for="item in ownShockers" :key="item.id">
<device :device="item"></device>
Expand Down Expand Up @@ -95,6 +97,7 @@ export default {
components: {Loading, Device},
data() {
return {
loadingShockers: true,
ownShockers: [],
devices: [],
modelOptions: [
Expand Down Expand Up @@ -193,6 +196,8 @@ export default {
}
});
});
this.loadingShockers = false;
},
async loadDevices() {
this.devicesLoading = true;
Expand Down
36 changes: 3 additions & 33 deletions src/views/utils/Loading.vue
Original file line number Diff line number Diff line change
@@ -1,46 +1,16 @@
<template>
<svg class="checkmark" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 52 52">
<circle class="checkmark__circle" cx="26" cy="26" r="25" fill="none"/>
</svg>
<img class="loading" src="@/assets/images/IconLoadingSpin.svg">
</template>

<script>
export default {
name: "Loading"
}
export default { }
</script>

<style scoped lang="scss">
.checkmark__circle {
stroke-dasharray: 166;
stroke-width: 2;
stroke-miterlimit: 10;
stroke: var(--color);
fill: none;
animation: stroke 0.6s infinite;
transform-origin: center;
animation-timing-function: linear;
stroke-dashoffset: 130;
}
.checkmark {
--color: #7ac142;
.loading {
width: 100px;
height: 100px;
border-radius: 50%;
display: block;
stroke-width: 2;
stroke: #fff;
stroke-miterlimit: 10;
margin: 10% auto;
box-shadow: inset 0 0 0 var(--color);
}
@keyframes stroke {
100% {
transform: rotate(360deg);
}
}
</style>

0 comments on commit 7809171

Please sign in to comment.