Skip to content

Commit

Permalink
Merge branch 'main' into feat/gameplay
Browse files Browse the repository at this point in the history
  • Loading branch information
Likqez authored Dec 10, 2024
2 parents a7f8cba + 90ff040 commit 7026f84
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion layouts/HeaderFooterView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="w-full xl:w-1/2 2xl:w-1/4 flex flex-col h-full">

<!-- Header -->
<div class="h-1/6 border rounded-b-3xl">
<div class="bg-yellow-500 h-1/6 border rounded-b-3xl">
<div class="flex justify-around items-center h-full">
<slot name="header" />
</div>
Expand Down
34 changes: 23 additions & 11 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,41 @@ import HeaderFooterView from "~/layouts/HeaderFooterView.vue";
import {UserViewType} from "@/types/components/users.view"
import {useGame} from "@/composables/useGames";
useUser().fetchUser(); // loading user state just in case
const { user } = useUser()
useUser().fetchUser(); // loading user state just in case
const {games, loading, error, fetchGames} = useGame();

Check failure on line 9 in pages/index.vue

View workflow job for this annotation

GitHub Actions / eslint

'loading' is assigned a value but never used. Allowed unused vars must match /^_/u

Check failure on line 9 in pages/index.vue

View workflow job for this annotation

GitHub Actions / eslint

'error' is assigned a value but never used. Allowed unused vars must match /^_/u

Check failure on line 9 in pages/index.vue

View workflow job for this annotation

GitHub Actions / eslint

'loading' is assigned a value but never used. Allowed unused vars must match /^_/u

Check failure on line 9 in pages/index.vue

View workflow job for this annotation

GitHub Actions / eslint

'error' is assigned a value but never used. Allowed unused vars must match /^_/u
onMounted(() => {
fetchGames();
});
function setLevelbar(newValue: number) {

Check failure on line 15 in pages/index.vue

View workflow job for this annotation

GitHub Actions / eslint

'setLevelbar' is defined but never used. Allowed unused vars must match /^_/u

Check failure on line 15 in pages/index.vue

View workflow job for this annotation

GitHub Actions / eslint

'setLevelbar' is defined but never used. Allowed unused vars must match /^_/u
const levelbar = document.getElementById('levelbar')
if (levelbar) {
levelbar.style.width = newValue + "%"
}
}
</script>

<template>
<div class="bg-gradient-to-b from-indigo-500 to-purple-500">
<HeaderFooterView>
<template #header>
<div>
1A
<div class="m-3 w-full flex items-center justify-center">
<Icon name="mdi:fire" class="text-red-600 text-4xl mr-2" />
<p class="text-xl font-bold">Streak: {{ user?.daily_streak }}</p>
</div>
<div>
2B
</div>
<div>
3C
<div class="m-3 w-full flex items-center justify-center">
<Icon name="mdi:star" class="text-red-600 text-5xl mr-2" />
<div class="w-full bg-gray-700 rounded-full h-2.5">
<div id="levelbar" class="bg-red-600 h-2.5 rounded-full" style="width: 50%" />
</div>
</div>


</template>
<template #content>
<div class="flex flex-col h-full p-3">
Expand All @@ -36,13 +48,13 @@ onMounted(() => {
</template>
<template #footer>
<NuxtLink to="/playlists" class="inline-flex items-center text-5xl rounded-xl">
<Icon name="mdi:album" class=""/>
<Icon name="mdi:album" class="" />
</NuxtLink>
<NuxtLink to="/" class="inline-flex items-center text-6xl rounded-full p-1.5">
<Icon name="mdi:home" class="text-white"/>
<Icon name="mdi:home" class="text-white" />
</NuxtLink>
<NuxtLink to="/profile" class="inline-flex items-center text-5xl rounded-xl">
<Icon name="mdi:account-details" class=""/>
<Icon name="mdi:account-details" class="" />
</NuxtLink>
</template>
</HeaderFooterView>
Expand Down

0 comments on commit 7026f84

Please sign in to comment.