Skip to content

Commit

Permalink
fix: display batch details in correct columns (#322)
Browse files Browse the repository at this point in the history
# What ❔

Move all Batch commit, prove and execute tx hashes into the same column

## Why ❔

Closes #66 

## Checklist

- [x] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [x] Tests for the changes have been added / updated.
- [x] Documentation comments have been added / updated.

## Evidence

Large screen

![image](https://github.com/user-attachments/assets/e625f785-52d1-4d5d-b493-7070933413d7)

Small screen

![image](https://github.com/user-attachments/assets/8e99897e-ac18-4e83-9db6-64b1fa739fcc)
  • Loading branch information
MexicanAce authored Nov 21, 2024
1 parent 9dca4b2 commit c5550ad
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions packages/app/src/components/batches/InfoTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import useContext from "@/composables/useContext";
import type { BatchDetails } from "@/composables/useBatch";
import type { Component, PropType } from "vue";
import { arrayHalfDivider } from "@/utils/helpers";
const { t } = useI18n();
const { width: screenWidth } = useWindowSize();
const { currentNetwork } = useContext();
Expand Down Expand Up @@ -50,19 +48,20 @@ const tableInfoItems = computed(() => {
url?: string;
};
let tableItems: InfoTableItem[] = [
const tableItemsLeft: InfoTableItem[] = [
{
label: t("batches.index"),
tooltip: t("batches.indexTooltip"),
value: props.batchNumber,
},
];
const tableItemsRight: InfoTableItem[] = [];
if (!props.batch) {
return [tableItems];
return [tableItemsLeft];
}
tableItems.push(
tableItemsLeft.push(
{
label: t("batches.size"),
tooltip: t("batches.sizeTooltip"),
Expand All @@ -87,7 +86,7 @@ const tableInfoItems = computed(() => {
["executeTxHash", "executedAt", "notYetExecuted"],
] as [keyof BatchDetails, keyof BatchDetails, string][]) {
if (props.batch[key]) {
tableItems.push(
tableItemsRight.push(
{
label: t(`batches.${key}`),
tooltip: t(`batches.${key}Tooltip`),
Expand All @@ -108,10 +107,10 @@ const tableInfoItems = computed(() => {
}
if (screenWidth.value < 1024) {
return [tableItems];
return [tableItemsLeft.concat(tableItemsRight)];
}
return arrayHalfDivider(tableItems);
return [tableItemsLeft, tableItemsRight];
});
</script>

Expand Down

0 comments on commit c5550ad

Please sign in to comment.