updated jsvm types and removed unused helper

This commit is contained in:
Gani Georgiev
2023-10-14 19:14:18 +03:00
parent 1f6ab24b34
commit 866d38caf9
41 changed files with 3320 additions and 3311 deletions
@@ -57,7 +57,7 @@
}
}
a:hover .pin-collection {
opacity: 0.5;
opacity: 0.4;
&:hover {
opacity: 1;
}
@@ -1,8 +1,7 @@
<script>
import { hideControls } from "@/stores/app";
import { collections, activeCollection, isCollectionsLoading } from "@/stores/collections";
import CommonHelper from "@/utils/CommonHelper";
import Dragline from "@/components/base/Dragline.svelte";
import PageSidebar from "@/components/base/PageSidebar.svelte";
import CollectionUpsertPanel from "@/components/collections/CollectionUpsertPanel.svelte";
import CollectionSidebarItem from "@/components/collections/CollectionSidebarItem.svelte";
@@ -11,17 +10,9 @@
let collectionPanel;
let searchTerm = "";
let pinnedIds = [];
let sidebarElem;
let initialSidebarWidth;
let sidebarWidth = localStorage.getItem("adminSidebarWidth") || null;
loadPinned();
$: if (sidebarWidth && sidebarElem) {
sidebarElem.style.width = sidebarWidth;
localStorage.setItem("adminSidebarWidth", sidebarWidth);
}
$: if ($collections) {
syncPinned();
scrollIntoView();
@@ -72,7 +63,7 @@
}
</script>
<aside bind:this={sidebarElem} class="page-sidebar collection-sidebar">
<PageSidebar class="collection-sidebar">
<header class="sidebar-header">
<div class="form-field search" class:active={hasSearch}>
<div class="form-field-addon">
@@ -130,19 +121,7 @@
</button>
</footer>
{/if}
</aside>
<Dragline
on:dragstart={() => {
initialSidebarWidth = sidebarElem.offsetWidth;
}}
on:dragging={(e) => {
sidebarWidth = initialSidebarWidth + e.detail.diffX + "px";
}}
on:dragstop={() => {
CommonHelper.triggerResize();
}}
/>
</PageSidebar>
<CollectionUpsertPanel
bind:this={collectionPanel}