From 7ade6a3495cd5c74c964df5ed794e110e770ed9d Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Sat, 28 Jun 2008 23:09:58 +0000 Subject: [PATCH 1/1] =?utf8?q?ADD=20avancement=20sur=20la=20possibilit?= =?utf8?q?=C3=A9=20de=20r=C3=A9duire=20une=20conversation=20(pas=20fini)?= =?utf8?q?=20ADD=20possibitlit=C3=A9=20de=20montrer=20de=20mani=C3=A8re=20?= =?utf8?q?ostentatoire=20que=20l'on=20est=20un=20ekMaster=20(pour=20Bernie?= =?utf8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- css/1/euphorik.css | 3 + css/1/pageMinichat.css | 9 +- doc/TODO.txt | 7 + doc/graphiques/maquette_1.svg | 1037 ++++++++++++++++------------ doc/protocole3.txt | 13 +- img/css1/logo_ek_master.png | Bin 0 -> 16975 bytes img/css1/marque_ek.png | Bin 0 -> 657 bytes index.yaws | 13 +- js/euphorik.js | 23 +- js/pageMinichat.js | 11 +- js/pageProfile.js | 243 ++++--- modules/erl/euphorik_bd.erl | 20 +- modules/erl/euphorik_bd_update.erl | 2 +- modules/erl/euphorik_daemon.erl | 85 +-- modules/erl/euphorik_protocole.erl | 58 +- modules/include/euphorik_bd.hrl | 3 +- nbproject/private/private.xml | 4 +- 17 files changed, 889 insertions(+), 642 deletions(-) create mode 100644 img/css1/logo_ek_master.png create mode 100644 img/css1/marque_ek.png diff --git a/css/1/euphorik.css b/css/1/euphorik.css index 5964a11..fa02cc0 100755 --- a/css/1/euphorik.css +++ b/css/1/euphorik.css @@ -107,6 +107,9 @@ ul#menu { height: 129px; position: absolute; } +#logo.ekMaster { + background-image: url(../../img/css1/logo_ek_master.png); +} /***** Le pied de page *****/ #footer { diff --git a/css/1/pageMinichat.css b/css/1/pageMinichat.css index faea35d..a352ff9 100755 --- a/css/1/pageMinichat.css +++ b/css/1/pageMinichat.css @@ -285,9 +285,16 @@ margin-right: 2px; font-weight: bold; } -#page.minichat div.message.ekMaster .pseudo { +#page.minichat div.message.ekMasterlight .pseudo { color: #f0df95 } + +#page.minichat div.message.ekMasterheavy .pseudo { + color: #fcd82f; + padding-left: 14px; + background: transparent url(../../img/css1/marque_ek.png) no-repeat scroll left center +} + #page.minichat div.message .pseudo .login { margin-left: 2px; font-size: 8px; diff --git a/doc/TODO.txt b/doc/TODO.txt index e54439d..c619c39 100755 --- a/doc/TODO.txt +++ b/doc/TODO.txt @@ -1,6 +1,9 @@ == TODO == === v1.1 === +* adapter au protocole pour envoyer les infos concernant les réductions des conversations +* étudier la solution SVG et le calcul de pourcentage pour la largeur des fenêtres +* un clic sur le nombre de message auquel le user répond enlève tous les mess * Gestion de l'historique au niveau du navigateur (pouvoir revenir aux pages précédentes). Utiliser un plugin jQuery si possible. Voir du coté des ancres (fragment d'url) : #ancre. * http://www.euphorik.ch/#page=chat * Revoir le système de conversation : @@ -13,10 +16,12 @@ * un bouton "créer lien" * un bouton "fermer" * Possibilité de fermer temporairement une conversation (la réduire sous la forme d'un onglet) + * etre averti lorsqu'un nouveau message arrive dans une conversation réduite * lien vers une conversation : http://www.euphorik.ch/#conv=45 * Mettre un icon (genre sablier ou truc qui tourne à la apple) lorsque le chat se charge (également lors d'un changement de page par exemple) * L'icon apparait tout en haut (absolute) * Simuler un réseau lent +* supprimer le cookie si le client n'arrive pas à s'authentifier avec (réponse négative du serveur) * Avoir une option dans le profile pour montrer son rang (ekMaster) de manière ostantatoire, discret ou caché * Mise à jour automatique de la version dans le about en fonction du tag/branche courant (lors de la mise en production) ? * Tests de monter en charge coté serveur, analyse de la complexité (regarder du coté des TODO dans le code). Utiliser eventuellement Tsung @@ -25,6 +30,8 @@ * Pouvoir récupérer son mdp (ou en générer unhttp://www.euphorik.ch/ autre) via son email. Marquer dans le profile que l'email sert à cela et n'est pas visible pas les autres personnes * (Pouvoir inverser le chat) tester la faisabilité === v1.2 === +* option dans le profile pour ouvrir les liens dans un nouveau tab +* Pouvoir auto répondre à une conversation * Possibilité d'ajouter des messages dans son profil * Les messages sont soient publics soient privées (Par défaut privées) * Un bouton "+" se trouve à coté de chaque message afin de pouvoir l'ajouter dans son profil diff --git a/doc/graphiques/maquette_1.svg b/doc/graphiques/maquette_1.svg index 3f930d9..f1ba88e 100644 --- a/doc/graphiques/maquette_1.svg +++ b/doc/graphiques/maquette_1.svg @@ -6,6 +6,7 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" @@ -15,93 +16,147 @@ inkscape:version="0.46" sodipodi:docname="maquette_1.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape" - inkscape:export-filename="/home/gburri/projets/euphorik/doc/graphiques/logo_brut2.png" + inkscape:export-filename="/tmp/plop.png" inkscape:export-xdpi="138.63565" inkscape:export-ydpi="138.63565"> + + + + + + + + + + + style="stop-color:#e36a6a;stop-opacity:1;" /> + style="stop-color:#7e1818;stop-opacity:1;" /> + style="stop-color:#767676;stop-opacity:1;" /> + style="stop-color:#801f1f;stop-opacity:1;" /> + style="stop-color:#e19671;stop-opacity:1;" /> + style="stop-color:#e19671;stop-opacity:0;" /> + style="stop-color:#00009d;stop-opacity:1;" /> + style="stop-color:#00009d;stop-opacity:0;" /> + inkscape:vp_x="192.22094 : 1229.9859 : 1" + sodipodi:type="inkscape:persp3d" /> + id="filter5374" + inkscape:collect="always"> + inkscape:collect="always" /> + + + - @@ -114,520 +169,618 @@ + inkscape:groupmode="layer" + inkscape:label="Layer 1"> + inkscape:export-filename="/home/gburri/projets/euphorik/doc/graphiques/logo_brut2.png" + ry="0" + y="32.944107" + x="46.644756" + height="287.99356" + width="453.62442" + id="rect3458" + style="fill:#f6dfc2;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - + transform="scale(1,-1)" + y="-132.54002" + x="138.54781" + height="13.069962" + width="357.56439" + id="rect3474" + style="fill:#f0df95;fill-opacity:1;fill-rule:evenodd;stroke:#841919;stroke-width:0.93;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> - + - + [16:57:11] Pifou + inkscape:export-filename="/home/gburri/projets/euphorik/doc/graphiques/logo_brut2.png" + sodipodi:nodetypes="cccccc" + id="rect2413" + d="M 46.294131,144.76665 L 138.52377,144.76665 L 143.38513,151.20817 L 138.52377,157.38453 L 46.294131,157.38453 L 46.294131,144.76665 z" + style="fill:#841919;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1" /> [16:57:11] + What is your favourite colour ? + id="tspan3195" + sodipodi:role="line">What is your favourite colour ? - + - + [16:57:11] Pifou + id="tspan3213" + sodipodi:role="line">[16:57:11] Pifou What is your favourite colour ? + id="tspan3217" + sodipodi:role="line">What is your favourite colour ? - + [16:57:11] Pifou + id="tspan3248" + sodipodi:role="line">[16:57:11] Pifou What is your favourite colour ? + id="tspan3252" + sodipodi:role="line">What is your favourite colour ? - - - + d="M 531.65729,145.35293 C 529.36216,145.35293 527.50104,147.21405 527.50104,149.50918 C 527.50104,151.80431 529.36216,153.66543 531.65729,153.66543 C 533.95242,153.66543 535.81354,151.80431 535.81354,149.50918 C 535.81354,147.21405 533.95242,145.35293 531.65729,145.35293 z M 530.04764,146.86648 L 534.5789,149.44579 L 530.16777,152.15985 L 530.04764,146.86648 z" + style="opacity:1;fill:#841919;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + inkscape:export-xdpi="138.63892" + inkscape:export-filename="/home/gburri/projets/euphorik/img/css1/extraction_hover.png" + id="path3235" + d="M 531.65729,158.13031 C 529.36216,158.13031 527.50104,159.99143 527.50104,162.28656 C 527.50104,164.58169 529.36216,166.44281 531.65729,166.44281 C 533.95242,166.44281 535.81354,164.58169 535.81354,162.28656 C 535.81354,159.99143 533.95242,158.13031 531.65729,158.13031 z M 530.04764,159.64386 L 534.5789,162.22317 L 530.16777,164.93723 L 530.04764,159.64386 z" + style="opacity:1;fill:#cb2626;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + inkscape:export-filename="/home/gburri/projets/euphorik/img/css1/fermer_conv.png" + id="path3237" + d="M 545.24466,145.35293 C 542.94951,145.35294 541.08841,147.21405 541.08841,149.50918 C 541.08839,151.80432 542.94953,153.66543 545.24466,153.66543 C 547.53977,153.66544 549.40091,151.80431 549.40091,149.50918 C 549.40089,147.21406 547.53979,145.35293 545.24466,145.35293 z M 543.83841,146.88418 L 545.24466,148.25918 L 546.65091,146.88418 L 547.90091,148.13418 L 546.49466,149.50918 L 547.90091,150.91543 L 546.65091,152.16543 L 545.24466,150.79043 L 543.83841,152.16543 L 542.58841,150.91543 L 543.99466,149.50918 L 542.58841,148.13418 L 543.83841,146.88418 z" + style="opacity:1;fill:#841919;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + inkscape:export-filename="/home/gburri/projets/euphorik/img/css1/fermer_conv_hover.png" + id="path3251" + d="M 545.24466,158.13031 C 542.94951,158.13032 541.08841,159.99143 541.08841,162.28656 C 541.08839,164.5817 542.94953,166.44281 545.24466,166.44281 C 547.53977,166.44282 549.40091,164.58169 549.40091,162.28656 C 549.40089,159.99144 547.53979,158.13031 545.24466,158.13031 z M 543.83841,159.66156 L 545.24466,161.03656 L 546.65091,159.66156 L 547.90091,160.91156 L 546.49466,162.28656 L 547.90091,163.69281 L 546.65091,164.94281 L 545.24466,163.56781 L 543.83841,164.94281 L 542.58841,163.69281 L 543.99466,162.28656 L 542.58841,160.91156 L 543.83841,159.66156 z" + style="opacity:1;fill:#cb2626;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> - + + inkscape:export-filename="/home/gburri/projets/euphorik/img/css1/fleche_reponda.png" + sodipodi:nodetypes="cccc" + id="path3254" + d="M 586.75494,158.78182 L 591.6163,165.22334 L 586.75494,171.3997 L 586.75494,158.78182 z" + style="fill:#cb2626;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;display:inline" /> dpi : 138.64 + sodipodi:role="line">dpi : 138.64 + inkscape:export-filename="/home/gburri/projets/euphorik/doc/graphiques/copier_conv.png" + id="path3260" + d="M 557.34084,145.5037 C 555.04571,145.50371 553.18459,147.36482 553.18459,149.65995 C 553.18459,151.95509 555.04571,153.8162 557.34084,153.8162 C 559.63597,153.81621 561.49709,151.95508 561.49709,149.65995 C 561.49709,147.36483 559.63597,145.5037 557.34084,145.5037 z M 557.37209,145.84745 L 558.34084,148.3162 L 560.99709,148.5037 L 558.93459,150.1912 L 559.59084,152.7537 L 557.37209,151.34745 L 555.12209,152.7537 L 555.77834,150.1912 L 553.71584,148.5037 L 556.37209,148.3162 L 557.37209,145.84745 z" + style="opacity:1;fill:#841919;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + inkscape:export-filename="/home/gburri/projets/euphorik/doc/graphiques/copier_conv_hover.png" + id="path3274" + d="M 556.97921,158.13031 C 554.68408,158.13032 552.82296,159.99143 552.82296,162.28656 C 552.82296,164.5817 554.68408,166.44281 556.97921,166.44281 C 559.27434,166.44282 561.13546,164.58169 561.13546,162.28656 C 561.13546,159.99144 559.27434,158.13031 556.97921,158.13031 z M 557.01046,158.47406 L 557.97921,160.94281 L 560.63546,161.13031 L 558.57296,162.81781 L 559.22921,165.38031 L 557.01046,163.97406 L 554.76046,165.38031 L 555.41671,162.81781 L 553.35421,161.13031 L 556.01046,160.94281 L 557.01046,158.47406 z" + style="opacity:1;fill:#cb2626;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> - + id="path3464" + d="M 595.4055,142.72403 L 600.26686,149.16555 L 595.4055,155.34191 L 595.4055,142.72403 z" + style="fill:#31732f;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;display:inline" /> + + inkscape:export-filename="/home/gburri/projets/euphorik/img/css1/fleche_repondu.png" + sodipodi:nodetypes="cccc" + id="path3468" + d="M 612.29483,142.72403 L 617.15619,149.16555 L 612.29483,155.34191 L 612.29483,142.72403 z" + style="fill:#84196c;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;display:inline" /> + inkscape:export-filename="/home/gburri/projets/euphorik/trunk/img/css1/extraction_complete.png" + id="path2721" + d="M 519.27037,145.35293 C 516.97525,145.35292 515.11412,147.21405 515.11412,149.50918 C 515.11413,151.8043 516.97524,153.66543 519.27037,153.66543 C 521.56551,153.66542 523.42662,151.80431 523.42662,149.50918 C 523.42659,147.21404 521.5655,145.35293 519.27037,145.35293 z M 519.27037,146.57168 L 522.23912,149.50918 L 519.27037,152.47793 L 516.33287,149.50918 L 519.27037,146.57168 z" + style="opacity:1;fill:#841919;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + inkscape:export-filename="/home/gburri/projets/euphorik/trunk/img/css1/extraction_complete_hover.png" + id="path3502" + d="M 519.27037,158.13031 C 516.97525,158.1303 515.11412,159.99143 515.11412,162.28656 C 515.11413,164.58168 516.97524,166.44281 519.27037,166.44281 C 521.56551,166.4428 523.42662,164.58169 523.42662,162.28656 C 523.42659,159.99142 521.5655,158.13031 519.27037,158.13031 z M 519.27037,159.34906 L 522.23912,162.28656 L 519.27037,165.25531 L 516.33287,162.28656 L 519.27037,159.34906 z" + style="opacity:1;fill:#cb2626;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + inkscape:export-filename="/home/gburri/projets/euphorik/trunk/img/css1/reduire_conv.png" + id="path2467" + d="M 569.31564,145.5037 C 567.02051,145.5037 565.15939,147.36482 565.15939,149.65995 C 565.15939,151.95508 567.02051,153.8162 569.31564,153.8162 C 571.61077,153.8162 573.47189,151.95508 573.47189,149.65995 C 573.47189,147.36482 571.61077,145.5037 569.31564,145.5037 z M 569.31564,146.0662 C 569.32581,146.06628 569.33669,146.066 569.34689,146.0662 C 570.25117,146.08396 571.28545,146.57492 571.81564,147.3162 C 571.11486,147.71347 570.50225,148.35045 570.40939,149.5662 C 570.41064,149.65901 570.40276,149.76061 570.40939,149.84745 C 570.50225,151.0632 571.11486,151.70018 571.81564,152.09745 C 571.28545,152.83873 570.25117,153.32969 569.34689,153.34745 C 569.33669,153.34765 569.32581,153.34737 569.31564,153.34745 C 568.41136,153.32969 567.37707,152.83873 566.84689,152.09745 C 567.54767,151.70018 568.16028,151.0632 568.25314,149.84745 C 568.25977,149.76061 568.25189,149.65901 568.25314,149.5662 C 568.16028,148.35045 567.54767,147.71347 566.84689,147.3162 C 567.37707,146.57492 568.41136,146.08396 569.31564,146.0662 z" + style="opacity:1;fill:#841919;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + + inkscape:export-filename="/home/gburri/projets/euphorik/doc/graphiques/logo_brut2.png" + sodipodi:linespacing="125%" + id="text3249" + y="154.29619" + x="104.03905" + style="font-size:9px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#d0df27;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;display:inline;font-family:Sans;-inkscape-font-specification:Sans" + xml:space="preserve">Pifou + + [12:47:29] Paul + Blabla blablablabla bla blabla .. + + + + id="layer2" + inkscape:groupmode="layer"> + inkscape:export-filename="/home/gburri/projets/euphorik/doc/graphiques/logo_brut2.png" + y="82.616722" + x="46.525745" + height="20.843534" + width="453.71909" + id="rect3224" + style="fill:#841919;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + inkscape:export-filename="/home/gburri/projets/euphorik/doc/graphiques/logo_brut.png" + id="path5267" + d="M 87.929756,36.448593 C 70.696656,36.448593 56.136941,47.968757 51.554756,63.729843 L 46.617256,63.729843 L 46.617256,82.823589 L 51.023506,82.823589 C 54.891953,99.630647 69.953686,112.16733 87.929756,112.16733 C 105.90583,112.16733 120.93631,99.630647 124.80476,82.823589 L 500.71101,82.823589 L 500.71101,63.729843 L 124.27351,63.729843 C 119.69133,47.968757 105.16286,36.448592 87.929756,36.448593 z" + style="opacity:0.75;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline;filter:url(#filter5374)" /> + sodipodi:ry="131.82491" + sodipodi:rx="131.82491" + sodipodi:cy="399.29855" + sodipodi:cx="332.84528" + id="path2407" + style="fill:#f6dfc2;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" + sodipodi:type="arc" /> + inkscape:export-filename="/home/gburri/projets/euphorik/doc/graphiques/logo_brut.png" + y="63.504051" + x="46.615898" + height="19.081215" + width="454.09647" + id="rect3462" + style="fill:#f6dfc2;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + id="path2383" + d="M 88.431816,40.254007 C 69.803625,40.166276 54.045002,54.16218 54.129835,75.22051 C 54.068954,91.274344 68.315564,108.10722 88.431816,107.91672 C 89.549813,107.91672 90.095216,107.88452 91.602061,107.7065 C 91.569653,103.93148 91.348366,91.115934 91.413181,87.162485 C 97.635009,91.828858 101.04085,94.097739 109.07738,100.44919 C 112.18829,97.868223 115.29373,94.591662 117.34476,90.7302 C 112.15991,87.360044 105.10581,81.72326 94.21761,73.68674 C 101.21717,66.557554 108.27196,59.995273 114.88264,53.643826 C 112.57171,50.906043 109.37619,47.542256 106.31623,45.699518 C 101.64986,50.106655 98.437833,52.770497 91.413181,59.441256 C 91.44732,54.651308 91.626799,44.013425 91.602061,40.511312 C 90.556557,40.322656 89.622719,40.270207 88.431816,40.254007 z M 79.801333,51.351275 C 79.779096,59.441488 79.924702,62.872417 79.801333,68.719324 C 74.553306,68.625903 71.396213,68.731631 64.915137,68.602009 C 65.721614,58.462795 72.73505,52.397459 79.801333,51.351275 z M 79.801333,80.324934 C 79.833045,85.530259 79.870744,89.328594 79.984647,96.135618 C 73.101686,95.143127 65.177362,88.021089 64.838379,80.002996 C 68.889043,79.921982 74.6941,80.096459 79.801333,80.324934 z" + style="fill:#841919;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.51327449;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> euphorikeuphorik + sodipodi:role="line" /> + inkscape:export-filename="/tmp/euphorik.png" + y="79.890785" + x="524.58624" + height="36.5" + width="36.5" + id="rect3280" + style="opacity:1;fill:#e19671;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.93000001;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + - + + + + + + + + + + id="path3648" + d="M 88.433689,40.139507 C 69.742342,40.051409 53.930364,54.094829 54.015447,75.224405 C 53.954448,91.332605 68.249193,108.22245 88.433689,108.03137 C 89.55531,108.03137 90.10262,107.99905 91.614572,107.82039 C 91.581954,104.03258 91.360034,91.173654 91.425073,87.20679 C 97.667896,91.888882 101.08528,94.16553 109.14899,100.53843 C 112.27055,97.94871 115.38639,94.661105 117.44437,90.786576 C 112.24197,87.404961 105.16399,81.749161 94.23898,73.685453 C 101.26227,66.532188 108.34084,59.947617 114.97399,53.574618 C 112.65526,50.827622 109.44896,47.452314 106.37864,45.603442 C 101.69625,50.025479 98.473488,52.69837 91.425073,59.391733 C 91.459366,54.585378 91.639306,43.911649 91.614572,40.397592 C 90.565479,40.208389 89.628528,40.155766 88.433689,40.139507 z M 79.773893,51.274418 C 79.751523,59.39193 79.897565,62.834445 79.773893,68.701128 C 74.508029,68.607413 71.340332,68.713545 64.837364,68.583467 C 65.646435,58.409945 72.683597,52.324004 79.773893,51.274418 z M 79.773893,80.3461 C 79.805722,85.568999 79.843563,89.380263 79.957676,96.210306 C 73.051558,95.214426 65.100465,88.068256 64.760264,80.023173 C 68.824617,79.941776 74.649439,80.116888 79.773893,80.3461 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:0.51327449;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" /> + + id="layer3" + inkscape:groupmode="layer"> - + chat + id="tspan3199" + sodipodi:role="line">chat profile + id="tspan3203" + sodipodi:role="line">profile about + id="tspan3207" + sodipodi:role="line">about - + troll de la semaine : - - + id="tspan3468" + sodipodi:role="line">troll de la semaine : diff --git a/doc/protocole3.txt b/doc/protocole3.txt index eb661a3..dc3ff4b 100644 --- a/doc/protocole3.txt +++ b/doc/protocole3.txt @@ -93,9 +93,9 @@ ou "nick_format" : "nick" | "login" | "nick_login", "view_times" : true | false, "view_tooltips" : true | false, - // "main_page" : 1, - "conversations" : [3, 8], - "ek_master" : true | false + "conversations" : [{"root" : 3, "minimized" : true}, + "ek_master" : true | false, + "ostentatious_master" : "invisible" | "light" | "heavy" } @@ -120,8 +120,8 @@ c -> s "nick_format" : "nick" | "login" | "nick_login", "view_times" : true | false, "view_tooltips" : true | false, - "main_page" : 1, - "conversations" : [3, 8] + "conversations" : [{"root" : 3, "minimized" : true}, + "ostentatious_master" : "invisible" | "light" | "heavy" } s -> c @@ -151,7 +151,8 @@ Si "main_page" est absent alors est vaut 1. "answer_to" : [ { "id" : 123, "nick" : "Pierre", "login" : "pierre_45" } ] - "ek_master" : true | false + "ek_master" : true | false, + "ostentatious_master" : "invisible" | "light" | "heavy" } c -> s diff --git a/img/css1/logo_ek_master.png b/img/css1/logo_ek_master.png new file mode 100644 index 0000000000000000000000000000000000000000..8e03c9340ac5cc3bbb18fbf0726f9fa179566bbb GIT binary patch literal 16975 zcmXtg1yoy2*L8s4E-7Bz-MzR&aVrkR-5r9vltQ6Mad)R^a9SuX#e=&Q_dn13t$!se zxw&iInYrie*=L_~XA-OaQ63YG1PuTHU@9ueXaWFmoUr3i6eQTEJjq@L>5Q zIlE2{J4Ng%tM4i8;^buI>GQmkHE1=LyfC0nw zIB}T#{LrvYHi2KMbc8qTHLa>Y?_MmuZEQ-G=4+eXbGIk`^+Y;(M11ao_kAYB?u@po zp5wL|c_#eYMmEa?1qHD;%>2n7SDMK;PZK0D@B5xVlz-sh?Zr023acQ2@PfHqOG6z< zAjC1HZGq)-pVesdddc5|Z$>yj@ z9#Mf}qKbjKztb+I6%%GZ-96FDLoY}G8t-R7#-cpx-1rLGh2*Iwy5Vj=z7xD=6&+zHQ`Vru$_p=uc6pdgGa;3@ z>ak0O7{+4s!14OR2(bE#(DwNS|MIR&zcl9#5>$}do;~n4|EOcrDG{Q+8WfF%ZJ3B? z-;4yo5<{sBxhIPmm_*3T4QTXrcyQnuT1XheD#+b;o%yf8Zluy7IO&xeT90j1hxo>Rg)5R5h zB4iw+t)96E_`gx>12c6Js#w~2OIg@dzin34MbT-GNM413hl9*Rvjfxl7NwM7l#RMo2nkpEJ7lmO5F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kwaG)85T!ooU8W&$Gk}Y45;rA!- z@I;oHgT+$AEN7ge)l_MX~eQtfWdNGw}IBU@D+esn&w`D+0PZbWrmINva~B zt3XvQ<-#k$2s+xg - euphorik.ch + % prédéfinit la feuille de style out(A) -> CSS = case euphorik_bd:css_from_user_cookie(yaws_api:find_cookie_val("cookie", A)) of undefined -> "css/1/euphorik.css"; @@ -35,10 +36,16 @@
- + + % permet de prédéfinir la "class" du logo pour un ekMaster.. + out(A) -> + Est_ek_master = euphorik_bd:is_ek_master_from_cookie(yaws_api:find_cookie_val("cookie", A)), + {ehtml, {'div', [{id, "logo"}] ++ if Est_ek_master -> [{class, "ekMaster"}]; true -> [] end}}. + +

