feat: provide and consume scroll offsets

This commit is contained in:
Paul Makles
2021-12-30 18:15:31 +00:00
parent 52d4de001d
commit ac9d175298
17 changed files with 113 additions and 97 deletions

View File

@@ -138,6 +138,16 @@ export default class Layout implements Store, Persistent<Data> {
return this.lastHomePath;
}
/**
* Get the last path the user had open.
* @returns Last path
*/
@computed getLastPath() {
return this.lastSection === "home"
? this.lastHomePath
: this.getLastOpened(this.lastSection);
}
/**
* Set the current path open in the home tab.
* @param path Pathname