mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	edit note button is now just an icon
This commit is contained in:
		
							
								
								
									
										14
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										14
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							| @@ -74,7 +74,7 @@ | |||||||
|         "jsdoc": "3.6.6", |         "jsdoc": "3.6.6", | ||||||
|         "lorem-ipsum": "2.0.3", |         "lorem-ipsum": "2.0.3", | ||||||
|         "rcedit": "3.0.0", |         "rcedit": "3.0.0", | ||||||
|         "webpack": "5.30.0", |         "webpack": "5.31.0", | ||||||
|         "webpack-cli": "4.6.0" |         "webpack-cli": "4.6.0" | ||||||
|       }, |       }, | ||||||
|       "optionalDependencies": { |       "optionalDependencies": { | ||||||
| @@ -9576,9 +9576,9 @@ | |||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "node_modules/webpack": { |     "node_modules/webpack": { | ||||||
|       "version": "5.30.0", |       "version": "5.31.0", | ||||||
|       "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.30.0.tgz", |       "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.31.0.tgz", | ||||||
|       "integrity": "sha512-Zr9NIri5yzpfmaMea2lSMV1UygbW0zQsSlGLMgKUm63ACXg6alhd1u4v5UBSBjzYKXJN6BNMGVM7w165e7NxYA==", |       "integrity": "sha512-3fUfZT/FUuThWSSyL32Fsh7weUUfYP/Fjc/cGSbla5KiSo0GtI1JMssCRUopJTvmLjrw05R2q7rlLtiKdSzkzQ==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "dependencies": { |       "dependencies": { | ||||||
|         "@types/eslint-scope": "^3.7.0", |         "@types/eslint-scope": "^3.7.0", | ||||||
| @@ -18083,9 +18083,9 @@ | |||||||
|       "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" |       "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==" | ||||||
|     }, |     }, | ||||||
|     "webpack": { |     "webpack": { | ||||||
|       "version": "5.30.0", |       "version": "5.31.0", | ||||||
|       "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.30.0.tgz", |       "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.31.0.tgz", | ||||||
|       "integrity": "sha512-Zr9NIri5yzpfmaMea2lSMV1UygbW0zQsSlGLMgKUm63ACXg6alhd1u4v5UBSBjzYKXJN6BNMGVM7w165e7NxYA==", |       "integrity": "sha512-3fUfZT/FUuThWSSyL32Fsh7weUUfYP/Fjc/cGSbla5KiSo0GtI1JMssCRUopJTvmLjrw05R2q7rlLtiKdSzkzQ==", | ||||||
|       "dev": true, |       "dev": true, | ||||||
|       "requires": { |       "requires": { | ||||||
|         "@types/eslint-scope": "^3.7.0", |         "@types/eslint-scope": "^3.7.0", | ||||||
|   | |||||||
| @@ -12,16 +12,17 @@ const TPL = ` | |||||||
|         padding: 10px; |         padding: 10px; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     .edit-code-note-container { |     .edit-code-note-button { | ||||||
|         position: absolute;  |         position: absolute;  | ||||||
|         top: 0px;  |         top: 5px;  | ||||||
|         right: 10px; |         right: 10px; | ||||||
|  |         font-size: 130%; | ||||||
|  |         cursor: pointer; | ||||||
|     } |     } | ||||||
|     </style> |     </style> | ||||||
|  |  | ||||||
|     <div class="alert alert-warning no-print edit-code-note-container"> |     <div class="alert alert-warning no-print edit-code-note-button bx bx-edit-alt" | ||||||
|          <a href="#" class="edit-note">Edit</a> <a href="#" class="external" data-help-page="Read-only-note" title="Help on Read only notes">?</a> |          title="Edit this note"></div> | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <pre class="note-detail-read-only-code-content"></pre> |     <pre class="note-detail-read-only-code-content"></pre> | ||||||
| </div>`; | </div>`; | ||||||
| @@ -34,7 +35,7 @@ export default class ReadOnlyCodeTypeWidget extends TypeWidget { | |||||||
|         this.contentSized(); |         this.contentSized(); | ||||||
|         this.$content = this.$widget.find('.note-detail-read-only-code-content'); |         this.$content = this.$widget.find('.note-detail-read-only-code-content'); | ||||||
|  |  | ||||||
|         this.$widget.find('a.edit-note').on('click', () => { |         this.$widget.find('.edit-code-note-button').on('click', () => { | ||||||
|             this.tabContext.codePreviewDisabled = true; |             this.tabContext.codePreviewDisabled = true; | ||||||
|  |  | ||||||
|             this.triggerEvent('codePreviewDisabled', {tabContext: this.tabContext}); |             this.triggerEvent('codePreviewDisabled', {tabContext: this.tabContext}); | ||||||
|   | |||||||
| @@ -36,16 +36,17 @@ const TPL = ` | |||||||
|         max-width: 100%; |         max-width: 100%; | ||||||
|     } |     } | ||||||
|      |      | ||||||
|     .edit-text-note-container { |     .edit-text-note-button { | ||||||
|         position: absolute;  |         position: absolute;  | ||||||
|         top: 5px; |         top: 5px; | ||||||
|         right: 10px; |         right: 10px; | ||||||
|  |         font-size: 130%; | ||||||
|  |         cursor: pointer; | ||||||
|     } |     } | ||||||
|     </style> |     </style> | ||||||
|  |  | ||||||
|     <div class="alert alert-warning no-print edit-text-note-container"> |     <div class="alert alert-warning no-print edit-text-note-button bx bx-edit-alt" | ||||||
|          <a href="#" class="edit-note">Edit</a> <a href="#" class="external" data-help-page="Read-only-note" title="Help on Read only notes">?</a> |          title="Edit this note"></div> | ||||||
|     </div> |  | ||||||
|  |  | ||||||
|     <div class="note-detail-readonly-text-content ck-content"></div> |     <div class="note-detail-readonly-text-content ck-content"></div> | ||||||
| </div> | </div> | ||||||
| @@ -60,7 +61,7 @@ export default class ReadOnlyTextTypeWidget extends AbstractTextTypeWidget { | |||||||
|  |  | ||||||
|         this.$content = this.$widget.find('.note-detail-readonly-text-content'); |         this.$content = this.$widget.find('.note-detail-readonly-text-content'); | ||||||
|  |  | ||||||
|         this.$widget.find('a.edit-note').on('click', () => { |         this.$widget.find('.edit-text-note-button').on('click', () => { | ||||||
|             this.tabContext.textPreviewDisabled = true; |             this.tabContext.textPreviewDisabled = true; | ||||||
|  |  | ||||||
|             this.triggerEvent('textPreviewDisabled', {tabContext: this.tabContext}); |             this.triggerEvent('textPreviewDisabled', {tabContext: this.tabContext}); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user