diff --git a/js/euphorik.js b/js/euphorik.js index 596ded4..7e611db 100755 --- a/js/euphorik.js +++ b/js/euphorik.js @@ -597,6 +597,7 @@ Client.prototype.resetDonneesPersonnelles = function() this.pagePrincipale = 1 this.ekMaster = false + this.ostentatiousMaster = "light" // les conversations, une conversation est un objet possédant les attributs suivants : // - root (entier) @@ -720,7 +721,7 @@ Client.prototype.getJSONConversations = function() { var conversations = new Array() for (var i = 0; i < this.conversations.length; i++) - conversations.push(this.conversations[i].root) + conversations.push({root : this.conversations[i].root, minimized : this.conversations[i].reduit}) return conversations } @@ -737,7 +738,8 @@ Client.prototype.getJSONProfile = function() "nick_format" : this.nickFormat, "view_times" : this.viewTimes, "view_tooltips" : this.viewTooltips, - "conversations" : this.getJSONConversations() + "conversations" : this.getJSONConversations(), + "ostentatious_master" : this.ostentatiousMaster } } @@ -788,6 +790,7 @@ Client.prototype.setStatut = function(statut) this.statut = statut this.majMenu() + this.majLogo() } /** @@ -879,6 +882,7 @@ Client.prototype.chargerDonnees = function(data) this.nickFormat = data["nick_format"] this.viewTimes = data["view_times"] this.viewTooltips = data["view_tooltips"] + this.ostentatiousMaster = data["ostentatious_master"] // la page de la conversation principale this.pagePrincipale = 1 @@ -886,10 +890,11 @@ Client.prototype.chargerDonnees = function(data) // les conversations this.conversations = data["conversations"] for (var i = 0; i < this.conversations.length; i++) - this.conversations[i] = {root : this.conversations[i], page : 1} + this.conversations[i] = {root : this.conversations[i].root, page : 1, reduit : this.conversations[i].minimized} this.majBulle() this.majCssSelectionee() + //this.majLogo() } } @@ -984,6 +989,18 @@ Client.prototype.majCssSelectionee = function() } } +/** + * Change la "class" du logo en fonction du statut de ekMaster. + */ +Client.prototype.majLogo = function() +{ + if (this.ekMaster) + $("#logo").addClass("ekMaster") + else + $("#logo").removeClass("ekMaster") +} + + Client.prototype.slap = function(userId, raison) { var thisClient = this diff --git a/js/pageMinichat.js b/js/pageMinichat.js index 4068f35..574dedd 100755 --- a/js/pageMinichat.js +++ b/js/pageMinichat.js @@ -302,6 +302,7 @@ function Message(client, formateur, element) this.systeme = element["system"] // est-ce un message 'système' ? this.setRepondA(element["answer_to"]) // un ensemble de reponse (voir Reponse) indexé par l'id du message de la reponses this.ekMaster = element["ek_master"] + this.degreeOstentatoire = element["ostentatious_master"] } /** @@ -387,8 +388,8 @@ Message.prototype.XHTML = function(messagePair, pre) // construit l'identifiant de la personne var identifiant = this.client.nickFormat == "nick" || this.login == "" ? this.formateur.traitementComplet(this.pseudo) : - (this.client.nickFormat == "login" ? this.formateur.traitementComplet(message.login) : - this.formateur.traitementComplet(this.pseudo) + "(" + this.formateur.traitementComplet(message.login) +")" ) + (this.client.nickFormat == "login" ? this.formateur.traitementComplet(this.login) : + this.formateur.traitementComplet(this.pseudo) + "(" + this.formateur.traitementComplet(this.login) +")" ) var XHTMLrepondA = "" var debut = true @@ -406,7 +407,7 @@ Message.prototype.XHTML = function(messagePair, pre) (this.clientARepondu ? " repondu" : "") + (this.estUneReponse ? " reponse" : "") + (this.systeme ? " systeme" : "") + - (this.ekMaster ? " ekMaster" : "") + + (this.ekMaster ? " ekMaster" + this.degreeOstentatoire : "") + "\">" + "

