generated from VLADIMIR/template_frontend
update api
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -5,8 +5,8 @@
|
|||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Вечерний детектив</title>
|
<title>Вечерний детектив</title>
|
||||||
<script type="module" crossorigin src="/assets/index-BTOvroZP.js"></script>
|
<script type="module" crossorigin src="/assets/index-B8f5WIAp.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-D7er9zH2.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-CX_1-5F4.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
|||||||
@@ -828,6 +828,7 @@ message GetTeamStoryReq {
|
|||||||
message GetTeamStoryRsp {
|
message GetTeamStoryRsp {
|
||||||
string error = 1;
|
string error = 1;
|
||||||
Story story = 2;
|
Story story = 2;
|
||||||
|
Game game = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
message AddTeamActionReq {
|
message AddTeamActionReq {
|
||||||
|
|||||||
@@ -386,6 +386,7 @@ export type GetTeamStoryReq = {
|
|||||||
export type GetTeamStoryRsp = {
|
export type GetTeamStoryRsp = {
|
||||||
error: string | undefined;
|
error: string | undefined;
|
||||||
story: Story | undefined;
|
story: Story | undefined;
|
||||||
|
game: Game | undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type AddTeamActionReq = {
|
export type AddTeamActionReq = {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getAuthClient } from '@/api/auth_client';
|
import { getAuthClient } from '@/api/auth_client';
|
||||||
import type { Place, Story } from '@/api/generated/crabs/evening_detective_server';
|
import type { Game, Place, Story } from '@/api/generated/crabs/evening_detective_server';
|
||||||
import HeaderMenu from '@/components/HeaderMenu.vue'
|
import HeaderMenu from '@/components/HeaderMenu.vue'
|
||||||
import { NCard, NFlex, NInput, NModal, NSpace, NText, NUpload, NUploadDragger, NAlert, NTag, NButton } from 'naive-ui'
|
import { NCard, NFlex, NInput, NModal, NSpace, NText, NUpload, NUploadDragger, NAlert, NTag, NButton } from 'naive-ui'
|
||||||
import { useMessage } from 'naive-ui';
|
import { useMessage } from 'naive-ui';
|
||||||
@@ -26,6 +26,16 @@ const story = ref<AdvancedStory>({
|
|||||||
places: []
|
places: []
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const game = ref<Game | undefined>({
|
||||||
|
id: undefined,
|
||||||
|
name: undefined,
|
||||||
|
description: undefined,
|
||||||
|
startAt: undefined,
|
||||||
|
status: undefined,
|
||||||
|
scenario: undefined,
|
||||||
|
teams: undefined
|
||||||
|
})
|
||||||
|
|
||||||
const code = ref('')
|
const code = ref('')
|
||||||
|
|
||||||
const isAtBottom = () => {
|
const isAtBottom = () => {
|
||||||
@@ -47,6 +57,8 @@ async function getStory() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
game.value = res.game
|
||||||
|
|
||||||
const wasAtBottom = isAtBottom();
|
const wasAtBottom = isAtBottom();
|
||||||
|
|
||||||
if (wasAtBottom) {
|
if (wasAtBottom) {
|
||||||
|
|||||||
Reference in New Issue
Block a user