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[] actions: Action[]
} }
const inputPlace = ref(false)
const login = ref("") const login = ref("")
const password = ref("") const password = ref("")
const place = ref("") const place = ref("")
@ -94,6 +95,7 @@ function getTeam() {
} }
function addAction() { function addAction() {
inputPlace.value = true
const placeValue = place.value.trim() const placeValue = place.value.trim()
if (placeValue === "") { if (placeValue === "") {
place.value = "" place.value = ""
@ -150,7 +152,11 @@ function getGame() {
// Автоматическая прокрутка при изменении items // Автоматическая прокрутка при изменении items
watch(actions, () => { watch(actions, () => {
if (inputPlace.value === false) {
return
}
scrollToBottom(); scrollToBottom();
inputPlace.value = false
}, { deep: true }); }, { deep: true });
let intervalId = 0 let intervalId = 0
@ -177,19 +183,16 @@ onMounted(() => {
}); });
}); });
// function formatText(text: string) {
// return text.replaceAll(' ', ' ')
// }
</script> </script>
<template> <template>
<div class="body-custom"> <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" /> <img alt="Вечерний детектив" class="logo" src="@/assets/logo.png" width="40" height="40" />
<div class="header-block"> <div class="header-block">
Вечерний детектив Вечерний детектив
<span class="team-name-block text-truncate">{{ team.name }}</span>
</div> </div>
<!-- Форма ввода --> <!-- Форма ввода -->
@ -345,4 +348,22 @@ body {
padding: 0 15px; padding: 0 15px;
cursor: pointer; 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> </style>