From 1ce8837f33049c7c5e3d7090815303d773d4f969 Mon Sep 17 00:00:00 2001 From: Aitchessbee Date: Wed, 13 Mar 2024 23:51:07 +0530 Subject: [PATCH] more linting fixes --- app/renderer/js/main.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/app/renderer/js/main.ts b/app/renderer/js/main.ts index c6c3aa2ef..ff0cdffe2 100644 --- a/app/renderer/js/main.ts +++ b/app/renderer/js/main.ts @@ -6,8 +6,7 @@ import url from "node:url"; import {Menu, app, dialog, session} from "@electron/remote"; import * as remote from "@electron/remote"; import * as Sentry from "@sentry/electron/renderer"; - -import Sortable from "sortablejs"; +import SortableJS from "sortablejs"; import type {Config} from "../../common/config-util.js"; import * as ConfigUtil from "../../common/config-util.js"; @@ -83,7 +82,7 @@ export class ServerManagerView { tabIndex: number; presetOrgs: string[]; preferenceView?: PreferenceView; - sortableSidebar: Sortable | null; + sortableSidebar: SortableJS | null; constructor() { this.$addServerButton = document.querySelector("#add-tab")!; this.$tabsContainer = document.querySelector("#tabs-container")!; @@ -239,9 +238,9 @@ export class ServerManagerView { initSidebar(): void { const showSidebar = ConfigUtil.getConfigItem("showSidebar", true); this.toggleSidebar(showSidebar); - this.sortableSidebar = new Sortable(this.$tabsContainer, { + this.sortableSidebar = new SortableJS(this.$tabsContainer, { animation: 150, - onEnd: (event: Sortable.SortableEvent) => { + onEnd: (event: SortableJS.SortableEvent) => { // Update the domain order in the database DomainUtil.updateDomainOrder(event.oldIndex ?? 0, event.newIndex ?? 0);