mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	Merge branch 'develop' into feature/windows_signing_v3
This commit is contained in:
		
						commit
						d0549ebdf9
					
				| @ -8,9 +8,6 @@ noAuthentication=false | |||||||
| # set to true to disable backups (e.g. because of limited space on server) | # set to true to disable backups (e.g. because of limited space on server) | ||||||
| noBackup=false | noBackup=false | ||||||
| 
 | 
 | ||||||
| # Disable automatically generating desktop icon |  | ||||||
| # noDesktopIcon=true |  | ||||||
| 
 |  | ||||||
| [Network] | [Network] | ||||||
| # host setting is relevant only for web deployments - set the host on which the server will listen | # host setting is relevant only for web deployments - set the host on which the server will listen | ||||||
| # host=0.0.0.0 | # host=0.0.0.0 | ||||||
|  | |||||||
| @ -4,7 +4,6 @@ import electron from "electron"; | |||||||
| import electronDebug from "electron-debug"; | import electronDebug from "electron-debug"; | ||||||
| import electronDl from "electron-dl"; | import electronDl from "electron-dl"; | ||||||
| import sqlInit from "./src/services/sql_init.js"; | import sqlInit from "./src/services/sql_init.js"; | ||||||
| import appIconService from "./src/services/app_icon.js"; |  | ||||||
| import windowService from "./src/services/window.js"; | import windowService from "./src/services/window.js"; | ||||||
| import tray from "./src/services/tray.js"; | import tray from "./src/services/tray.js"; | ||||||
| 
 | 
 | ||||||
