From 5444cc200925b9ebdb79a4c7454daa1fac87d9f5 Mon Sep 17 00:00:00 2001 From: zadam Date: Sun, 24 Jul 2022 14:30:42 +0200 Subject: [PATCH] floating button container WIP --- package-lock.json | 58 +++++++++---------- package.json | 6 +- .../floating_buttons/floating_buttons.js | 5 ++ .../floating_buttons/relation_map_buttons.js | 21 +++---- .../widgets/floating_buttons/zpetne_odkazy.js | 1 - src/public/app/widgets/note_map.js | 6 +- src/public/stylesheets/style.css | 5 -- 7 files changed, 49 insertions(+), 53 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6244df680..a53d5bd43 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,10 +29,10 @@ "electron-window-state": "5.0.3", "express": "4.18.1", "express-partial-content": "1.0.2", - "express-rate-limit": "6.4.0", + "express-rate-limit": "6.5.1", "express-session": "1.17.3", "fs-extra": "10.1.0", - "helmet": "5.1.0", + "helmet": "5.1.1", "html": "1.0.0", "html2plaintext": "2.1.4", "http-proxy-agent": "5.0.0", @@ -79,7 +79,7 @@ "electron-packager": "15.5.1", "electron-rebuild": "3.2.8", "esm": "3.2.25", - "jasmine": "4.2.1", + "jasmine": "4.3.0", "jsdoc": "3.6.11", "lorem-ipsum": "2.0.8", "rcedit": "3.0.1", @@ -4921,9 +4921,9 @@ } }, "node_modules/express-rate-limit": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.4.0.tgz", - "integrity": "sha512-lxQRZI4gi3qAWTf0/Uqsyugsz57h8bd7QyllXBgJvd6DJKokzW7C5DTaNvwzvAQzwHGFaItybfYGhC8gpu0V2A==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.5.1.tgz", + "integrity": "sha512-pxO6ioBLd3i8IHL+RmJtL4noYzte5fugoMdaDabtU4hcg53+x0QkTwfPtM7vWD0YUaXQgNj9NRdzmps+CHEHlA==", "engines": { "node": ">= 12.9.0" }, @@ -5834,9 +5834,9 @@ } }, "node_modules/helmet": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.0.tgz", - "integrity": "sha512-klsunXs8rgNSZoaUrNeuCiWUxyc+wzucnEnFejUg3/A+CaF589k9qepLZZ1Jehnzig7YbD4hEuscGXuBY3fq+g==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.1.tgz", + "integrity": "sha512-/yX0oVZBggA9cLJh8aw3PPCfedBnbd7J2aowjzsaWwZh7/UFY0nccn/aHAggIgWUFfnykX8GKd3a1pSbrmlcVQ==", "engines": { "node": ">=12.0.0" } @@ -6469,22 +6469,22 @@ "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==" }, "node_modules/jasmine": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.2.1.tgz", - "integrity": "sha512-LNZEKcScnjPRj5J92I1P515bxTvaHMRAERTyCoaGnWr87eOT6zv+b3M+kxKdH/06Gz4TnnXyHbXLiPtMHZ0ncw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.3.0.tgz", + "integrity": "sha512-ieBmwkd8L1DXnvSnxx7tecXgA0JDgMXPAwBcqM4lLPedJeI9hTHuWifPynTC+dLe4Y+GkSPSlbqqrmYIgGzYUw==", "dev": true, "dependencies": { "glob": "^7.1.6", - "jasmine-core": "^4.2.0" + "jasmine-core": "^4.3.0" }, "bin": { "jasmine": "bin/jasmine.js" } }, "node_modules/jasmine-core": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.2.0.tgz", - "integrity": "sha512-OcFpBrIhnbmb9wfI8cqPSJ50pv3Wg4/NSgoZIqHzIwO/2a9qivJWzv8hUvaREIMYYJBas6AvfXATFdVuzzCqVw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.3.0.tgz", + "integrity": "sha512-qybtBUesniQdW6n+QIHMng2vDOHscIC/dEXjW+JzO9+LoAZMb03RCUC5xFOv/btSKPm1xL42fn+RjlU4oB42Lg==", "dev": true }, "node_modules/jest-worker": { @@ -14759,9 +14759,9 @@ "requires": {} }, "express-rate-limit": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.4.0.tgz", - "integrity": "sha512-lxQRZI4gi3qAWTf0/Uqsyugsz57h8bd7QyllXBgJvd6DJKokzW7C5DTaNvwzvAQzwHGFaItybfYGhC8gpu0V2A==", + "version": "6.5.1", + "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-6.5.1.tgz", + "integrity": "sha512-pxO6ioBLd3i8IHL+RmJtL4noYzte5fugoMdaDabtU4hcg53+x0QkTwfPtM7vWD0YUaXQgNj9NRdzmps+CHEHlA==", "requires": {} }, "express-session": { @@ -15436,9 +15436,9 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, "helmet": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.0.tgz", - "integrity": "sha512-klsunXs8rgNSZoaUrNeuCiWUxyc+wzucnEnFejUg3/A+CaF589k9qepLZZ1Jehnzig7YbD4hEuscGXuBY3fq+g==" + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/helmet/-/helmet-5.1.1.tgz", + "integrity": "sha512-/yX0oVZBggA9cLJh8aw3PPCfedBnbd7J2aowjzsaWwZh7/UFY0nccn/aHAggIgWUFfnykX8GKd3a1pSbrmlcVQ==" }, "hosted-git-info": { "version": "2.8.9", @@ -15904,19 +15904,19 @@ } }, "jasmine": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.2.1.tgz", - "integrity": "sha512-LNZEKcScnjPRj5J92I1P515bxTvaHMRAERTyCoaGnWr87eOT6zv+b3M+kxKdH/06Gz4TnnXyHbXLiPtMHZ0ncw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-4.3.0.tgz", + "integrity": "sha512-ieBmwkd8L1DXnvSnxx7tecXgA0JDgMXPAwBcqM4lLPedJeI9hTHuWifPynTC+dLe4Y+GkSPSlbqqrmYIgGzYUw==", "dev": true, "requires": { "glob": "^7.1.6", - "jasmine-core": "^4.2.0" + "jasmine-core": "^4.3.0" } }, "jasmine-core": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.2.0.tgz", - "integrity": "sha512-OcFpBrIhnbmb9wfI8cqPSJ50pv3Wg4/NSgoZIqHzIwO/2a9qivJWzv8hUvaREIMYYJBas6AvfXATFdVuzzCqVw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.3.0.tgz", + "integrity": "sha512-qybtBUesniQdW6n+QIHMng2vDOHscIC/dEXjW+JzO9+LoAZMb03RCUC5xFOv/btSKPm1xL42fn+RjlU4oB42Lg==", "dev": true }, "jest-worker": { diff --git a/package.json b/package.json index 6f0ad218f..44c12b282 100644 --- a/package.json +++ b/package.json @@ -44,10 +44,10 @@ "electron-window-state": "5.0.3", "express": "4.18.1", "express-partial-content": "1.0.2", - "express-rate-limit": "6.4.0", + "express-rate-limit": "6.5.1", "express-session": "1.17.3", "fs-extra": "10.1.0", - "helmet": "5.1.0", + "helmet": "5.1.1", "html": "1.0.0", "html2plaintext": "2.1.4", "http-proxy-agent": "5.0.0", @@ -91,7 +91,7 @@ "electron-packager": "15.5.1", "electron-rebuild": "3.2.8", "esm": "3.2.25", - "jasmine": "4.2.1", + "jasmine": "4.3.0", "jsdoc": "3.6.11", "lorem-ipsum": "2.0.8", "rcedit": "3.0.1", diff --git a/src/public/app/widgets/floating_buttons/floating_buttons.js b/src/public/app/widgets/floating_buttons/floating_buttons.js index 98a715db6..23e8c96f9 100644 --- a/src/public/app/widgets/floating_buttons/floating_buttons.js +++ b/src/public/app/widgets/floating_buttons/floating_buttons.js @@ -15,6 +15,11 @@ const TPL = ` flex-direction: row; z-index: 100; } + + .floating-buttons .floating-button { + font-size: 130%; + padding: 5px 10px 4px 10px; + }
diff --git a/src/public/app/widgets/floating_buttons/relation_map_buttons.js b/src/public/app/widgets/floating_buttons/relation_map_buttons.js index be6ff9d2b..72cdb7bf3 100644 --- a/src/public/app/widgets/floating_buttons/relation_map_buttons.js +++ b/src/public/app/widgets/floating_buttons/relation_map_buttons.js @@ -5,25 +5,21 @@ import toastService from "../../services/toast.js"; const TPL = `
- + + class="relation-map-reset-pan-zoom floating-button btn bx bx-crop no-print" + title="Reset pan & zoom to initial coordinates and magnification"> -
+
`; @@ -47,5 +43,6 @@ export default class RelationMapButtons extends NoteContextAwareWidget { this.$zoomInButton.on('click', () => this.triggerEvent('relationMapResetZoomIn', {ntxId: this.ntxId})); this.$zoomOutButton.on('click', () => this.triggerEvent('relationMapResetZoomOut', {ntxId: this.ntxId})); + this.contentSized(); } } diff --git a/src/public/app/widgets/floating_buttons/zpetne_odkazy.js b/src/public/app/widgets/floating_buttons/zpetne_odkazy.js index 49343df0c..674578614 100644 --- a/src/public/app/widgets/floating_buttons/zpetne_odkazy.js +++ b/src/public/app/widgets/floating_buttons/zpetne_odkazy.js @@ -23,7 +23,6 @@ const TPL = ` display: flex; justify-content: space-between; align-items: center; - z-index: 10; } .backlinks-count { diff --git a/src/public/app/widgets/note_map.js b/src/public/app/widgets/note_map.js index f101a7def..eb9d1a888 100644 --- a/src/public/app/widgets/note_map.js +++ b/src/public/app/widgets/note_map.js @@ -25,9 +25,9 @@ const TPL = `
} -
- - +
+ +
diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index e84186be9..a714ee521 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -602,11 +602,6 @@ a.external:not(.no-arrow):after, a[href^="http://"]:not(.no-arrow):after, a[href padding: 0.7rem 1rem 0 1rem !important; /* make modal header padding slightly smaller */ } -.floating-button { - position: absolute !important; - z-index: 100; -} - #toast-container { position: absolute; width: 100%;