add team name and rm scroll

This commit is contained in:
Владимир Фёдоров 2026-03-01 02:01:01 +07:00
parent 046ebfc62f
commit 4f6a96a49a

View File

@ -26,6 +26,7 @@ type Team = {
actions: Action[]
}
const inputPlace = ref(false)
const login = ref("")
const password = ref("")
const place = ref("")
@ -94,6 +95,7 @@ function getTeam() {
}
function addAction() {
inputPlace.value = true
const placeValue = place.value.trim()
if (placeValue === "") {
place.value = ""
@ -150,7 +152,11 @@ function getGame() {
// Автоматическая прокрутка при изменении items
watch(actions, () => {
if (inputPlace.value === false) {
return
}
scrollToBottom();
inputPlace.value = false
}, { deep: true });
let intervalId = 0
@ -177,19 +183,16 @@ onMounted(() => {
});
});
// function formatText(text: string) {
// return text.replaceAll(' ', ' ')
// }
</script>
<template>
<div class="body-custom">
<!-- <img alt="Вечерний детектив" class="logo-right" src="@/assets/qr-code.svg" width="35" height="35" /> -->
<img alt="Вечерний детектив" class="logo" src="@/assets/logo.png" width="40" height="40" />
<div class="header-block">
Вечерний детектив
<span class="team-name-block text-truncate">{{ team.name }}</span>
</div>
<!-- Форма ввода -->
@ -345,4 +348,22 @@ body {
padding: 0 15px;
cursor: pointer;
}
.team-name-block {
float: right;
padding: 0 20px;
}
.text-truncate {
width: 100px;
text-align: center;
white-space: nowrap; /* Запрещаем перенос текста */
overflow: hidden; /* Обрезаем все, что не помещается */
text-overflow: ellipsis; /* Добавляем троеточие */
padding: 2px 7px;
margin: 0 20px;
background: rgb(40, 69, 87);
border-radius: 4px;
font-size: medium;
}
</style>