Improve usability
This commit is contained in:
		
							parent
							
								
									a70c24cd1e
								
							
						
					
					
						commit
						5679777010
					
				
					 1 changed files with 13 additions and 0 deletions
				
			
		|  | @ -90,12 +90,25 @@ export default defineComponent({ | ||||||
| 
 | 
 | ||||||
| 		save() { | 		save() { | ||||||
| 			this.$store.set('menu', this.splited); | 			this.$store.set('menu', this.splited); | ||||||
|  | 			this.reloadAsk(); | ||||||
| 		}, | 		}, | ||||||
| 
 | 
 | ||||||
| 		reset() { | 		reset() { | ||||||
| 			this.$store.reset('menu'); | 			this.$store.reset('menu'); | ||||||
| 			this.items = this.$store.state.menu.join('\n'); | 			this.items = this.$store.state.menu.join('\n'); | ||||||
|  | 			this.reloadAsk(); | ||||||
| 		}, | 		}, | ||||||
|  | 
 | ||||||
|  | 		async reloadAsk() { | ||||||
|  | 			const { canceled } = await os.dialog({ | ||||||
|  | 				type: 'info', | ||||||
|  | 				text: this.$ts.reloadToApplySetting, | ||||||
|  | 				showCancelButton: true | ||||||
|  | 			}); | ||||||
|  | 			if (canceled) return; | ||||||
|  | 
 | ||||||
|  | 			location.reload(); | ||||||
|  | 		} | ||||||
| 	}, | 	}, | ||||||
| }); | }); | ||||||
| </script> | </script> | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue