added the app name in the document title and fixed the double initial load on records list

This commit is contained in:
Gani Georgiev
2022-07-18 19:44:10 +03:00
parent f8f3ca25ee
commit f56adf26f4
21 changed files with 458 additions and 437 deletions
+10 -4
View File
@@ -7,6 +7,7 @@
} from "@/stores/collections";
import CommonHelper from "@/utils/CommonHelper";
import tooltip from "@/actions/tooltip";
import { pageTitle } from "@/stores/app";
import Searchbar from "@/components/base/Searchbar.svelte";
import RefreshButton from "@/components/base/RefreshButton.svelte";
import CollectionsSidebar from "@/components/collections/CollectionsSidebar.svelte";
@@ -17,6 +18,8 @@
const queryParams = CommonHelper.getQueryParams(window.location?.href);
$pageTitle = "Collections";
let collectionUpsertPanel;
let collectionDocsPanel;
let recordPanel;
@@ -29,9 +32,7 @@
// reset filter and sort on collection change
$: if ($activeCollection?.id && selectedCollectionId != $activeCollection.id) {
selectedCollectionId = $activeCollection.id;
sort = "-created";
filter = "";
reset();
}
// keep the url params in sync
@@ -43,7 +44,11 @@
});
}
CommonHelper.setDocumentTitle("Collections");
function reset() {
selectedCollectionId = $activeCollection.id;
sort = "-created";
filter = "";
}
loadCollections(selectedCollectionId);
</script>
@@ -123,6 +128,7 @@
{/if}
<CollectionUpsertPanel bind:this={collectionUpsertPanel} />
<CollectionDocsPanel bind:this={collectionDocsPanel} />
<RecordUpsertPanel