diff --git a/src/lib/components/accounts/AccountShow.svelte b/src/lib/components/accounts/AccountShow.svelte
index 56be7ec..e51f1e3 100644
--- a/src/lib/components/accounts/AccountShow.svelte
+++ b/src/lib/components/accounts/AccountShow.svelte
@@ -385,14 +385,18 @@
/>
{#snippet footer()}
{#if everything}
- Show the current period and overview
{:else}
- Show all transactions without grouping them by date
{/if}
diff --git a/src/lib/components/accounts/AccountsIndex.svelte b/src/lib/components/accounts/AccountsIndex.svelte
index 50bcb00..fcdea2a 100644
--- a/src/lib/components/accounts/AccountsIndex.svelte
+++ b/src/lib/components/accounts/AccountsIndex.svelte
@@ -68,14 +68,19 @@
}
const COLUMNS: Record = {
- active: { key: "active", label: "Is active?" },
+ active: { key: "active", label: "Is active?", wide: true },
activity: { key: "activity", label: "Last activity", wide: true },
balance: { key: "balance", label: "Current balance", num: true },
- difference: { key: "difference", label: "Balance difference", num: true },
- direction: { key: "direction", label: "Liability in/out" },
- due: { key: "due", label: "Amount due", num: true },
+ difference: {
+ key: "difference",
+ label: "Balance difference",
+ num: true,
+ wide: true,
+ },
+ direction: { key: "direction", label: "Liability in/out", wide: true },
+ due: { key: "due", label: "Amount due", num: true, wide: true },
interest: { key: "interest", label: "Interest (period)", wide: true },
- liability: { key: "liability", label: "Type of liability" },
+ liability: { key: "liability", label: "Type of liability", wide: true },
name: { key: "name", label: "Name" },
number: { key: "number", label: "Account number", wide: true },
role: { key: "role", label: "Role", wide: true },
@@ -163,7 +168,14 @@
);
const otherCount = $derived(others.data?.meta.pagination?.total ?? 0);
- const columns = $derived(LAYOUT[type].map((k) => COLUMNS[k]));
+ const numbered = $derived(
+ (accounts.data ?? []).some((item) => formatIban(item.attributes))
+ );
+ const columns = $derived(
+ LAYOUT[type]
+ .filter((k) => k !== "number" || numbered)
+ .map((k) => COLUMNS[k])
+ );
const sortParam = $derived(page.url.searchParams.get("sort") ?? "");
const sortKey = $derived(sortParam.replace("-", "") as Key | "");
const descending = $derived(sortParam.startsWith("-"));
@@ -447,7 +459,9 @@
: "Nothing archived"}
{#if active}
- Create a new {TYPE_ONE[type]}
{/if}
@@ -456,7 +470,7 @@
@@ -518,7 +532,7 @@
>
{#if col.key === "name"}
{a.name}
{/if}
{#snippet footer()}
- Create a new {TYPE_ONE[type]}
{#if failure}
diff --git a/src/lib/components/accounts/Reconcile.svelte b/src/lib/components/accounts/Reconcile.svelte
index c327a7e..eafed91 100644
--- a/src/lib/components/accounts/Reconcile.svelte
+++ b/src/lib/components/accounts/Reconcile.svelte
@@ -361,7 +361,9 @@
{#if a && a.type !== "asset"}
You can only reconcile asset accounts.
- Back to {a.name}
+ Back to {a.name}
{:else}
@@ -512,7 +514,7 @@
The first correction for this account has to be booked in
Firefly's own reconcile page();
+ let width = $state(0);
const stacks = $derived(rows.map((row) => ({ row, ...stack(row, keys) })));
const lo = $derived(Math.min(0, ...stacks.map((s) => s.negative)));
@@ -34,6 +37,14 @@
const span = $derived(hi - lo || 1);
const pos = (value: number) => ((value - lo) / span) * 100;
const total = (s: (typeof stacks)[number]) => s.positive + s.negative;
+ const valueText = (s: (typeof stacks)[number]) =>
+ s.row.note ?? (s.row.format ?? format)(total(s));
+ const wide = $derived(
+ width === 0 ||
+ width >=
+ WIDE_BASE +
+ Math.max(0, ...stacks.map((x) => valueText(x).length)) * CHAR
+ );
function box({ from, to, outer }: Segment, first: boolean) {
const up = to > from;
@@ -70,16 +81,20 @@
}
-
+
{#snippet footer()}
-
Go to your budgets
+
Go to your budgets
{/snippet}
diff --git a/src/lib/components/dashboard/CategoriesChart.svelte b/src/lib/components/dashboard/CategoriesChart.svelte
index 4818cd2..952aea3 100644
--- a/src/lib/components/dashboard/CategoriesChart.svelte
+++ b/src/lib/components/dashboard/CategoriesChart.svelte
@@ -101,7 +101,9 @@
{/if}
{#snippet footer()}
-
Go to your categories
{/snippet}
diff --git a/src/lib/components/dashboard/DebtsBox.svelte b/src/lib/components/dashboard/DebtsBox.svelte
index 3b41f77..e9cce1f 100644
--- a/src/lib/components/dashboard/DebtsBox.svelte
+++ b/src/lib/components/dashboard/DebtsBox.svelte
@@ -95,7 +95,9 @@
{/each}
{#snippet footer()}
- See your liabilities
{/snippet}
diff --git a/src/lib/components/dashboard/InfoBoxes.svelte b/src/lib/components/dashboard/InfoBoxes.svelte
index 6ce800b..4b2f796 100644
--- a/src/lib/components/dashboard/InfoBoxes.svelte
+++ b/src/lib/components/dashboard/InfoBoxes.svelte
@@ -164,7 +164,7 @@
: ""}"
>
diff --git a/src/lib/components/dashboard/InsightBox.svelte b/src/lib/components/dashboard/InsightBox.svelte
index c2bb89d..58a29c6 100644
--- a/src/lib/components/dashboard/InsightBox.svelte
+++ b/src/lib/components/dashboard/InsightBox.svelte
@@ -137,7 +137,9 @@
{/if}
{#snippet footer()}
- See your {kind} accounts
{/snippet}
diff --git a/src/lib/components/dashboard/PiggyBanksBox.svelte b/src/lib/components/dashboard/PiggyBanksBox.svelte
index fa8f1e9..7c7c155 100644
--- a/src/lib/components/dashboard/PiggyBanksBox.svelte
+++ b/src/lib/components/dashboard/PiggyBanksBox.svelte
@@ -62,7 +62,9 @@
{/each}
{#snippet footer()}
- Go to your piggy banks
{/snippet}
diff --git a/src/lib/components/dashboard/SubscriptionsBox.svelte b/src/lib/components/dashboard/SubscriptionsBox.svelte
index b385600..c32fb57 100644
--- a/src/lib/components/dashboard/SubscriptionsBox.svelte
+++ b/src/lib/components/dashboard/SubscriptionsBox.svelte
@@ -149,7 +149,9 @@
{/if}
{#snippet footer()}
- Go to your subscriptions
{/snippet}
diff --git a/src/lib/components/dashboard/data.ts b/src/lib/components/dashboard/data.ts
index 4193b7e..772971e 100644
--- a/src/lib/components/dashboard/data.ts
+++ b/src/lib/components/dashboard/data.ts
@@ -217,5 +217,5 @@ export const accountsQuery = (type: string, start: string, end: string) => ({
});
export function proportional(counts: number[]): string {
- return counts.map((n) => `minmax(0, ${Math.max(2, n)}fr)`).join(" ");
+ return counts.map((n) => `minmax(8rem, ${Math.max(2, n)}fr)`).join(" ");
}
diff --git a/src/routes/layout.css b/src/routes/layout.css
index 3915750..1e8be8b 100644
--- a/src/routes/layout.css
+++ b/src/routes/layout.css
@@ -113,3 +113,7 @@
border-radius: 4px;
box-shadow: inset 0 -1px 0 var(--cladd-outline);
}
+
+.dark .text-brand {
+ color: var(--ff-series-1);
+}