| @ -19,8 +18,6 @@ if ((await import("electron-squirrel-startup")).default) { | |||||||
| // Adds debug features like hotkeys for triggering dev tools and reload
 | // Adds debug features like hotkeys for triggering dev tools and reload
 | ||||||
| electronDebug(); | electronDebug(); | ||||||
| 
 | 
 | ||||||
| appIconService.installLocalAppIcon(); |  | ||||||
| 
 |  | ||||||
| electronDl({ saveAs: true }); | electronDl({ saveAs: true }); | ||||||
| 
 | 
 | ||||||
| // needed for excalidraw export https://github.com/zadam/trilium/issues/4271
 | // needed for excalidraw export https://github.com/zadam/trilium/issues/4271
 | ||||||
|  | |||||||
							
								
								
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										8
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -138,7 +138,7 @@ | |||||||
|         "@types/jquery": "3.5.32", |         "@types/jquery": "3.5.32", | ||||||
|         "@types/js-yaml": "4.0.9", |         "@types/js-yaml": "4.0.9", | ||||||
|         "@types/jsdom": "21.1.7", |         "@types/jsdom": "21.1.7", | ||||||
|         "@types/leaflet": "1.9.16", |         "@types/leaflet": "1.9.17", | ||||||
|         "@types/leaflet-gpx": "1.3.7", |         "@types/leaflet-gpx": "1.3.7", | ||||||
|         "@types/mime-types": "2.1.4", |         "@types/mime-types": "2.1.4", | ||||||
|         "@types/multer": "1.4.12", |         "@types/multer": "1.4.12", | ||||||
| @ -5820,9 +5820,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@types/leaflet": { |     "node_modules/@types/leaflet": { | ||||||
|       "version": "1.9.16", |       "version": "1.9.17", | ||||||
|       "resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.16.tgz", |       "resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.17.tgz", | ||||||
|       "integrity": "sha512-wzZoyySUxkgMZ0ihJ7IaUIblG8Rdc8AbbZKLneyn+QjYsj5q1QU7TEKYqwTr10BGSzY5LI7tJk9Ifo+mEjdFRw==", |       "integrity": "sha512-IJ4K6t7I3Fh5qXbQ1uwL3CFVbCi6haW9+53oLWgdKlLP7EaS21byWFJxxqOx9y8I0AP0actXSJLVMbyvxhkUTA==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |       "license": "MIT", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|  | |||||||
| @ -195,7 +195,7 @@ | |||||||
|     "@types/jquery": "3.5.32", |     "@types/jquery": "3.5.32", | ||||||
|     "@types/js-yaml": "4.0.9", |     "@types/js-yaml": "4.0.9", | ||||||
|     "@types/jsdom": "21.1.7", |     "@types/jsdom": "21.1.7", | ||||||
|     "@types/leaflet": "1.9.16", |     "@types/leaflet": "1.9.17", | ||||||
|     "@types/leaflet-gpx": "1.3.7", |     "@types/leaflet-gpx": "1.3.7", | ||||||
|     "@types/mime-types": "2.1.4", |     "@types/mime-types": "2.1.4", | ||||||
|     "@types/multer": "1.4.12", |     "@types/multer": "1.4.12", | ||||||
|  | |||||||
							
								
								
									
										173
									
								
								packages/turndown-plugin-gfm/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										173
									
								
								packages/turndown-plugin-gfm/package-lock.json
									
									
									
										generated
									
									
									
								
							| @ -163,9 +163,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-android-arm-eabi": { |     "node_modules/@rollup/rollup-android-arm-eabi": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.37.0.tgz", | ||||||
|       "integrity": "sha512-jgrXjjcEwN6XpZXL0HUeOVGfjXhPyxAbbhD0BlXUB+abTOpbPiN5Wb3kOT7yb+uEtATNYF5x5gIfwutmuBA26w==", |       "integrity": "sha512-l7StVw6WAa8l3vA1ov80jyetOAEo1FtHvZDbzXDO/02Sq/QVvqlHkYoFwDJPIMj0GKiistsBudfx5tGFnwYWDQ==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "arm" |         "arm" | ||||||
|       ], |       ], | ||||||
| @ -177,9 +177,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-android-arm64": { |     "node_modules/@rollup/rollup-android-arm64": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.37.0.tgz", | ||||||
|       "integrity": "sha512-NyfuLvdPdNUfUNeYKUwPwKsE5SXa2J6bCt2LdB/N+AxShnkpiczi3tcLJrm5mA+eqpy0HmaIY9F6XCa32N5yzg==", |       "integrity": "sha512-6U3SlVyMxezt8Y+/iEBcbp945uZjJwjZimu76xoG7tO1av9VO691z8PkhzQ85ith2I8R2RddEPeSfcbyPfD4hA==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "arm64" |         "arm64" | ||||||
|       ], |       ], | ||||||
| @ -191,9 +191,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-darwin-arm64": { |     "node_modules/@rollup/rollup-darwin-arm64": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.37.0.tgz", | ||||||
|       "integrity": "sha512-JQ1Jk5G4bGrD4pWJQzWsD8I1n1mgPXq33+/vP4sk8j/z/C2siRuxZtaUA7yMTf71TCZTZl/4e1bfzwUmFb3+rw==", |       "integrity": "sha512-+iTQ5YHuGmPt10NTzEyMPbayiNTcOZDWsbxZYR1ZnmLnZxG17ivrPSWFO9j6GalY0+gV3Jtwrrs12DBscxnlYA==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "arm64" |         "arm64" | ||||||
|       ], |       ], | ||||||
| @ -205,9 +205,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-darwin-x64": { |     "node_modules/@rollup/rollup-darwin-x64": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.37.0.tgz", | ||||||
|       "integrity": "sha512-6c6wMZa1lrtiRsbDziCmjE53YbTkxMYhhnWnSW8R/yqsM7a6mSJ3uAVT0t8Y/DGt7gxUWYuFM4bwWk9XCJrFKA==", |       "integrity": "sha512-m8W2UbxLDcmRKVjgl5J/k4B8d7qX2EcJve3Sut7YGrQoPtCIQGPH5AMzuFvYRWZi0FVS0zEY4c8uttPfX6bwYQ==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "x64" |         "x64" | ||||||
|       ], |       ], | ||||||
| @ -219,9 +219,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-freebsd-arm64": { |     "node_modules/@rollup/rollup-freebsd-arm64": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.37.0.tgz", | ||||||
|       "integrity": "sha512-KXVsijKeJXOl8QzXTsA+sHVDsFOmMCdBRgFmBb+mfEb/7geR7+C8ypAml4fquUt14ZyVXaw2o1FWhqAfOvA4sg==", |       "integrity": "sha512-FOMXGmH15OmtQWEt174v9P1JqqhlgYge/bUjIbiVD1nI1NeJ30HYT9SJlZMqdo1uQFyt9cz748F1BHghWaDnVA==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "arm64" |         "arm64" | ||||||
|       ], |       ], | ||||||
| @ -233,9 +233,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-freebsd-x64": { |     "node_modules/@rollup/rollup-freebsd-x64": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.37.0.tgz", | ||||||
|       "integrity": "sha512-dVeWq1ebbvByI+ndz4IJcD4a09RJgRYmLccwlQ8bPd4olz3Y213uf1iwvc7ZaxNn2ab7bjc08PrtBgMu6nb4pQ==", |       "integrity": "sha512-SZMxNttjPKvV14Hjck5t70xS3l63sbVwl98g3FlVVx2YIDmfUIy29jQrsw06ewEYQ8lQSuY9mpAPlmgRD2iSsA==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "x64" |         "x64" | ||||||
|       ], |       ], | ||||||
| @ -247,9 +247,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-arm-gnueabihf": { |     "node_modules/@rollup/rollup-linux-arm-gnueabihf": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.37.0.tgz", | ||||||
|       "integrity": "sha512-bvXVU42mOVcF4le6XSjscdXjqx8okv4n5vmwgzcmtvFdifQ5U4dXFYaCB87namDRKlUL9ybVtLQ9ztnawaSzvg==", |       "integrity": "sha512-hhAALKJPidCwZcj+g+iN+38SIOkhK2a9bqtJR+EtyxrKKSt1ynCBeqrQy31z0oWU6thRZzdx53hVgEbRkuI19w==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "arm" |         "arm" | ||||||
|       ], |       ], | ||||||
| @ -261,9 +261,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-arm-musleabihf": { |     "node_modules/@rollup/rollup-linux-arm-musleabihf": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.37.0.tgz", | ||||||
|       "integrity": "sha512-JFIQrDJYrxOnyDQGYkqnNBtjDwTgbasdbUiQvcU8JmGDfValfH1lNpng+4FWlhaVIR4KPkeddYjsVVbmJYvDcg==", |       "integrity": "sha512-jUb/kmn/Gd8epbHKEqkRAxq5c2EwRt0DqhSGWjPFxLeFvldFdHQs/n8lQ9x85oAeVb6bHcS8irhTJX2FCOd8Ag==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "arm" |         "arm" | ||||||
|       ], |       ], | ||||||
| @ -275,9 +275,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-arm64-gnu": { |     "node_modules/@rollup/rollup-linux-arm64-gnu": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.37.0.tgz", | ||||||
|       "integrity": "sha512-KqjYVh3oM1bj//5X7k79PSCZ6CvaVzb7Qs7VMWS+SlWB5M8p3FqufLP9VNp4CazJ0CsPDLwVD9r3vX7Ci4J56A==", |       "integrity": "sha512-oNrJxcQT9IcbcmKlkF+Yz2tmOxZgG9D9GRq+1OE6XCQwCVwxixYAa38Z8qqPzQvzt1FCfmrHX03E0pWoXm1DqA==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "arm64" |         "arm64" | ||||||
|       ], |       ], | ||||||
| @ -289,9 +289,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-arm64-musl": { |     "node_modules/@rollup/rollup-linux-arm64-musl": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.37.0.tgz", | ||||||
|       "integrity": "sha512-QiGnhScND+mAAtfHqeT+cB1S9yFnNQ/EwCg5yE3MzoaZZnIV0RV9O5alJAoJKX/sBONVKeZdMfO8QSaWEygMhw==", |       "integrity": "sha512-pfxLBMls+28Ey2enpX3JvjEjaJMBX5XlPCZNGxj4kdJyHduPBXtxYeb8alo0a7bqOoWZW2uKynhHxF/MWoHaGQ==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "arm64" |         "arm64" | ||||||
|       ], |       ], | ||||||
| @ -303,9 +303,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-loongarch64-gnu": { |     "node_modules/@rollup/rollup-linux-loongarch64-gnu": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.37.0.tgz", | ||||||
|       "integrity": "sha512-1ZPyEDWF8phd4FQtTzMh8FQwqzvIjLsl6/84gzUxnMNFBtExBtpL51H67mV9xipuxl1AEAerRBgBwFNpkw8+Lg==", |       "integrity": "sha512-yCE0NnutTC/7IGUq/PUHmoeZbIwq3KRh02e9SfFh7Vmc1Z7atuJRYWhRME5fKgT8aS20mwi1RyChA23qSyRGpA==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "loong64" |         "loong64" | ||||||
|       ], |       ], | ||||||
| @ -317,9 +317,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { |     "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.37.0.tgz", | ||||||
|       "integrity": "sha512-VMPMEIUpPFKpPI9GZMhJrtu8rxnp6mJR3ZzQPykq4xc2GmdHj3Q4cA+7avMyegXy4n1v+Qynr9fR88BmyO74tg==", |       "integrity": "sha512-NxcICptHk06E2Lh3a4Pu+2PEdZ6ahNHuK7o6Np9zcWkrBMuv21j10SQDJW3C9Yf/A/P7cutWoC/DptNLVsZ0VQ==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "ppc64" |         "ppc64" | ||||||
|       ], |       ], | ||||||
| @ -331,9 +331,23 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-riscv64-gnu": { |     "node_modules/@rollup/rollup-linux-riscv64-gnu": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.37.0.tgz", | ||||||
|       "integrity": "sha512-ttE6ayb/kHwNRJGYLpuAvB7SMtOeQnVXEIpMtAvx3kepFQeowVED0n1K9nAdraHUPJ5hydEMxBpIR7o4nrm8uA==", |       "integrity": "sha512-PpWwHMPCVpFZLTfLq7EWJWvrmEuLdGn1GMYcm5MV7PaRgwCEYJAwiN94uBuZev0/J/hFIIJCsYw4nLmXA9J7Pw==", | ||||||
|  |       "cpu": [ | ||||||
|  |         "riscv64" | ||||||
|  |       ], | ||||||
|  |       "dev": true, | ||||||
|  |       "license": "MIT", | ||||||
|  |       "optional": true, | ||||||
|  |       "os": [ | ||||||
|  |         "linux" | ||||||
|  |       ] | ||||||
|  |     }, | ||||||
|  |     "node_modules/@rollup/rollup-linux-riscv64-musl": { | ||||||
|  |       "version": "4.37.0", | ||||||
|  |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.37.0.tgz", | ||||||
|  |       "integrity": "sha512-DTNwl6a3CfhGTAOYZ4KtYbdS8b+275LSLqJVJIrPa5/JuIufWWZ/QFvkxp52gpmguN95eujrM68ZG+zVxa8zHA==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "riscv64" |         "riscv64" | ||||||
|       ], |       ], | ||||||
| @ -345,9 +359,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-s390x-gnu": { |     "node_modules/@rollup/rollup-linux-s390x-gnu": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.37.0.tgz", | ||||||
|       "integrity": "sha512-4a5gf2jpS0AIe7uBjxDeUMNcFmaRTbNv7NxI5xOCs4lhzsVyGR/0qBXduPnoWf6dGC365saTiwag8hP1imTgag==", |       "integrity": "sha512-hZDDU5fgWvDdHFuExN1gBOhCuzo/8TMpidfOR+1cPZJflcEzXdCy1LjnklQdW8/Et9sryOPJAKAQRw8Jq7Tg+A==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "s390x" |         "s390x" | ||||||
|       ], |       ], | ||||||
| @ -359,9 +373,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-x64-gnu": { |     "node_modules/@rollup/rollup-linux-x64-gnu": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.37.0.tgz", | ||||||
|       "integrity": "sha512-5KtoW8UWmwFKQ96aQL3LlRXX16IMwyzMq/jSSVIIyAANiE1doaQsx/KRyhAvpHlPjPiSU/AYX/8m+lQ9VToxFQ==", |       "integrity": "sha512-pKivGpgJM5g8dwj0ywBwe/HeVAUSuVVJhUTa/URXjxvoyTT/AxsLTAbkHkDHG7qQxLoW2s3apEIl26uUe08LVQ==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "x64" |         "x64" | ||||||
|       ], |       ], | ||||||
| @ -373,9 +387,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-linux-x64-musl": { |     "node_modules/@rollup/rollup-linux-x64-musl": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.37.0.tgz", | ||||||
|       "integrity": "sha512-sycrYZPrv2ag4OCvaN5js+f01eoZ2U+RmT5as8vhxiFz+kxwlHrsxOwKPSA8WyS+Wc6Epid9QeI/IkQ9NkgYyQ==", |       "integrity": "sha512-E2lPrLKE8sQbY/2bEkVTGDEk4/49UYRVWgj90MY8yPjpnGBQ+Xi1Qnr7b7UIWw1NOggdFQFOLZ8+5CzCiz143w==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "x64" |         "x64" | ||||||
|       ], |       ], | ||||||
| @ -387,9 +401,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-win32-arm64-msvc": { |     "node_modules/@rollup/rollup-win32-arm64-msvc": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.37.0.tgz", | ||||||
|       "integrity": "sha512-qbqt4N7tokFwwSVlWDsjfoHgviS3n/vZ8LK0h1uLG9TYIRuUTJC88E1xb3LM2iqZ/WTqNQjYrtmtGmrmmawB6A==", |       "integrity": "sha512-Jm7biMazjNzTU4PrQtr7VS8ibeys9Pn29/1bm4ph7CP2kf21950LgN+BaE2mJ1QujnvOc6p54eWWiVvn05SOBg==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "arm64" |         "arm64" | ||||||
|       ], |       ], | ||||||
| @ -401,9 +415,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-win32-ia32-msvc": { |     "node_modules/@rollup/rollup-win32-ia32-msvc": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.37.0.tgz", | ||||||
|       "integrity": "sha512-t+RY0JuRamIocMuQcfwYSOkmdX9dtkr1PbhKW42AMvaDQa+jOdpUYysroTF/nuPpAaQMWp7ye+ndlmmthieJrQ==", |       "integrity": "sha512-e3/1SFm1OjefWICB2Ucstg2dxYDkDTZGDYgwufcbsxTHyqQps1UQf33dFEChBNmeSsTOyrjw2JJq0zbG5GF6RA==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "ia32" |         "ia32" | ||||||
|       ], |       ], | ||||||
| @ -415,9 +429,9 @@ | |||||||
|       ] |       ] | ||||||
|     }, |     }, | ||||||
|     "node_modules/@rollup/rollup-win32-x64-msvc": { |     "node_modules/@rollup/rollup-win32-x64-msvc": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.37.0.tgz", | ||||||
|       "integrity": "sha512-aRXd7tRZkWLqGbChgcMMDEHjOKudo1kChb1Jt1IfR8cY/KIpgNviLeJy5FUb9IpSuQj8dU2fAYNMPW/hLKOSTw==", |       "integrity": "sha512-LWbXUBwn/bcLx2sSsqy7pK5o+Nr+VCoRoAohfJ5C/aBio9nfJmGQqHAhU6pwxV/RmyTk5AqdySma7uwWGlmeuA==", | ||||||
|       "cpu": [ |       "cpu": [ | ||||||
|         "x64" |         "x64" | ||||||
|       ], |       ], | ||||||
| @ -4944,9 +4958,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/rollup": { |     "node_modules/rollup": { | ||||||
|       "version": "4.36.0", |       "version": "4.37.0", | ||||||
|       "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.36.0.tgz", |       "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.37.0.tgz", | ||||||
|       "integrity": "sha512-zwATAXNQxUcd40zgtQG0ZafcRK4g004WtEl7kbuhTWPvf07PsfohXl39jVUvPF7jvNAIkKPQ2XrsDlWuxBd++Q==", |       "integrity": "sha512-iAtQy/L4QFU+rTJ1YUjXqJOJzuwEghqWzCEYD2FEghT7Gsy1VdABntrO4CLopA5IkflTyqNiLNwPcOJ3S7UKLg==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "license": "MIT", |       "license": "MIT", | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
| @ -4960,25 +4974,26 @@ | |||||||
|         "npm": ">=8.0.0" |         "npm": ">=8.0.0" | ||||||
|       }, |       }, | ||||||
|       "optionalDependencies": { |       "optionalDependencies": { | ||||||
|         "@rollup/rollup-android-arm-eabi": "4.36.0", |         "@rollup/rollup-android-arm-eabi": "4.37.0", | ||||||
|         "@rollup/rollup-android-arm64": "4.36.0", |         "@rollup/rollup-android-arm64": "4.37.0", | ||||||
|         "@rollup/rollup-darwin-arm64": "4.36.0", |         "@rollup/rollup-darwin-arm64": "4.37.0", | ||||||
|         "@rollup/rollup-darwin-x64": "4.36.0", |         "@rollup/rollup-darwin-x64": "4.37.0", | ||||||
|         "@rollup/rollup-freebsd-arm64": "4.36.0", |         "@rollup/rollup-freebsd-arm64": "4.37.0", | ||||||
|         "@rollup/rollup-freebsd-x64": "4.36.0", |         "@rollup/rollup-freebsd-x64": "4.37.0", | ||||||
|         "@rollup/rollup-linux-arm-gnueabihf": "4.36.0", |         "@rollup/rollup-linux-arm-gnueabihf": "4.37.0", | ||||||
|         "@rollup/rollup-linux-arm-musleabihf": "4.36.0", |         "@rollup/rollup-linux-arm-musleabihf": "4.37.0", | ||||||
|         "@rollup/rollup-linux-arm64-gnu": "4.36.0", |         "@rollup/rollup-linux-arm64-gnu": "4.37.0", | ||||||
|         "@rollup/rollup-linux-arm64-musl": "4.36.0", |         "@rollup/rollup-linux-arm64-musl": "4.37.0", | ||||||
|         "@rollup/rollup-linux-loongarch64-gnu": "4.36.0", |         "@rollup/rollup-linux-loongarch64-gnu": "4.37.0", | ||||||
|         "@rollup/rollup-linux-powerpc64le-gnu": "4.36.0", |         "@rollup/rollup-linux-powerpc64le-gnu": "4.37.0", | ||||||
|         "@rollup/rollup-linux-riscv64-gnu": "4.36.0", |         "@rollup/rollup-linux-riscv64-gnu": "4.37.0", | ||||||
|         "@rollup/rollup-linux-s390x-gnu": "4.36.0", |         "@rollup/rollup-linux-riscv64-musl": "4.37.0", | ||||||
|         "@rollup/rollup-linux-x64-gnu": "4.36.0", |         "@rollup/rollup-linux-s390x-gnu": "4.37.0", | ||||||
|         "@rollup/rollup-linux-x64-musl": "4.36.0", |         "@rollup/rollup-linux-x64-gnu": "4.37.0", | ||||||
|         "@rollup/rollup-win32-arm64-msvc": "4.36.0", |         "@rollup/rollup-linux-x64-musl": "4.37.0", | ||||||
|         "@rollup/rollup-win32-ia32-msvc": "4.36.0", |         "@rollup/rollup-win32-arm64-msvc": "4.37.0", | ||||||
|         "@rollup/rollup-win32-x64-msvc": "4.36.0", |         "@rollup/rollup-win32-ia32-msvc": "4.37.0", | ||||||
|  |         "@rollup/rollup-win32-x64-msvc": "4.37.0", | ||||||
|         "fsevents": "~2.3.2" |         "fsevents": "~2.3.2" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|  | |||||||
| @ -55,4 +55,8 @@ describe("Linter", () => { | |||||||
|         expect(await lint(`module.exports("Hi");`, "application/javascript;env=backend")).toStrictEqual([]); |         expect(await lint(`module.exports("Hi");`, "application/javascript;env=backend")).toStrictEqual([]); | ||||||
|         expect(await lint(`module.exports("Hi");`, "application/javascript;env=frontend")).toStrictEqual([]); |         expect(await lint(`module.exports("Hi");`, "application/javascript;env=frontend")).toStrictEqual([]); | ||||||
|     }); |     }); | ||||||
|  | 
 | ||||||
