-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from krazkidd:share-scoreboard
Share scoreboard proof of concept
- Loading branch information
Showing
15 changed files
with
478 additions
and
137 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
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
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
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,52 @@ | ||
<script setup lang="ts"> | ||
import { scoreboardMenuItem } from '~~/nav'; | ||
import type { ID, Team } from '~~/types'; | ||
const props = defineProps<{ | ||
teamId: ID | ||
team: Team | ||
}>(); | ||
const buttonPassThroughOptions = { | ||
label: { | ||
class: 'hidden' | ||
} | ||
}; | ||
const isDialogVisible = ref(false); | ||
</script> | ||
|
||
|
||
<template> | ||
<Button | ||
@click="isDialogVisible = true" | ||
icon="pi pi-fw pi-share-alt" | ||
severity="secondary" | ||
text | ||
rounded | ||
aria-label="Share" | ||
title="Share" | ||
:pt="buttonPassThroughOptions" | ||
/> | ||
|
||
<Dialog | ||
v-model:visible="isDialogVisible" | ||
modal | ||
:header="`${team.name}'s Scoreboard`" | ||
:pt="{ | ||
root: { class: 'w-full md:w-3/4 xl:w-1/2' }, | ||
content: { class: 'pt-1' } | ||
}" | ||
> | ||
<RouterLink :to="scoreboardMenuItem.to!" v-slot="{ href, route, navigate, isActive, isExactActive }" custom> | ||
<a :href="href.concat('/', props.teamId)" v-bind="props.action" @click="navigate" class="block"> | ||
<VueQrcode | ||
:value="`href.concat('/', props.teamId)`" | ||
type="image/png" | ||
:color="{ dark: '#000000ff', light: '#ffffffff' }" | ||
class="block mx-auto" | ||
/> | ||
</a> | ||
</RouterLink> | ||
</Dialog> | ||
</template> |
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,30 @@ | ||
import type { MatcherLocationAsPath } from "#vue-router"; | ||
import type { MenuItem } from "primevue/menuitem"; | ||
|
||
export const homeMenuItem: MenuItem = { | ||
key: 'home', | ||
label: 'Home', | ||
icon: 'pi pi-fw pi-home', | ||
//TODO deprecated | ||
to: { path: '/' } as MatcherLocationAsPath | ||
}; | ||
export const lineupMenuItem: MenuItem = { | ||
key: 'lineup', | ||
label: 'Lineup', | ||
icon: 'pi pi-fw pi-user-edit', | ||
//TODO deprecated | ||
to: { path: '/lineup' } as MatcherLocationAsPath | ||
}; | ||
export const scoreboardMenuItem: MenuItem = { | ||
key: 'scoreboard', | ||
label: 'Scoreboard', | ||
icon: 'pi pi-fw pi-play', | ||
//TODO deprecated | ||
to: { path: '/scoreboard' } as MatcherLocationAsPath | ||
}; | ||
|
||
export const navMenuItems: MenuItem[] = [ | ||
homeMenuItem, | ||
lineupMenuItem, | ||
scoreboardMenuItem, | ||
]; |
Oops, something went wrong.