Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
Loading items

Target

Select target project
  • cordeliaze/cesium
  • pfouque06/cesium
  • wellno1/cesium
  • 1000i100/cesium
  • vincentux/cesium
  • calbasi/cesium
  • thomasbromehead/cesium
  • matograine/cesium
  • clients/cesium-grp/cesium
  • cedricmenec/cesium
  • Pamplemousse/cesium
  • etienneleba/cesium
  • tnntwister/cesium
  • scanlegentil/cesium
  • morvanc/cesium
  • yyy/cesium
  • Axce/cesium
  • Bertrandbenj/cesium
  • Lupus/cesium
  • elmau/cesium
  • MartinDelille/cesium
  • tykayn/cesium
  • numeropi/cesium
  • Vivakvo/cesium
  • pokapow/cesium
  • pini-gh/cesium
  • anam/cesium
  • RavanH/cesium
  • bpresles/cesium
  • am97/cesium
  • tuxmain/cesium
  • jytou/cesium
  • oliviermaurice/cesium
  • 666titi999/cesium
  • Yvv/cesium
35 results
Select Git revision
Loading items
Show changes
Showing
with 633 additions and 115 deletions
{
"version": "https://jsonfeed.org/version/1.1",
"title": "Noticias",
"user_comment": "Ce fichier redirige vers le forum Duniter (via 'next_url')",
"feed_url": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-es-ES.json",
"home_page_url": "https://forum.duniter.org/t/nueva-version-de-cesium-es/11459",
"next_url": "https://forum.duniter.org/t/nueva-version-de-cesium-es/11459.json"
}
{
"version": "https://jsonfeed.org/version/1.1",
"title": "Actualités",
"user_comment": "Ce fichier redirige vers le forum Duniter (via 'next_url')",
"feed_url": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-fr-FR.json",
"home_page_url": "https://forum.monnaie-libre.fr/t/actu-generale-la-1-bouge/31318",
"next_url": "https://forum.monnaie-libre.fr/t/actu-generale-la-1-bouge/31318.json"
}
{
"version": "https://jsonfeed.org/version/1.1",
"title": "Actualités",
"user_comment": "Ce fichier redirige vers le forum Duniter (via 'next_url')",
"feed_url": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-fr-FR.json",
"home_page_url": "https://forum.monnaie-libre.fr/t/actu-generale-la-1-bouge/31318",
"next_url": "https://forum.monnaie-libre.fr/t/actu-generale-la-1-bouge/31318.json"
}
{
"version": "https://jsonfeed.org/version/1",
"title": "News",
"user_comment": "Ce fichier est nécessaire pour les versions avant la 1.7.7",
"feed_url": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/feed-en.json",
"home_page_url": "https://forum.duniter.org/t/nouvelle-version-de-cesium-fr/11458/2",
"author": {
"name": "Benoit Lavenier",
"url": "@BenoitLavenier",
"avatar": "https://forum.duniter.org//user_avatar/forum.duniter.org/kimamila/48/185_2.png"
},
"items": [
{
"title": "New version of Cesium",
"author": {
"name": "Benoit Lavenier",
"url": "@BenoitLavenier",
"avatar": "https://forum.duniter.org//user_avatar/forum.duniter.org/kimamila/48/185_2.png"
},
"date_published": "2023-08-14T19:30:00+02:00",
"id": "https://forum.duniter.org/t/new-version-of-cesium-en/11460",
"url": "https://forum.duniter.org/t/new-version-of-cesium-en/11460",
"content_html": "<p>A new release version of Cesium <a href=\"https://cesium.app\">is available</a>!</p><blockquote><p>The cesium.app website is currently being updated... The same goes for the Play Store, App Store, etc.\nPlease be patient! :slight_smile:</p></blockquote><p>In recent months, many of you have encountered multiple difficulties: transactions disappearing or being completely lost, “timeout” error, desynchronized node, etc.</p><p>We are well aware of these issues. They are related to several factors:</p><ul><li>on the one hand, to the new version 1.7 of Cesium, which introduces automatic node selection for Duniter, by random drawing among synchronized nodes;</li><li>on the other hand, to the state of the Duniter nodes network, some nodes have been found to be misconfigured to work with Cesium, or using unstable versions of Duniter.</li></ul><h2><a name=\"new-features-1\" class=\"anchor\" href=\"#new-features-1\"></a>New Features</h2><h3><a name=\"at-start-up-2\" class=\"anchor\" href=\"#at-start-up-2\"></a>At Start-Up</h3><p>Node selection at startup has been reviewed to select only those compatible with Cesium’s features. This should fix the previously explained problems.</p><h3><a name=\"my-operations-3\" class=\"anchor\" href=\"#my-operations-3\"></a>My Operations</h3><p>In “My Operations,” long comments are now more visible, whether on a phone:<br><img src=\"https://forum.duniter.org/uploads/default/original/2X/4/4fa5d83286441e6689d93b6d636a46771fcb543d.png\" alt=\"image\" data-base62-sha1=\"bmB2vlwdnBe1zK86r7RGiQpJesl\" width=\"594\" height=\"357\"></p><p>…or in a web browser:</p><p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e.png\" data-download-href=\"https://forum.duniter.org/uploads/default/7d081473f9398e237425c96c8b9d55ef81e5662e\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e_2_690x192.png\" alt=\"image\" data-base62-sha1=\"hQ4ZGoEbNyaKoAMxEGc1d0Ksby6\" width=\"690\" height=\"192\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e_2_690x192.png, https://forum.duniter.org/uploads/default/original/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e.png 2x\" data-dominant-color=\"F2F6F8\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">819×229 36.5 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p><p>Other small improvements on this page:</p><ul><li>Refreshing the list no longer causes flickering of existing operations. Only new operations are animated;</li><li>loading older operations (at the bottom of the page) is now done directly by scrolling down. No need to click on “Show More” or “Show All”! Beyond 6 months of history, these buttons appear to limit the number of network requests.<br><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699.png\" data-download-href=\"https://forum.duniter.org/uploads/default/8617ad8aa899debbc16bd92f38f1eefe68ed4699\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699_2_690x211.png\" alt=\"image\" data-base62-sha1=\"j8eI3VQg2QseXemuowxFVl8qFlf\" width=\"690\" height=\"211\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699_2_690x211.png, https://forum.duniter.org/uploads/default/optimized/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699_2_1035x316.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699.png 2x\" data-dominant-color=\"F7F9FA\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">1094×335 36.1 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></li></ul><h3><a name=\"networks-in-expert-mode-4\" class=\"anchor\" href=\"#networks-in-expert-mode-4\"></a>Networks (in expert mode)</h3><p>The network view now allows you to see the status of the waiting queues (or pools) containing pending documents (transactions and membership requests).</p><blockquote><p>Only if you have activated “expert mode” in the settings,<br>and for nodes that have activated the BMA API</p></blockquote><p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5.png\" data-download-href=\"https://forum.duniter.org/uploads/default/f475de5c8c5f2e8efa21e33a387c3262a33eded5\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5_2_690x258.png\" alt=\"image\" data-base62-sha1=\"ySB2aVf3V1kcQ5aWwasCVNCX9kN\" width=\"690\" height=\"258\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5_2_690x258.png, https://forum.duniter.org/uploads/default/original/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5.png 2x\" data-dominant-color=\"F3F7F4\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">781×293 36.4 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p><p>Another small novelty: you can now see if a node (BMA) properly archives the history of transactions. The symbol <strong><img src=\"https://forum.duniter.org/images/emoji/twitter/credit_card.png?v=12\" title=\":credit_card:\" class=\"emoji\" alt=\":credit_card:\" loading=\"lazy\" width=\"20\" height=\"20\"> <code>TX</code></strong> now appears in the <code>API</code> column.</p><blockquote><p>Only visible in expert mode, by <strong>expanding the display</strong> of rows</p></blockquote><p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c.png\" data-download-href=\"https://forum.duniter.org/uploads/default/f6c5abe0063f927df3b6a1814f3265d611c4ac4c\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c_2_690x40.png\" alt=\"image\" data-base62-sha1=\"zd2XW5qedxuZ7gjgSiRiYV6K2D2\" width=\"690\" height=\"40\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c_2_690x40.png, https://forum.duniter.org/uploads/default/original/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c.png 2x\" data-dominant-color=\"EFF3F1\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">787×46 8.14 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p><h3><a name=\"other-fixes-5\" class=\"anchor\" href=\"#other-fixes-5\"></a>Other Fixes</h3><ul><li>Android / iOS: file downloading works! For the revocation file in particular, but also for the list of operations, the saving of identifiers, etc.<blockquote><p>You will find the downloaded file in the “Downloads” directory (on Android) or “Documents” (on iOS);</p></blockquote></li><li>My Operations: the list of UDs is now correctly displayed (without going through the Duniter nodes to bypass a limitation, but through the Cesium+ pod if activated);</li><li>Notifications: the number of messages or notifications is now correct when you log in for the first time on an account.</li></ul><br/><br/>(...)"
}
]
}
{
"version": "https://jsonfeed.org/version/1",
"title": "News",
"user_comment": "Ce fichier est nécessaire pour les versions avant la 1.7.7",
"feed_url": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/feed-es.json",
"home_page_url": "https://forum.duniter.org/t/nueva-version-de-cesium-es/11459/3",
"author": {
"name": "Benoit Lavenier",
"url": "@BenoitLavenier",
"avatar": "https://forum.duniter.org//user_avatar/forum.duniter.org/kimamila/48/185_2.png"
},
"items": [
{
"title": "Nueva versión de Cesium",
"author": {
"name": "Benoit Lavenier",
"url": "@BenoitLavenier",
"avatar": "https://forum.duniter.org//user_avatar/forum.duniter.org/kimamila/48/185_2.png"
},
"date_published": "2023-08-14T19:30:00+02:00",
"id": "https://forum.duniter.org/t/nueva-version-de-cesium-es/11459",
"url": "https://forum.duniter.org/t/nueva-version-de-cesium-es/11459",
"content_html": "<p>¡Una nueva versión de Cesium <a href=\"https://cesium.app\">está disponible</a>!</p><blockquote><p>El sitio cesium.app está siendo actualizado... Lo mismo para Play Store, App Store, etc.\n¡Tengan paciencia!</p></blockquote><p>En los últimos meses, muchos de ustedes han encontrado múltiples dificultades: transacciones que desaparecen o se pierden completamente, error de “tiempo de espera excedido”, nodo desincronizado, etc.</p><p>Somos muy conscientes de estos problemas. Están relacionados con varios factores:</p><ul><li>por un lado, a la nueva versión 1.7 de Cesium, que introduce la selección automática del nodo Duniter, mediante sorteo entre los nodos sincronizados;</li><li>por otro lado, al estado de la red de nodos Duniter, algunos de los cuales se han revelado mal configurados para funcionar con Cesium, o utilizando versiones inestables de Duniter.</li></ul><h2><a name=\"novedades-1\" class=\"anchor\" href=\"#novedades-1\"></a>Novedades</h2><h3><a name=\"al-inicio-2\" class=\"anchor\" href=\"#al-inicio-2\"></a>Al inicio</h3><p>La selección de nodos al inicio ha sido revisada, para seleccionar solo aquellos compatibles con las funcionalidades de Cesium. Esto debería corregir los problemas explicados anteriormente.</p><h3><a name=\"mis-operaciones-3\" class=\"anchor\" href=\"#mis-operaciones-3\"></a>Mis operaciones</h3><p>En “Mis operaciones”, los comentarios largos son ahora más visibles, ya sea en un teléfono:<br><img src=\"https://forum.duniter.org/uploads/default/original/2X/4/4fa5d83286441e6689d93b6d636a46771fcb543d.png\" alt=\"image\" data-base62-sha1=\"bmB2vlwdnBe1zK86r7RGiQpJesl\" width=\"594\" height=\"357\"></p><p>…o en un navegador web:</p><p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e.png\" data-download-href=\"https://forum.duniter.org/uploads/default/7d081473f9398e237425c96c8b9d55ef81e5662e\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e_2_690x192.png\" alt=\"image\" data-base62-sha1=\"hQ4ZGoEbNyaKoAMxEGc1d0Ksby6\" width=\"690\" height=\"192\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e_2_690x192.png, https://forum.duniter.org/uploads/default/original/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e.png 2x\" data-dominant-color=\"F2F6F8\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">819×229 36.5 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p><p>Otras pequeñas mejoras en esta página:</p><ul><li>El hecho de refrescar la lista ya no provoca el parpadeo de las operaciones existentes. Solo las nuevas operaciones están animadas;</li><li>la carga de las operaciones más antiguas (en la parte inferior de la página) se hace directamente desplazándose hacia abajo. ¡No es necesario hacer clic en “Mostrar más” o “Mostrar todo”! Más allá de 6 meses de historial, estos botones aparecen para limitar el número de solicitudes a la red.<br><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699.png\" data-download-href=\"https://forum.duniter.org/uploads/default/8617ad8aa899debbc16bd92f38f1eefe68ed4699\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699_2_690x211.png\" alt=\"image\" data-base62-sha1=\"j8eI3VQg2QseXemuowxFVl8qFlf\" width=\"690\" height=\"211\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699_2_690x211.png, https://forum.duniter.org/uploads/default/optimized/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699_2_1035x316.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699.png 2x\" data-dominant-color=\"F7F9FA\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">1094×335 36.1 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></li></ul><h3><a name=\"redes-en-modo-experto-4\" class=\"anchor\" href=\"#redes-en-modo-experto-4\"></a>Redes (en modo experto)</h3><p>La vista de red permite ahora ver el estado de las colas de espera (o piscinas) que contienen los documentos pendientes (transacciones y solicitudes de membresía).</p><blockquote><p>Solo si ha activado el “modo experto” en la configuración,<br>y para los nodos que han activado la API BMA</p></blockquote><p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5.png\" data-download-href=\"https://forum.duniter.org/uploads/default/f475de5c8c5f2e8efa21e33a387c3262a33eded5\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5_2_690x258.png\" alt=\"image\" data-base62-sha1=\"ySB2aVf3V1kcQ5aWwasCVNCX9kN\" width=\"690\" height=\"258\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5_2_690x258.png, https://forum.duniter.org/uploads/default/original/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5.png 2x\" data-dominant-color=\"F3F7F4\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">781×293 36.4 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p><p>Otra pequeña novedad: ahora puede ver si un nodo (BMA) archiva correctamente el historial de transacciones. El símbolo <strong><img src=\"https://forum.duniter.org/images/emoji/twitter/credit_card.png?v=12\" title=\":credit_card:\" class=\"emoji\" alt=\":credit_card:\" loading=\"lazy\" width=\"20\" height=\"20\"> <code>TX</code></strong> aparece ahora en la columna <code>API</code>.</p><blockquote><p>Solo visible en modo experto, al <strong>expandir la visualización</strong> de las filas</p></blockquote><p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c.png\" data-download-href=\"https://forum.duniter.org/uploads/default/f6c5abe0063f927df3b6a1814f3265d611c4ac4c\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c_2_690x40.png\" alt=\"image\" data-base62-sha1=\"zd2XW5qedxuZ7gjgSiRiYV6K2D2\" width=\"690\" height=\"40\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c_2_690x40.png, https://forum.duniter.org/uploads/default/original/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c.png 2x\" data-dominant-color=\"EFF3F1\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">787×46 8.14 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p><h3><a name=\"otras-correcciones-5\" class=\"anchor\" href=\"#otras-correcciones-5\"></a>Otras correcciones</h3><ul><li>Android / iOS: ¡la descarga de archivos funciona! Para el archivo de revocación en particular, pero también para la lista de operaciones, la salvaguardia de identificadores, etc.<blockquote><p>Encontrarás el archivo descargado en el directorio “Descargas” (en Android) o “Documentos” (en iOS);</p></blockquote></li><li>Mis operaciones: la lista de UDs se muestra ahora correctamente (sin pasar por los nodos Duniter para eludir una limitación, pero a través del pod Cesium+ si está activado);</li><li>Notificaciones: el número de mensajes o notificaciones es ahora correcto cuando inicia sesión por primera vez en una cuenta.</li></ul><br/><br/>(...)"
}
]
}
{
"version": "https://jsonfeed.org/version/1",
"user_comment": "Feed that use the jsonFeed format (see jsonFeed.org for details).",
"title": "Actualités",
"description": "Actualités de Cesium",
"home_page_url": "https://forum.monnaie-libre.fr/tag/cesium",
"feed_url": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/feed-fr.json",
"user_comment": "Ce fichier est nécessaire pour les versions avant la 1.7.7",
"feed_url": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/feed-ff.json",
"home_page_url": "https://forum.duniter.org/t/nouvelle-version-de-cesium-fr/11458/2",
"author": {
"name": "Benoit Lavenier",
"url": "@BenoitLavenier",
"avatar": "https://g1.data.duniter.fr/user/profile/38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE/_image/avatar.png"
"avatar": "https://forum.duniter.org//user_avatar/forum.duniter.org/kimamila/48/185_2.png"
},
"items": [
{
"title": "Cesium évolue ! Aïe, ça va piquer mais…",
"title": "Nouvelle version de Cesium",
"author": {
"name": "Elois",
"url": "@elois",
"avatar": "https://forum.monnaie-libre.fr/user_avatar/forum.monnaie-libre.fr/elois/45/185_2.png"
"name": "Benoit Lavenier",
"url": "@BenoitLavenier",
"avatar": "https://forum.duniter.org//user_avatar/forum.duniter.org/kimamila/48/185_2.png"
},
"date_published": "2023-08-14T19:30:00+02:00",
"id": "https://forum.duniter.org/t/nouvelle-version-de-cesium/11458",
"url": "https://forum.duniter.org/t/nouvelle-version-de-cesium/11458",
"content_html": "<p>Une nouvelle version de Cesium <a href=\"https://cesium.app\">est disponible</a> !</p><blockquote><p>La mise jour du site et des Play Store est en cours.\nSoyez patient !</p></blockquote><p>Ces derniers mois, beaucoup d’entre vous ont rencontré des difficultés multiples : transactions qui disparaissent ou sont carrément perdues, erreur “délai d’attente dépassé”, nœud désynchronisé, etc.</p><p>Nous sommes bien conscients de ces problèmes. Ils sont liés à plusieurs facteurs :</p><ul><li>d’une part, à la nouvelle version 1.7 de Cesium, qui introduit la sélection automatique du nœud Duniter, par tirage au sort parmi les nœuds synchronisés ;</li><li>d’autre part, à l’état du réseau des nœuds Duniter, dont certains nœuds se sont révélés mal configurés pour fonctionner avec Cesium, ou utilisant des versions de Duniter non stables.</li></ul><h2><a name=\"nouveauts-1\" class=\"anchor\" href=\"#nouveauts-1\"></a>Nouveautés</h2><h3><a name=\"au-dmarrage-2\" class=\"anchor\" href=\"#au-dmarrage-2\"></a>Au démarrage</h3><p>La sélection des nœuds au démarrage a été revue, pour ne sélectionner que ceux compatibles avec les fonctionnalités de Cesium. Ceci devrait corriger les problèmes précédemment expliqués.</p><h3><a name=\"mes-oprations-3\" class=\"anchor\" href=\"#mes-oprations-3\"></a>Mes opérations</h3><p>Dans “Mes opérations”, les longs commentaires sont mieux visibles, que ce soit sur téléphone :<br><img src=\"https://forum.duniter.org/uploads/default/original/2X/4/4fa5d83286441e6689d93b6d636a46771fcb543d.png\" alt=\"image\" data-base62-sha1=\"bmB2vlwdnBe1zK86r7RGiQpJesl\" width=\"594\" height=\"357\"></p><p>…ou dans un navigateur web :</p><p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e.png\" data-download-href=\"https://forum.duniter.org/uploads/default/7d081473f9398e237425c96c8b9d55ef81e5662e\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e_2_690x192.png\" alt=\"image\" data-base62-sha1=\"hQ4ZGoEbNyaKoAMxEGc1d0Ksby6\" width=\"690\" height=\"192\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e_2_690x192.png, https://forum.duniter.org/uploads/default/original/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/7/7d081473f9398e237425c96c8b9d55ef81e5662e.png 2x\" data-dominant-color=\"F2F6F8\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">819×229 36.5 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p><p>Autres petites améliorations sur cette page :</p><ul><li>Le fait de rafraîchir la liste ne provoque plus de clignotement des opérations déjà existantes. Seules les nouvelles opérations sont animées ;</li><li>le chargement des opérations plus anciennes (en bas de page) se fait directement par défilement vers le bas. Plus besoin de cliquer sur “Afficher plus” ou “Afficher tout” ! Au-delà de 6 mois d’historique, ces boutons apparaissent, pour limiter le nombre de requêtes au réseau.<br><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699.png\" data-download-href=\"https://forum.duniter.org/uploads/default/8617ad8aa899debbc16bd92f38f1eefe68ed4699\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699_2_690x211.png\" alt=\"image\" data-base62-sha1=\"j8eI3VQg2QseXemuowxFVl8qFlf\" width=\"690\" height=\"211\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699_2_690x211.png, https://forum.duniter.org/uploads/default/optimized/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699_2_1035x316.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/8/8617ad8aa899debbc16bd92f38f1eefe68ed4699.png 2x\" data-dominant-color=\"F7F9FA\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">1094×335 36.1 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></li></ul><h3><a name=\"rseaux-en-mode-expert-4\" class=\"anchor\" href=\"#rseaux-en-mode-expert-4\"></a>Réseaux (en mode expert)</h3><p>La vue réseau permet maintenant de voir l’état des files d’attente (ou piscines) contenant les documents en attente (transactions et demandes d’adhésion).</p><blockquote><p>Uniquement si vous avez activé le “mode expert” dans les paramètres,<br>et pour les nœuds ayant activé l’API BMA</p></blockquote><p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5.png\" data-download-href=\"https://forum.duniter.org/uploads/default/f475de5c8c5f2e8efa21e33a387c3262a33eded5\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5_2_690x258.png\" alt=\"image\" data-base62-sha1=\"ySB2aVf3V1kcQ5aWwasCVNCX9kN\" width=\"690\" height=\"258\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5_2_690x258.png, https://forum.duniter.org/uploads/default/original/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/f/f475de5c8c5f2e8efa21e33a387c3262a33eded5.png 2x\" data-dominant-color=\"F3F7F4\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">781×293 36.4 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p><p>Autre petite nouveauté : vous pouvez voir si un nœud (BMA) archive bien l’historique des transactions. Le symbole <strong><img src=\"https://forum.duniter.org/images/emoji/twitter/credit_card.png?v=12\" title=\":credit_card:\" class=\"emoji\" alt=\":credit_card:\" loading=\"lazy\" width=\"20\" height=\"20\"> <code>TX</code></strong> s’affiche maintenant, dans la colonne <code>API</code>.</p><blockquote><p>Visible uniquement en mode expert, en <strong>décompactant l’affichage</strong> des lignes</p></blockquote><p><div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://forum.duniter.org/uploads/default/original/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c.png\" data-download-href=\"https://forum.duniter.org/uploads/default/f6c5abe0063f927df3b6a1814f3265d611c4ac4c\" title=\"image\"><img src=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c_2_690x40.png\" alt=\"image\" data-base62-sha1=\"zd2XW5qedxuZ7gjgSiRiYV6K2D2\" width=\"690\" height=\"40\" srcset=\"https://forum.duniter.org/uploads/default/optimized/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c_2_690x40.png, https://forum.duniter.org/uploads/default/original/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c.png 1.5x, https://forum.duniter.org/uploads/default/original/2X/f/f6c5abe0063f927df3b6a1814f3265d611c4ac4c.png 2x\" data-dominant-color=\"EFF3F1\"><div class=\"meta\"><svg class=\"fa d-icon d-icon-far-image svg-icon\" aria-hidden=\"true\"><use href=\"#far-image\"></use></svg><span class=\"filename\">image</span><span class=\"informations\">787×46 8.14 KB</span><svg class=\"fa d-icon d-icon-discourse-expand svg-icon\" aria-hidden=\"true\"><use href=\"#discourse-expand\"></use></svg></div></a></div></p><h3><a name=\"autres-correctifs-5\" class=\"anchor\" href=\"#autres-correctifs-5\"></a>Autres correctifs</h3><ul><li>Android / iOS : le téléchargement de fichier fonctionne ! Pour le fichier de révocation notamment, mais aussi pour la liste des opérations, la sauvegarde des identifiants, etc.<blockquote><p>Vous trouverez le fichier téléchargé dans le répertoire “Téléchargements” (sous Android) ou “Documents” (sous iOS) ;</p></blockquote></li><li>Mes opérations : la liste des DU s’affiche maintenant correctement (sans passer par les nœuds Duniter pour contourner une limitation, mais par le pod Cesium+ s’il est activé) ;</li><li>Notifications : le nombre de messages ou de notifications est maintenant correct lorsque vous vous connectez pour la première fois sur un compte.</li></ul><br/> (...)"
},
{
"title": "Actu générale : La Ǧ1 bouge !",
"author": {
"name": "Collectif MaJ V2",
"url": "@LeForum",
"avatar": "https://forum.monnaie-libre.fr/user_avatar/forum.monnaie-libre.fr/leforum/48/8260_2.png"
},
"date_published": "2020-03-07T19:42:00+01:00",
"id": "https://forum.monnaie-libre.fr/t/cesium-evolue-aie-ca-va-piquer-mais/10015",
"url": "https://forum.monnaie-libre.fr/t/cesium-evolue-aie-ca-va-piquer-mais/10015",
"content_html": "<p>Au <b>1er mai 2020</b>, certains d’entre vous vont devoir changer leurs habitudes :</p>\n<ul>\n<li>pour ceux d’entre vous qui ont <strong>installé</strong> Cesium sur leur appareil : rien ne change</li>\n<li>pour ceux qui n’en sont pas sûrs : vous utilisez probablement la version «&nbsp;<strong>en ligne</strong>&nbsp;» (par exemple <code>g1․duniter․fr</code>), elle sera désactivée le 1er mai 2020. <strong>Relocalisez</strong> la gestion de votre compte en téléchargeant votre propre copie de Cesium dès maintenant :\n<a href=\"https://cesium.app/\">Je télécharge ma copie de Cesium</a> !</li>\n</ul>\n<h4>Besoin d’aide ? On est là pour vous !</h4>\n<p>Vous ne serez pas seul·e :</p>\n<p>La communauté G1 et les développeurs de Cesium sont là pour répondre à vos questions si jamais vous rencontrez un problème dans l’installation ou dans l’usage.</p>\n<p>Trois possibilités s’offrent à vous :</p>\n<ul>\n<li>Rendez-vous aux prochaines rencontres organisées par votre groupe local,</li>\n<li>ou : dites-le-nous sur le forum : <a href=\"https://forum.monnaie-libre.fr/c/tools/13\">Support cesium.app</a>\n</li>\n<li>ou : envoyez un e-mail à <a href=\"mailto:support@cesium.app\">support@cesium.app</a> créée pour l’occasion avec une équipe derrière.</li>\n</ul>\n<p>Pour effectuer votre transition en douceur, Cesium-web reste utilisable jusqu’au 1er mai 2020 .</p>\n<p>Cependant, plus vite vous <a href=\"https://cesium.app\">installez Cesium</a>, plus nous aurons de temps pour vous aider avant la fermeture du site.</p>\n"
"date_published": "2025-02-25T12:09:00+02:00",
"id": "https://forum.monnaie-libre.fr/t/actu-generale-la-1-bouge/31318",
"url": "https://forum.monnaie-libre.fr/t/actu-generale-la-1-bouge/31318",
"content_html": "<p>La Ǧ1 bouge, plusieurs chantiers importants sont en cours :</p>\n<ul>\n<li>Son écosystème technique qui approche de sa <a href=\"https://monnaie-libre.fr/maj-v2/\">mise à jour (V2) </a> sur laquelle nous travaillons depuis plusieurs années.</li>\n<li>Organisation et prises des décisions (gouvernance) dont un <a href=\"https://forum.monnaie-libre.fr/t/proposition-licence-g1-v0-3-0/31234\">vote pour faire évoluer la licence Ǧ1</a> auquel vous pouvez prendre part avant le 13 mars.</li>\n</ul>\n<p><strong>Pour la dernière ligne droite, la Ǧ1 a besoin de vous :</strong></p>\n<ul>\n<li>Pour accélérer les développements restants par un <a href=\"https://www.helloasso.com/associations/axiom-team/collectes/finalisation-de-cesium-v2-et-duniter-v2\">financement participatif</a> pour rémunérer quelques mois un développeur afin de finaliser Cesium².</li>\n<li>Pour tester les logiciels et nous dire ce qui ne marche pas sur votre appareil (ordi, tablette ou smartphone).</li>\n</ul>\n<p>Pour être tenu au courant d’un ou plusieurs des sujets évoqués, <a href=\"https://s.42l.fr/form-g1v2\">laissez-nous votre email</a>.</p>"
}
]
}
File added
# Connexion automatique, par fichier de trousseau
> Possible uniquement sur la version de bureau (desktop) de Cesium
Pour se connecter dès la lancement, à partir d'une fichier de trousseau (ou fichier de clefs), suivez les étapes suivantes :
1. Générer un fichier de trousseau :
* Allez dans "Mon compte > Options > Compte et sécurité";
* Choisissez "Générer mon fichier de trousseau";
* Puis "format "PubSec".
2. Placer le fichier à l'emplacement suivant `<home>/.config/cesium/keyring.yml`
3. Lancer Cesium : vous devriez être directement connecté sur ce compte.
......@@ -90,16 +90,16 @@ Installer Node.js est devenu extrêmement simple pour ces OS : un outil vous per
Vous pouvez installer nvm avec la commande suivante :
```bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.39.3/install.sh | bash
```
Fermez puis rouvrez votre terminal, comme indiqué. Puis, installez Node.js (choisissez la version 6) :
Fermez puis rouvrez votre terminal, comme indiqué. Puis, installez Node.js (choisissez la version 12) :
```bash
nvm install 6
nvm install 12
```
Vous aurez alors la dernière version de la branche 5.x de Node.js prête à l'emploi.
Vous aurez alors la dernière version de la branche 12.x de Node.js prête à l'emploi.
##### Outils de compilation
......@@ -110,7 +110,7 @@ sudo apt-get install build-essential
#### Sous Windows
Pour Windows, téléchargez la version 6 disponible sur le site officiel de Node.js : https://nodejs.org
Pour Windows, téléchargez la version 12 disponible sur le site officiel de Node.js : https://nodejs.org
Puis lancez l'installeur ainsi téléchargé.
......
File deleted
......@@ -7,5 +7,5 @@ Cesium Android allow user to upload user profile (avatar, pictures), when the Ce
Privacy policy are :
- Profile data and avatar are public data;
- Profile data and avatar on an [ES Duniter4j node](https://github.com/duniter/duniter4j); Open Cesium+ settings to known the node address;
- Profile data and avatar on an [Cesium+ node](https://github.com/duniter/cesium-plus-pod); Open Cesium+ settings to know the node address;
- User can remove profile and avatar (open the Settings page, then use the options menu).
\ No newline at end of file
......@@ -2,7 +2,7 @@
const gulp = require('gulp'),
path = require("path"),
sass = require('gulp-sass'),
sass = require('gulp-sass')(require('node-sass')),
cleanCss = require('gulp-clean-css'),
base64 = require('gulp-base64-v2'),
rename = require('gulp-rename'),
......@@ -79,6 +79,9 @@ const uglifyBaseOptions = {
max_line_len: 120000
}
};
const cleanCssOptions = {
specialComments: 0 // new name of 'keepSpecialComments', since 4.0
}
const debugBaseOptions = {
title: 'Processing',
minimal: true,
......@@ -134,9 +137,7 @@ function appSass() {
maxImageSize: 14 * 1024
}))
.pipe(gulp.dest('./www/css/'))
.pipe(cleanCss({
keepSpecialComments: 0
}))
.pipe(cleanCss(cleanCssOptions))
.pipe(rename({ extname: '.min.css' }))
.pipe(gulp.dest('./www/css/'));
}
......@@ -172,7 +173,38 @@ function appConfig() {
.pipe(gulp.dest('www/js'));
}
function appAndPluginLint(done) {
function appConfigTest() {
const allConfig = JSON.parse(fs.readFileSync('./app/config.json', 'utf8'));
// Determine which environment to use when building config.
const env = 'g1-test';
const config = allConfig[env];
if (!config) {
throw new Error(colors.red("=> Could not load `" + env + "` environment!"));
}
log(colors.green("Building App test config at `www/js/config-test.js` for `" + env + "` environment..."));
const project = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
config['version'] = project.version;
config['build'] = (new Date()).toJSON();
config['newIssueUrl'] = project.bugs.new;
return ngConstant({
name: 'cesium.config',
constants: {"csConfig": config},
stream: true,
dest: 'config-test.js'
})
// Add a warning header
.pipe(header("/******\n* !! WARNING: This is a generated file !!\n*\n* PLEASE DO NOT MODIFY DIRECTLY\n*\n* => Changes should be done on file 'app/config.json'.\n******/\n\n"))
// Writes into file www/js/config-test.js
.pipe(rename('config-test.js'))
.pipe(gulp.dest('www/js'));
}
function appAndPluginLint() {
log(colors.green('Linting JS files...'));
// Copy Js (and remove unused code)
......@@ -185,8 +217,8 @@ function appAndPluginLint(done) {
console.error('jshint failed');
process.exit(1);
}
}))
.on('end', done);
cb();
}));
}
function appNgTemplate() {
......@@ -334,9 +366,7 @@ function pluginSass() {
deleteAfterEncoding: false
}))
.pipe(gulp.dest('./www/css/'))
.pipe(cleanCss({
keepSpecialComments: 0
}))
.pipe(cleanCss(cleanCssOptions))
.pipe(rename({ extname: '.min.css' }))
.pipe(gulp.dest('./www/css/'))
);
......@@ -391,6 +421,11 @@ function webCopyFiles() {
.pipe(htmlmin())
.pipe(gulp.dest(targetPath + '/api')),
// Copy config-test.js
gulp.src('./www/js/config*.js')
.pipe(debug(debugOptions))
.pipe(gulp.dest(targetPath)),
// Copy fonts
gulp.src('./www/fonts/**/*.*')
.pipe(debug(debugOptions))
......@@ -530,7 +565,7 @@ function webUglify() {
log(colors.green('Minify JS and CSS files...'));
const indexFilter = filter('**/index.html', {restore: true});
const jsFilter = filter(["**/*.js", '!**/config.js'], {restore: true});
const jsFilter = filter(["**/*.js", '!**/config.js', '!**/config-test.js'], {restore: true});
const cssFilter = filter("**/*.css", {restore: true});
// Process index.html
......@@ -588,7 +623,7 @@ function webApiUglify() {
const targetPath = './dist/web/www';
const version = JSON.parse(fs.readFileSync('./package.json', 'utf8')).version;
const jsFilter = filter(["**/*.js", '!**/config.js'], {restore: true});
const jsFilter = filter(["**/*.js", '!**/config.js', '!**/config-test.js'], {restore: true});
const cssFilter = filter("**/*.css", {restore: true});
const indexFilter = filter('**/index.html', {restore: true});
......@@ -621,6 +656,7 @@ function webApiUglify() {
.pipe(replace("dist_js", "../dist_js"))
.pipe(replace("dist_css", "../dist_css"))
.pipe(replace("config.js", "../config.js"))
.pipe(replace("config-test.js", "../config-test.js"))
.pipe(indexFilter.restore)
.pipe(sourcemaps.write('maps'))
......@@ -638,6 +674,7 @@ function webApiUglify() {
.pipe(replace("dist_js", "../dist_js"))
.pipe(replace("dist_css", "../dist_css"))
.pipe(replace("config.js", "../config.js"))
.pipe(replace("config-test.js", "../config-test.js"))
.pipe(indexFilter.restore)
.pipe(gulp.dest(targetPath));
......@@ -676,6 +713,9 @@ function webCleanUnusedFiles(done) {
// Unused maps/config.js.map
gulp.src(targetPath + '/maps/config.js.map', {read: false, allowEmpty: true})
.pipe(debug(debugOptions))
.pipe(clean()),
gulp.src(targetPath + '/maps/config-test.js.map', {read: false, allowEmpty: true})
.pipe(debug(debugOptions))
.pipe(clean())
)
......@@ -1330,6 +1370,7 @@ const appAndPluginSass = gulp.series(appSass, pluginSass);
const app = gulp.series(appSass, appNgTemplate, appNgAnnotate, appNgTranslate);
const plugin = gulp.series(pluginSass, pluginNgTemplate, pluginNgAnnotate, pluginNgTranslate);
const build = gulp.series(appLicense, app, plugin);
const config = gulp.series(appConfig, appConfigTest);
const webApp = gulp.series(appSass, webCopyFiles, webNgTemplate, webAppNgAnnotate);
const webPlugin = gulp.series(pluginSass, webPluginCopyFiles, webPluginNgTemplate, webPluginNgAnnotate);
......@@ -1371,7 +1412,7 @@ const webExtBuild = gulp.series(
--------------------------------------------------------------------------*/
exports.help = help;
exports.config = appConfig;
exports.config = config;
exports.license = appLicense;
exports.sass = appAndPluginSass;
exports.translate = translate;
......@@ -1415,6 +1456,6 @@ const cdvBeforeCompile = gulp.series(
);
exports.cdvBeforeCompile = cdvAsHook(cdvBeforeCompile);
exports.default = gulp.series(appConfig, build);
exports.default = gulp.series(config, build);
exports.serveBefore = gulp.series(build, appAndPluginWatch);
exports['ionic:serve:before'] = exports.serveBefore; // Alias need need by @ionic/cli
exports['ionic:serve:before'] = exports.serveBefore; // Alias need by @ionic/cli
......@@ -6,16 +6,10 @@ is_installed() {
type "$1" > /dev/null 2>&1
}
if [ "_$1" != "_" ]; then
CESIUM_DIR="$1"
fi
if [ "_$CESIUM_DIR" = "_" ]; then
DIRNAME=`pwd`
CESIUM_DIR="$DIRNAME/cesium"
fi
CESIUM_DIR=${1:-$(pwd)/cesium}
latest_version() {
echo "v1.6.9" #lastest
echo "v1.7.13" # lastest
}
api_release_url() {
......@@ -39,16 +33,15 @@ download() {
install_from_github() {
local RELEASE=`curl -XGET -i $(api_release_url)`
local CESIUM_URL=`echo "$RELEASE" | grep -P "\"browser_download_url\": \"[^\"]+" | grep -oP "https://[a-zA-Z0-9/.-]+-web.zip"`
local CESIUM_ARCHIVE=$CESIUM_DIR/cesium.zip
if [ -d "$CESIUM_DIR" ]; then
if [ -f "$CESIUM_ARCHIVE" ]; then
echo "WARNING: Deleting existing archive [$CESIUM_ARCHIVE]"
rm $CESIUM_ARCHIVE
fi
else
local RELEASE=$(curl -XGET -i "$(api_release_url)")
local CESIUM_URL=$(echo "$RELEASE" | grep -P '"browser_download_url": "[^"]+' | grep -oP "https://[a-zA-Z0-9/.-]+-web.zip" | head -n 1)
local CESIUM_ARCHIVE="$CESIUM_DIR/cesium.zip"
if [ ! -d "$CESIUM_DIR" ]; then
mkdir -p "$CESIUM_DIR"
elif [ -f "$CESIUM_ARCHIVE" ]; then
echo "WARNING: Deleting existing archive [$CESIUM_ARCHIVE]"
rm "$CESIUM_ARCHIVE"
fi
echo "Downloading [$CESIUM_URL]"
......@@ -56,23 +49,23 @@ install_from_github() {
echo >&2 "Failed to download '$CESIUM_URL'"
return 4
}
echo "Unarchive to $CESIUM_DIR"
unzip -o $CESIUM_ARCHIVE -d $CESIUM_DIR
rm $CESIUM_ARCHIVE
echo
echo "Unarchiving to $CESIUM_DIR"
unzip -o "$CESIUM_ARCHIVE" -d "$CESIUM_DIR"
rm "$CESIUM_ARCHIVE"
echo "Cesium successfully installed at $CESIUM_DIR"
}
do_install() {
if ! is_installed "curl"; then
echo "=> curl is not available. You will likely need to install 'curl' package."
if ! is_installed "curl" && ! is_installed "wget"; then
echo "=> Neither 'curl' nor 'wget' is available. Please install one of them."
exit 1
fi
if ! is_installed "unzip"; then
echo "=> unzip is not available. You will likely need to install 'unzip' package."
echo "=> 'unzip' is not available. You will likely need to install the 'unzip' package."
exit 1
fi
......@@ -84,10 +77,9 @@ do_install() {
# during the execution of the install script
#
reset() {
unset -f reset is_installed latest_version \
download install_from_github do_install
unset -f reset is_installed latest_version api_release_url download install_from_github do_install
}
[ "_$CESIUM_ENV" = "_testing" ] || do_install $1
[ "_$CESIUM_ENV" = "_testing" ] || do_install "$1"
} # this ensures the entire script is downloaded #
......@@ -4,10 +4,11 @@
"integrations": {
"cordova": {}
},
"type": "ionic1",
"watchPatterns": [
"www/index.html",
"www/api/index.html",
"www/dist/**/*",
"www/css/*.css"
]
],
"yarn": true
}
{}
\ No newline at end of file
{
"compileOnSave": false
}
{
"name": "cesium",
"version": "1.6.9",
"version": "1.7.14",
"description": "Cesium Wallet for G1 libre currency",
"author": "Benoit Lavenier <benoit.lavenier@e-is.pro>",
"license": "AGPL-3.0",
......@@ -10,20 +10,21 @@
"url": "git@git.duniter.org:clients/cesium/cesium.git"
},
"scripts": {
"clean": "clean webClean webExtClean && trash dist/desktop/**/*.deb platforms/android/**/*.apk",
"clean": "gulp clean webClean webExtClean && rm -rf dist/web dist/android && rm -f desktop/**/cesium-*.deb desktop/**/cesium-*.exe platforms/android/**/*.apk",
"postinstall": "node scripts/node/postinstall.js",
"gulp": "gulp",
"lint": "gulp lint",
"install-platforms": "ionic cordova prepare",
"start": "ionic serve",
"start:webExt": "gulp webExtCompile && web-ext run --source-dir ./dist/web/ext/",
"start:webExt": "gulp webExtCompile && web-ext run --source-dir ./dist/web/ext/ --devtools",
"start:android": "ionic cordova run android --color",
"docker:build": "sudo docker build . -t cesium/release",
"docker:run": "sudo docker run -ti --rm -p 8100:8100 -p 35729:35729 -v .:/cesium:rw cesium/release",
"build": "gulp build",
"build:web": "gulp config --env default && gulp webBuild --release",
"build:webExt": "gulp config --env default && gulp webExtBuild --release",
"build:android": "ionic cordova build android --color --release",
"build:ios": "ionic cordova build ios --color --release"
"build:android": "ionic cordova build android --warning-mode=none --color --release -- -- --packageType=apk",
"build:ios": "ionic cordova build ios --warning-mode=none --color --release"
},
"keywords": [
"duniter",
......@@ -64,11 +65,11 @@
"@bower_components/angular-ui-router": "angular-ui/angular-ui-router-bower#0.2.18",
"@bower_components/blob-polyfill": "bjornstar/blob-polyfill#~1.0.20150320",
"@bower_components/chart.js": "chartjs/Chart.js#v2.9.3",
"@bower_components/file-saver.js": "Teleborder/FileSaver.js#~1.20150507.2",
"@bower_components/ion-digit-keyboard": "skol-pro/ion-digit-keyboard#973b90c2fc",
"@bower_components/ionic": "driftyco/ionic-bower#v1.3.5",
"@bower_components/ionic-material": "zachsoft/Ionic-Material#v0.4.2",
"@bower_components/js-nacl": "tonyg/js-nacl#1.3.2",
"@bower_components/jdenticon": "dmester/jdenticon#3.1.0",
"@bower_components/js-nacl": "tonyg/js-nacl#1.4.0",
"@bower_components/js-scrypt": "tonyg/js-scrypt#v1.2.0",
"@bower_components/leaflet": "Leaflet/Leaflet#v0.7.7",
"@bower_components/leaflet-search": "stefanocudini/leaflet-search#v2.7.2",
......@@ -88,33 +89,30 @@
"uuid": "3.2.1"
},
"devDependencies": {
"@ionic/cli": "^6.11.7",
"@ionic/v1-toolkit": "^3.2.8",
"@ionic/cli": "~6.20.9",
"@ionic/v1-toolkit": "^3.2.20",
"@prantlf/gulp-jsonlint": "^2.4.0",
"ansi-colors": "^4.1.1",
"cordova": "^10.0.0",
"cordova-android": "^9.0.0",
"cordova": "^11.1.0",
"cordova-android": "^10.1.2",
"cordova-clipboard": "^1.3.0",
"cordova-ios": "^6.1.0",
"cordova-osx": "^6.0.0",
"cordova-plugin-androidx": "^2.0.0",
"cordova-plugin-androidx-adapter": "^1.1.1",
"cordova-plugin-camera": "^4.1.0",
"cordova-plugin-compat": "^1.2.0",
"cordova-fetch": "^4.0.0",
"cordova-ios": "^6.3.0",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-camera": "^5.0.3",
"cordova-plugin-customurlscheme": "^5.0.2",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-device": "^2.1.0",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-file": "^8.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.2.1",
"cordova-plugin-minisodium": "git+https://github.com/duniter-cesium/cordova-plugin-minisodium.git#v1.0.2",
"cordova-plugin-secure-storage-android10": "git+https://github.com/duniter-cesium/cordova-plugin-secure-storage-android10.git#6.0.4",
"cordova-plugin-splashscreen": "^6.0.0",
"cordova-plugin-statusbar": "^2.4.3",
"cordova-plugin-ionic-webview": "^5.0.0",
"cordova-plugin-network-information": "~3.0.0",
"cordova-plugin-secure-storage-android10": "~6.0.7",
"cordova-plugin-splashscreen": "^6.0.2",
"cordova-plugin-statusbar": "^3.0.0",
"cordova-plugin-vibration": "^3.1.1",
"cordova-plugin-websocket": "^0.12.2",
"cordova-plugin-whitelist": "^1.3.4",
"cordova-plugin-x-toast": "^2.7.2",
"cordova-plugin-x-toast": "^2.7.3",
"del": "^5.1.0",
"delete-empty": "^0.1.3",
"event-stream": "3.3.4",
......@@ -122,7 +120,7 @@
"glob": "^5.0.15",
"graceful-fs": "^4.2.3",
"gulp": "^4.0.2",
"gulp-angular-templatecache": "^3.0.0",
"gulp-angular-templatecache": "^3.0.1",
"gulp-angular-translate": "^0.1.4",
"gulp-base64-v2": "^1.0.4",
"gulp-bump": "^3.1.3",
......@@ -144,7 +142,7 @@
"gulp-remove-code": "^3.0.4",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0",
"gulp-sass": "^4.1.0",
"gulp-sass": "^5.1.0",
"gulp-sort": "^2.0.0",
"gulp-sourcemaps": "^2.6.5",
"gulp-sri-hash": "^2.2.1",
......@@ -158,11 +156,11 @@
"map-stream": "0.0.7",
"merge2": "^1.3.0",
"mv": "^2.1.1",
"node-sass": "^4.14.1",
"node-sass": "^9.0.0",
"phonegap-plugin-barcodescanner": "^8.1.0",
"playup": "^1.1.0",
"vinyl-fs": "^3.0.3",
"web-ext": "^4.3.0",
"web-ext": "^7.9.0",
"yargs": "^5.0.0"
},
"peerDependencies": {
......@@ -189,7 +187,6 @@
"cordova-plugin-statusbar": {},
"cordova-plugin-vibration": {},
"cordova-plugin-websocket": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-x-toast": {},
"cordova-plugin-ionic-keyboard": {},
"phonegap-plugin-barcodescanner": {
......@@ -202,7 +199,6 @@
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "28.+"
},
"cordova-plugin-file": {},
"cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "june",
......@@ -211,16 +207,15 @@
"ANDROID_PATHPREFIX": "/wallet"
},
"cordova-plugin-secure-storage-android10": {},
"cordova-plugin-minisodium": {}
"cordova-plugin-network-information": {}
},
"platforms": [
"ios",
"osx",
"android"
]
},
"engines": {
"node": ">= 12.18.3",
"node": ">= 16.17.0",
"yarn": ">= 1.22.0"
}
}
......@@ -36,7 +36,7 @@ RUN npm install -g cordova@"$CORDOVA_VERSION" cordova-res@"$CORDOVA_RES_VERSION"
RUN echo ANDROID_HOME="${ANDROID_HOME}" >> /etc/environment && \
dpkg --add-architecture i386 && \
apt-get update && \
apt-get -y install openjdk-8-jdk-headless && \
apt-get -y install openjdk-11-jdk-headless && \
apt-get install -y --force-yes expect ant wget zipalign libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 qemu-kvm kmod && \
apt-get clean && \
apt-get autoclean && \
......
configurations.all {
resolutionStrategy {
force 'androidx.legacy:legacy-support-v4:1.0.0'
force 'androidx.appcompat:appcompat:1.2.0'
}
}
dependencies {
implementation(project(path: ":CordovaLib")) {
exclude group: 'com.android.support', module:'support-v4'
}
}
File deleted
package com.crypho.plugins;
import android.annotation.TargetApi;
import android.app.KeyguardManager;
import android.content.Context;
import android.content.Intent;
import android.hardware.biometrics.BiometricPrompt;
import android.os.Build;
import android.os.CancellationSignal;
import android.os.Handler;
import android.provider.Settings;
import android.util.Base64;
import android.util.Log;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaArgs;
import org.apache.cordova.CordovaPlugin;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.reflect.Method;
import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.Executor;
/**
* CHANGES :
* 31/05/2023 - BLA - Report MR as a workaround for issue #6 (https://github.com/Sotam/cordova-plugin-secure-storage-android10/issues/6)
* TODO: remove this file after new release, with this fixed issue
*/
public class SecureStorage extends CordovaPlugin {
private static final String TAG = "SecureStorage";
private static final boolean SUPPORTED = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
private static final Boolean IS_API_29_AVAILABLE = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
private static final Integer DEFAULT_AUTHENTICATION_VALIDITY_TIME = 60 * 60 * 24; // Fallback to 24h. Workaround to avoid asking for credentials too "often"
private static final String MSG_NOT_SUPPORTED = "API 19 (Android 4.4 KitKat) is required. This device is running API " + Build.VERSION.SDK_INT;
private static final String MSG_DEVICE_NOT_SECURE = "Device is not secure";
private static final String MSG_KEYS_FAILED = "Generate RSA Encryption Keys failed. ";
private Hashtable<String, SharedPreferencesHandler> SERVICE_STORAGE = new Hashtable<String, SharedPreferencesHandler>();
private String INIT_SERVICE;
private String INIT_PACKAGENAME;
private volatile CallbackContext secureDeviceContext, generateKeysContext, unlockCredentialsContext;
private volatile boolean generateKeysContextRunning = false;
private AbstractRSA rsa = RSAFactory.getRSA();
@Override
public void onResume(boolean multitasking) {
if (secureDeviceContext != null) {
if (isDeviceSecure()) {
secureDeviceContext.success();
} else {
secureDeviceContext.error(MSG_DEVICE_NOT_SECURE);
}
secureDeviceContext = null;
}
if (unlockCredentialsContext != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cordova.getThreadPool().execute(new Runnable() {
public void run() {
if (unlockCredentialsContext != null) {
String alias = service2alias(INIT_SERVICE);
if (rsa.userAuthenticationRequired(alias)) {
unlockCredentialsContext.error("User not authenticated");
}
unlockCredentialsContext.success();
unlockCredentialsContext = null;
}
}
});
}
}
}
@Override
public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException {
if (!SUPPORTED) {
Log.w(TAG, MSG_NOT_SUPPORTED);
callbackContext.error(MSG_NOT_SUPPORTED);
return false;
}
if ("init".equals(action)) {
String service = args.getString(0);
JSONObject options = args.getJSONObject(1);
String packageName = options.optString("packageName", getContext().getPackageName());
Context ctx = null;
// Solves #151. By default, we use our own ApplicationContext
// If packageName is provided, we try to get the Context of another Application with that packageName
try {
ctx = getPackageContext(packageName);
} catch (Exception e) {
// This will fail if the application with given packageName is not installed
// OR if we do not have required permissions and cause a security violation
Log.e(TAG, "Init failed :", e);
callbackContext.error(e.getMessage());
}
INIT_PACKAGENAME = ctx.getPackageName();
String alias = service2alias(service);
INIT_SERVICE = service;
SharedPreferencesHandler PREFS = new SharedPreferencesHandler(alias, ctx);
SERVICE_STORAGE.put(service, PREFS);
if (!isDeviceSecure()) {
Log.e(TAG, MSG_DEVICE_NOT_SECURE);
callbackContext.error(MSG_DEVICE_NOT_SECURE);
} else if (!rsa.encryptionKeysAvailable(alias)) {
// Encryption Keys aren't available, proceed to generate them
Integer userAuthenticationValidityDuration = options.optInt("userAuthenticationValidityDuration", DEFAULT_AUTHENTICATION_VALIDITY_TIME);
generateKeysContext = callbackContext;
generateEncryptionKeys(userAuthenticationValidityDuration);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
unlockCredentialsLegacy();
}
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && rsa.userAuthenticationRequired(alias)) {
// User has to confirm authentication via device credentials.
String title = options.optString("unlockCredentialsTitle", null);
String description = options.optString("unlockCredentialsDescription", null);
unlockCredentialsContext = callbackContext;
unlockCredentials(title, description);
} else {
initSuccess(callbackContext);
}
return true;
}
if ("set".equals(action)) {
final String service = args.getString(0);
final String key = args.getString(1);
final String value = args.getString(2);
final String cipherMode = args.isNull(3) ? null : args.getString(3); // Close #6 - cipherMode is optional
final String adata = service;
cordova.getThreadPool().execute(new Runnable() {
public void run() {
try {
JSONObject result = AES.encrypt(value.getBytes(), adata.getBytes(), cipherMode);
byte[] aes_key = Base64.decode(result.getString("key"), Base64.DEFAULT);
byte[] aes_key_enc = rsa.encrypt(aes_key, service2alias(service));
result.put("key", Base64.encodeToString(aes_key_enc, Base64.DEFAULT));
if (cipherMode != null) result.put("mode", cipherMode);
getStorage(service).store(key, result.toString());
callbackContext.success(key);
} catch (Exception e) {
Log.e(TAG, "Encrypt failed :", e);
callbackContext.error(e.getMessage());
}
}
});
return true;
}
if ("get".equals(action)) {
final String service = args.getString(0);
final String key = args.getString(1);
String value = getStorage(service).fetch(key);
if (value != null) {
JSONObject json = new JSONObject(value);
final byte[] encKey = Base64.decode(json.getString("key"), Base64.DEFAULT);
final JSONObject data = json.getJSONObject("value");
final byte[] ct = Base64.decode(data.getString("ct"), Base64.DEFAULT);
final byte[] iv = Base64.decode(data.getString("iv"), Base64.DEFAULT);
final byte[] adata = Base64.decode(data.getString("adata"), Base64.DEFAULT);
cordova.getThreadPool().execute(new Runnable() {
public void run() {
try {
byte[] decryptedKey = rsa.decrypt(encKey, service2alias(service));
String cipherMode = data.isNull("mode") ? null : data.getString("mode");
String decrypted = new String(AES.decrypt(ct, decryptedKey, iv, adata, cipherMode));
callbackContext.success(decrypted);
} catch (Exception e) {
Log.e(TAG, "Decrypt failed :", e);
callbackContext.error(e.getMessage());
}
}
});
} else {
callbackContext.error("Key [" + key + "] not found.");
}
return true;
}
if ("secureDevice".equals(action)) {
// Open the Security Settings screen. The app developer should inform the user about
// the security requirements of the app and initialize again after the user has changed the screen-lock settings
secureDeviceContext = callbackContext;
secureDevice();
return true;
}
if ("remove".equals(action)) {
String service = args.getString(0);
String key = args.getString(1);
getStorage(service).remove(key);
callbackContext.success(key);
return true;
}
if ("keys".equals(action)) {
String service = args.getString(0);
callbackContext.success(new JSONArray(getStorage(service).keys()));
return true;
}
if ("clear".equals(action)) {
String service = args.getString(0);
getStorage(service).clear();
callbackContext.success();
return true;
}
return false;
}
private boolean isDeviceSecure() {
KeyguardManager keyguardManager = (KeyguardManager) (getContext().getSystemService(Context.KEYGUARD_SERVICE));
try {
Method isSecure = null;
isSecure = keyguardManager.getClass().getMethod("isDeviceSecure");
return ((Boolean) isSecure.invoke(keyguardManager)).booleanValue();
} catch (Exception e) {
return keyguardManager.isKeyguardSecure();
}
}
private String service2alias(String service) {
String res = INIT_PACKAGENAME + "." + service;
return res;
}
private SharedPreferencesHandler getStorage(String service) {
return SERVICE_STORAGE.get(service);
}
private void initSuccess(CallbackContext context) {
context.success();
}
/**
* Create the Confirm Credentials screen.
* You can customize the title and description or Android will provide a generic one for you if you leave it null
*
* @param title
* @param description
*/
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void unlockCredentials(final String title, final String description) {
cordova.getActivity().runOnUiThread(new Runnable() {
public void run() {
if (IS_API_29_AVAILABLE && isDeviceSecure()) {
// Building a biometric prompt instance with custom title and description.
BiometricPrompt.Builder biometricPromptBuilder = new BiometricPrompt.Builder(getContext());
biometricPromptBuilder.setTitle(title);
biometricPromptBuilder.setDescription(description);
//biometricPromptBuilder.setDeviceCredentialAllowed(true);
BiometricPrompt biometricPrompt = biometricPromptBuilder.build();
CancellationSignal cancellationSignal = new CancellationSignal();
final Executor executor = getExecutor();
// Launching the credential confirmation popup to get biometric validation.
// If biometric is not available will open the other unlock methods.
biometricPrompt.authenticate(cancellationSignal, executor, new BiometricPrompt.AuthenticationCallback() {
@Override
public void onAuthenticationError(int errorCode, CharSequence errString) {
super.onAuthenticationError(errorCode, errString);
}
@Override
public void onAuthenticationHelp(int helpCode, CharSequence helpString) {
super.onAuthenticationHelp(helpCode, helpString);
}
@Override
public void onAuthenticationSucceeded(BiometricPrompt.AuthenticationResult result) {
super.onAuthenticationSucceeded(result);
}
@Override
public void onAuthenticationFailed() {
super.onAuthenticationFailed();
}
});
} else {
KeyguardManager keyguardManager = (KeyguardManager) (getContext().getSystemService(Context.KEYGUARD_SERVICE));
Intent intent = keyguardManager.createConfirmDeviceCredentialIntent(title, description);
if (intent != null) {
startActivity(intent);
} else {
Log.e(TAG, "Error creating Confirm Credentials Intent");
unlockCredentialsContext.error("Cant't unlock credentials, error creating Confirm Credentials Intent");
}
}
}
});
}
@TargetApi(Build.VERSION_CODES.KITKAT)
private void unlockCredentialsLegacy() {
cordova.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
Intent intent = new Intent("com.android.credentials.UNLOCK");
startActivity(intent);
}
});
}
/**
* Generate Encryption Keys in the background.
*
* @param userAuthenticationValidityDuration User authentication validity duration in seconds
*/
private void generateEncryptionKeys(final Integer userAuthenticationValidityDuration) {
if (generateKeysContext != null && !generateKeysContextRunning) {
cordova.getThreadPool().execute(new Runnable() {
public void run() {
generateKeysContextRunning = true;
try {
String alias = service2alias(INIT_SERVICE);
SharedPreferencesHandler storage = getStorage(INIT_SERVICE);
if(storage.isEmpty()){
//Solves Issue #96. The RSA key may have been deleted by changing the lock type.
getStorage(INIT_SERVICE).clear();
rsa.createKeyPair(getContext(), alias, userAuthenticationValidityDuration);
}
generateKeysContext.success();
} catch (Exception e) {
Log.e(TAG, MSG_KEYS_FAILED, e);
generateKeysContext.error(MSG_KEYS_FAILED + e.getMessage());
} finally {
generateKeysContext = null;
generateKeysContextRunning = false;
}
}
});
}
}
/**
* Open Security settings screen.
*/
private void secureDevice() {
cordova.getActivity().runOnUiThread(new Runnable() {
public void run() {
try {
Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
startActivity(intent);
} catch (Exception e) {
Log.e(TAG, "Error opening Security settings to secure device : ", e);
secureDeviceContext.error(e.getMessage());
}
}
});
}
private Context getContext() {
return cordova.getActivity().getApplicationContext();
}
/**
* Creates a executor with handler to run runnable tasks.
*/
private Executor getExecutor() {
return new Executor() {
@Override
public void execute(Runnable command) {
Handler handler = new Handler();
handler.post(command);
}
};
}
private Context getPackageContext(String packageName) throws Exception {
Context pkgContext = null;
Context context = getContext();
if (context.getPackageName().equals(packageName)) {
pkgContext = context;
} else {
pkgContext = context.createPackageContext(packageName, 0);
}
return pkgContext;
}
private void startActivity(Intent intent) {
cordova.getActivity().startActivity(intent);
}
}