Skip to content

Commit

Permalink
Remove LoadingBar (it was ugly)
Browse files Browse the repository at this point in the history
  • Loading branch information
sitegui committed Jan 5, 2024
1 parent 9c3ad4a commit b7cb3d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 18 deletions.
9 changes: 0 additions & 9 deletions src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
} from 'firebase/firestore'
import type { Ref } from 'vue'
import { ref } from 'vue'
import { LoadingBar, Notify } from 'quasar'
import { notifyError } from '@/helpers'

/**
Expand Down Expand Up @@ -53,7 +52,6 @@ export class Database {
}

reloadGames() {
LoadingBar.start()
this.games.value = []

this._getGames()
Expand All @@ -63,13 +61,9 @@ export class Database {
.catch((error) => {
notifyError(error)
})
.finally(() => {
LoadingBar.stop()
})
}

reloadTranslations() {
LoadingBar.start()
this.translations.value = {
categories: new Map(),
mechanics: new Map()
Expand All @@ -82,9 +76,6 @@ export class Database {
.catch((error) => {
notifyError(error)
})
.finally(() => {
LoadingBar.stop()
})
}

/**
Expand Down
12 changes: 3 additions & 9 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import 'quasar/src/css/index.sass'

import App from './App.vue'
import { createApp, type Ref, ref, watch } from 'vue'
import { LoadingBar, Notify, Quasar } from 'quasar'
import { Notify, Quasar } from 'quasar'
import quasarLang from 'quasar/lang/fr'
import { Database } from '@/database'
import router from '@/router'
Expand All @@ -17,14 +17,8 @@ const app = createApp(App)

app.use(router)
app.use(Quasar, {
plugins: { Notify, LoadingBar },
lang: quasarLang,
config: {
loadingBar: {
size: '10px',
color: 'accent'
}
}
plugins: { Notify },
lang: quasarLang
})

const firebaseConfig = {
Expand Down
4 changes: 4 additions & 0 deletions src/views/SuggestView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ function addFavoriteGame(game: Game): void {
</q-card>
</div>

<div class="text-center" v-if="games.length === 0">
<q-spinner color="primary" size="5em" />
</div>

<div class="q-ma-md" v-if="suggestionResults">
<q-banner class="bg-secondary text-white" v-if="!suggestionResults.length">
Aucun résultat n'a été trouvé. Essaye de changer les critères de la recherche
Expand Down

0 comments on commit b7cb3d5

Please sign in to comment.