Skip to content

Commit

Permalink
Merge pull request #151 from karlomikus/develop
Browse files Browse the repository at this point in the history
Add loader to rating
  • Loading branch information
karlomikus authored Dec 29, 2023
2 parents 9c4ea27 + 69d08bb commit e518475
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v2.6.1
## Fixes
- Added missing loader on rating

# v2.6.0
## New
- Bar Assistant now has a new cloud offering and homepage: [barassistant.app](https://barassistant.app)
Expand Down
22 changes: 17 additions & 5 deletions src/components/OverlayLoader.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
<script setup>
import SaltRimSpinner from './SaltRimSpinner.vue'
</script>

<template>
<div class="overlay-loader">
<SaltRimSpinner :size="50" />
<SaltRimSpinner :size="size" />
</div>
</template>

<script>
import SaltRimSpinner from './SaltRimSpinner.vue'
export default {
components: {
SaltRimSpinner,
},
props: {
size: {
type: Number,
default: 50
}
}
}
</script>

<style scope>
.overlay-loader {
--ol-clr-bg: rgba(255, 255, 255, 0.7);
Expand Down
5 changes: 5 additions & 0 deletions src/components/RatingActions.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<template>
<div class="rating">
<OverlayLoader v-if="isLoading" :size="25" />
<a v-for="val in max" :key="val" href="#" :class="{'is-rated': val <= currentRating}" @click.prevent="rate(val)"></a>
</div>
</template>

<script>
import ApiRequests from './../ApiRequests.js'
import OverlayLoader from './OverlayLoader.vue'
export default {
props: {
Expand All @@ -22,6 +24,9 @@ export default {
default: 'cocktail'
}
},
components: {
OverlayLoader,
},
data() {
return {
isLoading: false,
Expand Down

0 comments on commit e518475

Please sign in to comment.