mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-03 19:54:14 +00:00 
			
		
		
		
	User data are included in data archive
This commit is contained in:
		@@ -60,7 +60,7 @@ ComunicWeb.components.account.export.ui = {
 | 
			
		||||
		var closeModal = function(){
 | 
			
		||||
			$(modal).modal('hide');
 | 
			
		||||
			emptyElem(modal);
 | 
			
		||||
			remove();
 | 
			
		||||
			modal.remove();
 | 
			
		||||
		}
 | 
			
		||||
		this._exportModal.close = closeModal;
 | 
			
		||||
		this._exportModal.closeModal.onclick = closeModal;
 | 
			
		||||
 
 | 
			
		||||
@@ -82,12 +82,12 @@ ComunicWeb.components.account.export.worker = {
 | 
			
		||||
 | 
			
		||||
		//Add raw json file
 | 
			
		||||
		zip.file("source.json", JSON.stringify(data));
 | 
			
		||||
 | 
			
		||||
		
 | 
			
		||||
		//Add the files to download
 | 
			
		||||
		/*files_list.forEach(function(url){
 | 
			
		||||
		files_list.forEach(function(url){
 | 
			
		||||
			var path = urlToPath(url);
 | 
			
		||||
			zip.file(path, urlToPromise(url), {binary:true});
 | 
			
		||||
		});*/
 | 
			
		||||
		});
 | 
			
		||||
 | 
			
		||||
		//Generated zip archive
 | 
			
		||||
		zip.generateAsync({type:"blob"}, function updateCallback(metadata) {
 | 
			
		||||
@@ -147,9 +147,12 @@ ComunicWeb.components.account.export.worker = {
 | 
			
		||||
		 * @param {Object} info Information about the post to parse
 | 
			
		||||
		 */
 | 
			
		||||
		var parsePost = function(post){
 | 
			
		||||
			if(post.file_path_url != null){
 | 
			
		||||
				if(!files.includes(post.file_path_url))
 | 
			
		||||
					files.push(post.file_path_url);
 | 
			
		||||
			
 | 
			
		||||
			if(post.kind != "youtube"){
 | 
			
		||||
				if(post.file_path_url != null){
 | 
			
		||||
					if(!files.includes(post.file_path_url))
 | 
			
		||||
						files.push(post.file_path_url);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			//Parse comments
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user