refactor(client): integrate jquery-hotkeys

This commit is contained in:
Elian Doran 2025-05-17 21:27:23 +03:00
parent a4cfef7892
commit 3f2a0e302d
No known key found for this signature in database
8 changed files with 3 additions and 11 deletions

View File

@ -12,6 +12,7 @@ import type ElectronRemote from "@electron/remote";
import type Electron from "electron"; import type Electron from "electron";
import "./stylesheets/bootstrap.scss"; import "./stylesheets/bootstrap.scss";
import "boxicons"; import "boxicons";
import "jquery-hotkeys";
import "autocomplete.js/index_jquery.js"; import "autocomplete.js/index_jquery.js";
await appContext.earlyInit(); await appContext.earlyInit();

View File

@ -1,6 +1,7 @@
import utils from "./services/utils.js"; import utils from "./services/utils.js";
import ko from "knockout"; import ko from "knockout";
import "./stylesheets/bootstrap.scss"; import "./stylesheets/bootstrap.scss";
import "jquery-hotkeys";
// TriliumNextTODO: properly make use of below types // TriliumNextTODO: properly make use of below types
// type SetupModelSetupType = "new-document" | "sync-from-desktop" | "sync-from-server" | ""; // type SetupModelSetupType = "new-document" | "sync-from-desktop" | "sync-from-server" | "";

View File

@ -5,8 +5,7 @@
"private": true, "private": true,
"dependencies": { "dependencies": {
"better-sqlite3": "11.10.0", "better-sqlite3": "11.10.0",
"jquery.fancytree": "2.38.5", "jquery.fancytree": "2.38.5"
"jquery-hotkeys": "0.2.2"
}, },
"devDependencies": { "devDependencies": {
"@electron/remote": "2.1.2", "@electron/remote": "2.1.2",

View File

@ -41,8 +41,6 @@
<link href="<%= assetPath %>/stylesheets/tree.css" rel="stylesheet"> <link href="<%= assetPath %>/stylesheets/tree.css" rel="stylesheet">
<script src="<%= assetPath %>/node_modules/jquery.fancytree/dist/jquery.fancytree-all-deps.min.js"></script> <script src="<%= assetPath %>/node_modules/jquery.fancytree/dist/jquery.fancytree-all-deps.min.js"></script>
<script src="<%= assetPath %>/node_modules/jquery-hotkeys/jquery-hotkeys.js"></script>
<script src="<%= assetPath %>/node_modules/autocomplete.js/dist/autocomplete.jquery.min.js"></script> <script src="<%= assetPath %>/node_modules/autocomplete.js/dist/autocomplete.jquery.min.js"></script>
<link href="<%= assetPath %>/stylesheets/ckeditor-theme.css" rel="stylesheet"> <link href="<%= assetPath %>/stylesheets/ckeditor-theme.css" rel="stylesheet">

View File

@ -169,7 +169,6 @@
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script> <script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
<script src="<%= assetPath %>/node_modules/jquery/dist/jquery.min.js"></script> <script src="<%= assetPath %>/node_modules/jquery/dist/jquery.min.js"></script>
<script src="<%= assetPath %>/node_modules/jquery-hotkeys/jquery-hotkeys.js"></script>
<script src="<%= appPath %>/runtime.js" crossorigin type="module"></script> <script src="<%= appPath %>/runtime.js" crossorigin type="module"></script>
<script src="<%= appPath %>/setup.js" crossorigin type="module"></script> <script src="<%= appPath %>/setup.js" crossorigin type="module"></script>

View File

@ -49,8 +49,6 @@ async function register(app: express.Application) {
app.use(`/${assetPath}/node_modules/jquery/dist/`, persistentCacheStatic(path.join(nodeModulesDir, "jquery/dist/"))); app.use(`/${assetPath}/node_modules/jquery/dist/`, persistentCacheStatic(path.join(nodeModulesDir, "jquery/dist/")));
app.use(`/${assetPath}/node_modules/jquery-hotkeys/`, persistentCacheStatic(path.join(nodeModulesDir, "jquery-hotkeys/")));
app.use(`/${assetPath}/node_modules/jquery.fancytree/dist/`, persistentCacheStatic(path.join(nodeModulesDir, "jquery.fancytree/dist/"))); app.use(`/${assetPath}/node_modules/jquery.fancytree/dist/`, persistentCacheStatic(path.join(nodeModulesDir, "jquery.fancytree/dist/")));
} }

View File

@ -14,7 +14,6 @@ function buildFilesToCopy() {
const nodePaths = [ const nodePaths = [
"jquery/dist", "jquery/dist",
"jquery-hotkeys",
"jquery.fancytree/dist", "jquery.fancytree/dist",
// Required as they are native dependencies and cannot be well bundled. // Required as they are native dependencies and cannot be well bundled.

3
pnpm-lock.yaml generated
View File

@ -484,9 +484,6 @@ importers:
better-sqlite3: better-sqlite3:
specifier: 11.10.0 specifier: 11.10.0
version: 11.10.0 version: 11.10.0
jquery-hotkeys:
specifier: 0.2.2
version: 0.2.2
jquery.fancytree: jquery.fancytree:
specifier: 2.38.5 specifier: 2.38.5
version: 2.38.5(jquery@3.7.1) version: 2.38.5(jquery@3.7.1)