Skip to content

Commit

Permalink
web/satellite: truncate long bucket names
Browse files Browse the repository at this point in the history
This change restricts the width occupied by long bucket names by
truncating them with ellipsis.

Issue: #6791
Change-Id: I7ed21bed56f25206d2d0183e85ab67de1053af92
  • Loading branch information
wilfred-asomanii authored and Storj Robot committed Mar 15, 2024
1 parent 93b545c commit 43d1311
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions web/satellite/src/components/BucketsDataTable.vue
Expand Up @@ -44,7 +44,7 @@
<template #default>
<img class="mr-3" src="../assets/icon-bucket-tonal.svg" alt="Bucket">
<div class="max-width">
<p class="font-weight-bold text-lowercase white-space">{{ item.name }}</p>
<p class="font-weight-bold text-lowercase text-truncate">{{ item.name }}</p>
</div>
</template>
</v-btn>
Expand Down Expand Up @@ -572,33 +572,22 @@ onBeforeUnmount(() => {

<style scoped lang="scss">
.max-width {
max-width: 500px;
max-width: 300px;
@media screen and (width <= 780px) {
max-width: 450px;
max-width: 400px;
}
@media screen and (width <= 620px) {
max-width: 350px;
max-width: 300px;
}
@media screen and (width <= 490px) {
max-width: 250px;
max-width: 200px;
}
@media screen and (width <= 385px) {
max-width: 185px;
}
}
.white-space {
white-space: break-spaces;
text-align: left;
@media screen and (width <= 780px) {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100px;
}
}
</style>

0 comments on commit 43d1311

Please sign in to comment.