Skip to content

Commit

Permalink
Add limit to preview dispaly
Browse files Browse the repository at this point in the history
  • Loading branch information
MBoretto committed Oct 8, 2023
1 parent 3ae7041 commit ddc637d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
<div
class="headline mb-1"
>
{{ cloud_storage_values[akey] }}
{{ limitLength(cloud_storage_values[akey], 35) }}
</div>
<div
class="text-subtitle-2 text-grey"
Expand Down Expand Up @@ -313,6 +313,12 @@ export default {
} else {
return "mdi-text-box";
}
},
limitLength(value, max_length) {
if (value.length <= max_length) {
return value;
}
return value.substring(0, max_length) + "...";
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ButtonDelete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<v-btn
color="red"
icon="mdi-delete-outline"
variant="text"
variant="tonal"
@click="$emit('remove-key')"
/>
</template>
Expand Down
2 changes: 2 additions & 0 deletions src/components/CardGeo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<v-spacer />
<v-btn
size="large"
color="primary"
variant="tonal"
@click="openLink(data.lat, data.lng)"
>
Open Location
Expand Down
2 changes: 2 additions & 0 deletions src/components/CardUrl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<v-spacer />
<v-btn
size="large"
color="primary"
variant="tonal"
@click="openLink(data.value)"
>
Open Link
Expand Down

0 comments on commit ddc637d

Please sign in to comment.