mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	remove unused static getType() from section widgets
This commit is contained in:
		
							parent
							
								
									7a389baf08
								
							
						
					
					
						commit
						aa901b67ed
					
				| @ -38,8 +38,6 @@ export default class BasicPropertiesWidget extends NoteContextAwareWidget { | |||||||
|         this.child(this.noteTypeWidget, this.protectedNoteSwitchWidget); |         this.child(this.noteTypeWidget, this.protectedNoteSwitchWidget); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     static getType() { return "basic-properties"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return this.note; |         return this.note; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -43,8 +43,6 @@ const TPL = ` | |||||||
| </div> | </div> | ||||||
| `;
 | `;
 | ||||||
| export default class BookPropertiesWidget extends NoteContextAwareWidget { | export default class BookPropertiesWidget extends NoteContextAwareWidget { | ||||||
|     static getType() { return "book-properties"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return this.note && this.note.type === 'book'; |         return this.note && this.note.type === 'book'; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -55,8 +55,6 @@ const TPL = ` | |||||||
| </div>`; | </div>`; | ||||||
| 
 | 
 | ||||||
| export default class FilePropertiesWidget extends NoteContextAwareWidget { | export default class FilePropertiesWidget extends NoteContextAwareWidget { | ||||||
|     static getType() { return "file"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return this.note && this.note.type === 'file'; |         return this.note && this.note.type === 'file'; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -37,8 +37,6 @@ const TPL = ` | |||||||
| </div>`; | </div>`; | ||||||
| 
 | 
 | ||||||
| export default class ImagePropertiesWidget extends NoteContextAwareWidget { | export default class ImagePropertiesWidget extends NoteContextAwareWidget { | ||||||
|     static getType() { return "image"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return this.note && this.note.type === 'image'; |         return this.note && this.note.type === 'image'; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -24,8 +24,6 @@ const TPL = ` | |||||||
| let linkMapContainerIdCtr = 1; | let linkMapContainerIdCtr = 1; | ||||||
| 
 | 
 | ||||||
| export default class LinkMapWidget extends NoteContextAwareWidget { | export default class LinkMapWidget extends NoteContextAwareWidget { | ||||||
|     static getType() { return "link-map"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return this.note; |         return this.note; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -62,8 +62,6 @@ const TPL = ` | |||||||
| </div> | </div> | ||||||
| `;
 | `;
 | ||||||
| export default class NoteInfoWidget extends NoteContextAwareWidget { | export default class NoteInfoWidget extends NoteContextAwareWidget { | ||||||
|     static getType() { return "note-info"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return this.note; |         return this.note; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -36,8 +36,6 @@ const TPL = ` | |||||||
| </div>`; | </div>`; | ||||||
| 
 | 
 | ||||||
| export default class NotePathsWidget extends NoteContextAwareWidget { | export default class NotePathsWidget extends NoteContextAwareWidget { | ||||||
|     static getType() { return "note-paths"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return this.note; |         return this.note; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -15,8 +15,6 @@ const TPL = ` | |||||||
| </div>`; | </div>`; | ||||||
| 
 | 
 | ||||||
| export default class NotePropertiesWidget extends NoteContextAwareWidget { | export default class NotePropertiesWidget extends NoteContextAwareWidget { | ||||||
|     static getType() { return "note-properties"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return this.note && !!this.note.getLabelValue('pageUrl'); |         return this.note && !!this.note.getLabelValue('pageUrl'); | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -200,8 +200,6 @@ for (const clazz of [ | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| export default class SearchDefinitionWidget extends NoteContextAwareWidget { | export default class SearchDefinitionWidget extends NoteContextAwareWidget { | ||||||
|     static getType() { return "search"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return this.note && this.note.type === 'search'; |         return this.note && this.note.type === 'search'; | ||||||
|     } |     } | ||||||
|  | |||||||
| @ -31,8 +31,6 @@ const TPL = ` | |||||||
| `;
 | `;
 | ||||||
| 
 | 
 | ||||||
| export default class SimilarNotesWidget extends NoteContextAwareWidget { | export default class SimilarNotesWidget extends NoteContextAwareWidget { | ||||||
|     static getType() { return "similar-notes"; } |  | ||||||
| 
 |  | ||||||
|     isEnabled() { |     isEnabled() { | ||||||
|         return super.isEnabled() |         return super.isEnabled() | ||||||
|             && this.note.type !== 'search' |             && this.note.type !== 'search' | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam