mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	feat(settings): add button to restart application
This commit is contained in:
		
							parent
							
								
									3605a77b25
								
							
						
					
					
						commit
						1e985f7858
					
				| @ -22,6 +22,8 @@ const TPL = ` | |||||||
|             <p>On the desktop application, it's possible to use a semi-transparent background tinted in the colors of the user's wallpaper to add a touch of color.</p> |             <p>On the desktop application, it's possible to use a semi-transparent background tinted in the colors of the user's wallpaper to add a touch of color.</p> | ||||||
|         </label>         |         </label>         | ||||||
|     </div> |     </div> | ||||||
|  | 
 | ||||||
|  |     <button class="btn btn-micro restart-app-button">Restart the application to view the changes</button> | ||||||
| </div> | </div> | ||||||
| `;
 | `;
 | ||||||
| 
 | 
 | ||||||
| @ -36,9 +38,13 @@ export default class ElectronIntegrationOptions extends OptionsWidget { | |||||||
|         }); |         }); | ||||||
| 
 | 
 | ||||||
|         this.$backgroundEffects = this.$widget.find("input.background-effects"); |         this.$backgroundEffects = this.$widget.find("input.background-effects"); | ||||||
|         this.$backgroundEffects.on("change", async () => { |         this.$backgroundEffects.on("change", () => this.updateCheckboxOption("backgroundEffects", this.$backgroundEffects)); | ||||||
|             await this.updateCheckboxOption("backgroundEffects", this.$backgroundEffects); | 
 | ||||||
|             utils.reloadFrontendApp("background effect change"); |         const restartAppButton = this.$widget.find(".restart-app-button"); | ||||||
|  |         restartAppButton.on("click", () => { | ||||||
|  |             const app = utils.dynamicRequire('@electron/remote').app; | ||||||
|  |             app.relaunch(); | ||||||
|  |             app.exit(); | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
|      |      | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran