mirror of
				https://github.com/em-squared/5e-drs.git
				synced 2025-10-31 05:24:20 +00:00 
			
		
		
		
	réduction de la taille des emplacements de sorts dans le grimoire personnel + options d'impressions
This commit is contained in:
		
							parent
							
								
									e6c38d156a
								
							
						
					
					
						commit
						44b8729230
					
				
					 3 changed files with 25 additions and 8 deletions
				
			
		|  | @ -33,9 +33,15 @@ export default { | |||
| 			// Récupération des données utilisateurs depuis le navigateur
 | ||||
| 			if(localStorage.getItem('mySpells') && localStorage.getItem('mySpells') !== undefined) { | ||||
|         let localStorageData = JSON.parse(localStorage.getItem('mySpells')) | ||||
|         state.spells = localStorageData.spells | ||||
|         state.spellSlots = localStorageData.spellSlots | ||||
|         state.notPrintedSpells = localStorageData.notPrintedSpells | ||||
|         if (localStorageData.spells) { | ||||
|           state.spells = localStorageData.spells | ||||
|         } | ||||
|         if (localStorageData.spellSlots) { | ||||
|           state.spellSlots = localStorageData.spellSlots | ||||
|         } | ||||
|         if (localStorageData.notPrintedSpells) { | ||||
|           state.notPrintedSpells = localStorageData.notPrintedSpells | ||||
|         } | ||||
| 			} | ||||
| 		}, | ||||
|     setSpells: (state, payload) => { | ||||
|  | @ -65,6 +71,9 @@ export default { | |||
|     setSpellSlots: (state, payload) => { | ||||
|       state.spellSlots = payload | ||||
|     }, | ||||
|     setNotPrintedSpells: (state, payload) => { | ||||
|       state.notPrintedSpells = payload | ||||
|     }, | ||||
|     addNotPrintedSpell: (state, payload) => { | ||||
|       let spellIndex = state.notPrintedSpells.findIndex(spell => spell.key == payload.key) | ||||
|       if (!spellIndex >= 0) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Maxime Moraine
						Maxime Moraine