mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-07-13 06:28:08 +00:00
Compare commits
6 Commits
personnal-
...
22-01-2019
Author | SHA1 | Date | |
---|---|---|---|
e6f4159e53 | |||
2d88a71b80 | |||
6c090b4967 | |||
f67670dc0a | |||
a03fc1a745 | |||
32c484b41a |
2
LICENSE
2
LICENSE
@ -1,5 +1,5 @@
|
|||||||
MIT License
|
MIT License
|
||||||
Copyright (c) 2017-2018 Pierre HUBERT
|
Copyright (c) 2017-2019 Pierre HUBERT
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
@ -58,6 +58,14 @@ p, h1, h2, h3, h4, h5, h6 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Callouts
|
||||||
|
*/
|
||||||
|
.callout.callout-info {
|
||||||
|
background-color: var(--black-5) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Forms
|
* Forms
|
||||||
*/
|
*/
|
||||||
@ -556,4 +564,11 @@ img[src$="groups_logo/default.png"] {
|
|||||||
*/
|
*/
|
||||||
.friends-list-ro .friend a:hover .friends-name {
|
.friends-list-ro .friend a:hover .friends-name {
|
||||||
color: var(--black4);
|
color: var(--black4);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Account created page
|
||||||
|
*/
|
||||||
|
.page_account_created .message_container .message {
|
||||||
|
background-color: var(--black5);
|
||||||
}
|
}
|
@ -421,7 +421,7 @@ function checkString(value){
|
|||||||
function removeHtmlTags(input){
|
function removeHtmlTags(input){
|
||||||
|
|
||||||
//Check if input string is empty
|
//Check if input string is empty
|
||||||
if(input == null)
|
if(input == null || typeof input !== "string")
|
||||||
return "";
|
return "";
|
||||||
|
|
||||||
//Prepare update
|
//Prepare update
|
||||||
|
@ -25,18 +25,51 @@ ComunicWeb.components.account.export.worker = {
|
|||||||
ComunicWeb.components.account.export.ui.updateMessage("Got text data");
|
ComunicWeb.components.account.export.ui.updateMessage("Got text data");
|
||||||
ComunicWeb.components.account.export.ui.updateProgress(10);
|
ComunicWeb.components.account.export.ui.updateProgress(10);
|
||||||
|
|
||||||
//Parse data
|
//Get explorer
|
||||||
ComunicWeb.components.account.export.worker.parse(result);
|
ComunicWeb.components.account.export.worker.getExplorer(result);
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse account text data into ZIP file
|
* Second step for export : Get and open personnal data explorer
|
||||||
*
|
*
|
||||||
* @param {Object} data Text data about the account
|
* @param {Object} data Text data about the account (data not modified at this stage)
|
||||||
*/
|
*/
|
||||||
parse: function(data){
|
getExplorer: function(data){
|
||||||
|
|
||||||
|
ComunicWeb.components.account.export.ui.updateMessage("Getting data explorer");
|
||||||
|
ComunicWeb.components.account.export.ui.updateProgress(15);
|
||||||
|
|
||||||
|
JSZipUtils.getBinaryContent(ComunicWeb.__config.assetsURL+"zip/personnal-data-export-navigator.zip", function(err, file){
|
||||||
|
|
||||||
|
if(err != null){
|
||||||
|
ComunicWeb.debug.logMessage("Could not get personnal data export navigator!");
|
||||||
|
ComunicWeb.components.account.export.ui.exportFatalError(e);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
JSZip.loadAsync(file).then(function(zip){
|
||||||
|
|
||||||
|
//Ready to parse data
|
||||||
|
ComunicWeb.components.account.export.worker.parse(data, zip);
|
||||||
|
|
||||||
|
}).catch(function(){
|
||||||
|
ComunicWeb.debug.logMessage("Could not parse personnal data export navigator!");
|
||||||
|
ComunicWeb.components.account.export.ui.exportFatalError(e);
|
||||||
|
return;
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse account text data into ZIP file
|
||||||
|
*
|
||||||
|
* @param {Object} data Text data about the account
|
||||||
|
* @param {ZIP} zip The ZIP object to fill
|
||||||
|
*/
|
||||||
|
parse: function(data, zip){
|
||||||
|
|
||||||
//Get UI shorcut
|
//Get UI shorcut
|
||||||
var ui = ComunicWeb.components.account.export.ui;
|
var ui = ComunicWeb.components.account.export.ui;
|
||||||
@ -77,9 +110,6 @@ ComunicWeb.components.account.export.worker = {
|
|||||||
//Determine the list of files to download
|
//Determine the list of files to download
|
||||||
var files_list = this._generate_files_list(data);
|
var files_list = this._generate_files_list(data);
|
||||||
|
|
||||||
//Create zip file
|
|
||||||
var zip = new JSZip();
|
|
||||||
|
|
||||||
//Add raw json file
|
//Add raw json file
|
||||||
zip.file("source.json", JSON.stringify(data));
|
zip.file("source.json", JSON.stringify(data));
|
||||||
|
|
||||||
|
@ -22,6 +22,9 @@ ComunicWeb.components.conversations.messageEditor = {
|
|||||||
|
|
||||||
function(content){
|
function(content){
|
||||||
|
|
||||||
|
if(!content)
|
||||||
|
return;
|
||||||
|
|
||||||
//Intend to update message content
|
//Intend to update message content
|
||||||
ComunicWeb.components.conversations.interface.UpdateSingleMessage(
|
ComunicWeb.components.conversations.interface.UpdateSingleMessage(
|
||||||
message.ID,
|
message.ID,
|
||||||
|
1
assets/zip/.gitignore
vendored
Normal file
1
assets/zip/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
personnal-data-export-navigator.zip
|
9
assets/zip/personnal-data-export-navigator-builder.sh
Executable file
9
assets/zip/personnal-data-export-navigator-builder.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
cd $SCRIPT_DIR;
|
||||||
|
|
||||||
|
rm -f personnal-data-export-navigator.zip
|
||||||
|
cd personnal-data-export-navigator;
|
||||||
|
zip -r personnal-data-export-navigator.zip assets Export.html
|
||||||
|
mv personnal-data-export-navigator.zip ../
|
8
builder
8
builder
@ -177,6 +177,7 @@ if(file_exists(OUTPUT_DIRECTORY))
|
|||||||
mkdir(OUTPUT_DIRECTORY, 0777, true);
|
mkdir(OUTPUT_DIRECTORY, 0777, true);
|
||||||
mkdir($path_release_assets, 0777, true);
|
mkdir($path_release_assets, 0777, true);
|
||||||
mkdir($path_release_assets."/css", 0777, true);
|
mkdir($path_release_assets."/css", 0777, true);
|
||||||
|
mkdir($path_release_assets."/zip", 0777, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -237,6 +238,13 @@ rcopy($path_debug_assets."css/dark_theme.css", $path_release_assets."css/dark_th
|
|||||||
//Copy pacman
|
//Copy pacman
|
||||||
rcopy($path_debug_assets."3rdparty/pacman", $path_release_assets."3rdparty/pacman");
|
rcopy($path_debug_assets."3rdparty/pacman", $path_release_assets."3rdparty/pacman");
|
||||||
|
|
||||||
|
|
||||||
|
//Build and copy personnal data navigator
|
||||||
|
notice("Build personnal data export navigator and add it to built files");
|
||||||
|
exec($path_debug_assets."zip/personnal-data-export-navigator-builder.sh");
|
||||||
|
rcopy($path_debug_assets."zip/personnal-data-export-navigator.zip", $path_release_assets."zip/personnal-data-export-navigator.zip");
|
||||||
|
|
||||||
|
|
||||||
//Begin to write root PHP File
|
//Begin to write root PHP File
|
||||||
notice("Generate PHP root file");
|
notice("Generate PHP root file");
|
||||||
$page_src = '<?php
|
$page_src = '<?php
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
Comunic web app client
|
Comunic web app client
|
||||||
Main HTML file
|
Main HTML file
|
||||||
|
|
||||||
(c) Pierre HUBERT 2017-2018
|
(c) Pierre HUBERT 2017-2019
|
||||||
-->
|
-->
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
Reference in New Issue
Block a user