viewer: click to copy values, amounts, and identifiers
Company details (EIN, state number, address, every profile value), an entry's number and amount, an account's code and balance, a document's file name and SHA-256 copy on click: a pointer and copy icon on hover, a check for a moment after. Amounts copy as their exact plain decimal (fmt::plain: no "$", commas, or parentheses; "-" for negatives); where a click already drills down (report cells, register and transaction rows, general ledger lines), a right-click menu copies the amounts, the entry number, or the description. The sidebar's chain check copies the journal head and data folder. tests/copy.rs: every display style copies back to the exact value (property), and clicking the EIN, an entry's amount, and its number puts exactly that on the clipboard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GWVo7x3UHw5kwCUaWxiejX
This commit is contained in:
1 parent
c126843ce1
commit
afd427a023
10 files changed
+344
-17
No files matched your search
@@ -675,12 +675,23 @@ fn live_status(ui: &mut Ui, b: &Books, since_update: f64, live: bool) {
|
||||
} else {
|
||||
(icon::WARNING_CIRCLE, p.negative)
|
||||
};
|
||||
ui.label(
|
||||
RichText::new(format!("{glyph} {text}"))
|
||||
.font(theme::regular(11.5))
|
||||
.color(color),
|
||||
)
|
||||
.on_hover_text(tip);
|
||||
let r = ui
|
||||
.label(
|
||||
RichText::new(format!("{glyph} {text}"))
|
||||
.font(theme::regular(11.5))
|
||||
.color(color),
|
||||
)
|
||||
.on_hover_text(tip);
|
||||
if text == "Journal chain verified" {
|
||||
r.context_menu(|ui| {
|
||||
crate::widgets::copy_item(ui, "Copy journal head", &b.head);
|
||||
crate::widgets::copy_item(
|
||||
ui,
|
||||
"Copy data folder",
|
||||
&b.data_dir.display().to_string(),
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user