|  |     it("ignores TypeScript file", async () => { | ||||||
|  |         expect(await lint("export async function lint(code: string, mimeType: string) {}", "text/typescript-jsx")).toStrictEqual([]); | ||||||
|  |     }); | ||||||
| }); | }); | ||||||
|  | |||||||
| @ -10,6 +10,12 @@ export async function lint(code: string, mimeType: string) { | |||||||
|         module: "readonly" |         module: "readonly" | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  |     // Unsupported languages
 | ||||||
|  |     if (mimeType.startsWith("text/typescript")) { | ||||||
|  |         return []; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     // Custom globals
 | ||||||
|     if (mimeType === "application/javascript;env=frontend") { |     if (mimeType === "application/javascript;env=frontend") { | ||||||
|         globals = { ...globals, ...globalDefinitions.jquery }; |         globals = { ...globals, ...globalDefinitions.jquery }; | ||||||
|     } else if (mimeType === "application/javascript;env=backend") { |     } else if (mimeType === "application/javascript;env=backend") { | ||||||
|  | |||||||
| @ -206,7 +206,8 @@ export class TypedBasicWidget<T extends TypedComponent<any>> extends TypedCompon | |||||||
|     doRender() {} |     doRender() {} | ||||||
| 
 | 
 | ||||||
|     toggleInt(show: boolean | null | undefined) { |     toggleInt(show: boolean | null | undefined) { | ||||||
|         this.$widget.toggleClass("hidden-int", !show); |         this.$widget.toggleClass("hidden-int", !show) | ||||||
|  |                     .toggleClass("visible", !!show); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     isHiddenInt() { |     isHiddenInt() { | ||||||
| @ -214,7 +215,8 @@ export class TypedBasicWidget<T extends TypedComponent<any>> extends TypedCompon | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     toggleExt(show: boolean) { |     toggleExt(show: boolean) { | ||||||
|         this.$widget.toggleClass("hidden-ext", !show); |         this.$widget.toggleClass("hidden-ext", !show) | ||||||
|  |                     .toggleClass("visible", !!show); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     isHiddenExt() { |     isHiddenExt() { | ||||||
|  | |||||||
| @ -13,7 +13,7 @@ export default class ShowTocWidgetButton extends OnClickButtonWidget { | |||||||
|     constructor() { |     constructor() { | ||||||
|         super(); |         super(); | ||||||
| 
 | 
 | ||||||
|         this.icon("bx-spreadsheet bx-rotate-180") |         this.icon("bx-tn-toc") | ||||||
|             .title(t("show_toc_widget_button.show_toc")) |             .title(t("show_toc_widget_button.show_toc")) | ||||||
|             .titlePlacement("bottom") |             .titlePlacement("bottom") | ||||||
|             .onClick(() => { |             .onClick(() => { | ||||||
|  | |||||||
| @ -3,6 +3,14 @@ import { t } from "../../services/i18n.js"; | |||||||
| import type FNote from "../../entities/fnote.js"; | import type FNote from "../../entities/fnote.js"; | ||||||
| import type BasicWidget from "../basic_widget.js"; | import type BasicWidget from "../basic_widget.js"; | ||||||
| 
 | 
 | ||||||
|  | /* | ||||||
|  |  * Note: | ||||||
|  |  * | ||||||
|  |  * For floating button widgets that require content to overflow, the has-overflow CSS class should | ||||||
|  |  * be applied to the root element of the widget. Additionally, this root element may need to | ||||||
|  |  * properly handle rounded corners, as defined by the --border-radius CSS variable. | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
| const TPL = ` | const TPL = ` | ||||||
| <div class="floating-buttons no-print"> | <div class="floating-buttons no-print"> | ||||||
|     <style> |     <style> | ||||||
| @ -39,10 +47,18 @@ const TPL = ` | |||||||
|             top: 70px; |             top: 70px; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         .type-canvas .floating-buttons-children > * { | ||||||
|  |             --border-radius: 0; /* Overridden by themes */ | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         .floating-buttons-children > *:not(.hidden-int):not(.no-content-hidden) { |         .floating-buttons-children > *:not(.hidden-int):not(.no-content-hidden) { | ||||||
|             margin: 2px; |             margin: 2px; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         .floating-buttons-children > *:not(.has-overflow) { | ||||||
|  |             overflow: hidden; | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|         .floating-buttons-children > button, .floating-buttons-children .floating-button { |         .floating-buttons-children > button, .floating-buttons-children .floating-button { | ||||||
|             font-size: 150%; |             font-size: 150%; | ||||||
|             padding: 5px 10px 4px 10px; |             padding: 5px 10px 4px 10px; | ||||||
|  | |||||||
| @ -10,7 +10,7 @@ import froca from "../../services/froca.js"; | |||||||
| import type FNote from "../../entities/fnote.js"; | import type FNote from "../../entities/fnote.js"; | ||||||
| 
 | 
 | ||||||
| const TPL = ` | const TPL = ` | ||||||
| <div class="backlinks-widget"> | <div class="backlinks-widget has-overflow"> | ||||||
|     <style> |     <style> | ||||||
|         .backlinks-widget { |         .backlinks-widget { | ||||||
|             position: relative; |             position: relative; | ||||||
| @ -61,7 +61,7 @@ const TPL = ` | |||||||
|         <span class="backlinks-count"></span> |         <span class="backlinks-count"></span> | ||||||
|     </div> |     </div> | ||||||
| 
 | 
 | ||||||
|     <div class="backlinks-items" style="display: none;"></div> |     <div class="backlinks-items dropdown-menu" style="display: none;"></div> | ||||||
| </div> | </div> | ||||||
| `;
 | `;
 | ||||||
| 
 | 
 | ||||||
| @ -121,7 +121,8 @@ export default class BacklinksWidget extends NoteContextAwareWidget { | |||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     toggle(show: boolean) { |     toggle(show: boolean) { | ||||||
|         this.$widget.toggleClass("hidden-no-content", !show); |         this.$widget.toggleClass("hidden-no-content", !show) | ||||||
|  |                     .toggleClass("visible", !!show); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     clearItems() { |     clearItems() { | ||||||
|  | |||||||
| @ -5,6 +5,7 @@ import server from "../services/server.js"; | |||||||
| import type FNote from "../entities/fnote.js"; | import type FNote from "../entities/fnote.js"; | ||||||
| import type { EventData } from "../components/app_context.js"; | import type { EventData } from "../components/app_context.js"; | ||||||
| import type { Icon } from "./icon_list.js"; | import type { Icon } from "./icon_list.js"; | ||||||
|  | import { Dropdown } from "bootstrap"; | ||||||
| 
 | 
 | ||||||
| const TPL = ` | const TPL = ` | ||||||
| <div class="note-icon-widget dropdown"> | <div class="note-icon-widget dropdown"> | ||||||
| @ -88,6 +89,7 @@ interface IconToCountCache { | |||||||
| 
 | 
 | ||||||
| export default class NoteIconWidget extends NoteContextAwareWidget { | export default class NoteIconWidget extends NoteContextAwareWidget { | ||||||
| 
 | 
 | ||||||
|  |     private dropdown!: bootstrap.Dropdown; | ||||||
|     private $icon!: JQuery<HTMLElement>; |     private $icon!: JQuery<HTMLElement>; | ||||||
|     private $iconList!: JQuery<HTMLElement>; |     private $iconList!: JQuery<HTMLElement>; | ||||||
|     private $iconCategory!: JQuery<HTMLElement>; |     private $iconCategory!: JQuery<HTMLElement>; | ||||||
| @ -96,6 +98,8 @@ export default class NoteIconWidget extends NoteContextAwareWidget { | |||||||
| 
 | 
 | ||||||
|     doRender() { |     doRender() { | ||||||
|         this.$widget = $(TPL); |         this.$widget = $(TPL); | ||||||
|  |         this.dropdown = Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']")[0]); | ||||||
|  | 
 | ||||||
|         this.$icon = this.$widget.find("button.note-icon"); |         this.$icon = this.$widget.find("button.note-icon"); | ||||||
|         this.$iconList = this.$widget.find(".icon-list"); |         this.$iconList = this.$widget.find(".icon-list"); | ||||||
|         this.$iconList.on("click", "span", async (e) => { |         this.$iconList.on("click", "span", async (e) => { | ||||||
| @ -130,6 +134,8 @@ export default class NoteIconWidget extends NoteContextAwareWidget { | |||||||
| 
 | 
 | ||||||
|     async refreshWithNote(note: FNote) { |     async refreshWithNote(note: FNote) { | ||||||
|         this.$icon.removeClass().addClass(`${note.getIcon()} note-icon`); |         this.$icon.removeClass().addClass(`${note.getIcon()} note-icon`); | ||||||
|  |         this.$icon.prop("disabled", !!(this.noteContext?.viewScope?.viewMode !== "default")); | ||||||
|  |         this.dropdown.hide(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     async entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) { |     async entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) { | ||||||
|  | |||||||
| @ -579,11 +579,7 @@ table.promoted-attributes-in-tooltip th { | |||||||
| 
 | 
 | ||||||
| .tooltip { | .tooltip { | ||||||
|     font-size: var(--main-font-size) !important; |     font-size: var(--main-font-size) !important; | ||||||
|     /* |  | ||||||
|         TODO: Investigate the purpose of this |  | ||||||
|     z-index: calc(var(--ck-z-panel) - 1) !important; |     z-index: calc(var(--ck-z-panel) - 1) !important; | ||||||
|     */ |  | ||||||
|     z-index: 3000; |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .tooltip-trigger { | .tooltip-trigger { | ||||||
| @ -1797,3 +1793,10 @@ footer.file-footer button { | |||||||
|     font-size: 130%; |     font-size: 130%; | ||||||
|     padding: 1px 10px 1px 10px; |     padding: 1px 10px 1px 10px; | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | /* Customized icons */ | ||||||
|  | 
 | ||||||
|  | .bx-tn-toc::before { | ||||||
|  |     content: "\ec24"; | ||||||
|  |     transform: rotate(180deg); | ||||||
|  | } | ||||||
| @ -1305,7 +1305,7 @@ div.promoted-attribute-cell .multiplicity:has(span) { | |||||||
|  /* Floating buttons container */ |  /* Floating buttons container */ | ||||||
| div#center-pane .floating-buttons-children { | div#center-pane .floating-buttons-children { | ||||||
|     opacity: 1; |     opacity: 1; | ||||||
|     overflow: hidden; |     min-height: var(--floating-button-height); | ||||||
|     transform-origin: right; |     transform-origin: right; | ||||||
|     box-shadow: 1px 1px 1px var(--floating-button-shadow-color); |     box-shadow: 1px 1px 1px var(--floating-button-shadow-color); | ||||||
|     background: var(--floating-button-background-color); |     background: var(--floating-button-background-color); | ||||||
| @ -1325,6 +1325,10 @@ div#center-pane .floating-buttons-children { | |||||||
| 
 | 
 | ||||||
| /* Floating buttons */ | /* Floating buttons */ | ||||||
| 
 | 
 | ||||||
|  | .floating-buttons-children { | ||||||
|  |     --border-radius-size: 6px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| .floating-buttons-children > * { | .floating-buttons-children > * { | ||||||
|     margin: 0 !important; |     margin: 0 !important; | ||||||
| } | } | ||||||
| @ -1352,6 +1356,12 @@ div.floating-buttons-children .floating-button:active { | |||||||
|     font-size: calc(var(--floating-button-icon-size) * 0.85); |     font-size: calc(var(--floating-button-icon-size) * 0.85); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | /* The first visible floating button */ | ||||||
|  | div.floating-buttons-children > *:nth-child(1 of .visible) { | ||||||
|  |     --border-radius: var(--border-radius-size) 0 0 var(--border-radius-size); | ||||||
|  |     border-radius: var(--border-radius); | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  /* "Show / hide floating buttons" buttons */ |  /* "Show / hide floating buttons" buttons */ | ||||||
| 
 | 
 | ||||||
|  @keyframes floating-buttons-show-hide-button-animation { |  @keyframes floating-buttons-show-hide-button-animation { | ||||||
| @ -1409,8 +1419,9 @@ div.floating-buttons-children:not(.temporarily-hidden) .close-floating-buttons-b | |||||||
|     animation: floating-buttons-show-hide-button-animation 400ms ease-out; |     animation: floating-buttons-show-hide-button-animation 400ms ease-out; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| div.floating-buttons-children .close-floating-buttons-button { | div.floating-buttons-children .close-floating-buttons { | ||||||
|     border-radius: 0; |     border-radius: 0 var(--border-radius-size) var(--border-radius-size) 0; | ||||||
|  |     overflow: hidden; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| div.floating-buttons-children .close-floating-buttons { | div.floating-buttons-children .close-floating-buttons { | ||||||
| @ -1426,18 +1437,27 @@ div.floating-buttons-children .close-floating-buttons:has(.close-floating-button | |||||||
| 
 | 
 | ||||||
| /* Backlink count */ | /* Backlink count */ | ||||||
| 
 | 
 | ||||||
| .floating-buttons .backlinks-ticker { | .backlinks-widget .backlinks-ticker { | ||||||
|     height: 100%; |     height: 100%; | ||||||
|     padding: 0 10px; |     padding: 0 10px; | ||||||
|     border-radius: 0; |     border-radius: var(--border-radius); | ||||||
|     background: transparent; |     background: transparent; | ||||||
|     user-select: none; |     user-select: none; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| .floating-buttons .backlinks-ticker:has(.backlinks-count:hover) { | .backlinks-widget .backlinks-ticker:hover { | ||||||
|     background: var(--floating-button-hover-background); |     background: var(--floating-button-hover-background); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | .backlinks-widget .backlinks-items { | ||||||
|  |     --menu-padding-size: 20px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | /* TODO: Restyle the path */ | ||||||
|  | .backlinks-widget .backlinks-items .note-path { | ||||||
|  |     padding-inline-start: 8px; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| /* Copy image reference */ | /* Copy image reference */ | ||||||
| 
 | 
 | ||||||
| .floating-buttons .copy-image-reference-button .hidden-image-copy { | .floating-buttons .copy-image-reference-button .hidden-image-copy { | ||||||
| @ -1452,14 +1472,6 @@ div.floating-buttons-children .close-floating-buttons:has(.close-floating-button | |||||||
|     gap: 0; |     gap: 0; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| /* Individual icon position / size corrections */ |  | ||||||
| 
 |  | ||||||
| /* Table of contents */ |  | ||||||
| .floating-buttons .bx-spreadsheet::before { |  | ||||||
|     /* Note: since the icon is rotated, a positive top margin will actually shift the icon upwards */ |  | ||||||
|     margin-top: .1em; |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| /* The highlight animation */ | /* The highlight animation */ | ||||||
| 
 | 
 | ||||||
| @keyframes floating-button-highlight { | @keyframes floating-button-highlight { | ||||||
|  | |||||||
| @ -1,70 +0,0 @@ | |||||||
| "use strict"; |  | ||||||
| 
 |  | ||||||
| import path from "path"; |  | ||||||
| import resourceDir from "./resource_dir.js"; |  | ||||||
| import log from "./log.js"; |  | ||||||
| import os from "os"; |  | ||||||
| import fs from "fs"; |  | ||||||
| import config from "./config.js"; |  | ||||||
| import { isElectron } from "./utils.js"; |  | ||||||
| 
 |  | ||||||
| const template = `[Desktop Entry]
 |  | ||||||
| Type=Application |  | ||||||
| Name=TriliumNext Notes |  | ||||||
| StartupWMClass=TriliumNext Notes |  | ||||||
| Icon=#APP_ROOT_DIR#/icon.png |  | ||||||
| Exec=#EXE_PATH# |  | ||||||
| Categories=Office |  | ||||||
| Terminal=false |  | ||||||
| `;
 |  | ||||||
| 
 |  | ||||||
| /** |  | ||||||
|  * Installs .desktop icon into standard ~/.local/share/applications directory. |  | ||||||
|  * We overwrite this file during every run as it might have been updated. |  | ||||||
|  */ |  | ||||||
| function installLocalAppIcon() { |  | ||||||
|     if (!isElectron || ["win32", "darwin"].includes(os.platform()) || (config.General && config.General.noDesktopIcon)) { |  | ||||||
|         return; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     if (!fs.existsSync(path.resolve(resourceDir.ELECTRON_APP_ROOT_DIR, "trilium-portable.sh"))) { |  | ||||||
|         // simple heuristic to detect ".tar.xz" linux build (i.e., not flatpak, not debian)
 |  | ||||||
|         // only in such case it's necessary to create an icon
 |  | ||||||
|         return; |  | ||||||
|     } |  | ||||||
| 
 |  | ||||||
|     const desktopDir = path.resolve(os.homedir(), ".local/share/applications"); |  | ||||||
| 
 |  | ||||||
|     fs.stat(desktopDir, function (err, stats) { |  | ||||||
|         if (err) { |  | ||||||
|             // Directory doesn't exist, so we won't attempt to create the .desktop file
 |  | ||||||
|             return; |  | ||||||
|         } |  | ||||||
| 
 |  | ||||||
|         if (stats.isDirectory()) { |  | ||||||
|             const desktopFilePath = path.resolve(desktopDir, "trilium-notes.desktop"); |  | ||||||
| 
 |  | ||||||
|             fs.writeFile(desktopFilePath, getDesktopFileContent(), function (err) { |  | ||||||
|                 if (err) { |  | ||||||
|                     log.error("Desktop icon installation to ~/.local/share/applications failed."); |  | ||||||
|                 } |  | ||||||
|             }); |  | ||||||
|         } |  | ||||||
|     }); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function getDesktopFileContent() { |  | ||||||
|     return template.replace("#APP_ROOT_DIR#", escapePath(resourceDir.ELECTRON_APP_ROOT_DIR)).replace("#EXE_PATH#", escapePath(getExePath())); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function escapePath(path: string) { |  | ||||||
|     return path.replace(/ /g, "\\ "); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function getExePath() { |  | ||||||
|     return path.resolve(resourceDir.ELECTRON_APP_ROOT_DIR, "trilium"); |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| export default { |  | ||||||
|     installLocalAppIcon |  | ||||||
| }; |  | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran