|
146 | 146 | </q-card-section> |
147 | 147 | <q-card-section class="text-h4 text-weight-bolder q-pt-none" |
148 | 148 | :class="$q.dark.isActive ? 'dark_text' : 'text-grey-8'"> |
| 149 | + |
149 | 150 | <!-- £ --> |
150 | 151 |
|
151 | 152 | <span v-if="balance_toggle">{{ formatSatoshis(balance) }} sats <i |
|
226 | 227 | </div> |
227 | 228 | <div class="col-12 q-mt-sm"> |
228 | 229 |
|
229 | | - |
230 | 230 | <JsonExcel |
231 | 231 | :data="transactions" |
232 | 232 | :fields="json_fields" class="float-right" |
|
261 | 261 | row-key="id" |
262 | 262 | :filter="filter" |
263 | 263 | > |
| 264 | + <!-- Updated body-cell-memo Template --> |
264 | 265 | <template v-slot:body-cell-memo="props"> |
265 | 266 | <q-td :props="props" class="truncate-chip-labels"> |
266 | | - <q-chip dense :dark="false" class="q-px-sm" color="primary" text-color="white" :label="props.value"> |
| 267 | + <q-chip dense :dark="false" class="q-px-sm whitespace-nowrap" color="primary" text-color="white" :label="props.value"> |
267 | 268 | <q-tooltip> |
268 | 269 | {{ props.value }} |
269 | 270 | </q-tooltip> |
|
275 | 276 | <q-list dense> |
276 | 277 | <div class="text-body1 text-white q-pa-sm">Comments</div> |
277 | 278 | <q-separator color="white"/> |
278 | | - <q-item clickable v-for="comment in props.row['extra']['comment']" :key="comment.id"> |
279 | | - <q-item-section class="text-left text-body2 text-white ellipsis-3-lines"> |
280 | | - <div> |
281 | | - <q-avatar size="15px"> |
282 | | - <q-icon name="circle"/> |
283 | | - </q-avatar> |
284 | | - {{ comment }} |
285 | | - </div> |
286 | | - </q-item-section> |
287 | | - <q-item-section side> |
288 | | - <q-icon color="white" size="20px" name="content_copy" @click="copyToClipboard(comment)" class="cursor-pointer"/> |
289 | | - </q-item-section> |
290 | | - </q-item> |
| 279 | + <!-- Check if comment is an array --> |
| 280 | + <div v-if="Array.isArray(props.row['extra']['comment'])"> |
| 281 | + <q-item clickable v-for="(comment, index) in props.row['extra']['comment']" :key="index"> |
| 282 | + <q-item-section class="text-left text-body2 text-white ellipsis-3-lines whitespace-nowrap"> |
| 283 | + <div class="flex items-center"> |
| 284 | + <q-avatar size="15px"> |
| 285 | + <q-icon name="circle"/> |
| 286 | + </q-avatar> |
| 287 | + <span class="ml-2">{{ comment }}</span> |
| 288 | + </div> |
| 289 | + </q-item-section> |
| 290 | + <q-item-section side> |
| 291 | + <q-icon color="white" size="20px" name="content_copy" @click="copyToClipboard(comment)" class="cursor-pointer"/> |
| 292 | + </q-item-section> |
| 293 | + </q-item> |
| 294 | + </div> |
| 295 | + <!-- If comment is a string --> |
| 296 | + <div v-else> |
| 297 | + <q-item clickable> |
| 298 | + <q-item-section class="text-left text-body2 text-white ellipsis-3-lines whitespace-nowrap"> |
| 299 | + <div class="flex items-center"> |
| 300 | + <q-avatar size="15px"> |
| 301 | + <q-icon name="circle"/> |
| 302 | + </q-avatar> |
| 303 | + <span class="ml-2">{{ props.row['extra']['comment'] }}</span> |
| 304 | + </div> |
| 305 | + </q-item-section> |
| 306 | + <q-item-section side> |
| 307 | + <q-icon color="white" size="20px" name="content_copy" @click="copyToClipboard(props.row['extra']['comment'])" class="cursor-pointer"/> |
| 308 | + </q-item-section> |
| 309 | + </q-item> |
| 310 | + </div> |
291 | 311 | </q-list> |
292 | 312 | </q-menu> |
293 | 313 | </q-btn> |
294 | 314 | </q-td> |
295 | 315 | </template> |
| 316 | + <!-- End of Updated Template --> |
| 317 | + |
296 | 318 | <template v-slot:body-cell-amount_sats="props"> |
297 | 319 | <q-td :props="props"> |
298 | 320 | <q-icon v-if="props.row['amount'] > 0" name="call_received" color="positive"/> |
@@ -834,7 +856,6 @@ export default defineComponent({ |
834 | 856 | console.error("There was an error fetching the transactions!", error); |
835 | 857 | }); |
836 | 858 |
|
837 | | -
|
838 | 859 | }, |
839 | 860 | exportTable() { |
840 | 861 | const content = [this.columns.map(col => wrapCsvValue(col.label))].concat( |
@@ -1070,4 +1091,16 @@ export default defineComponent({ |
1070 | 1091 | .truncate-chip-labels > .q-chip { |
1071 | 1092 | max-width: 300px |
1072 | 1093 | } |
| 1094 | +.whitespace-nowrap { |
| 1095 | + white-space: nowrap; |
| 1096 | +} |
| 1097 | +.flex { |
| 1098 | + display: flex; |
| 1099 | +} |
| 1100 | +.items-center { |
| 1101 | + align-items: center; |
| 1102 | +} |
| 1103 | +.ml-2 { |
| 1104 | + margin-left: 0.5rem; |
| 1105 | +} |
1073 | 1106 | </style> |
0 commit comments