mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 11:39:01 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			689 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			689 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| class Sidebar {
 | |
|     /**
 | |
|      * @param {TabContext} ctx
 | |
|      */
 | |
|     constructor(ctx) {
 | |
|         this.ctx = ctx;
 | |
|         this.$sidebar = ctx.$tabContent.find(".note-detail-sidebar");
 | |
|         this.$showSideBarButton = this.ctx.$tabContent.find(".show-sidebar-button");
 | |
|         this.$showSideBarButton.hide();
 | |
| 
 | |
|         this.$hideSidebarButton = this.$sidebar.find(".hide-sidebar-button");
 | |
| 
 | |
|         this.$hideSidebarButton.click(() => {
 | |
|             this.$sidebar.hide();
 | |
|             this.$showSideBarButton.show();
 | |
|         });
 | |
| 
 | |
|         this.$showSideBarButton.click(() => {
 | |
|             this.$sidebar.show();
 | |
|             this.$showSideBarButton.hide();
 | |
|         })
 | |
|     }
 | |
| }
 | |
| 
 | |
| export default Sidebar; | 
