From 53071bb69f5d21b35b8a61c2b1dd18832ce781d4 Mon Sep 17 00:00:00 2001 From: Anders Betts Date: Wed, 23 Sep 2026 09:13:17 +0200 Subject: tui: aligned voucher detail, up/down between vouchers, list sorting The detail pads every column by display width, blanks zero amounts and shows row texts and a Summa line. Up/Down step to the previous/next voucher in the list order; 's' cycles the list sort (number or date, ascending or descending, saved in tui.conf). The list fetches all pages of voucher.list instead of stopping at 200. Co-Authored-By: Claude Opus 5.5 --- clients/bokftui.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'clients/bokftui.c') diff --git a/clients/bokftui.c b/clients/bokftui.c index 69d6690..867e63e 100644 --- a/clients/bokftui.c +++ b/clients/bokftui.c @@ -20,6 +20,7 @@ #include "version.h" #include "yyjson.h" #include "ui.h" +#include "vlist.h" /* Screen names for ^R restoration and --screen. Only the top-level views; sub-screens unwind to their parent. */ @@ -149,6 +150,8 @@ static void config_load(struct app *a) else if (strcmp(line, "attachment_dir") == 0 && !a->attachment_dir[0]) snprintf(a->attachment_dir, sizeof a->attachment_dir, "%s", val); + else if (strcmp(line, "voucher_sort") == 0) + a->voucher_sort = vlist_sort_parse(val); } fclose(f); } @@ -166,6 +169,8 @@ void config_save(struct app *a) fprintf(f, "user=%s\n", a->username); if (a->attachment_dir[0]) fprintf(f, "attachment_dir=%s\n", a->attachment_dir); + if (a->voucher_sort != VSORT_NUMBER) + fprintf(f, "voucher_sort=%s\n", vlist_sort_name(a->voucher_sort)); fclose(f); chmod(path, 0600); } -- cgit v1.3