generated from VLADIMIR/template_frontend
up
This commit is contained in:
@@ -39,7 +39,6 @@ import type {
|
||||
TeamResult,
|
||||
Ticket,
|
||||
} from '@/api/generated/crabs/evening_detective_server'
|
||||
import { getURL } from '@/api/generated/crabs/evening_detective_server/client'
|
||||
import GameMapPanel from '@/components/GameMapPanel.vue'
|
||||
import GameScreensPanel from '@/components/GameScreensPanel.vue'
|
||||
import GameTeamsPanel from '@/components/GameTeamsPanel.vue'
|
||||
@@ -499,7 +498,9 @@ async function deleteGame() {
|
||||
}
|
||||
|
||||
function getTeamStoryURL(id: number, password: string): string {
|
||||
return getURL() + '/team-story/' + id + '?password=' + password
|
||||
const url = new URL(`/team-story/${id}`, window.location.origin)
|
||||
url.searchParams.set('password', password)
|
||||
return url.toString()
|
||||
}
|
||||
|
||||
function openTeamQR(team: Team) {
|
||||
|
||||
@@ -11,10 +11,10 @@ defineProps<{
|
||||
|
||||
const emit = defineEmits<{
|
||||
add: []
|
||||
openQR: [team: Team]
|
||||
'open-qr': [team: Team]
|
||||
preview: [id: number, password: string]
|
||||
delete: [team: Team]
|
||||
giveApplication: [team: Team, application: Application]
|
||||
'give-application': [team: Team, application: Application]
|
||||
}>()
|
||||
</script>
|
||||
|
||||
@@ -47,7 +47,7 @@ const emit = defineEmits<{
|
||||
</div>
|
||||
</div>
|
||||
<n-flex justify="end">
|
||||
<n-button v-if="team.participationStatus !== 'cancelled'" @click="emit('openQR', team)"
|
||||
<n-button v-if="team.participationStatus !== 'cancelled'" @click="emit('open-qr', team)"
|
||||
>QR</n-button
|
||||
>
|
||||
<n-button
|
||||
@@ -62,7 +62,7 @@ const emit = defineEmits<{
|
||||
v-for="application in team.applications"
|
||||
:key="application.name"
|
||||
class="link-button"
|
||||
@click="emit('giveApplication', team, application)"
|
||||
@click="emit('give-application', team, application)"
|
||||
>
|
||||
Выдать: {{ application.name }}
|
||||
</n-button>
|
||||
|
||||
Reference in New Issue
Block a user