mirror of
				https://github.com/em-squared/5e-drs.git
				synced 2025-10-31 05:24:20 +00:00 
			
		
		
		
	refonte du grimoire personnel, suivi des emplacements de sorts par niveau
This commit is contained in:
		
							parent
							
								
									7cf83baed3
								
							
						
					
					
						commit
						9dae3aec37
					
				
					 6 changed files with 180 additions and 27 deletions
				
			
		|  | @ -43,7 +43,7 @@ export default { | |||
| 
 | ||||
|   methods: { | ||||
|     download () { | ||||
|       saveAs(new Blob([JSON.stringify(this.$store.state.myMagicItems.magicItems)], { | ||||
|       saveAs(new Blob([JSON.stringify(this.$store.state.myMagicItems)], { | ||||
|           type: "text/plain;charset=utf-8" | ||||
|       }), "objets-magiques.json") | ||||
|     }, | ||||
|  | @ -56,15 +56,15 @@ export default { | |||
|       reader.onload = function() { | ||||
|         let result = JSON.parse(reader.result) | ||||
|         let isValid = true | ||||
|         if (result.length >= 1) { | ||||
|           for (var s of result) { | ||||
|         if (result.magicItems && result.magicItems.length >= 1) { | ||||
|           for (var s of result.magicItems) { | ||||
|             if (s.pid !== 'magicItem') { | ||||
|               isValid = false | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|         if (isValid) { | ||||
|           self.$store.commit('myMagicItems/setMagicItems', result) | ||||
|           self.$store.commit('myMagicItems/setMagicItems', result.magicItems) | ||||
|         } | ||||
|       } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Maxime Moraine
						Maxime Moraine