mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
fix(web): long artist name overflow + textarea resize artifact
- Player.vue: wrap artist text in a span with ellipsis. The previous text node sat directly inside the flex `.song-artist` container with no overflow handling, so a long author name expanded the container past its 240px parent and broke the bottom Player bar layout. Also add `min-width: 0 + overflow: hidden` to `.song-info` and `.song-artist`, and a `:title` attribute for the full text on hover. - Settings.vue: change `resize: vertical` on the cookie textareas to `resize: none`. The browser's resize grip rendered as a stray black triangle at the bottom-right corner in dark theme, and dragging it caused visual artifacts on the right edge. The textareas keep their `rows="3"` default height. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d2bad58aa8
commit
35210cf570
2 files changed
+15
-3
No files matched your search
@@ -27,10 +27,10 @@
|
|||||||
<div class="player-left" @click="toggleLyrics">
|
<div class="player-left" @click="toggleLyrics">
|
||||||
<CoverArt :url="currentSong.coverUrl" :size="40" />
|
<CoverArt :url="currentSong.coverUrl" :size="40" />
|
||||||
<div class="song-info">
|
<div class="song-info">
|
||||||
<div class="song-name">{{ currentSong.name }}</div>
|
<div class="song-name" :title="currentSong.name">{{ currentSong.name }}</div>
|
||||||
<div class="song-artist">
|
<div class="song-artist">
|
||||||
<span v-if="showBotBadge" class="bot-badge">{{ activeBot?.name }}</span>
|
<span v-if="showBotBadge" class="bot-badge">{{ activeBot?.name }}</span>
|
||||||
{{ currentSong.artist }}
|
<span class="artist-name" :title="currentSong.artist">{{ currentSong.artist }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -310,6 +310,8 @@ function cycleMode() {
|
|||||||
|
|
||||||
.song-info {
|
.song-info {
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.song-name {
|
.song-name {
|
||||||
@@ -326,6 +328,16 @@ function cycleMode() {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.artist-name {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
min-width: 0;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bot-badge {
|
.bot-badge {
|
||||||
|
|||||||
@@ -1483,7 +1483,7 @@ onUnmounted(() => {
|
|||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
outline: none;
|
outline: none;
|
||||||
resize: vertical;
|
resize: none;
|
||||||
&:focus { border-color: var(--color-primary); }
|
&:focus { border-color: var(--color-primary); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user