" + "[" + this.date + "]" + @@ -662,8 +663,8 @@ Conversation.prototype.attacherEventsSurMessage = function(element) // l'id du message var idMess = this.idMessageFromString($(element).attr("id")) - this.util.infoBulle("Extraction de la conversation à partir de ce message", $(".extraire", this)) - this.util.infoBulle("Extraction de la conversation complète", $(".extraireCompletement", this)) + this.util.infoBulle("Extraction de la conversation à partir de ce message", $(".extraire", element)) + this.util.infoBulle("Extraction de la conversation complète", $(".extraireCompletement", element)) var thisConversation = this $(".lienConv", element).click( diff --git a/js/pageProfile.js b/js/pageProfile.js index 14ca09c..cb29198 100755 --- a/js/pageProfile.js +++ b/js/pageProfile.js @@ -14,58 +14,61 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with Euphorik. If not, see . - -function PageProfile(client, formateur, util) -{ - this.nom = "profile" - - this.client = client - this.formateur = formateur - this.util = util -} - -PageProfile.prototype.contenu = function() -{ - // pourquoi ? - return "" -} - -PageProfile.prototype.charger = function() -{ - $("#page").html(this.getHTML()) - - // en fonction du statut - if (this.client.authentifie()) - this.chargerProfile() - else - this.chargerLogin() - - $("#page form#profile").submit(function(){return false}) -} - -PageProfile.prototype.chargerProfile = function() +// along with Euphorik. If not, see . + +function PageProfile(client, formateur, util) +{ + this.nom = "profile" + + this.client = client + this.formateur = formateur + this.util = util +} + +PageProfile.prototype.contenu = function() +{ + // pourquoi ? + return "" +} + +PageProfile.prototype.charger = function() +{ + $("#page").html(this.getHTML()) + + // en fonction du statut + if (this.client.authentifie()) + this.chargerProfile() + else + this.chargerLogin() + + $("#page form#profile").submit(function(){return false}) +} + +PageProfile.prototype.chargerProfile = function() { var thisPage = this $("form#profile input.login").val(this.client.login) $("form#profile input.pseudo").val(this.client.pseudo) - $("form#profile input.email").val(this.client.email) - $("form#profile input#viewTooltips").attr("checked", this.client.viewTooltips) - $("form#profile input#viewTimes").attr("checked", this.client.viewTimes) - - $("form#profile select#affichagePseudo option").removeAttr("selected") - $("form#profile select#affichagePseudo option[value=" + this.client.nickFormat + "]").attr("selected", "selected") + $("form#profile input.email").val(this.client.email) + $("form#profile input#viewTooltips").attr("checked", this.client.viewTooltips) + $("form#profile input#viewTimes").attr("checked", this.client.viewTimes) + + $("form#profile select#degreeOstentatoire option").removeAttr("selected") + $("form#profile select#degreeOstentatoire option[value=" + this.client.ostentatiousMaster + "]").attr("selected", "selected") + $("form#profile select#affichagePseudo option").removeAttr("selected") + $("form#profile select#affichagePseudo option[value=" + this.client.nickFormat + "]").attr("selected", "selected") $("form#profile button").click( function() { thisPage.client.pseudo = thisPage.formateur.filtrerInputPseudo($("form#profile input.pseudo").val()) - thisPage.client.email = $("form#profile input.email").val() - thisPage.client.nickFormat = $("form#profile select#affichagePseudo option:selected").attr("value") - thisPage.client.viewTooltips = $("form#profile input#viewTooltips").attr("checked") - thisPage.client.viewTimes = $("form#profile input#viewTimes").attr("checked") + thisPage.client.email = $("form#profile input.email").val() + thisPage.client.nickFormat = $("form#profile select#affichagePseudo option:selected").attr("value") + thisPage.client.ostentatiousMaster = $("form#profile select#degreeOstentatoire option:selected").attr("value") + thisPage.client.viewTooltips = $("form#profile input#viewTooltips").attr("checked") + thisPage.client.viewTimes = $("form#profile input#viewTimes").attr("checked") var password = $("form#profile input.password").val() var passwordRe = $("form#profile input.passwordRe").val() @@ -81,80 +84,90 @@ PageProfile.prototype.chargerProfile = function() if(!thisPage.client.flush()) thisPage.util.messageDialogue("Impossible de mettre à jour votre profile, causes inconnues", messageType.erreur) - else - { - thisPage.util.messageDialogue("Votre profile a été mis à jour") - thisPage.pages.afficherPage("minichat") + else + { + thisPage.util.messageDialogue("Votre profile a été mis à jour") + thisPage.pages.afficherPage("minichat") } } - ) -} - -PageProfile.prototype.chargerLogin = function() -{ - var thisPage = this - - $("#page form#profile button").click( - function() - { - if(thisPage.client.connexionLogin($("form#profile input.login").val(), thisPage.util.md5($("form#profile input.password").val()))) + ) +} + +PageProfile.prototype.chargerLogin = function() +{ + var thisPage = this + + $("#page form#profile button").click( + function() + { + if(thisPage.client.connexionLogin($("form#profile input.login").val(), thisPage.util.md5($("form#profile input.password").val()))) { - // TODO afficher un message "ok" - thisPage.pages.afficherPage("minichat") - } - } - ) -} - -PageProfile.prototype.getHTML = function() -{ -return '\ -\ - \ - \ - \ - \ - \ - \ - \ - \ - ' + - (this.client.authentifie() ? '\ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - \ - ' : '') + '\ - \ - \ - \ -
login
password
password re
pseudo
e-mail
Affichage des identifiants\ - \ -
Afficher les infos bulles
Afficher les dates
\ -
\ -' -} - + // TODO afficher un message "ok" + thisPage.pages.afficherPage("minichat") + } + } + ) +} + +PageProfile.prototype.getHTML = function() +{ +return '\ +
\ + \ + \ + \ + \ + \ + \ + \ + \ + ' + + (this.client.authentifie() ? '\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + ' + + (this.client.ekMaster ? '\ + ' : '') + + '\ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + \ + ' : '') + '\ + \ + \ + \ +
login
password
password re
pseudo
e-mail
Degrée d\'ostentation\ + \ +
Affichage des identifiants\ + \ +
Afficher les infos bulles
Afficher les dates
\ +
\ +
' +} + diff --git a/modules/erl/euphorik_bd.erl b/modules/erl/euphorik_bd.erl index be46ab2..d84b0fb 100755 --- a/modules/erl/euphorik_bd.erl +++ b/modules/erl/euphorik_bd.erl @@ -33,7 +33,7 @@ % users : nouveau_user/2, nouveau_user/3, - set_profile/10, + set_profile/11, update_date_derniere_connexion/1, update_ip/2, update_pseudo_user/2, @@ -47,6 +47,7 @@ user_by_mess/1, toggle_ek_master/1, css_from_user_cookie/1, + is_ek_master_from_cookie/1, % messages :e nouveau_message/3, @@ -192,8 +193,11 @@ nouveau_user(Login, Password, Cookie) -> % Mise à par Cookie les autres peuvent être undefined ce qui veut dire qu'ils ne seront pas modifié. -set_profile(Cookie, Login, Password, Pseudo, Email, Css, Nick_format, View_times, View_tooltips, Conversations) -> - if Nick_format =:= nick; Nick_format =:= login; Nick_format =:= nick_login -> +% Conversation est de type [{int(), bool()}] où l'entier est la racine, le booléen indique si la conversation est réduite ou non +% Ostentatious_master peut valoir invisible, light ou heavy +set_profile(Cookie, Login, Password, Pseudo, Email, Css, Nick_format, View_times, View_tooltips, Conversations, Ostentatious_master) -> + if Nick_format =:= nick; Nick_format =:= login; Nick_format =:= nick_login, + Ostentatious_master =:= invisible; Ostentatious_master =:= light; Ostentatious_master =:= heavy -> resultat_transaction(mnesia:transaction( fun() -> case user_by_cookie(Cookie) of @@ -213,7 +217,8 @@ set_profile(Cookie, Login, Password, Pseudo, Email, Css, Nick_format, View_times nick_format = Nick_format, view_times = View_times, view_tooltips = View_tooltips, - conversations = if is_list(Conversations) -> Conversations; true -> User#user.conversations end + conversations = if is_list(Conversations) -> Conversations; true -> User#user.conversations end, + ostentatious_master = Ostentatious_master }, mnesia:write(User_modifie), ok @@ -396,6 +401,13 @@ css_from_user_cookie(Cookie) -> undefined end. + +is_ek_master_from_cookie(Cookie) -> + case user_by_cookie(Cookie) of + {ok, #user{ek_master = true}} -> true; + _ -> false + end. + user_by_login_password(Login, Password) -> resultat_transaction(mnesia:transaction( diff --git a/modules/erl/euphorik_bd_update.erl b/modules/erl/euphorik_bd_update.erl index 14a85c9..1f04ab0 100644 --- a/modules/erl/euphorik_bd_update.erl +++ b/modules/erl/euphorik_bd_update.erl @@ -78,7 +78,7 @@ patch(1) -> mnesia:transform_table( user, fun({user, Id, Cookie, Pseudo, Login, Password, Email, Date_creation, Date_derniere_connexion, Css, Nick_format, View_times, View_tooltips, Indice_flood, _Page_principale, Conversations, Ek_master, Last_ip}) -> - {user, Id, Cookie, Pseudo, Login, Password, Email, Date_creation, Date_derniere_connexion, Css, Nick_format, View_times, View_tooltips, reverse, Indice_flood, lists:map(fun({C, _}) -> C end, Conversations), Ek_master, Last_ip} + {user, Id, Cookie, Pseudo, Login, Password, Email, Date_creation, Date_derniere_connexion, Css, Nick_format, View_times, View_tooltips, light, reverse, Indice_flood, lists:map(fun({R, _}) -> {R, false} end, Conversations), Ek_master, Last_ip} end, record_info(fields, user), user diff --git a/modules/erl/euphorik_daemon.erl b/modules/erl/euphorik_daemon.erl index 274a2c2..548eab1 100755 --- a/modules/erl/euphorik_daemon.erl +++ b/modules/erl/euphorik_daemon.erl @@ -16,25 +16,25 @@ % You should have received a copy of the GNU General Public License % along with Euphorik. If not, see . % -% Module tournant en background s'occupant periodiquement de certaines tâches : +% Module tournant en background s'occupant periodiquement de certaines tâches : % - sélection du prochain troll chaque semaine % - rechargement des modules lors d'une mise en production -% Date : 05.11.2007 +% Date : 05.11.2007 % @author G.Burri --module(euphorik_daemon). --export([start/1, reload_euphorik/0, loop/0]). --include("../include/euphorik_defines.hrl"). +-module(euphorik_daemon). +-export([start/1, reload_euphorik/0, loop/0]). +-include("../include/euphorik_defines.hrl"). - -% Démarre le démon + +% Démarre le démon start(_A) -> register(euphorik_daemon, self()), - loop(). + loop(). + - -loop() -> +loop() -> % on attend une minute de plus pour prevenir une dérive négative (ce qui pourrait engendrer une double élection) receive switch -> % permet de substituer le code du process par un nouveau code, voir reload_euphorik @@ -42,38 +42,39 @@ loop() -> after 1000 * (trunc(temps_prochaine_election() + 60)) -> euphorik_bd:elire_troll(), euphorik_daemon:loop() - end. - - -% Renvoie le nombre de seconde qu'il reste jusque au prochain lundi à l'heure donnée (l'heure est sur 24heures) -% 86400 est le nombre de seconde dans un jour -temps_prochaine_election() -> - {Date, {H,M,S}} = calendar:local_time(), - Delta = (?JOUR_ELECTION_TROLL - 1) * 86400 + ?HEURE_ELECTION_TROLL * 60 * 60 - -((calendar:day_of_the_week(Date) - 1) * 86400 + H * 60 * 60 + M * 60 + S), - % attention au cas où deux dates (maintenant et la date d'élection) ne se trouvent pas dans la même semaine. - if Delta =< 0 -> Delta + 7 * 86400; true -> Delta end. - - -% Recharge tous les modules euphorik. -% Appelé lors d'une mise en prod. -% TODO : récupérer les noms à partir des .beam dans /modules/ebin -reload_euphorik() -> - lists:foreach( - fun(M) -> - code:purge(M), - code:load_file(M) - end, - [ - euphorik_common, - euphorik_minichat_conversation, - euphorik_protocole, - euphorik_requests, - euphorik_bd, - euphorik_bd_update, - euphorik_daemon - ] + end. + + +% Renvoie le nombre de seconde qu'il reste jusque au prochain lundi à l'heure donnée (l'heure est sur 24heures) +% 86400 est le nombre de seconde dans un jour +temps_prochaine_election() -> + {Date, {H,M,S}} = calendar:local_time(), + Delta = (?JOUR_ELECTION_TROLL - 1) * 86400 + ?HEURE_ELECTION_TROLL * 60 * 60 + -((calendar:day_of_the_week(Date) - 1) * 86400 + H * 60 * 60 + M * 60 + S), + % attention au cas où deux dates (maintenant et la date d'élection) ne se trouvent pas dans la même semaine. + if Delta =< 0 -> Delta + 7 * 86400; true -> Delta end. + + +% Recharge tous les modules euphorik. +% Appelé lors d'une mise en prod. +% TODO : récupérer les noms à partir des .beam dans /modules/ebin +reload_euphorik() -> + lists:foreach( + fun(M) -> + code:purge(M), + code:load_file(M) + end, + [ + euphorik_common, + euphorik_minichat_conversation, + euphorik_protocole, + euphorik_requests, + euphorik_bd, + euphorik_bd_update, + euphorik_daemon + ] ), % changement du code du daemon - euphorik_daemon ! switch. + euphorik_daemon ! switch, + ok. \ No newline at end of file diff --git a/modules/erl/euphorik_protocole.erl b/modules/erl/euphorik_protocole.erl index dac7d03..3f9d7a1 100755 --- a/modules/erl/euphorik_protocole.erl +++ b/modules/erl/euphorik_protocole.erl @@ -74,19 +74,27 @@ erreur_register_flood() -> % Un utilisateur se logge (avec un couple {login, mot de passe}) login([{login, Login}, {password, Password}], IP) -> - loginUser(euphorik_bd:user_by_login_password(Login, Password), IP); + case euphorik_bd:user_by_login_password(Login, Password) of + {ok, User} -> + loginUser(User, IP); + _ -> + timer:sleep(?TEMPS_ATTENTE_ERREUR_LOGIN), + erreur("Couple login/pass introuvable") + end; % Un utilisateur se logge (avec un cookie) login([{cookie, Cookie}], IP) -> - loginUser(euphorik_bd:user_by_cookie(Cookie), IP). + case euphorik_bd:user_by_cookie(Cookie) of + {ok, User} -> + loginUser(User, IP); + _ -> + timer:sleep(?TEMPS_ATTENTE_ERREUR_LOGIN), + erreur("Authentification impossible par cookie") + end. -loginUser({ok, User}, IP) -> +loginUser(User, IP) -> euphorik_bd:update_ip(User#user.id, IP), euphorik_bd:update_date_derniere_connexion(User#user.id), - json_reponse_login_ok(User); -loginUser(_, _) -> - % ajoute un délais d'attente - timer:sleep(?TEMPS_ATTENTE_ERREUR_LOGIN), - erreur("Couple login/pass introuvable"). + json_reponse_login_ok(User). % Renvoie un string() représentant un cookie en base 36. Il y a 10^32 possibillités. @@ -113,14 +121,22 @@ profile( {nick_format, Nick_format_str}, {view_times, View_times}, {view_tooltips, View_tooltips}, - {conversations, {array, Conversations_json}} + {conversations, {array, Conversations_json}}, + {ostentatious_master, Ostentatious_master} ] ) -> - % virage des messages qui n'existent pas - Conversations = lists:dropwhile( - fun(Message_id) -> - not euphorik_bd:message_existe(Message_id) + % décomposition de la strucure JSON + Conversations = lists:foldr( + fun({struc, [{root, Racine}, {minimized, Reduit}]}, A) -> + % virage des messages qui n'existent pas + Message_exite = euphorik_bd:message_existe(Racine), + if Message_exite -> + [ {Racine, Reduit} | A]; + true -> + A + end end, + [], Conversations_json ), % TODO : pas très beau, mieux vaut construire un #user @@ -134,7 +150,8 @@ profile( list_to_atom(Nick_format_str), View_times, View_tooltips, - Conversations) of + Conversations, + list_to_atom(Ostentatious_master)) of ok -> json_reponse_ok(); login_deja_pris -> @@ -658,8 +675,14 @@ json_reponse_login_ok(User) -> {nick_format, atom_to_list(User#user.nick_format)}, {view_times, User#user.view_times}, {view_tooltips, User#user.view_tooltips}, - {conversations, {array, User#user.conversations } }, - {ek_master, User#user.ek_master} + {conversations, {array, lists:map( + fun({Racine, Reduit}) -> + {struct, [{root, Racine}, {minimized, Reduit}]} + end, + User#user.conversations + )}}, + {ek_master, User#user.ek_master}, + {ostentatious_master, atom_to_list(User#user.ostentatious_master)} ] }. @@ -692,5 +715,6 @@ json_message(Mess, Repond_a, User) -> end, Repond_a )}}, - {ek_master, User_mess#user.ek_master} + {ek_master, User_mess#user.ek_master}, + {ostentatious_master, atom_to_list(User_mess#user.ostentatious_master)} ]}. diff --git a/modules/include/euphorik_bd.hrl b/modules/include/euphorik_bd.hrl index b779583..1a12872 100755 --- a/modules/include/euphorik_bd.hrl +++ b/modules/include/euphorik_bd.hrl @@ -74,9 +74,10 @@ nick_format = nick, %atom(), peut valoir 'nick', 'login' ou 'nick_login' view_times = true, view_tooltips = true, + ostentatious_master = light, % peut valoir invisible, light ou heavy. seulement pour ek_master message_order = reverse, % can be normal or reverse indice_flood = 0, % integer() est incrémenté lorsque l'utilisateur envoie trop rapidement des messages. - conversations = [], % [integer()], la liste des messages correspondant au conversation + conversations = [], % [{integer(), bool}], la liste des messages correspondant au conversation {racine, reduite?} ek_master = false, last_ip = undefined % integer(), undefined si inconnu }). diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml index 3212e36..da5c656 100644 --- a/nbproject/private/private.xml +++ b/nbproject/private/private.xml @@ -4,8 +4,8 @@ js/pageMinichat.js 237 - 901 - 1150 + 906 + 1155 -- 2.43.0