Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide tx data overflow and allow line-wrap #785

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/components/transaction/DataFormat.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineComponent({
const transferData = computed(() => actionData.value as TransferData);
const clientHeight = computed(() => dataBox.value?.clientHeight ?? 0);
let currentData = ref<string | unknown>(null);
const maxHeight = 98; // the maximum row height
const maxHeight = 130; // the maximum row height
const switchHeight = 20;
const maxHeightStyle = `calc(${maxHeight}px - ${switchHeight}px)`;

Expand Down Expand Up @@ -108,10 +108,10 @@ export default defineComponent({

<template>
<div
class="relative-position"
class="relative-position overflow-hidden"
:class="{'div-compressed': !showOverflow}"
>
<div v-if="actionName === 'transfer'" ref="dataBox" class="row">
<div v-if="actionName === 'transfer'" ref="dataBox" class="row transfer-data">
<div class="col-12">
<span class="text-bold">
<AccountFormat :account="transferData.from" type="account"/></span><span class="text-bold">&nbsp; → &nbsp;
Expand Down Expand Up @@ -157,6 +157,9 @@ export default defineComponent({
gap: 5px
word-break: break-all

.transfer-data
text-wrap: wrap

.div-compressed
max-height: v-bind(maxHeightStyle)

Expand Down
Loading