fix center

This commit is contained in:
Владимир Фёдоров 2026-03-24 16:18:20 +07:00
parent c8dbce1462
commit 9e5c63da5a
3 changed files with 37 additions and 24 deletions

View File

@ -2,6 +2,8 @@
body { body {
overflow: hidden; overflow: hidden;
background-color: black;
scrollbar-width: none;
} }
@font-face { @font-face {
@ -28,3 +30,9 @@ body {
margin: 0 auto; margin: 0 auto;
} }
} }
.center-container {
display: flex;
align-items: center;
justify-content: center;
}

View File

@ -117,22 +117,23 @@ onMounted(() => {
</script> </script>
<template> <template>
<div>
<div class="body-custom">
<GameHeader></GameHeader> <GameHeader></GameHeader>
<GameInputForm v-model="isPlaceFilled" :gameState="gameState" :login="login" :password="password"></GameInputForm> <GameInputForm v-model="isPlaceFilled" :gameState="gameState" :login="login" :password="password"></GameInputForm>
<!-- Действия --> <!-- Qr Код -->
<div class="messages-block" ref="scrollContainer">
<div class="center-block-custom">
<div v-if="!team || !team.actions.length"> <div v-if="!team || !team.actions.length">
<div class="center-message"> <div class="messages-block center-container">
<div class="center-block-custom">
<WelcomeGameBlock :qrurl="qrurl" :team="team.name"></WelcomeGameBlock> <WelcomeGameBlock :qrurl="qrurl" :team="team.name"></WelcomeGameBlock>
</div> </div>
</div> </div>
</div>
<!-- Действия -->
<div v-else> <div v-else>
<div class="messages-block" ref="scrollContainer">
<div class="center-block-custom">
<div v-for="(action, index) in team.actions" :key="action.id"> <div v-for="(action, index) in team.actions" :key="action.id">
<MessageCloud v-model="isPlaceFilled" :action="action" :gameState="gameState" :login="login" <MessageCloud v-model="isPlaceFilled" :action="action" :gameState="gameState" :login="login"
:password="password" :index="index" :count="team.actions.length"></MessageCloud> :password="password" :index="index" :count="team.actions.length"></MessageCloud>
@ -140,15 +141,14 @@ onMounted(() => {
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<style scoped> <style scoped>
.body-custom { .aaa {
font-size: medium; width: 100px;
height: calc(100vh - 100px); height: 2000px;
border: solid 2px red;
} }
.game-input-form-shadow { .game-input-form-shadow {
@ -163,16 +163,16 @@ onMounted(() => {
} }
.messages-block { .messages-block {
top: 95px; top: 90px;
height: calc(100dvh - 100px - 76px); /* height: calc(100dvh - 100px - 76px); */
/* 90px от верхнего края экрана до второго ремня */
/* 100px от верхнего края экрана до края иконки */
/* 76px от нижнего края экрана до края ремня */
height: calc(100dvh - 90px - 76px);
overflow-y: auto; overflow-y: auto;
scrollbar-width: none; scrollbar-width: none;
position: relative; position: relative;
padding: 5px 10px 15px 10px; padding: 15px 10px 15px 10px;
}
.center-message {
height: calc(100dvh - 140px);
} }
.team-name-block { .team-name-block {

View File

@ -16,7 +16,7 @@ const qrOptions = ref<QROptions>({
margin: 1, margin: 1,
color: { color: {
dark: '#303030', dark: '#303030',
light: 'none' light: '#f0f0f0'
} }
}); });
@ -50,6 +50,11 @@ const props = withDefaults(defineProps<Props>(), {})
width: 200px; width: 200px;
} }
.qr-code {
margin: 12px 0;
box-shadow: 0px 3px 15px rgb(98, 98, 98);
}
.team-name { .team-name {
margin: 10px 0; margin: 10px 0;
font-size: 20px; font-size: 20px;