Skip to content

Commit

Permalink
fix text short property collision
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicBlueberry committed Oct 8, 2024
1 parent ec7433e commit 4fe0d94
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions client/src/components/ActivityBar/ActivityItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ function onClick(evt: MouseEvent): void {
.activity-item {
display: flex;
flex-direction: column;
&:deep(.variant-danger) {
color: $brand-danger;
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Common/TextShort.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const props = withDefaults(defineProps<Props>(), {
maxLength: 24,
});
const text = computed(() => {
const trimmedText = computed(() => {
if (props.text.length > props.maxLength) {
const partialText = props.text.slice(0, props.maxLength);
return `${partialText}...`;
Expand All @@ -22,6 +22,6 @@ const text = computed(() => {

<template>
<span class="text-break text-center">
{{ text }}
{{ trimmedText }}
</span>
</template>

0 comments on commit 4fe0d94

Please sign in to comment.