-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/history' into develop
- Loading branch information
Showing
9 changed files
with
307 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<template> | ||
<div>History</div> | ||
<div class="flex flex-row justify-center gap-2"> | ||
<button @click="setGraph = 'total'">Total</button> | ||
<button @click="setGraph = 'table'">Table</button> | ||
<button @click="setGraph = 'cumulative'">cumulative</button> | ||
</div> | ||
<container | ||
class="grid grid-cols-[56px_1fr] overflow-y-auto max-h-[300px]" | ||
v-if="setGraph == 'table'" | ||
> | ||
<div class="font-semibold"> | ||
<div class="firstLine">Round</div> | ||
<div v-for="(item, index) in store.getRoundNumber" :key="index"> | ||
{{ item }} | ||
</div> | ||
</div> | ||
<div class="overflow-x-scroll"> | ||
<div class="flex flex-row gap-2 alternateBlue"> | ||
<div v-for="(player, playerId) in store.userList" :key="playerId" class="w-32"> | ||
<div class="font-semibold firstLine">{{ player.name }}</div> | ||
<div v-for="roundIScore in player.scorePerRound"> | ||
{{ roundIScore }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</container> | ||
<historychart :graph-type="<graphType><unknown>setGraph"></historychart> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useScoreStore } from "./store"; | ||
import container from "../../components/container.vue"; | ||
import historychart, { Props as graphType } from "./historychart.vue"; | ||
import { ref } from "vue"; | ||
const setGraph = ref<"total" | "cumulative" | "table" | undefined>("total"); | ||
const store = useScoreStore(); | ||
</script> | ||
|
||
<style scoped> | ||
.alternateBlue > :nth-child(even) { | ||
@apply bg-blue-400 text-white px-2; | ||
} | ||
.firstLine { | ||
/* @apply bg-blue-500 text-white px-2 font-semibold; */ | ||
/* @apply sticky top-0; */ | ||
} | ||
</style> |
Oops, something went wrong.