mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-18 18:46:02 +00:00
Harden lint validation and browser shims
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@
|
||||
"buildVite": "npx dotenv-cli -e .env -- vite build --mode production",
|
||||
"buildViteOriginal": "npx dotenv-cli -e .env -- vite build --mode original",
|
||||
"buildDev": "node esbuild.config.mjs dev",
|
||||
"lint": "eslint --cache --concurrency auto src",
|
||||
"lint": "eslint --cache --cache-strategy content --concurrency auto src",
|
||||
"lint:community": "eslint --config eslint.community.config.mjs --concurrency auto src",
|
||||
"svelte-check": "svelte-check --tsconfig ./tsconfig.json --fail-on-warnings",
|
||||
"tsc-check": "tsc --noEmit",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { promiseWithResolver, type PromiseWithResolvers } from "octagonal-wheels/promises";
|
||||
import { promiseWithResolvers, type PromiseWithResolvers } from "octagonal-wheels/promises";
|
||||
import { mount } from "svelte";
|
||||
import MenuView from "./ui/MenuView.svelte";
|
||||
import { _activeDocument } from "@vrtmrz/livesync-commonlib/compat/common/coreEnvFunctions";
|
||||
@@ -45,7 +45,7 @@ export class Menu {
|
||||
if (this.waitingForClose) {
|
||||
this.waitingForClose.resolve();
|
||||
}
|
||||
this.waitingForClose = promiseWithResolver<void>();
|
||||
this.waitingForClose = promiseWithResolvers<void>();
|
||||
mount(MenuView, {
|
||||
target: el,
|
||||
props: {
|
||||
|
||||
@@ -23,14 +23,14 @@ export class ShimModal {
|
||||
this.titleEl.className = "modal-title";
|
||||
this.modalEl = _activeDocument.createElement("div");
|
||||
this.modalEl.className = "modal";
|
||||
this.modalEl.style.display = "none";
|
||||
this.modalEl.hidden = true;
|
||||
this.modalEl.appendChild(this.titleEl);
|
||||
this.modalEl.appendChild(this.contentEl);
|
||||
this.baseEl.appendChild(this.modalEl);
|
||||
}
|
||||
open() {
|
||||
this.isOpen = true;
|
||||
this.modalEl.style.display = "block";
|
||||
this.modalEl.hidden = false;
|
||||
if (!this.baseEl.parentElement) {
|
||||
_activeDocument.body.appendChild(this.baseEl);
|
||||
}
|
||||
@@ -38,7 +38,7 @@ export class ShimModal {
|
||||
}
|
||||
close() {
|
||||
this.isOpen = false;
|
||||
this.baseEl.style.display = "none";
|
||||
this.modalEl.hidden = true;
|
||||
this.baseEl.remove();
|
||||
this.onClose();
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import { FileSystemAccessStorageAdapter } from "@vrtmrz/livesync-commonlib/brows
|
||||
import { FSAPIVaultAdapter } from "./FSAPIVaultAdapter";
|
||||
import type { FSAPIFile, FSAPIFolder, FSAPIStat } from "./FSAPITypes";
|
||||
import { shareRunningResult } from "octagonal-wheels/concurrency/lock_v2";
|
||||
import type { WebAppLog } from "../WebAppLog";
|
||||
import type { WebAppLog } from "@/apps/webapp/WebAppLog";
|
||||
|
||||
/**
|
||||
* Complete file system adapter implementation for FileSystem API
|
||||
|
||||
@@ -13,7 +13,7 @@ import type { FileEventItemSentinel } from "@vrtmrz/livesync-commonlib/compat/ma
|
||||
import type { FSAPIFile, FSAPIFolder } from "@/apps/webapp/adapters/FSAPITypes";
|
||||
import { compatGlobal } from "@vrtmrz/livesync-commonlib/compat/common/coreEnvFunctions";
|
||||
import { LOG_LEVEL_INFO, LOG_LEVEL_NOTICE, LOG_LEVEL_VERBOSE } from "@vrtmrz/livesync-commonlib/compat/common/types";
|
||||
import type { WebAppLog } from "../WebAppLog";
|
||||
import type { WebAppLog } from "@/apps/webapp/WebAppLog";
|
||||
|
||||
type FileSystemObserverRecord = {
|
||||
changedHandle?: FileSystemFileHandle | FileSystemDirectoryHandle;
|
||||
|
||||
Reference in New Issue
Block a user