An online poker tracker for PokerTH (https://pokerth.net). Continuation of https://github.com/Pik-9/PokerTH-Tracker https://finda.fish
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

128 lines
3.0 KiB

<template>
<v-app>
<v-navigation-drawer v-model="menuOpen" app>
<v-list dense rounded>
<v-list-item :to="($auth.loggedIn ? '/detailed' : '/overview')">
<v-list-item-content>
<v-list-item-title>{{ $t('nav-overview') }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-list-item to="/submit">
<v-list-item-content>
<v-list-item-title>{{ $t('submit-files') }}</v-list-item-title>
</v-list-item-content>
</v-list-item>
<v-subheader>{{ $t('nav-player') }}</v-subheader>
<v-list-item
v-for="player in knownPlayers"
:key="player.name"
:to="generatePath(player.name)"
nuxt
color="secondary"
>
<v-list-item-content>
<v-list-item-title v-text="player.name" />
</v-list-item-content>
<v-list-item-action>
<v-list-item-action-text v-text="player.observedHands" />
</v-list-item-action>
</v-list-item>
</v-list>
</v-navigation-drawer>
<v-app-bar app dark color="primary">
<v-app-bar-nav-icon @click="menuOpen = !menuOpen" />
<v-spacer />
<v-toolbar-title>finda.fish</v-toolbar-title>
<v-spacer />
<LanguageSwitcher />
<v-btn icon @click="$vuetify.theme.dark = !$vuetify.theme.dark">
<v-icon>
{{ $vuetify.theme.dark ? 'mdi-weather-sunny' : 'mdi-weather-night' }}
</v-icon>
</v-btn>
</v-app-bar>
<v-main>
<nuxt />
</v-main>
<v-footer dark padless>
<v-toolbar dense color="primary">
<v-icon>mdi-copyright</v-icon>
{{ new Date().getFullYear() }} - Daniel Steinhauer
<v-spacer />
<div class="hidden-xs-only">
v{{version}}
</div>
<v-spacer />
<v-btn class="hidden-sm-and-down" text href="https://www.gnu.org/licenses/agpl-3.0.en.html">
<v-icon>mdi-open-source-initiative</v-icon>
AGPL v 3
</v-btn>
<v-spacer />
<v-btn text href="https://codeberg.org/Pik-9/finda.fish">
<v-icon>mdi-git</v-icon>
{{ $t('foot-fork') }}
</v-btn>
</v-toolbar>
</v-footer>
</v-app>
</template>
<script>
import LanguageSwitcher from '@/components/language-switcher.vue';
export default {
name: 'default',
components: {
LanguageSwitcher,
},
methods: {
generatePath(username) {
return `/profile/${username}`;
},
},
data() {
return {
menuOpen: false,
version: '0.0.0',
};
},
computed: {
knownPlayers() {
return this.$store.state.playerList;
},
},
mounted() {
// Get the player list initially.
this.$store.dispatch('updatePlayerList');
// Activate the dark theme at night, deactivate it during daylight.
const now = new Date();
this.$vuetify.theme.dark = !((now.getHours() < 21) && (now.getHours() > 5));
},
async fetch() {
this.version = this.$nuxt.context.$config.version;
},
};
</script>