feat(transactions): notes folded under rows, i shows them all
This commit is contained in:
1 parent
0ace2919aa
commit
4e774f5104
2 files changed
+53
-6
No files matched your search
+14
-4
@@ -1,14 +1,24 @@
|
||||
const SIDEBAR_KEY = "ffui.sidebar.collapsed";
|
||||
const NOTES_KEY = "ffui.notes.shown";
|
||||
|
||||
function stored(key: string): boolean {
|
||||
return (
|
||||
typeof localStorage !== "undefined" && localStorage.getItem(key) === "1"
|
||||
);
|
||||
}
|
||||
|
||||
class Ui {
|
||||
palette = $state(false);
|
||||
paletteQuery = $state("");
|
||||
quickEntry = $state(false);
|
||||
mobileNav = $state(false);
|
||||
collapsed = $state(
|
||||
typeof localStorage !== "undefined" &&
|
||||
localStorage.getItem(SIDEBAR_KEY) === "1"
|
||||
);
|
||||
collapsed = $state(stored(SIDEBAR_KEY));
|
||||
notes = $state(stored(NOTES_KEY));
|
||||
|
||||
toggleNotes() {
|
||||
this.notes = !this.notes;
|
||||
localStorage.setItem(NOTES_KEY, this.notes ? "1" : "0");
|
||||
}
|
||||
|
||||
openPalette(query = "") {
|
||||
this.paletteQuery = query;
|
||||
|
||||
Reference in new issue
Block a user