fix(shell): return to the saved page before the period takes the url
This commit is contained in:
1 parent
9e89829bae
commit
189a455308
3 files changed
+9
-8
No files matched your search
@@ -30,12 +30,12 @@
|
|||||||
path / /home /accounts /budgets /categories /tags
|
path / /home /accounts /budgets /categories /tags
|
||||||
path /bills /subscriptions /piggy-banks /groups /reports /search
|
path /bills /subscriptions /piggy-banks /groups /reports /search
|
||||||
path /currencies /exchange-rates /attachments /preferences /export /administrations
|
path /currencies /exchange-rates /attachments /preferences /export /administrations
|
||||||
path /recurring /webhooks/index /settings/links /accounts/* /inactive-accounts/* /transactions/*
|
path /recurring /webhooks/index /settings/links /settings/links/create /accounts/* /inactive-accounts/*
|
||||||
path /budgets/* /categories/* /tags/* /bills/* /subscriptions/* /piggy-banks/*
|
path /transactions/* /budgets/* /categories/* /tags/* /bills/* /subscriptions/*
|
||||||
path /groups/* /reports/* /currencies/* /exchange-rates/* /attachments/* /administrations/*
|
path /piggy-banks/* /groups/* /reports/* /currencies/* /exchange-rates/* /attachments/*
|
||||||
path /recurring/show/* /webhooks/show/* /settings/links/show/*
|
path /administrations/* /recurring/show/* /webhooks/show/* /settings/links/show/* /settings/links/edit/*
|
||||||
not path /accounts/reconcile/* /attachments/download/* /attachments/view/* /transactions/convert/* /transactions/debug/* /transactions/link/*
|
not path /attachments/download/* /attachments/view/* /transactions/convert/* /transactions/debug/* /transactions/link/* /transactions/mass/*
|
||||||
not path /transactions/mass/* /transactions/bulk/* /transactions/show-by-journal/* /piggy-banks/add/* /piggy-banks/remove/* /reports/options/*
|
not path /transactions/bulk/* /transactions/show-by-journal/* /piggy-banks/add/* /piggy-banks/remove/* /reports/options/*
|
||||||
not expression `{query.ffui} in ["off", "old"] || ({cookie.ffui} == "off" && {query.ffui} != "on")`
|
not expression `{query.ffui} in ["off", "old"] || ({cookie.ffui} == "off" && {query.ffui} != "on")`
|
||||||
}
|
}
|
||||||
handle @ffui_pages {
|
handle @ffui_pages {
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ class Period {
|
|||||||
const range = rangeFromUrl(url) ?? stored() ?? periodOf(today(), view);
|
const range = rangeFromUrl(url) ?? stored() ?? periodOf(today(), view);
|
||||||
this.start = range.start;
|
this.start = range.start;
|
||||||
this.end = range.end;
|
this.end = range.end;
|
||||||
|
localStorage.setItem(STORAGE_KEY, JSON.stringify(range));
|
||||||
this.ready = true;
|
this.ready = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,11 @@
|
|||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
try {
|
try {
|
||||||
const back = await session.boot();
|
const back = await session.boot();
|
||||||
period.init(session.viewRange, page.url);
|
|
||||||
period.loadFirst().catch(() => undefined);
|
|
||||||
if (back) {
|
if (back) {
|
||||||
await goto(back, { replace: true });
|
await goto(back, { replace: true });
|
||||||
}
|
}
|
||||||
|
period.init(session.viewRange, page.url);
|
||||||
|
period.loadFirst().catch(() => undefined);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
session.failed = error instanceof Error ? error.message : String(error);
|
session.failed = error instanceof Error ? error.message : String(error);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user