forked from React-Group/interstellar_ai
		
	Compare commits
	
		
			3 commits
		
	
	
		
			0aa7116fd3
			...
			15d852c11d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 15d852c11d | |||
|   | 29fd6d0a05 | ||
| d4507c74a7 | 
					 1 changed files with 22 additions and 23 deletions
				
			
		|  | @ -8,9 +8,11 @@ export function exportSettings(): string { | |||
|     for (let i = 0; i < localStorage.length; i++) { | ||||
|         const key = localStorage.key(i); | ||||
|         if (key) { | ||||
|             if (key !== "accountName" && key !== "accountPassword" && key !== "accountEmail") { | ||||
|                 settings[key] = localStorage.getItem(key); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     // Convert settings object to JSON string
 | ||||
|     return JSON.stringify(settings, null, 2); | ||||
|  | @ -21,9 +23,6 @@ export function importSettings(jsonData: string): void { | |||
|     try { | ||||
|         const parsedSettings = JSON.parse(jsonData); | ||||
| 
 | ||||
|       // Clear the current localStorage
 | ||||
|       localStorage.clear(); | ||||
| 
 | ||||
|         // Loop through parsed settings and save them in localStorage
 | ||||
|         Object.keys(parsedSettings).forEach((key) => { | ||||
|             localStorage.setItem(key, parsedSettings[key]); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue