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
  • master
  • develop
  • feature/cordova-android-13
  • feature/migrate-cordova-13
  • feat/improve-network-scan
  • feat/force-migration-check
  • feature/encrypted_comment
  • feature/android_api_19
  • gitlab_migration_1
  • rml8
  • 0.0.1.ES.alpha1
  • 0.0.2
  • 0.1.13
  • 0.1.14
  • 0.1.15
  • 0.1.16
  • 0.1.17
  • 0.1.18
  • 0.1.19
  • 0.1.20
  • 0.1.21
  • 0.1.22
  • 0.1.23
  • 0.1.24
  • 0.1.25
  • 0.1.26
  • 0.1.27
  • 0.1.28
  • 0.1.4
  • 0.1.7
  • 0.1.8
  • 0.2.0
  • 0.2.1
  • v0.10.0
  • v0.10.1
  • v0.10.2
  • v0.11.0
  • v0.11.1
  • v0.11.2
  • v0.11.3
  • v0.11.4
  • v0.11.5
  • v0.11.6
  • v0.11.7
  • v0.11.8
  • v0.12.0
  • v0.12.1
  • v0.12.2
  • v0.12.3
  • v0.12.4
  • v0.12.5
  • v0.12.6
  • v0.12.7
  • v0.12.8
  • v0.12.9
  • v0.13.0
  • v0.14.0
  • v0.14.1
  • v0.15.0
  • v0.15.1
  • v0.15.2
  • v0.15.3
  • v0.15.4
  • v0.15.5
  • v0.15.6
  • v0.15.7
  • v0.16.0
  • v0.16.1
  • v0.17.0
  • v0.17.1
  • v0.17.2
  • v0.17.3
  • v0.17.4
  • v0.17.5
  • v0.17.6
  • v0.18.0
  • v0.18.1
  • v0.18.2
  • v0.18.3
  • v0.19.0
  • v0.19.1
  • v0.19.2
  • v0.19.3
  • v0.19.4
  • v0.19.5
  • v0.19.6
  • v0.2.10
  • v0.2.12
  • v0.2.13
  • v0.2.14
  • v0.2.3
  • v0.2.4
  • v0.2.5
  • v0.2.6
  • v0.2.7
  • v0.2.8
  • v0.2.9
  • v0.3.0
  • v0.3.1
  • v0.3.10
  • v0.3.11
  • v0.3.12
  • v0.3.13
  • v0.3.14
  • v0.3.15
  • v0.3.16
  • v0.3.17
  • v0.3.2
  • v0.3.3
  • v0.3.4
110 results

Target

Select target project
No results found
Select Git revision
  • master
  • patch-1
  • issue_4
  • issue_780
  • gitlab_migration_1
  • dev
  • rml8
  • 0.0.1.ES.alpha1
  • 0.0.2
  • 0.1.13
  • 0.1.14
  • 0.1.15
  • 0.1.16
  • 0.1.17
  • 0.1.18
  • 0.1.19
  • 0.1.20
  • 0.1.21
  • 0.1.22
  • 0.1.23
  • 0.1.24
  • 0.1.25
  • 0.1.26
  • 0.1.27
  • 0.1.28
  • 0.1.4
  • 0.1.7
  • 0.1.8
  • 0.2.0
  • 0.2.1
  • v0.10.0
  • v0.10.1
  • v0.10.2
  • v0.11.0
  • v0.11.1
  • v0.11.2
  • v0.11.3
  • v0.11.4
  • v0.11.5
  • v0.11.6
  • v0.11.7
  • v0.11.8
  • v0.12.0
  • v0.12.1
  • v0.12.2
  • v0.12.3
  • v0.12.4
  • v0.12.5
  • v0.12.6
  • v0.12.7
  • v0.12.8
  • v0.12.9
  • v0.13.0
  • v0.14.0
  • v0.14.1
  • v0.15.0
  • v0.15.1
  • v0.15.2
  • v0.15.3
  • v0.15.4
  • v0.15.5
  • v0.15.6
  • v0.15.7
  • v0.16.0
  • v0.16.1
  • v0.17.0
  • v0.17.1
  • v0.17.2
  • v0.17.3
  • v0.17.4
  • v0.17.5
  • v0.17.6
  • v0.18.0
  • v0.18.1
  • v0.18.2
  • v0.18.3
  • v0.19.0
  • v0.19.1
  • v0.19.2
  • v0.19.3
  • v0.19.4
  • v0.19.5
  • v0.19.6
  • v0.2.10
  • v0.2.12
  • v0.2.13
  • v0.2.14
  • v0.2.3
  • v0.2.4
  • v0.2.5
  • v0.2.6
  • v0.2.7
  • v0.2.8
  • v0.2.9
  • v0.3.0
  • v0.3.1
  • v0.3.10
  • v0.3.11
  • v0.3.12
  • v0.3.13
  • v0.3.14
  • v0.3.15
  • v0.3.16
  • v0.3.17
  • v0.3.2
  • v0.3.3
  • v0.3.4
107 results
Show changes
919 files
+ 99447
221505
Compare changes
  • Side-by-side
  • Inline

Files

.bowerrc

deleted100644 → 0
+0 −3
Original line number Original line Diff line number Diff line
{
  "directory": "www/lib"
}
+10 −0
Original line number Original line Diff line number Diff line
This project is now tracked on our hosted gitlab server at:
> https://git.duniter.org/clients/cesium/cesium

The current github repository is a simple clone taken up to date at each push on the main gitlab repository.

All contributions should be performed on the main gitlab repository.

Pull requests proposed on github would generate more work for the main contributors.

Issues can be submitted on github. However, all issues created on github will be duplicated on gitlab manually and closed with a link to the gitlab issue.
+6 −0
Original line number Original line Diff line number Diff line
Please note that all issues should be preferentially opened at
https://git.duniter.org/clients/cesium/cesium/issues/new?issue

If you open issue here, it will be duplicated manually on our hosted gitlab and closed here with a link to our main repository.

Thank you for your understanding.
+10 −0
Original line number Original line Diff line number Diff line
This project is now tracked on our hosted gitlab server at:
> https://git.duniter.org/clients/cesium-grp/cesium

The current github repository is a simple clone taken up to date at each push on the main gitlab repository.

All contributions should be performed on the main gitlab repository.

Pull requests proposed on github would generate more work for the main contributors, therefore we would really appreciate if you can create instead merge requests on our hosted gitlab instance.

Thank you for your understanding.
+14 −0
Original line number Original line Diff line number Diff line
# Initial disclaimer
This project is now tracked on our hosted gitlab server at:
https://git.duniter.org/clients/cesium-grp/cesium

The current github repository is a simple clone taken up to date at each push on the main gitlab repository.

All contributions should be performed on the main gitlab repository.

Pull requests proposed on github would generate more work for the main contributors.

Issues can be submitted on github. However, all issues created on github will be duplicated on gitlab manually and closed with a link to the gitlab issue.


# Original README.md
+40 −17
Original line number Original line Diff line number Diff line
/www/lib/ionic-material
/www/lib/robotodraft
# Specifies intentionally untracked files to ignore when using Git
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore
# http://git-scm.com/docs/gitignore


/node_modules/
/node_modules/
/platforms/
/platforms/ios
/platforms/android
/resources/android/build/local.properties
/resources/android/build/*.keystore
/resources/android/build/release-signing.properties
/plugins/
/plugins/
.idea/
.idea/
/cesium.iml
.vscode/
/pom.xml
.local/
/www/css/ionic.app.css
.directory
/www/css/ionic.app.min.css
/*.iml
/npm-debug.log
/package-lock.json
/yarn-error.log

/dist/web
/dist/android
/dist/*.sha256

/hooks/uglify-config.json
/hooks/after_prepare/uglify.js

/scripts/sdkmanager.log


/www/lib/angular
/www/lib/angular-animate
/www/lib/angular-messages
/www/lib/angular-sanitize
/www/lib/angular-ui-router
/www/lib/angular-moment
/www/lib/moment
/www/lib/waves
/www/js/config.js
/www/js/config.js
/www/dist
/www/dist
/hooks/playstore-config.json
/www/lib


.directory
# Generated CSS
 No newline at end of file
/www/css/ionic.app.css
/www/css/ionic.app.min.css

# Generated License files
/www/license/*.html
/www/license/*.txt

# Leaflet generated files
/www/css/leaflet.app.css
/www/css/leaflet.app.min.css
/www/img/layers*.png
/www/img/marker*.png
/www/img/loader.gif
/www/img/search-icon.png
/www/img/search-icon-mobile.png

.run/*

.gitlab-ci.yml

0 → 100644
+156 −0
Original line number Original line Diff line number Diff line
# ---------------------------------------------------------------
# Global
# ---------------------------------------------------------------

# default image
image: node:12

# stages (main steps of pipeline)
stages:
  - build
  - alt_build
  - deploy

# ---------------------------------------------------------------
# Global variables
# ---------------------------------------------------------------

variables:
    CI_BUILD_IMAGE: $CI_REGISTRY_IMAGE/build:develop

# ---------------------------------------------------------------
# Jobs templates
# ---------------------------------------------------------------

.docker:
  image: docker:latest
  tags: [redshift]
  services:
    - docker:dind
  before_script:
    - docker login -u ${CI_REGISTRY_USER} -p ${CI_REGISTRY_PASSWORD} ${CI_REGISTRY}
    #- docker login -u "duniterteam" -p "$DUNITERTEAM_PASSWD"
  after_script:
    - docker logout ${CI_REGISTRY}
    #- docker logout
  allow_failure: false

# ---------------------------------------------------------------
# Build jobs
# ---------------------------------------------------------------

.build:
  stage: build
  tags: [redshift]
  script:
    - yarn install
    - yarn run build:web
  after_script:
    - ls -la dist/web/
    - du -csh dist/web/
  artifacts:
    untracked: true
    paths:
      - dist/web
    expire_in: 60 minutes

build:
  extends: .build
  image: ${CI_BUILD_IMAGE}
  before_script:
    - mv /tmp/.build-cache/node_modules ./
  only:
    - develop

failsafe-build:
  extends: .build
  stage: alt_build
  when: on_failure
  before_script:
    - yarn global add gulp
  only:
    - develop

docker:ci:
  extends: .docker
  stage: alt_build
  when: on_failure
  allow_failure: true
  script:
    # Create the target directory
    - mkdir -p dist/ci
    - cd dist/ci
    # Create the Dockerfile
    - echo 'FROM node:12' > Dockerfile
    - echo 'WORKDIR /tmp/.build-cache' >> Dockerfile
    - echo 'COPY ./ ./' >> Dockerfile
    # Store disk usage (before install)
    - echo 'RUN du -s `find . -maxdepth 1 | egrep -v "^\.$"` > /tmp/before.txt' >> Dockerfile
    - echo 'RUN du -s `find /tmp/.cache/yarn -maxdepth 1 | egrep -v "^\.$"` >> /tmp/before.txt' >> Dockerfile
    # Install dependencies
    - echo 'RUN yarn global add gulp web-ext @ionic/cli' >> Dockerfile
    - echo 'RUN yarn install' >> Dockerfile
    # Store disk usage (after install)
    - echo 'RUN du -s `find . -maxdepth 1 | egrep -v "^\.$"` > /tmp/after.txt' >> Dockerfile
    - echo 'RUN du -s `find /tmp/.cache/yarn -maxdepth 1 | egrep -v "^\.$"` >> /tmp/after.txt' >> Dockerfile
    # Force docker to detect any changes
    - echo "RUN diff /tmp/before.txt /tmp/after.txt || true" >> Dockerfile
    - echo 'WORKDIR /build' >> Dockerfile
    # Build and push the CI image
    - docker build --no-cache -t ${CI_BUILD_IMAGE} .
    - docker push ${CI_BUILD_IMAGE}
  artifacts:
    paths:
      - dist/ci/Dockerfile
    expire_in: 60 minutes

# ---------------------------------------------------------------
# Deploy jobs
# ---------------------------------------------------------------

pages:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ls -la public || true
    - mv dist/web/www public
  artifacts:
    untracked: true
    paths:
      - public
  only:
    - master

mirror:
  stage: deploy
  image: liaohuqiu/rsync
  before_script:
    - eval $(ssh-agent -s)
    - ssh-add <(echo "$SSH_PRIVATE_KEY")
    - mkdir -p ~/.ssh
    - >-
      [[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >
      ~/.ssh/config
  script:
    - mv dist/web/www public
    - rsync -az -e ssh ./public/ gammanu@1000i100.fr:~/g1.money/dev-cesium
  after_script:
    - ssh gammanu@1000i100.fr "~/g1.money/update-cesium.sh"
  only:
    - master

release:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ls -la www || true
    - mv dist/web/www www
  artifacts:
    untracked: true
    paths:
      - www
  only:
    - tags
+6 −0
Original line number Original line Diff line number Diff line
[submodule "dist/desktop"]
	path = dist/desktop
	url = git@git.duniter.org:clients/cesium-grp/cesium-desktop.git
[submodule "dist/android/sources"]
	path = dist/android/sources
	url = git@git.duniter.org:clients/cesium-grp/cesium-android.git

.yarnrc

0 → 100644
+1 −0
Original line number Original line Diff line number Diff line
--install.ignore-engines true

CHANGELOG.md

0 → 100644
+1 −0
Original line number Original line Diff line number Diff line
[changelog version by version](doc/changelog/)
 No newline at end of file

Dockerfile

0 → 100644
+43 −0
Original line number Original line Diff line number Diff line
FROM  node:12
LABEL maintainer="benoit [dot] lavenier [at] e-is [dot] pro"
LABEL version="1.7.0-rc1"
LABEL description="Cesium Wallet for Ğ1 libre currency"

ARG CESIUM_VER="1.7.0-rc1"

ENV DEBIAN_FRONTEND=noninteractive \
    NODE_VERSION=16.17.0 \
    NPM_VERSION=8.3.0 \
    YARN_VERSION=1.22.17 \
    IONIC_CLI_VERSION=6.20.9 \
    CORDOVA_VERSION=10.0.0 \
    GRADLE_VERSION=6.5.1 \
    GULP_VERSION=4.0.2

# Install basics
RUN apk update && \
        apk add ca-certificates wget curl git && \
        update-ca-certificates && \
    apk add --update python make g++

# create group and user cesium
RUN addgroup -S -g 1111 cesium && \
	adduser -SD -h /cesium -G cesium -u 1111 cesium
#RUN mkdir -p /var/lib/cesium /etc/cesium && chown cesium:cesium /var/lib/cesium /etc/cesium

# Install global dependencies
RUN yarn global add gulp@"$GULP_VERSION" @ionic/cli@"$IONIC_CLI_VERSION"

# copy source tree
COPY ./ ./

RUN test -f package.json || git clone https://github.com/duniter/cesium.git && cd cesium

# Install project dependencies
# Workaround need for node-sass (- )see https://github.com/yarnpkg/yarn/issues/4867)
RUN yarn install --ignore-engines && \
    yarn remove node-sass && yarn add node-sass

WORKDIR /cesium
EXPOSE 8100 35729
CMD ["yarn", "run", "start"]
+73 −86
Original line number Original line Diff line number Diff line
                    GNU GENERAL PUBLIC LICENSE
                    GNU AFFERO GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007
                       Version 3, 19 November 2007


 Copyright (C) 2007 Free Software Foundation, Inc. [http://fsf.org/]
 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
 of this license document, but changing it is not allowed.


                            Preamble
                            Preamble


  The GNU General Public License is a free, copyleft license for
  The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works.
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.


  The licenses for most software and other practical works are designed
  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
software for all its users.
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.


  When we speak of free software, we are referring to freedom, not
  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
price.  Our General Public Licenses are designed to make sure that you
@@ -26,44 +24,34 @@ them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
free programs, and that you know you can do these things.


  To protect your rights, we need to prevent others from denying you
  Developers that use our General Public Licenses protect your rights
these rights or asking you to surrender the rights.  Therefore, you have
with two steps: (1) assert copyright on the software, and (2) offer
certain responsibilities if you distribute copies of the software, or if
you this License which gives you legal permission to copy, distribute
you modify it: responsibilities to respect the freedom of others.
and/or modify the software.


  For example, if you distribute copies of such a program, whether
  A secondary benefit of defending all users' freedom is that
gratis or for a fee, you must pass on to the recipients the same
improvements made in alternate versions of the program, if they
freedoms that you received.  You must make sure that they, too, receive
receive widespread use, become available for other developers to
or can get the source code.  And you must show them these terms so they
incorporate.  Many developers of free software are heartened and
know their rights.
encouraged by the resulting cooperation.  However, in the case of

software used on network servers, this result may fail to come about.
  Developers that use the GNU GPL protect your rights with two steps:
The GNU General Public License permits making a modified version and
(1) assert copyright on the software, and (2) offer you this License
letting the public access it on a server without ever releasing its
giving you legal permission to copy, distribute and/or modify it.
source code to the public.


  For the developers' and authors' protection, the GPL clearly explains
  The GNU Affero General Public License is designed specifically to
that there is no warranty for this free software.  For both users' and
ensure that, in such cases, the modified source code becomes available
authors' sake, the GPL requires that modified versions be marked as
to the community.  It requires the operator of a network server to
changed, so that their problems will not be attributed erroneously to
provide the source code of the modified version running there to the
authors of previous versions.
users of that server.  Therefore, public use of a modified version, on

a publicly accessible server, gives the public access to the source
  Some devices are designed to deny users access to install or run
code of the modified version.
modified versions of the software inside them, although the manufacturer

can do so.  This is fundamentally incompatible with the aim of
  An older license, called the Affero General Public License and
protecting users' freedom to change the software.  The systematic
published by Affero, was designed to accomplish similar goals.  This is
pattern of such abuse occurs in the area of products for individuals to
a different license, not a version of the Affero GPL, but Affero has
use, which is precisely where it is most unacceptable.  Therefore, we
released a new version of the Affero GPL which permits relicensing under
have designed this version of the GPL to prohibit the practice for those
this license.
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.


  The precise terms and conditions for copying, distribution and
  The precise terms and conditions for copying, distribution and
modification follow.
modification follow.
@@ -72,7 +60,7 @@ modification follow.


  0. Definitions.
  0. Definitions.


  "This License" refers to version 3 of the GNU General Public License.
  "This License" refers to version 3 of the GNU Affero General Public License.


  "Copyright" also means copyright-like laws that apply to other kinds of
  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
works, such as semiconductor masks.
@@ -549,35 +537,45 @@ to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
License would be to refrain entirely from conveying the Program.


  13. Use with the GNU Affero General Public License.
  13. Remote Network Interaction; Use with the GNU General Public License.

  Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software.  This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.


  Notwithstanding any other provision of this License, you have
  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work.  The terms of this
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
but the work with which it is combined will remain governed by version
section 13, concerning interaction through a network will apply to the
3 of the GNU General Public License.
combination as such.


  14. Revised Versions of this License.
  14. Revised Versions of this License.


  The Free Software Foundation may publish revised and/or new versions of
  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
the GNU Affero General Public License from time to time.  Such new versions
be similar in spirit to the present version, but may differ in detail to
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
address new problems or concerns.


  Each version is given a distinguishing version number.  If the
  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
by the Free Software Foundation.


  If the Program specifies that a proxy can decide which future
  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
to choose that version for the Program.


@@ -631,44 +629,33 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
the "copyright" line and a pointer to where the full notice is found.


    {one line to give the program's name and a brief idea of what it does.}
    G1SMS
    Copyright (C) {year}  {name of author}
    Copyright (C) 2018  Fred


    This program is free software: you can redistribute it and/or modify
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    it under the terms of the GNU Affero General Public License as published
    the Free Software Foundation, either version 3 of the License, or
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    (at your option) any later version.


    This program is distributed in the hope that it will be useful,
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    GNU Affero General Public License for more details.


    You should have received a copy of the GNU General Public License
    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see [http://www.gnu.org/licenses/].
    along with this program.  If not, see <http://www.gnu.org/licenses/>.


Also add information on how to contact you by electronic and paper mail.
Also add information on how to contact you by electronic and paper mail.


  If the program does terminal interaction, make it output a short
  If your software can interact with users remotely through a computer
notice like this when it starts in an interactive mode:
network, you should also make sure that it provides a way for users to

get its source.  For example, if your program is a web application, its
    {project}  Copyright (C) {year}  {fullname}
interface could display a "Source" link that leads users to an archive
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
of the code.  There are many ways you could offer source, and different
    This is free software, and you are welcome to redistribute it
solutions will be better for different programs; see section 13 for the
    under certain conditions; type `show c' for details.
specific requirements.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".


  You should also get your employer (if you work as a programmer) or school,
  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
For more information on this, and how to apply and follow the GNU AGPL, see
[http://www.gnu.org/licenses/].
<http://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
[http://www.gnu.org/philosophy/why-not-lgpl.html].
 No newline at end of file
+42 −152
Original line number Original line Diff line number Diff line
@@ -2,177 +2,67 @@


# Cesium
# Cesium


[Unhosted webapp](https://unhosted.org) client for [Duniter](https://duniter.org) network.
Cesium is wallet client software for [Duniter](https://duniter.org) crypto-currency, like Ğ1.
Cesium allow you to manage your wallet, certify your friends, and more!


Try it at: http://cesium.duniter.fr
Cesium is an [Unhosted](https://unhosted.org) Progressive Web Application (PWA), using AngularJS and Ionic.


Please visit th Cesium web site: [cesium.app](https://cesium.app)


## Installation
## Install


### On desktop computer
### As a web extension (Firefox, Chrome)
 
 To use Cesium from your desktop computer :
 
 - Download the [latest release](https://github.com/duniter/cesium/releases/latest). Choose the web packaging (`cesium-vX.Y.Z-we.zip`); 
 - Unpack in a empty directory;
 - Open the `index.html` file in a web browser.


### On web server
 - Download the [latest extension release](https://github.com/duniter/cesium/releases/latest)
 
 
Cesium can be easily installed on most web server.
 - Drag/drop the file into your browser;
 
 
#### Minimal install from source
 - Confirm the installation.
if you don't allready use nodejs, see [Prerequisite](https://github.com/duniter/cesium#prerequisite)
```bash
git clone https://github.com/duniter/cesium.git
cd cesium
npm install
npm start
```
Answer asked questions.
 
 
Your cesium instance is now reacheable on : [http://localhost:8100/](http://localhost:8100/) or an other ip if your listen on an other interface.
 That's it! A new button is appeared, on the top right corner.
 
 
#### Installation script
### On desktop computer

For Linux distribution, a installation script could be used to:


 - Download the [latest release](https://github.com/duniter/cesium/releases/latest)
 - Download the [latest release](https://github.com/duniter/cesium/releases/latest)
 - Unpack archive into the directory `./cesium`. Existing files will be override.  
 
 
```
 - Then install, depending on your operating system:  
curl -kL https://raw.githubusercontent.com/duniter/cesium/master/install.sh | bash
    * Ubuntu: Double click the `.deb` file
```
    * Debian: Run the command `sudo dpkg -i *.deb`
or:
    * Windows: Double click on the `.exe` file
    * Mac OSx: Unzip the osx `.zip` file, then drop Cesium into your `Applications` folder 
    * Other operating systems:  
       * Unpack the ZIP archive (file `cesium-vX.Y.Z-web.zip`) into an empty folder;
       * Open the file `index.html` in your web browser;


```
### On smartphone
wget -qO- https://raw.githubusercontent.com/duniter/cesium/master/install.sh | bash
```


 - Android: 
    * Manual installation: download then install the `.apk` from your smartphone;
    * [Play Store](https://play.google.com/store/apps/details?id=fr.duniter.cesium);
 - iOS
    * [App Store](https://apps.apple.com/us/app/cesium-%C4%9F1/id1471028018);


**Note**: You may need root permission to write files. If so just replace `| bash` with `| sudo bash`.


 
 
#### Yunohost package
#### Yunohost package
    
    
There is a [package](https://github.com/duniter/cesium_ynh) for [YunoHost self-hosting distribution](https://yunohost.org).
There is a [package](https://github.com/duniter/cesium_ynh) for [YunoHost self-hosting distribution](https://yunohost.org).


## Configuration
## Contribute

To change default configuration:

  - Edit the file `config.js`, and set default properties:
  
```
angular.module("cesium.config", [])
.constant("csConfig", {
	"timeout": 4000,
	"cacheTimeMs": 60000,
	"useRelative": true,
	"timeWarningExpireMembership": 5184000,
	"timeWarningExpire": 7776000,
	"useLocalStorage": false,
	"rememberMe": false,
	"showUDHistory": false,
	"node": {
		"host": "test-net.duniter.fr",
		"port": "9201"
	},
	"plugins": {
		"es": {
			"enable": "false",
			"host": "test-net.duniter.fr",
			"port": "9203"
		}
	},
	"version": "0.2.6",
	"build": "2016-08-25T07:16:49.361Z",
	"newIssueUrl": "https://github.com/duniter/cesium/issues/new?labels=bug"
});
```

  - Configure a Duniter node:
 
     * set `node.host` and `node.port` to the default node address. 
   
  - Configure the optional extension for [ElasticSearch Duniter4j node](https://github.com/duniter/duniter4j)
 
     * set `plugins.es.host` and `plugins.es.port` to the default ES node address.
   
     * set `plugins.es.enable` with [true|false] to change the default extension state. 
   
     * To **remove** the extension (and not only disable by default): remove all content inside the `plugins` tag.
       Users will NOT be able to enable the extension.
 
## License

This software is distributed under [GNU GPLv3](https://raw.github.com/duniter/cesium/master/LICENSE).

## Development Guide

### Prerequisite  

To build Cesium, you will have to: 
 
  - Installing [nvm](https://github.com/creationix/nvm)
```
  wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
```


  - Configure NodeJS to use a version 5:
A [Development Guide](doc/development_guide.md) is available to learn :
```
 - How to install your development environment.
  nvm install 5 
 - Development best practices.
```
 
 
  - Installing nodejs build tools:
A [development tutorial](doc/fr/development_tutorial-01.md) (in French) is also available.
```
The [first 3 lessons of the tutorial](doc/en/development_tutorial-01.md) have also been translated into english.
   npm install -g bower gulp ionic@1.7.16 cordova
```


  - Installing other build dependencies:
## Donate
```
 sudo apt-get install build-essential
```


### Source code
To help developers with donation, use the [Cesium Team Ğ1 account](https://demo.cesium.app#/app/wot/CitdnuQgZ45tNFCagay7Wh12gwwHM8VLej1sWmfHWnQX/) (public key: `CitdnuQgZ45tNFCagay7Wh12gwwHM8VLej1sWmfHWnQX`) 
   
  - Getting source and installing project dependencies:    
```
  git clone https://github.com/duniter/cesium.git
  cd cesium
  npm install
  bower install
```
  - Installing Cordova plugins    
```
  ionic state restore
```

### Build environment

 - To configure your build environment :
 
    * Add your environment config into `app/config.json`
   
    * Update default configuration, using the command:
    
```
  gulp config --env <your_env_name> 
```

 This will update the configuration file used by cesium, at `www/js/config.json`.
 
### Compile and launch

  - Compiling and running Cesium:
     
```
  ionic serve
```


## License


### Best pratices
This software is distributed under [GNU AGPL-3.0](https://raw.github.com/duniter/cesium/master/LICENSE).


 Cesium could be run on phone devices. Please read [performance tips on AgularJS + Ionic ](http://julienrenaux.fr/2015/08/24/ultimate-angularjs-and-ionic-performance-cheat-sheet/)
Please read also our [privacy policy](./doc/privacy_policy.md).
 before starting to contribute.
 No newline at end of file
 Read also [Angular performance for large applicatoins](https://www.airpair.com/angularjs/posts/angularjs-performance-large-applications). 
+239 −105
Original line number Original line Diff line number Diff line
{
{
  "default": {
  "default": {
    "cacheTimeMs": 60000,
    "cacheTimeMs": 300000,
    "demo": false,
    "readonly": false,
    "fallbackLanguage": "en",
    "fallbackLanguage": "en",
    "rememberMe": false,
    "rememberMe": true,
    "showUDHistory": false,
    "showUDHistory": true,
    "timeout": 10000,
    "timeout": 30000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpire": 7776000,
    "timeWarningExpire": 7776000,
    "minConsensusPeerCount": 10,
    "keepAuthIdle": 600,
    "useLocalStorage": true,
    "useLocalStorage": true,
    "useRelative": true,
    "useRelative": false,
    "initPhase": false,
    "expertMode": false,
    "expertMode": false,
    "decimalCount": 4,
    "decimalCount": 2,
    "httpsMode": false,
    "shareBaseUrl": "https://demo.cesium.app/",
    "helptip": {
    "helptip": {
      "enable": true,
      "enable": true,
      "installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
      "installDocUrl": {
        "fr-FR": "https://duniter.fr/wiki/doc/installer/",
        "en": "https://duniter.org/wiki/doc/install/"
      }
    },
    },
    "node": {
    "license": {
      "host": "cgeek.fr",
      "ca": "license/license_g1-ca",
      "port": "9330"
      "de-DE": "license/license_g1-de-DE",
      "en": "license/license_g1-en",
      "en-GB": "license/license_g1-en",
      "eo-EO": "license/license_g1-eo-EO",
      "es-ES": "license/license_g1-es-ES",
      "fr-FR": "license/license_g1-fr-FR",
      "it-IT": "license/license_g1-it-IT",
      "pt-PT": "license/license_g1-pt-PT"
    },
    },
    "plugins":{
    "feed": {
      "es": {
      "jsonFeed": {
        "enable": true,
        "ca": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-ca.json",
        "askEnable": false,
        "de-DE": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-de-DE.json",
        "host": "data.duniter.fr",
        "en": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-en.json",
        "port": "80",
        "en-GB": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-en-GB.json",
        "notifications": {
        "eo-EO": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-eo-EO.json",
          "txSent": true,
        "es-ES": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-es-ES.json",
          "txReceived": true,
        "fr-FR": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-fr-FR.json",
          "certSent": true,
        "it-IT": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-it-IT.json",
          "certReceived": true
        "nl-NL": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-nl-NL.json",
        }
        "pt-PT": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-pt-PT.json"
      }
    }
      },
      },

      "maxContentLength": 1300,
  "sou": {
      "maxAgeInMonths": 3,
    "cacheTimeMs": 60000,
      "maxCount": 3
    "fallbackLanguage": "fr-FR",
    "defaultLanguage": "fr-FR",
    "rememberMe": false,
    "showUDHistory": false,
    "timeout": 15000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpire": 7776000,
    "useLocalStorage": true,
    "useRelative": true,
    "initPhase": false,
    "expertMode": false,
    "decimalCount": 2,
    "helptip": {
      "enable": false,
      "installDocUrl": {
        "fr-FR": "http://www.le-sou.org/devenir-noeud/",
        "en": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
      }
    },
    },
    "node": {
    "fallbackNodes": [
      "host": "duniter.le-sou.org",
      {
      "port": "80"
        "host": "g1.e-is.pro",
        "port": 443
      },
      {
        "host": "vit.fdn.org",
        "port": 443
      },
      {
        "host": "g1.cgeek.fr",
        "port": 443
      },
      {
        "host": "g1.mithril.re",
        "port": 443
      },
      {
        "host": "g1.duniter.org",
        "port": 443
      },
      {
        "host": "g1.le-sou.org",
        "port": 443
      },
      {
        "host": "duniter.pini.fr",
        "port": 443
      },
      },
      {
        "host": "g1.moul.re",
        "port": 443
      },
      {
        "host": "duniter-v1.comunes.net",
        "port": 443
      }
    ],
    "developers": [
      {"name": "Benoit Lavenier", "pubkey": "38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE"},
      {"name": "Cédric Moreau", "pubkey": "2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ"},
      {"name": "Kapis", "pubkey": "24jaf8XhYZyDyUb7hMcy5qsanaHBC11AwPefcCQRBQNA"},
      {"name": "Matograine", "pubkey": "CmFKubyqbmJWbhyH2eEPVSSs4H4NeXGDfrETzEnRFtPd"}
    ],
    "plugins":{
    "plugins":{
      "es": {
      "es": {
        "enable": false,
        "enable": true,
        "askEnable": true,
        "askEnable": true,
        "host": "data.le-sou.org",
        "useRemoteStorage": true,
        "port": "80",
        "host": "g1.data.e-is.pro",
        "port": 443,
        "fallbackNodes": [
          {
            "host": "g1.data.presles.fr",
            "port": 443
          },
          {
            "host": "g1.data.le-sou.org",
            "port": 443
          },
          {
            "host": "g1.data.brussels.ovh",
            "port": 443
          },
          {
            "host": "g1.data.pini.fr",
            "port": 443
          },
          {
            "host": "g1.data.mithril.re",
            "port": 443
          },
          {
            "host": "g1.data.e-is.pro",
            "port": 443
          }
        ],
        "notifications": {
        "notifications": {
          "txSent": true,
          "txSent": true,
          "txReceived": true,
          "txReceived": true,
          "certSent": true,
          "certSent": true,
          "certReceived": true
          "certReceived": true
        }
        },
        "defaultCountry": "France"
      }
      }
    }
    }
  },
  },


  "dev": {
  "g1-test": {
    "cacheTimeMs": 60000,
    "cacheTimeMs": 300000,
    "fallbackLanguage": "fr-FR",
    "demo": false,
    "defaultLanguage": "fr-FR",
    "readonly": false,
    "fallbackLanguage": "en",
    "rememberMe": true,
    "rememberMe": true,
    "showUDHistory": false,
    "showUDHistory": true,
    "timeout": 6000,
    "timeout": 30000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpire": 7776000,
    "timeWarningExpire": 7776000,
    "minConsensusPeerCount": -1,
    "useLocalStorage": true,
    "useLocalStorage": true,
    "useRelative": true,
    "useRelative": false,
    "initPhase": false,
    "expertMode": true,
    "expertMode": false,
    "decimalCount": 2,
    "decimalCount": 2,
    "httpsMode": false,
    "shareBaseUrl": "https://g1-test.cesium.app",
    "helptip": {
    "helptip": {
      "enable": true,
      "enable": false,
      "installDocUrl": {
      "installDocUrl": {
        "fr-FR": "http://www.le-sou.org/devenir-noeud/",
        "fr-FR": "https://duniter.fr/wiki/doc/installer/",
        "en": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
        "en": "https://duniter.org/wiki/doc/install/"
      }
      }
    },
    },
    "node": {
    "node": {
      "host": "duniter.le-sou.org",
      "host": "g1-test.duniter.org",
      "port": "9600"
      "port": 443
    },
    },
    "fallbackNodes": [
      {
        "host": "gt.moul.re",
        "port": 10902
      },
      {
        "host": "g1-test.duniter.org",
        "port": 443
      }
    ],
    "developers": [
      {"name": "Benoit Lavenier", "pubkey": "38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE"},
      {"name": "Cédric Moreau", "pubkey": "2ny7YAdmzReQxAayyJZsyVYwYhVyax2thKcGknmQy5nQ"},
      {"name": "Kapis", "pubkey": "24jaf8XhYZyDyUb7hMcy5qsanaHBC11AwPefcCQRBQNA"},
      {"name": "Matograine", "pubkey": "CmFKubyqbmJWbhyH2eEPVSSs4H4NeXGDfrETzEnRFtPd"}
    ],
    "plugins":{
    "plugins":{
      "es": {
      "es": {
        "enable": true,
        "enable": false,
        "askEnable": true,
        "askEnable": false,
        "host": "data.le-sou.org",
        "useRemoteStorage": false,
        "port": "80",
        "host": "g1-test.data.e-is.pro",
        "port": 443,
        "notifications": {
        "notifications": {
          "txSent": true,
          "txSent": true,
          "txReceived": true,
          "txReceived": true,
          "certSent": true,
          "certSent": true,
          "certReceived": true
          "certReceived": true
        }
        },
        "defaultCountry": "France"
      }
      }
    }
    }
  },
  },


  "dev2": {
  "dev": {
    "cacheTimeMs": 60000,
    "cacheTimeMs": 300000,
    "demo": false,
    "readonly": false,
    "fallbackLanguage": "fr-FR",
    "fallbackLanguage": "fr-FR",
    "defaultLanguage": "fr-FR",
    "defaultLanguage": "fr-FR",
    "rememberMe": true,
    "rememberMe": true,
    "showUDHistory": false,
    "showUDHistory": true,
    "timeout": 6000,
    "timeout": 300000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpire": 7776000,
    "timeWarningExpire": 7776000,
    "useLocalStorage": true,
    "useLocalStorage": true,
    "useRelative": true,
    "useRelative": true,
    "initPhase": false,
    "expertMode": true,
    "expertMode": true,
    "decimalCount": 2,
    "helptip": {
    "helptip": {
      "enable": false,
      "enable": false,
      "installDocUrl": {
      "installDocUrl": {
        "fr-FR": "http://www.le-sou.org/devenir-noeud/",
        "fr-FR": "https://duniter.fr/wiki/doc/installer/",
        "en": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
        "en": "https://duniter.org/en/wiki/duniter/install/"
      }
      }
    },
    },
    "license": {
      "en": "license/license_g1-en",
      "fr-FR": "license/license_g1-fr-FR",
      "es-ES": "license/license_g1-es-ES",
      "eo-EO": "license/license_g1-eo-EO",
      "pt-PT": "license/license_g1-pt-PT",
      "it-IT": "license/license_g1-it-IT",
      "de-DE": "license/license_g1-de-DE"
    },
    "node": {
    "node": {
      "host": "test-net.duniter.fr",
      "host": "g1.e-is.pro",
      "port": "9201"
      "port": 443
    },
    "fallbackNodes": [{
        "host": "g1.duniter.org",
        "port": 443
      },
      },
      {
        "host": "g1.e-is.pro",
        "port": 443
      }
    ],
    "plugins":{
    "plugins":{
      "es": {
      "es": {
        "enable": true,
        "enable": false,
        "askEnable": false,
        "askEnable": false,
        "host": "localhost",
        "host": "localhost",
        "port": 9200,
        "port": 9200,
        "wsPort": 9400,
        "wsPort": 9400,
        "fallbackNodes": [
          {
            "host": "g1.data.le-sou.org",
            "port": 443
          },
          {
            "host": "g1.data.e-is.pro",
            "port": 443
          }
        ],
        "notifications": {
        "notifications": {
          "txSent": true,
          "txSent": true,
          "txReceived": true,
          "txReceived": true,
          "certSent": true,
          "certSent": true,
          "certReceived": true
          "certReceived": true
        }
        },
        "defaultCountry": "France"
      },
      "graph": {
        "enable": true
      },
      "rml9": {
        "enable": true
      }
      }
    }
    }
  },
  },


  "fake": {
  "dev_g1": {
    "cacheTimeMs": 60000,
    "cacheTimeMs": 300000,
    "fallbackLanguage": "fr-FR",
    "demo": false,
    "defaultLanguage": "fr-FR",
    "readonly": false,
    "fallbackLanguage": "en",
    "rememberMe": true,
    "rememberMe": true,
    "showUDHistory": false,
    "showUDHistory": true,
    "timeout": 6000,
    "timeout": 300000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpire": 7776000,
    "timeWarningExpire": 7776000,
    "useLocalStorage": true,
    "useLocalStorage": true,
    "useRelative": true,
    "useRelative": false,
    "initPhase": true,
    "initPhase": false,
    "expertMode": true,
    "expertMode": true,
    "decimalCount": 2,
    "httpsMode": false,
    "helptip": {
    "helptip": {
      "enable": false,
      "enable": false,
      "installDocUrl": {
      "installDocUrl": {
        "fr-FR": "http://www.le-sou.org/devenir-noeud/",
        "fr-FR": "https://duniter.fr/wiki/doc/installer/",
        "en": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
        "en": "https://duniter.org/en/wiki/duniter/install/"
      }
      }
    },
    },
    "license": {
      "en": "license/license_g1-en",
      "fr-FR": "license/license_g1-fr-FR",
      "es-ES": "license/license_g1-es-ES",
      "eo-EO": "license/license_g1-eo-EO",
      "pt-PT": "license/license_g1-pt-PT",
      "it-IT": "license/license_g1-it-IT",
      "de-DE": "license/license_g1-de-DE"
    },
    "node": {
    "node": {
      "host": "fakenet.cgeek.fr",
      "host": "g1.duniter.org",
      "port": "10900"
      "port": 443
    },
    },
    "plugins":{
    "plugins":{
      "es": {
      "es": {
        "enable": true,
        "enable": false,
        "askEnable": false,
        "askEnable": false,
        "host": "localhost",
        "host": "localhost",
        "port": 9200,
        "port": "9200",
        "wsPort": 9400,
        "wsPort": "9400",
        "notifications": {
        "defaultCountry": "France"
          "txSent": true,
      },
          "txReceived": true,
      "graph": {
          "certSent": true,
        "enable": true
          "certReceived": true
      },
        }
      "rml9": {
        "enable": true
      }
      }
    }
    }
  }
  }

bower.json

deleted100644 → 0
+0 −22
Original line number Original line Diff line number Diff line
{
  "name": "cesium",
  "private": "true",
  "devDependencies": {
    "ionic": "driftyco/ionic-bower#1.3.2",
    "ionic-material": "0.4.2"
  },
  "dependencies": {
    "angular-messages": "1.3.13",
    "robotodraft": "1.1.0",
    "angular-moment": "^0.10.3",
    "angular-animate": "1.4.3",
    "angular-sanitize": "1.5.3",
    "angular": "1.5.3"
  },
  "resolutions": {
    "angular-sanitize": "1.5.3",
    "angular-animate": "1.5.3",
    "angular": "1.5.3",
    "ionic": "1.3.1"
  }
}
 No newline at end of file

build.json

0 → 100644
+18 −0
Original line number Original line Diff line number Diff line
{
  "android": {
  },
  "ios": {
    "debug": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "3TH8P5JJ9J",
      "automaticProvisioning": true,
      "packageType": "development"
    },
    "release": {
      "codeSignIdentity": "iPhone Developer",
      "developmentTeam": "3TH8P5JJ9J",
      "automaticProvisioning": true,
      "packageType": "app-store"
    }
  }
}
+169 −80
Original line number Original line Diff line number Diff line
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<widget
<widget android-versionCode="107160" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.7.16" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  xmlns="http://www.w3.org/ns/widgets"
  xmlns:cdv="http://cordova.apache.org/ns/1.0"
  id="fr.duniter.cesium"
  version="0.6.2"
  android-versionCode="602"
  >
    <name>Cesium</name>
    <name>Cesium</name>
    <description>
    <description>
  An simple App for Duniter
      Cesium Wallet for Ğ1 libre currency
    </description>
    </description>
  <author email="contact@duniter.fr" href="http://www.duniter.fr">
    <author email="contact@e-is.pro">
    Duniter team
      E-IS PRO
    </author>
    </author>
    <content src="index.html" />
    <content src="index.html" />
    <access origin="*" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <allow-intent href="june:*" />
    <allow-intent href="web+june:*" />
    <allow-navigation href="http://*/*" />
    <allow-navigation href="https://*/*" />
    <allow-navigation href="data:*" />
    <allow-navigation href="june:*" />
    <allow-navigation href="web+june:*" />
    <icon src="www/img/logo_96px.png" />
    <icon src="www/img/logo_96px.png" />
    <preference name="webviewbounce" value="false" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="DisallowOverscroll" value="true" />
  <preference name="android-minSdkVersion" value="16" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreen" value="screen" />
  <preference name="SplashScreenDelay" value="4000" />
    <preference name="SplashScreenDelay" value="2500" />
  <allow-navigation href="*" />
    <preference name="KeyboardDisplayRequiresUserAction" value="false" />
    <preference name="KeyboardResizeMode" value="ionic" />
    <preference name="xwalkVersion" value="19" />
    <preference name="xwalkMultipleApk" value="false" />
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="StatusBarBackgroundColor" value="#000" />
    <preference name="StatusBarStyle" value="lightcontent" />
    <preference name="loadUrlTimeoutValue" value="700000" />
    <hook src="scripts/hooks/before_prepare.js" type="before_prepare" />
    <hook src="scripts/hooks/after_prepare.js" type="after_prepare" />
    <hook src="scripts/hooks/before_compile.js" type="before_compile" />
    <feature name="StatusBar">
    <feature name="StatusBar">
        <param name="ios-package" onload="true" value="CDVStatusBar" />
        <param name="ios-package" onload="true" value="CDVStatusBar" />
    </feature>
    </feature>
    <feature name="Device">
        <param name="android-package" onload="true" value="org.apache.cordova.device.Device" />
    </feature>
    <feature name="Custom URL scheme">
        <param name="id" value="cordova-plugin-customurlscheme" />
        <param name="url" value="https://github.com/EddyVerbruggen/Custom-URL-scheme.git" />
        <variable name="URL_SCHEME" value="june" />
    </feature>
    <platform name="android">
    <platform name="android">
        <preference name="AndroidLaunchMode" value="singleTask" />
        <preference name="AndroidInsecureFileModeEnabled" value="true" />
        <preference name="android-minSdkVersion" value="22" />
        <preference name="android-targetSdkVersion" value="35" />
        <preference name="android-compileSdkVersion" value="35" />
        <preference name="AndroidJavaSourceCompatibility" value="8" />
        <preference name="AndroidTargetSourceCompatibility" value="8" />
        <preference name="GradlePluginKotlinEnabled" value="true" />
        <preference name="GradleVersion" value="8.7" />
        <preference name="AndroidKotlinJVMTarget" value="8" />
        <preference name="AndroidPersistentFileLocation" value="Compatibility" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/android/splash/splashscreen.xml" />
        <preference name="AndroidWindowSplashScreenBackground" value="#1A237E" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
@@ -45,38 +82,90 @@
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
        <edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:networkSecurityConfig="@xml/network_security_config" />
        </edit-config>
    </platform>
    </platform>
    <platform name="ios">
    <platform name="ios">
        <preference name="BackupWebStorage" value="local" />
        <preference name="BackupWebStorage" value="local" />
      <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <preference name="StatusBarOverlaysWebView" value="true" />
      <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <preference name="KeyboardShrinksView" value="true" />
      <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="20" src="resources/ios/icon/Icon-App-20x20@1x.png" width="20" />
      <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="40" src="resources/ios/icon/Icon-App-20x20@2x.png" width="40" />
      <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="60" src="resources/ios/icon/Icon-App-20x20@3x.png" width="60" />
      <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="29" src="resources/ios/icon/Icon-App-29x29@1x.png" width="29" />
      <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="58" src="resources/ios/icon/Icon-App-29x29@2x.png" width="58" />
      <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="87" src="resources/ios/icon/Icon-App-29x29@3x.png" width="87" />
      <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="40" src="resources/ios/icon/Icon-App-40x40@1x.png" width="40" />
      <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="80" src="resources/ios/icon/Icon-App-40x40@2x.png" width="80" />
      <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="120" src="resources/ios/icon/Icon-App-40x40@3x.png" width="120" />
      <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="50" src="resources/ios/icon/Icon-App-50x50@1x.png" width="50" />
      <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="100" src="resources/ios/icon/Icon-App-50x50@2x.png" width="100" />
      <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="57" src="resources/ios/icon/Icon-App-57x57@1x.png" width="57" />
      <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="114" src="resources/ios/icon/Icon-App-57x57@2x.png" width="114" />
      <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <icon height="120" src="resources/ios/icon/Icon-App-60x60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/Icon-App-60x60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/Icon-App-72x72@1x.png" width="72" />
        <icon height="144" src="resources/ios/icon/Icon-App-72x72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/Icon-App-76x76@1x.png" width="76" />
        <icon height="152" src="resources/ios/icon/Icon-App-76x76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/Icon-App-83.5x83.5@2x.png" width="167" />
        <icon height="1024" src="resources/ios/icon/ItunesArtwork@2x.png" width="1024" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="2436" src="resources/ios/splash/Default-2436h.png" width="1125" />
        <splash height="1125" src="resources/ios/splash/Default-Landscape-2436h.png" width="2436" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
        <edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
            <string>To scan QRCode</string>
        </edit-config>
        <edit-config file="*-Info.plist" mode="merge" target="NSPhotoLibraryUsageDescription">
            <string>To choose a profile picture</string>
        </edit-config>
        <edit-config file="*-Info.plist" mode="merge" target="CFBundleURLSchemes">
            <string>june</string>
        </edit-config>
        <config-file mode="add" parent="ITSAppUsesNonExemptEncryption" target="*-Info.plist">
            <false />
        </config-file>
    </platform>
    </platform>
  <platform name="firefoxos">
    <plugin name="cordova-plugin-camera" spec="^4.1.0">
    <icon height="128" src="resources/firefoxos/img/logo_128.png" width="128" />
        <variable name="CAMERA_USAGE_DESCRIPTION" value="Add picture to the user profile" />
    <icon height="60" src="resources/firefoxos/img/logo_60.png" width="60" />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Take a picture for the user profile" />
  </platform>
        <variable name="ANDROID_SUPPORT_V4_VERSION" value="28.+" />
    </plugin>
    <plugin name="cordova-plugin-ionic-webview" spec="^5.0.1">
        <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="28.+" />
    </plugin>
    <plugin name="cordova-plugin-device" spec="^3.0.0" />
    <plugin name="cordova-plugin-dialogs" spec="^2.0.2" />
    <plugin name="cordova-clipboard" spec="^1.3.0" />
    <plugin name="cordova-plugin-splashscreen" spec="^6.0.2" />
    <plugin name="cordova-plugin-statusbar" spec="^4.0.0" />
    <plugin name="cordova-plugin-file" spec="^8.1.3" />
    <plugin name="cordova-plugin-vibration" spec="^3.1.1" />
    <plugin name="cordova-plugin-websocket" spec="^0.12.2" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
    <plugin name="cordova-plugin-androidx-adapter" spec="^1.1.3" />
    <plugin name="cordova-plugin-x-toast" spec="^2.7.3" />
    <plugin name="@red-mobile/cordova-plugin-barcodescanner" spec="^9.1.0">
        <variable name="CAMERA_USAGE_DESCRIPTION" value="To scan QRCode" />
        <variable name="ANDROID_SUPPORT_V4_VERSION" value="28.+" />
    </plugin>
    <plugin name="cordova-plugin-customurlscheme" spec="^5.0.2">
        <variable name="URL_SCHEME" value="june" />
    </plugin>
    <plugin name="cordova-plugin-network-information" spec="~3.0.0">
    </plugin>
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
</widget>
</widget>
Original line number Original line Diff line number Diff line
Subproject commit 17788c85b43b1fa75287a80454349948068cc457
Original line number Original line Diff line number Diff line
Subproject commit 7f899bf2139dd7238840019d4365377341171f6d

doc/build_android.md

0 → 100644
+140 −0
Original line number Original line Diff line number Diff line
# Build Cesium for Android

Cesium can be build as an Android App.

Cesium use [Ionic Framework v1.7.16](http://ionicframework.com/docs/v1/) with some Apache Cordova plugins.

## Prerequisites

### Install the development environment

Follow all the steps defined in the [Development guide](./development_guide.md).

After that you should be able to start the application using `npm start`, and to test it.

### Install JDK (Java Development Kit)

You can choose to install
 
- on Linux, install OpenJDK 11:
 
  * ``sudo apt-get install openjdk-11-jdk``
    
- or Oracle JDK 8 (all platforms supported):
  
   * Download it from [Oracle web site](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)
   
   <img src="./fr/img/fef4f4dfe7c2168cb27c9e7f5e399fd547ce774a.png" width="400">

   And choose the right version, depending on your platform.

### Install Android Studio


Download Android Studio from the [AndroidStudio-Downloads page](https://developer.android.com/studio/index.html#downloads)

- On MS Windows:
  
  * Download file **without** the Android SDK:
  <img src="./fr/img/3b8fa2f5c0465b13ae5ce74d49702e0c9f027866.png" width="690" height="237">
  
  * Then follow installation steps.

- On Linux : 
 
  * download the full archive, then uncompress it (e.g in `/opt/android-sdk`).

  * open a terminal, run the command:
  ```bash
  ./bin/studio.sh
  ```

At the end of the installation or the first launch, Android Studio will indicate that you do not have an SDK and will propose to install it.

Install the version that it proposes to you.

### Install Android NDK

> The NDK is used for code execution in C ++, need to build the NaCL cryptography library.

- Download NDK from [this page](https://developer.android.com/ndk/downloads/index.html)

  * **Warning**: Please use version `r10d` (not tested on newer versions).

- Uncompress the archive (e.g on Linux, in a new directory `/opt/android-ndk`).

- Launch Android-studio, then open the menu `File > Project Structure...`

  <img src="./fr/img/04e64b769cbd45b9d275cd5f81002a399a1a7684.png" width="300">

- A window like this should open: 

  <img src="./fr/img/ceb75301172038e75f5c43b328dd7febd7bedc7e.png" width="450">

- Fill in the installation path of the NDK.

### Install Gradle

- Download [Gradle 4.1](wget https://services.gradle.org/distributions/gradle-4.1-bin.zip)

- Uncompress the archive (e.g in `/opt/gradle`).

## Android configuration

Android need some configuration, to be able to build Cesium.

- First, create a properties file `local.properties` in the directory `platforms/android`:
 
```properties
# Path to your Android SDK installation
sdk.dir=/opt/android-sdk

# Path to your Android NDK installation
ndk.dir=/opt/android-ndk
```

- In order to sign your Android builds: 
 
  * Generate a new keystore file :
```
keytool -genkey -v -keystore Cesium.keystore -alias Cesium -keyalg RSA -keysize 2048 -validity 10000`
```

  * Create a file `release-signing.properties` in the directory `platforms/android`:
```properties
storeFile=/path/to/Cesium.keystore
keyAlias=Cesium
storePassword=YourStorePassword
keyPassword=YourKeyPassword
```

- Open Android Studio, then open the menu `File > Settings...`. Set `Gradle Home` to your fresh Gradle installation directory (e.g. `/opt/gradle`).

## Generate APK file

 - To build a signed APK file:
```
ionic build android --release
```

 - To build an unsigned (debug) APK:
```
ionic build android
```

Generated APK files should be in the directory `platforms/android/build/outputs/apk`.

### Troubleshooting

#### "Cannot run program (...)/aapt"

If you get this error:

```
Cannot run program "/opt/android-sdk/build-tools/21.1.2/aapt": error=2, No such file or folder
```

Then install two additional compatibility libraries (workaround found in [this post](http://stackoverflow.com/questions/22701405/aapt-ioexception-error-2-no-such-file-or-directory-why-cant-i-build-my-grad)):                            
```bash
sudo apt-get install lib32stdc++6 lib32z1
```

doc/build_desktop.md

0 → 100644
+7 −0
Original line number Original line Diff line number Diff line
# Build Cesium as a Desktop application

Cesium can be build as a standalone desktop application, for Linux (`.deb`), Windows (`.exe`) or MacOSx;

- Clone the [cesium-desktop](https://git.duniter.org/clients/cesium-grp/cesium-desktop) project locally;
- Follow this project documentation.

doc/build_docker.md

0 → 100644
+16 −0
Original line number Original line Diff line number Diff line
# Cesium docker image

> WARNING: This documentation need a review! (not up to date)

## Build

```bash
 cd cesium
 docker build . -t cesium/release
```

## Run

```bash
 docker run -ti --net host -p 8100:8100 -p 35729:35729 -v ~/.gradle:/root/.gradle -v \$PWD:/cesium:rw --privileged cesium/release
```
 No newline at end of file

doc/build_ios.md

0 → 100644
+164 −0
Original line number Original line Diff line number Diff line
# Build Cesium for iOS

Cesium can be build as desktop application for iOS. .

## Prerequisites

### Install an OSx VM

Cesium comes with ready to use `Vagrantfile`, used to start a OSx VM easily.

1. Install VirtualBox

2. Install Vagrant 

3. Make sure [Cesium-desktop](https://git.duniter.org/clients/cesium-grp/cesium-desktop) has been checkout inside the path `/platforms/desktop/` (or anywhere else).
   This should have been done, if you followed the installation steps.  

4. On a terminal, go inside [platforms/desktop/arch/osx/](../platforms/desktop/arch/osx/), then start the VM:
```bash
cd platforms/desktop/arch/osx/
vagrant up --provision
```

5. Connect to the VM: 
```bash
vagrant ssh
```

6. Execute the build
```
./build-osx.sh
```
This should download Cesium sources in `Downloads/cesium_src` and binaries web artifact in `Downloads/cesium`.

## Installing XCode 8 (XIP file) 

1. Download Xcode (8.2.1) : https://developer.apple.com/services-account/download?path=/Developer_Tools/Xcode_8.2.1/Xcode_8.2.1.xip

2. Copy the `.xip` file into directory `platforms/desktop/arch/osx/`

3. Make sure to restart the VM (this is required to copy the XIP file)
```bash
vagrant halt
vagrant up
vagrant ssh
```
4. Unpack the XIP file
```bash
unxip Xcode*.xip
```
5. Install Xcode into `/Applications`, then configure xcode-select
```bash
sudo mv Xcode.app /Applications 
```
6. Configure `xcode-select`:
```bash
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
```

## Install Node JS

1. Install NVM (node.js version manager) :
2. Install node.js 16
3. Install common node.js dependencies
 
```bash
# NVM (Node version manager
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.1/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

# Node.js
nvm install 16

# node-pre-gyp
npm install -g nw-gyp node-pre-gyp
```

## Build from source

1. Checkout Cesium source, from git, inside the directory `/Users/vagrant/Downloads/cesium_src`

2. Install global dependencies (see [Development Guide](./development_guide.md) for versions to used) :
```
npm install -g yarn gulp cordova @ionic/cli@6.20.9
```

3. Install project dependencies :
```
cd cesium_src
npm install
```

4. Prepare ionic, to build on ios:
```bash
ionic platform add ios
ionic state reset
```

5. Run cesium:
```bash
ionic run ios
```

6. Build binaries for emulator :

```bash
ionic build ios
```


## Publishing to Apple store

### Pre-requisite

Ensure you have a valid Certificate (with your private key) 
and Distribution Provisioning Profile associated to it in the OSX Keychain.

See: https://help.apple.com/developer-account/#/devbfa00fef7

### Archive and upload to Apple Store Connect

1. Prepare for iOS in release mode:

```bash
ionic prepare ios --release --prod
```

2. Generate archive for iOS generic device
```bash
cd platforms/ios
mkdir build
xcodebuild -workspace Cesium.xcworkspace -scheme Cesium -sdk iphoneos -configuration AppStoreDistribution archive -archivePath $PWD/build/Cesium.xcarchive
```

4. Create an `export.plist` file with the following content
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>method</key>
    <string>app-store</string>
    <key>teamID</key>
    <string>YOUR_TEAM_ID</string>
</dict>
</plist>
```

Replace `YOUR_TEAM_ID` by the Team ID associated to your Apple Developer Account (see Membership section on https://developer.apple.com/account/)

3. generate IPA for Apple Store
```bash
xcodebuild -exportArchive -archivePath $PWD/build/Cesium.xcarchive -exportOptionsPlist $PWD/export.plist -exportPath $PWD/build
```

4. Upload to Apple Store Connect:
```bash
/Applications/Xcode.app/Contents/Applications/Application\ Loader.app/Contents/Frameworks/ITunesSoftwareService.framework/Support/altool --upload-app -f $PWD/build/Cesium.ipa -u YOUR_APPLE_ID
```

The command will prompt for your password, if you use two-factor authentication, you'll need to generate an application specific password for this command (see: https://appleid.apple.com/account/manage)

5. Go to `https://appstoreconnect.apple.com/`, then `My Apps` and publish your App from there.
 No newline at end of file

doc/build_web.md

0 → 100644
+26 −0
Original line number Original line Diff line number Diff line
# Build Cesium as an unhosted web application

Cesium can be build as a simple web application, portable and runnable anywhere.

## Prerequisites

### Install the development environment

Follow all the steps defined in the [Development guide](./development_guide.md).

After that you should be able to start the application using `npm start`or `yarn start`, and to test it.

## Build the unhosted web application


- To create a compressed ZIP artifact, run:
  ```bash
     cd cesium
     gulp webBuild --release
  ```
  
  A ZIP archive will be visible `dist/web/build/cesium-vx.y.z.zip`

## Publishing to a web site 

Decompress the web archive, then open the `ìndex.html` file in your web browser.
 No newline at end of file
+53 −0
Original line number Original line Diff line number Diff line
# Build Cesium as a Web extension

Cesium can be build as Web extension, for Mozilla Firefox extension (`.xpi`) and Chrome/Chromium (`.crx`).

## Prerequisites

### Install the development environment

Follow all the steps defined in the [Development guide](./development_guide.md).

After that you should be able to start the application using `yarn run start`, and to test it.

## Build the web extension


- To create an uncompressed extension, use :
  ```bash
     cd cesium
     gulp build
     gulp webExtCompile --release
  ```
  
  The uncompressed web extension will be visible `dist/web/ext`
  
- To create a portable and compressed ZIP extension : 
  ```bash
     cd cesium
     gulp build
     gulp webExtBuild --release
  ```
  
  The web extension is visible at `dist/web/build/cesium-vx.y.z-extension.zip`

> Remove the option `--release` to skip creation of minified CSS and JS files (and source maps)

## Publishing to Mozilla Addons 

- Make sure you have `web-ext` installed. If not, run:
  ```bash
     npm install -g web-ext
  ```
  
- Sign your extension :
  ```bash
  
    # Define your credentials on addons.mozilla.org (your developer account)
    export AMO_JWT_ISSUER =   // username
    export AMO_JWT_SECRET =   // password
  
    # Will archive and upload your extension 
    cd cesium
    web-ext sign "--api-key=${AMO_JWT_ISSUER}" "--api-secret=${AMO_JWT_SECRET}" "--source-dir=dist/web/ext" "--artifacts-dir=${PROJECT_DIR}/dist/web/build"  --id=${WEB_EXT_ID} --channel=listed
  ``` 
 No newline at end of file
+7 −0
Original line number Original line Diff line number Diff line
# Version v1.2.10

## All platforms

- [enh] Cesium+: Add compatibility to Cesium+ Pod v1.1.3+
- [fix] If Duniter node is down, settings cannot be stored locally - fix [#788](https://git.duniter.org/clients/cesium-grp/cesium/issues/788)
- [fix] My account: notification count was wrong - fix [#745](https://git.duniter.org/clients/cesium-grp/cesium/issues/745)
+26 −0
Original line number Original line Diff line number Diff line
# Version v1.2.5

## Currency
- Graph: Inversion of series "Monetary mass" and "average mass by member" - fix [#763](https://git.duniter.org/clients/cesium-grp/cesium/issues/763)

## Network
- Disable the network map, because freegeoip.net service has been closed - fix [#755](https://git.duniter.org/clients/cesium-grp/cesium/issues/755)
- Disable cache on the network page - fix [#766](https://git.duniter.org/clients/cesium-grp/cesium/issues/766)

## Transfer
- Allow send money to account defined in "my wallets" - fix [#772](https://git.duniter.org/clients/cesium-grp/cesium/issues/772)

## Certifications
- Allow to renew an existing certification - fix [#774](https://git.duniter.org/clients/cesium-grp/cesium/issues/774)

## My operations
- Negative balance, because of pending TX - fix [#769](https://git.duniter.org/clients/cesium-grp/cesium/issues/769)

## Cesium+ features

### Private message
- Android: Add a small button to compose a message to a user, on small device - fix [#770](https://git.duniter.org/clients/cesium-grp/cesium/issues/770)

### Notifications
- Disable HTML5 notifications (using popup) by default. Can be enable in Cesium+ settings - fix [#755](https://git.duniter.org/clients/cesium-grp/cesium/issues/755)
- Use HTML5 notification (using popup) only for the main wallet, no more for additional wallets.
 No newline at end of file
+16 −0
Original line number Original line Diff line number Diff line
# Version v1.2.6

## All platforms

### WoT identity
- [fix] Fix JS error when browsing a identity (identity without certifications)

### My account
- [enh] Display a warn when distance rule failed - fix [#777](https://git.duniter.org/clients/cesium-grp/cesium/issues/777)

### My wallets
- [enh] Use 'pubkey' login method as default, when add new wallets - fix [#767](https://git.duniter.org/clients/cesium-grp/cesium/issues/767)

### Cesium+ > Notifications

- [fix] Fix JS error when displaying a warning in the notifications popover
 No newline at end of file
+20 −0
Original line number Original line Diff line number Diff line
# Version v1.2.9

## All platforms

### My operations

- [enh] Add icon on each divider 
- [fix] Avoid duplicated transaction, and refresh issue - Fix [#780](https://git.duniter.org/clients/cesium-grp/cesium/issues/780)

### My wallets

- [enh] Display the total balance of wallets
- [enh] Show the default (main) wallet 
- [enh] Better wallets refresh animation
- [fix] wallet list can be lost when view not fully loaded - Fix [#782](https://git.duniter.org/clients/cesium-grp/cesium/issues/782) 
- [fix] Avoid multiple error when failed - Fix [#776](https://git.duniter.org/clients/cesium-grp/cesium/issues/776) 

### Cesium+ > Messages

- [fix] Fix sending message from a secondary wallet - fix [#784](https://git.duniter.org/clients/cesium-grp/cesium/issues/784) 
 No newline at end of file
+8 −0
Original line number Original line Diff line number Diff line
# Version v1.3.0

## Desktop

- Upgrade to NW.js v0.35.3
- Better Duniter configuration detection (keyring and node)
- Auto-login using keyring file at ~/.config/cesium/keyring.yml 
- About popup: allow to open the DEV tools window - fix [#789](https://git.duniter.org/clients/cesium-grp/cesium/issues/789) 
+8 −0
Original line number Original line Diff line number Diff line
# Version v1.3.1

## Desktop

- [enh] Display logs in terminal
- [enh] Add option `--debug` to show debug logs
- [fix] Fix error "Expected buffer" when authenticate - fix [#790](https://git.duniter.org/clients/cesium-grp/cesium/issues/790)
- [fix] Do not try to open Dev tools, when NW is not a SDK version (e.g. production mode)
 No newline at end of file
+5 −0
Original line number Original line Diff line number Diff line
# Version v1.3.10

## Web payment API

- [fix]fix cancel button redirection
 No newline at end of file
+8 −0
Original line number Original line Diff line number Diff line
# Version v1.3.11

## All platforms

 - [enh] Add a console log, when load sources failed (e.g. if network timeout)
 - [fix] Settings: on small screens, make sure all option's labels are visible
 - [fix] Menu: left menu is now scrollable for small device, to fix access to the `Settings` entry
 
 No newline at end of file
+17 −0
Original line number Original line Diff line number Diff line
# Version v1.3.8

## All platforms

- [enh] Settings: display options in 2 columns
- [enh] Display registration date, in multiple identities modal  - fix [#817](https://git.duniter.org/clients/cesium-grp/cesium/issues/817)
- [fix] Detect Duniter local node, at startup  - fix [#813](https://git.duniter.org/clients/cesium-grp/cesium/issues/813)
- [fix] Settings: Change text "Display relative unit?" - fix [#807](https://git.duniter.org/clients/cesium-grp/cesium/issues/807)
- [fix] My Wallets: avoid a full reload when previously loaded

## Android

- [fix] Fix WIF/EWIF scan error, when secure storage is enable - fix [#818](https://git.duniter.org/clients/cesium-grp/cesium/issues/818)

## Desktop

- [enh] Upgrade to NW.js version 0.37.1 
+7 −0
Original line number Original line Diff line number Diff line
# Version v1.3.9

## Web payment API

- [enh] Add `preferred_node` params on the URL to call the payment API;
- [enh] Allow `amount` to have list of values, to allow user to choice the payment amount;
- [enh] Add `{node}` params on `return_url` - fix [#549](https://git.duniter.org/clients/cesium-grp/cesium/issues/549) ;
+12 −0
Original line number Original line Diff line number Diff line
# Version v1.4.0

## All platforms

- [enh] Optimize screen for landscape mode, on Tablet device
- [enh] Switch in fullscreen, when web version is running on mobile devices
- [fix] Fix freeze bug (bas CSS after using actions popover)
- [fix] Fix theme color, on mobile device

## iOS

- [fix] Fix iOS layout issues
+5 −0
Original line number Original line Diff line number Diff line
# Version v1.4.1

## Desktop

- [fix] Fix fullscreen mode, on desktop build
+12 −0
Original line number Original line Diff line number Diff line
# Version v1.4.12

## All platforms

- [enh] Fix some Esperanto translations - thanks to @Vivakvo 
- [fix] Avoid to use source with complex output condition - fix [#845](https://git.duniter.org/clients/cesium-grp/cesium/issues/819) - thanks to @matograine
- [fix] Avoid transaction to himself - fix [#819](https://git.duniter.org/clients/cesium-grp/cesium/issues/819)
- [fix] Fix some Italian translations - thanks to @BorisPAING 

## iOS

- [enh] Add compatibility for iOS and iPad - thanks to @bpresles
+9 −0
Original line number Original line Diff line number Diff line
# Version v1.4.13

## All platforms

- [enh] Upgrade some JS libs: bower 1.8.8, angular 1.5.11, chart.js 2.9.3
- [fix] Build: Better dependencies management: update the `bower.json`, and remove libs from `www/js/vendor` 
  and `www/lib/ionic/angular`
- [fix] Cesium+: fix charts X axis labels
+13 −0
Original line number Original line Diff line number Diff line
# Version v1.4.14

## All platforms

- [enh] Transfer form: display the amount's unit as a dropdown  
- [fix] I18n: better explanation for where Cesium+ profile are stored

## Build tools

- [enh] Migrate dependency management to Yarn, instead of Bower (deprecated) 
- [fix] Avoid error during `ionic state restore` : move `platforms/desktop` and `platforms/web` to `dist` 
- [fix] DEV: when `ionic serve` is running, avoid the web browser to be reloaded before end of compilation process
+22 −0
Original line number Original line Diff line number Diff line
# Version v1.4.3

## All platforms

- [enh] Menu: change items order - thanks to @BorisPAING 
- [enh] Add Esperanto translation - thanks to @Vivakvo 
- [fix] Fix scale change, on the network TX graph - fix #835 - thanks to @jiemme2
- [fix] Fix ES translation - thanks to @scanlegentil
- [fix] Fix NL translation - thanks to @RavanH
- [fix] Fix development guide - thanks to @BorisPAING 

## Android

- [enh] Add 64bit compatibility for libsodium

## Desktop

- [enh] upgrade to Chromium 76 (NWJS v0.40.1)

## iOS

- [enh] Add doc to build a signed artefact for iOS - thanks to @bpresles
+5 −0
Original line number Original line Diff line number Diff line
# Version v1.4.6

## Android

- [enh] Android: Add libsodium 64bit so, for compatibility with Google Play Store policy
+44 −0
Original line number Original line Diff line number Diff line
# Version v1.5.3

## All platforms

- [enh] My operations: show many pubkeys, when TX has more than one issuers (or recipients)
- [enh] My operations: Optimize load

- [fix] Home: fix logout button icons, on small device
- [fix] Menu: badge alignment on small device
- [fix] Wot identity: better fab compose id (UID is not safe)
- [fix] Secondary wallet: allow to see certifications
- [fix] Transfer: always hide the digitKeyboard when not a mobile device - fix #866
- [fix] Network: add button to show Cesium+ network (if expert mode and Cesium+ plugin are enable)

### Cesium+ plugin

- [enh] Cesium+: add a view to monitor Cesium+ pod network
- [enh] Cesium+ settings: Use the specific Cs+ network view, to select a Pod
- [enh] Cesium+ pod stats: Allow to see stats pages (data and synchro) from any Cesium+ pod

- [fix] Cesium+ settings: do not store remotely es.node.useSsl property
- [fix] Cesium+ page: Fix comment "send button" alignment
- [fix] Cesium+ pod stats: use the new index (document/stats) instead of (docstat/record)
- [fix] Settings: do not store `max upload size` in remote settings
- [fix] Network: Fix an error in console, when leaving the network view

### Android build

- [fix] Android: revert to minSdkVersion=19
- [fix] Android: Fix new cordova restore plugins
- [fix] Android build: use ~/Android/Sdk if exists
- [fix] Android build: add gradle installation when not found
- [fix] Android build: use existing gradle if found in the path

## Build tools

- [enh] Add a sha256 checksum file, on each release

- [fix] Remove Ionic v1 config file
- [fix] Fix gulp compile script (watch)
- [fix] update config.xml cordova plugins version
- [fix] Build: compile using the last ionic cli, and nodeJS v10
- [fix] Build: Remove unused gulp sourcemaps
+25 −0
Original line number Original line Diff line number Diff line
# Version v1.6.0

## All platforms

- [enh] Home: Add feed (news)
- [enh] Menu: new menu layout, and new icon for "My operations"
- [enh] Navigation: better performance, by adding a network cache (between session if enable in settings)

- [fix] Wallet: Fix freeze on "Loading..."
- [fix] Fix locale flags (and add a flag for Esperanto)

### Desktoo

- [enh] Upgrade to Chromium 80 (NWjs v0.44.4)

### Android

- [enh] Can toggle QR code into full screen
- [enh] Show more QRcode (on a identity page, in the transactions history) 

- [fix] Android: revert to minSdkVersion=16

### Firefox and Chrome extension

- [enh] Allow to add Cesium as browser extension 
+53 −0
Original line number Original line Diff line number Diff line
# Version v1.6.2

## All platforms

- [enh] Improve private message icon, on a identity profile - fix [#900](https://git.duniter.org/clients/cesium-grp/cesium/-/issues/900)
- [enh] Improve avatar modal, when editing a Cesium+ profile:
  * allow drag and drop;
  * add a "previous" button;
  
- [fix] Fix some ES translations
- [fix] API: error 'qrcode not defined' - fix [#903](https://git.duniter.org/clients/cesium-grp/cesium/-/issues/903)

### Desktop

- [enh] Add a splash screen

- [fix] Fix command line option `--debug`
- [fix] Open popup to select local Duniter node, if detected  

### Android

- [enh] Fix Android 10 compatibility (due to secure storage Cordova plugin) - fix [#908](https://git.duniter.org/clients/cesium-grp/cesium/-/issues/898)

### Firefox and Chrome extension

- [fix] Unable to set avatar and page's pictures - fix [#904](https://git.duniter.org/clients/cesium-grp/cesium/-/issues/904)

## Development environment

### Build from source

Before building Cesium, please launch this commands:
```bash 
cd cesium

# Update ionic CLI to latest 
npm remove ionic

npm i -g @ionic/cli

# Remove JS dependencies
rm -rf node_modules

# Clean Yarn cache, then install deps
yarn cache clean && yarn install

# Remove Cordova plugins
rm -rf plugins
  
# Re install Cordova plugins
cd scripts
./ionic-update.sh 
```
 No newline at end of file
+10 −0
Original line number Original line Diff line number Diff line
# Version v1.6.5

## All platforms

- [fix] Unable to report abuse, or like, a profile, if not login - fix [#913](https://git.duniter.org/clients/cesium-grp/cesium/-/issues/913) 

## Android

- [fix] Fix startup error, under Android 10 (API 28)  - [#898](https://git.duniter.org/clients/cesium-grp/cesium/-/issues/898)
- [fix] Fix 'findIndex' error on transaction history, under Android 4.4 (API 19) - fix [#912](https://git.duniter.org/clients/cesium-grp/cesium/-/issues/912)
+18 −0
Original line number Original line Diff line number Diff line
# Version v1.6.8

## All platforms

- [enh] Build: upgrade to cordova@10.0.0, and node.js v12. Refactor Cordova hook to use main gulpfile.js
- [fix] Map: optimize loading time (remove the search layer)

## Web extension

- [enh] Handle G1 link, like 'web+june://' - See [this post](https://forum.duniter.org/t/g1link-syntax-review-choisissons-la-syntaxe-g1lien/7522)

## Android

- [enh] Handle G1 link, like 'june://' - See [this post](https://forum.duniter.org/t/g1link-syntax-review-choisissons-la-syntaxe-g1lien/7522)
 
## Desktop

- [fix] Fix startup error on Ubuntu 20+ - [#921](https://git.duniter.org/clients/cesium-grp/cesium/-/issues/921)
 No newline at end of file
+6 −0
Original line number Original line Diff line number Diff line
# Version v1.7.0

## All platforms

- [enh] Add mre languages : Italian, Deutsch, Catalan, Portuges
- [fix] Update default Duniter and Cesium+ Pod peers 
 No newline at end of file

doc/configuration.md

0 → 100644
+165 −0
Original line number Original line Diff line number Diff line
# Configuration

On a web server or local installation, Cesium use a configuration to set default settings, like default peer, timeout, ...
   
## Deployment configuration

When deploying Cesium (on web server or locally for a standalone use), you need to change this default configuration :

- Edit the file `config.js`:  
```js
angular.module("cesium.config", [])
.constant("csConfig", {
  "cacheTimeMs": 60000,
  "fallbackLanguage": "en",
  "rememberMe": false,
  "showUDHistory": false,
  "timeout": 10000,
  "timeWarningExpireMembership": 5184000,
  "timeWarningExpire": 7776000,
  "useLocalStorage": true,
  "useRelative": false,
  "expertMode": false,
  "decimalCount": 2,
  "httpsMode": false,
  "shareBaseUrl": "https://g1.duniter.fr",
  "helptip": {
    "enable": true,
    "installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
  },
  "node": {
    "host": "g1-test.duniter.org",
    "port": 10900
  },
  "fallbackNodes": [
    {
      "host": "g1-test.cgeek.fr",
      "port": 443
    }
  ],
	"plugins": {
		"es": {
			"enable": "true",
			"host": "g1-test.data.duniter.fr",
			"port": 443
		}
	},
	"version": "...",
	"build": "...",
	"newIssueUrl": "https://git.duniter.org/clients/cesium/cesium/issues/new",
  "userForumUrl": "https://forum.duniter.org"
});
```

## Minimal configuration file

Because of default options values (see details below), the minimal configuration file should be:

- without any extension:
  ```js
  angular.module("cesium.config", [])
  .constant("csConfig", {
  	"node": {
  		"host": "g1-test.duniter.org",
  		"port": "10900"
  	},
  	"version": "...",
  	"build": "..."
  });
  ```

- with ES (Cesium+) extension:
  ```js
    angular.module("cesium.config", [])
    .constant("csConfig", {
    	"node": {
    		"host": "g1-test.duniter.org",
    		"port": 10900
    	},
    	"plugins": {
    	   "es": {
           "host": "g1-test.data.duniter.fr",
           "port": 443
         }
      },
    	"version": "...",
    	"build": "..."
    });
    ```
  
## Core options

### Technical and mandatory options 

This technical options are mandatory in the configuration file. User can NOT changed them.

Option                      | Description
--------------------------- | -------------------------------------------
version                     | Build version. Filled at compilation time.
build                       | Build date. Filled at compilation time.


### Technical and optional options 

This technical options are optional (default values will be applied if not set). User can NOT changed them.

Option                      | Description                                                                                    | Default value
--------------------------- | ---------------------------------------------------------------------------------------------- | -----------------
fallbackNodes               | Fallback nodes, when default node is unreacheable (array of object with host+port properties)  | no fallback nodes
cacheTimeMs                 | Default network request cache time, in millisecond.                                            | `60000` (1 min).
fallbackLanguage            | Default locale, if browser default language not exists in Cesium                               | `en`
defaultLanguage             | Used to force the default language (ignore browser's language), on user first connection.      | =`fallbackLanguage`
decimalCount                | Number of decimal to display, on float value (when using relative unit)                        | `4`
shareBaseUrl                | Used in share buttons, to reference another web site.                                          | not defined (will use navigator's window location) 
helptip.installDocUrl       | Used in features tour, for the link 'How-to install my own node'.                              | URL of [Duniter installation node](https://duniter.org/en/wiki/duniter/install/)
newIssueUrl                 | Used for link in the About screen, to submit new issue                                         | URL of [Cesium issues](https://git.duniter.org/clients/cesium/cesium/issues/new)
userForumUrl                | Link to the user forum, show in the About screen                                               | URL of [forum.monnaie-libre.fr](forum.monnaie-libre.fr)
timeout                     | Default network request timeout, in millisecond.                                               | `4000`
timeWarningExpire           | Delay (in second) before expiration of certifications, use to warn the user that there will soon be a lack of certifications | `5184000` (2 mois)
timeWarningExpireMembership | Delay (in second) before membership expiration, use to warns user that he should renew his membership.  | `7776000` (3 mois)
logoutIdle                  | Duration (in second) of inactivity, before logout                                              | `600` (10 minutes)
logoutTimout                | Duration (in second) of a warning message, before logout                                       | `15` (15s)
walletHistoryTimeSecond     | Default transaction history to load (in second), in 'My account' screen.                       | `86400` (30 days) 
walletHistorySliceSecond    | Slice size (in second) for downloading transaction history (need for cache optimization)       | `432000` (5 days)
wallet.alertIfUnusedWallet  | Should warn user if account seems to be used ?                                                 | `true`

> This default values are defined in [this code](../www/js/services/settings-services.js#L44)


### User options

This options can be changed by user action (generally using Settings screen, or action buttons).


Options                     | Description                                                                        | Default value
--------------------------- | ---------------------------------------------------------------------------------- | ------------------------------------------
expertMode                  | Enable the expert mode (display more technical details)                            | `false`
helptip.enable              | Should open help tips (contextual tips) ?                                          | `true`
node.host                   | Duniter peer host to use by default (DNS name or IP)                               | No default value (mandatory in `config.js` file)
node.port                   | Duniter peer port to use by default                                                | No default value (mandatory in `config.js` file)
node.useSsl                 | Duniter peer port to use by default                                                | `true` if `node.port=443` or if Cesium URL starts with `https://`, `false` otherwise
rememberMe                  | Default value of the 'Remember me' button, in the login popup                      | `true` on Android  build, `false` otherwise
showUDHistory               | Should display UD history in the transaction history ?                             | `false`
showLoginSalt               | Should display salt value (pass phrase) in the login screen. If `false`, masked.   | `false`
useLocalStorage             | Enable data storage (settings, credentials, cache) in the browser local storage ?  | `true`
useRelative                 | Should use relative unit (UD) by default ?                                         | `false`
wallet.showPubkey           | Should display pubkey and uid in 'My account' screen ?                             | `true`
wallet.notificationReadTime | Time (in second) since the last notification read.                                 | `0` (never read)


## Plugin options

### ES API (for Cesium +)

This options should be defined in `config.js`, to enable Cesium+ extension.
Then user can change this default values (generally using the Settings screen).

Options                     | Description
--------------------------- | -------------------------------------------- 
plugins.es.enable           | Enable or not Cesium+ extension, by default.
plugins.es.host             | Default ES node host (DNS name or IP)
plugins.es.port             | Default ES node port


> To **remove** the extension (and not only disable by default): remove all content inside the `plugins` attribute.
> Users will NOT be able to enable the extension.

doc/deploy_web.md

0 → 100644
+148 −0
Original line number Original line Diff line number Diff line

# Deploy Cesium on a web server 

> **WARN**: Installing Cesium as a web site is NOT recommended, for security reasons!
> A DNS attack can redirect to another web site (with modified javascript code) in order to retrieve user credentials (wallet secret key)
>
> We recommend the use of the [web extension](build_web_extension.md), or the [desktop application](build_desktop.md);
>
> Read [this post](https://forum.monnaie-libre.fr/t/cesium-evolue-aie-ca-va-piquer-mais/10015) for details (French).

## First deployment

1. Download the [latest release](https://github.com/duniter/cesium/releases/latest) (file `cesium-vx.y.z-web.zip`);
 
2. Unpack into an empty directory;

3. Change Cesium default settings, by editing the file `config.js` (see next bottom); 

4. Configure the web server engine (e.g. Apache, nginx):
  * Add a new `location` (or a new `virtual host`), that use the directory as `web root`. 
  * Make sure the file `index.html` exist inside this directory.
 
   Please refer to your engine documentation.

5. Restart your web engine.

That's it !


## Configure Cesium default settings 

To change default configuration, that Cesium will use:

- Edit the file `config.js` in the web root directory, and change some properties:
  
```js
angular.module("cesium.config", [])
.constant("csConfig", {
  "fallbackLanguage": "en",
  "rememberMe": false,
  "timeWarningExpireMembership": 5184000,
  "timeWarningExpire": 7776000,
  "useLocalStorage": true,
  "useRelative": true,
  "decimalCount": 4,
  "helptip": {
    "enable": true,
    "installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
  },
  "node": {
    "host": "g1.duniter.org",
    "port": "443"
  },
	"plugins": {
		"es": {
			"enable": "true",
			"host": "g1.data.duniter.fr",
			"port": "443"
		}
	},
	"version": "1.3.7",
	"build": "2019-04-02T08:27:57.915Z"
});
```

- Configure a Duniter node:
  * set `node.host` and `node.port` to the default node address. 

- Configure the optional extension for [Cesium+](https://git.duniter.org/clients/cesium-grp/cesium-plus-pod/)

  * set `plugins.es.host` and `plugins.es.port` to the default Cesium+ Pod (aka ES) address.
  * set `plugins.es.enable` with [true|false] to change the default extension state. 
   
   
To learn more about configuration options, see the [detailed documentation](configuration.md).

 
## Update to the last version

On Linux server, you can use an update script:

```
cd <CESIUM_WEB_ROOT>
curl -kL https://git.duniter.org/clients/cesium-grp/cesium/raw/master/install.sh | bash
```
or:

```
cd <CESIUM_WEB_ROOT>
wget -qO- https://git.duniter.org/clients/cesium-grp/cesium/raw/master/install.sh | bash
```

> **Note**: You should NOT need root permission. Make sure to NEVER replace `| bash` by `| sudo bash`!
> For any permission issue during installation, change permission on directory, then retry.

## Another Bash script  
 
This is a bash script example, that you can use to deploy the latest release, in a existing Cesium web site.

This script will create or replace a directory name `cesium`, where application will be unpack.
 
**Be aware** that the destination directory will be created **where the script is**.

```bash
#!/bin/bash

READLINK=`which readlink`
if [ -z "$READLINK"  ]; then
  message "Required tool 'readlink' is missing. Please install before launch \"$0\" file."
  exit 1
fi

# ------------------------------------------------------------------
# Ensure BASEDIR points to the directory where the soft is installed.
# ------------------------------------------------------------------
SCRIPT_LOCATION=$0
if [ -x "$READLINK" ]; then
  while [ -L "$SCRIPT_LOCATION" ]; do
    SCRIPT_LOCATION=`"$READLINK" -e "$SCRIPT_LOCATION"`
  done
fi

export BASEDIR=`dirname "$SCRIPT_LOCATION"`

cd $BASEDIR

echo "Installing cesium into '$BASEDIR/cesium'..."

# In order to get the latest version, simplify run:
wget -qO- https://git.duniter.org/clients/cesium-grp/cesium/raw/master/install.sh | bash

export VERSION=`sed -rn "s/\s*\"version\": \"([^\"]*)\",\s*/\1/p" cesium/config.js`
export BUILD=`sed -rn "s/\s*\"build\": \"([^\"]*)\",\s*/\1/p" cesium/config.js`
echo "Detected version: $VERSION"
echo "           build: $BUILD"

if [ -e "$BASEDIR/config.js" ]; then
  echo "Override config file using '$BASEDIR/config.js'"
  cp -f cesium/config.js cesium/config.js.ori
  cp -f config.js cesium/
  
  # Keep version and build from original config file
  sed -i "s/\"version\": \"[^\"]*\"/\"version\": \"${VERSION}\"/g" cesium/config.js
  sed -i "s/\"build\": \"[^\"]*\"/\"build\": \"${BUILD}\"/g" cesium/config.js
fi

echo "Done !"
```
 No newline at end of file
+127 −0
Original line number Original line Diff line number Diff line
# Development Guide

## In a post-it

```bash
# Install NodeJS v16
nvm use 16
npm install -g yarn 

# Clone and compile from source
git clone git@git.duniter.org:clients/cesium-grp/cesium.git
cd cesium
yarn

# Run the App !
yarn run start
```


## Step by step

### Prerequisite  

To build Cesium, you will have to: 
 
1. Installing build tools:
   ```bash
      sudo apt-get install git wget curl unzip build-essential software-properties-common ruby ruby-dev ruby-ffi gcc make
   ```

2. Installing node.js v16 :

  * First, install [nvm](https://github.com/nvm-sh/nvm) (Node Version Manager) :    
    ```bash
       wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh | bash
    ```

    > Alternatively, if you are using `fish shell`, there is a [dedicated plugin](https://github.com/jorgebucaran/fish-nvm).

  * Then, reload your terminal (for instance by executing the command `bash`);

  * Configure nvm to use the expected version: (**WARNING**: upper version will NOT work !) 
    ```bash
       nvm install 16
    ```
      
3. Installing node build tools, as global dependencies:
   ```bash
      npm install -g yarn gulp cordova @ionic/cli@6.20.9 web-ext
   ```
   
### Get the source code and dependencies
   
1. Getting the source code:    
  ```bash
     git clone git@git.duniter.org:clients/cesium-grp/cesium.git
  ```
  
2. Install project dependencies:    
   ```bash
      cd cesium
      yarn
   ```

3. Installing Cordova plugins (required to build Android and iOS artifacts): 
   ```bash
      export JAVA_HOME=/path/to/jdk-11
      export PATH=$JAVA_HOME/bin:$PATH
      ionic cordova prepare
   ```

   This should create new directories `platforms/android` and `platforms/ios`.

   > As a reminder: check that your command line is well configured:
   > - You must place yourself in the directory of the application: `cd cesium`
   > - and working with NodeJs **v16**: `nvm use 16` (please check using the command `node --version`)
    

### Prepare configuration file

Configure Cesium default settings :
 
1. Add your environment config into `app/config.json`
   
2. Update default configuration, using the command:    
   ```bash
      gulp config --env <your_env_name> 
   ```

  This will update a configuration file `www/js/config.json`.
 
### Compile and launch

To compile and launch Cesium, run:
```bash
  yarn run start
```

or alternative: `npm start` or `ionic serve` 

The application should be running at [localhost:8100](http://localhost:8100)!


### Build artifacts 

Cesium can be build:
- [as an unhosted web applicationa](build_web.md);
- [for Android](build_android.md);
- [for iOS](build_ios.md);
- [as a Web extension](build_web_extension.md) for Mozilla Firefox or Chrome/Chomium;
- [as a Desktop application](build_desktop.md) for Linux (`.deb`), Windows and MacOSx;

You may also [use Docker image](build_docker.md) to simplify this task;   


### Time to code !

#### Pull request

For each pull request, please create an issue first.

#### Best practices for development

Cesium could be run on phone devices. Please read [performance tips on AgularJS + Ionic](http://julienrenaux.fr/2015/08/24/ultimate-angularjs-and-ionic-performance-cheat-sheet/)
before starting to contribute.

Read also [Angular performance for large applicatoins](https://www.airpair.com/angularjs/posts/angularjs-performance-large-applications). 
+390 −0
Original line number Original line Diff line number Diff line
## Introduction

This article is an introductory tutorial to the source code of the Cesium software. 

This will allow you, through a succession of steps, to access the mastery of the tools and methods used daily by the developers of Cesium to create and modify the software.

At the end of this tutorial, you will be *able to modify the software*. And if you feel like it, you can even make a change and share it with the main code repository, so that it is officially integrated and available to users!

To your keyboards!

## Level I: Retrieve the source code

This first level consists of creating *your own version* of the software sources and retrieving this copy on your computer. You will produce:

* your own account on the [GitLab de Duniter](https://git.duniter.org)
* your own version of the software, your *fork*
* a local copy of the source code files from your *fork*

### Create a GitLab Duniter account

> If you already have a GitLab account, you can skip this step.

Go to [https://git.duniter.org](https://git.duniter.org/users/sign_in?redirect_to_referer=yes) (site in english).

In 'Register' Fill in the 3 proposed fields:

* Full name 
* Username 
* E-mail 
* Password

You will probably receive a confirmation email that you will need to validate. Once this step is over, you should have an account on the GitLab Duniter.

### Fork the main repo

Go to https://git.duniter.org/clients/cesium-grp/cesium.

Click the "Fork" button at the top of the page (below the logo).

### Install Git

Installing Git depends on your operating system. Simply follow the instructions on : https://git-scm.com/

### Clone your fork

At this point, you are able to retrieve your version of the source code (your *fork*), so that you can work on it.

#### Open Git from the command line

To retrieve the source code, launch Git in console mode.

* On Linux and MacOS, simply open Terminal
* On Windows launch the *Git Bash* program :

<img src="../fr/img/6fc638dc0a22d88da7e84dbf0371e69747767f78.png" width="432" height="80">

#### Clone your fork from the command line

Go back to the GitHub webpage and find the "Clone or download" button: Click on it, you can then copy the clone URL by clicking on the suitcase icon.

All you have to do is go back to your Git console and enter: 

    git clone <paste the copied URL>

which gives **in my case**:

```
git clone git@git.duniter.org:blavenie/cesium.git
Cloning into 'cesium'...
 (...)
Checking connectivity... done.
```

If you have come to a similar behavior, **great**, you now have the Cesium source code!
 
## Level II: Compiling and Launching in a Browser

This second level aims to obtain the basic tools to execute the source code, and verify its proper functioning. You will realize:

* installation of the JavaScript runtime *Node.js*
* the verification of the proper functioning of the source code *via* the launch of the application, in web mode.

If the application launches, you will already have a fully **functional** environment!

### Install Node.js

#### Under Linux / MacOS

Installing Node.js has become extremely simple for these OS: a tool allows you to install the version of Node.js you want, change it whenever you want and without conflict with a previous version: it is [nvm](https://github.com/creationix/nvm).

You can install nvm with the following command:

```bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
```

Close and reopen your terminal, as shown. Then, install Node.js (choose version 12):

```bash
nvm install 12
```

You will then have the latest version of node's 5.x branch.js ready to use.

##### Compilation tools

Install the necessary tools for compilation.
```bash
sudo apt-get install build-essential
```

(mac users https://appuals.com/how-to-fix-sudo-apt-get-command-not-found-on-macos/)

#### On Windows

For Windows, download version 6 available from the official website of Node.js: https://nodejs.org

Then launch the installer thus downloaded.

### Install Cesium Node.js modules

Cesium relies on third-party libraries to run called *dependencies*, such as compilation libraries (gulp, ionic, angularJS).

The fact that you cloned the sources is actually not enough to launch the application. We need to get the code of the dependencies to get all the executable code of the program. To do this, go back to the Git console and move to the cloned directory:

```bash
cd cesium
```

Then, start downloading and installing the Cesium modules using the command:

```bash
npm install -g yarn gulp cordova@10.0.0 @ionic/cli web-ext
```

Then for non-global dependencies:

```bash
yarn
```

> The installation process may take several minutes. Indeed, it is necessary to download all the dependencies of Cesium and even compile some of them.

If everything went well, you should get an end tree in the console, and the command prompt should have returned your hand:

```bash
yarn install v1.15.2
[1/4] Resolving packages...
  (...)
$ node -e "try { require('fs').symlinkSync(require('path').resolve('node_modules/@bower_components'), 'www/lib', 'junction') } catch (e) { }"
Done in 0.82s.
```

> You may get `npm WARN messages [...] `. Nothing serious: as the name of the message suggests, it is simply a non-blocking warning for the rest of the events.

Then install the remaining dependencies (via bower):

```bash
npm run postinstall
```

### Install an IDE

To develop in NodeJS, you can use the IDE of your choice:

 * For example Sublime Text (not free) : https://www.sublimetext.com/
 * Other possibilities : 
    * VS Code (free).
    * WebStorm (not free but very advanced operation).

### Install Chrome and/or Firefox

To debug Cesium javascript more easily, it is easier to use the Chrome browser

## Level III: Mastering the usual commands

This third level allows you to discover the few (five) commands that you will use all the time if you develop Cesium. You will learn:

* configure Cesium, including the Duniter node it will use (default);
* to launch Cesium in your browser;

### Configure Cesium

The default configuration of our environment is visible in the file 'app/config.json'. Several profiles are present: 'default', 'dev', etc.

```json
{
   "default": {
       "cacheTimeMs": 60000,
       "fallbackLanguage": "en",
       "rememberMe": false,
       "showUDHistory": false,
       "timeout": 10000,
       "timeWarningExpireMembership": 5184000,
       "timeWarningExpire": 7776000,
       "useLocalStorage": true,
       "useRelative": true,
       "initPhase": false,
       "expertMode": false,
       "decimalCount": 4,
       "helptip": {
         "enable": true,
         "installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
       },
       "node": {
         "host": "g1.duniter.org",
         "port": "443"
       },
       "plugins":{
         "es": {
           "enable": true,
           "askEnable": false,
           "host": "g1.data.duniter.fr",
           "port": "443"
         }
       }
     },
     
     (...)
     "dev": {
         "cacheTimeMs": 60000,
         "fallbackLanguage": "fr-FR",
         "defaultLanguage": "fr-FR",
         "rememberMe": true,
         "showUDHistory": false,
         "timeout": 6000,
         "timeWarningExpireMembership": 5184000,
         "timeWarningExpire": 7776000,
         "useLocalStorage": true,
         "useRelative": true,
         "initPhase": false,
         "expertMode": false,
         "decimalCount": 2,
         "helptip": {
           "enable": true,
         },
         "node": {
           "host": "localhost",
           "port": "9600"
         },
         "plugins":{
           "es": {
             "enable": false
           }
         }
       },
}
```

We will use the "dev" configuration, you  may use your Duniter node.

Change the 'host' and 'port' values of the 'dev' configuration profile to match your Duniter node:

```json
  "dev: {
  ...
         "node": {
           "host": "localhost",
           "port": "9600"
         },
  ...
```

Disable the plugin "es" (used for Cesium+) :

```json
  "dev: {
  ...
         "plugins":{
           "es": {
             "enable": false
           }
         }
  ...
```

To enable this configuration, now run the command:

```bash
 gulp config --env dev
```

```bash
[17:32:34] Using gulpfile (...)/cesium/gulpfile.js
[17:32:34] Starting 'config'...
[17:32:34] Building `www/js/config.js` for `dev` environment...
[17:32:36] Finished 'config' after 10 μs
```

> This command will be restarted at the time of your changes to the `app/config` file.

Cesium is now configured to use your local Duniter node.

### Launch Cesium (web mode)

All you have to do is launch the application (in web mode) to find out if everything went well and that you are ready for the future.

Run the following command :

```bash
npm start
```

 > Alternative : `ionic serve`

When complete, the command displays :

```bash
Running live reload server: http://localhost:35729
Watching: 0=www/**/*, 1=!www/lib/**/*
Running dev server:  http://localhost:8100
Ionic server commands, enter:
  restart or r to restart the client app from the root
  goto or g and a url to have the app navigate to the given url
  consolelogs or c to enable/disable console log output
  serverlogs or s to enable/disable server log output
  quit or q to shutdown the server and exit

ionic $ 
```

You can open a web browser at http://localhost:8100
You should see the Cesium homepage there.
 
Congratulations, you have an operational Cesium installation!

### Documentation

Cesium uses the Ionic framework, which has good documentation : http://ionicframework.com.

Visit this site to learn more.

## Level IV: Finding your way around the code

### Locate software layers

Open your IDE, and open the Cesium project.

Search and locate in the code:

* HTML templates that carry HMIs: www/templates 
* controllers (JS): www/js/controllers 
* services (JS): www/js/services

<img src="../fr/img/a5078db3abdf71c87f245e948ce94a181b0e0f37.png" width="690" height="369">


### Go further in the code

Cesium relies on AngularJS. Excellent documentation is available on the web.

__Note :__ The version of AngularJS used is a 1.x. The 2.x and above change completely and impose a complete redesign... This redesign is planned by 2019, in a version 2 of Cesium.

## Level V: Debugging

### On Chrome

#### Open The Source Explorer

Open the app in Chrome at http://localhost:8100

Open the developer tools: 
* Menu `Option > More Tools > Developer Tools` 
* or by the keyboard shortcuts: `Ctrl + Shift + i`

#### Debug a user's certification

Open the source explorer, and then locate the file `dist/dist_js/app/controllers/wot-controllers.js`.

Find the method `$scope.certify()`, and place a breakpoint there.

Navigate the Cesium app as follows:

 * Click in the menu (on the left) `Annuaire`;
 * Searches for a user and then visualizes their identity;
 * In `Certification received`, click on the `Certify` button;
 * Verify that the console stops at the breakpoint.

<img src="../fr/img/eca671a6d24b8e11566cfcca11b65e6c9c9c370c.png" width="690" height="223">

Discover the code by scrolling down the step-by-step action.

> Use the keys from `F9` to `F11`, to enter a method (F11), advance step by step (F10) or to the next breakpoint (F9), etc.


## See more ?!

You can now continue with the following levels. We will see how to modify a Cesium screen.

[See more here >>](./development_tutorial-02.md)
+180 −0
Original line number Original line Diff line number Diff line
## Presentation

This article is the 2nd initiation tutorial to the Cesium software source code.

You will be able to understand the role of the different software layers,
by modifying them in order to improve a screen of Cesium.

## Prerequisites

Before doing this tutorial, you must:
  
 - Know the functionalities of Cesium. If not, refer to [la vidéo de présentation générale des fonctionnalités](https://www.youtube.com/watch?v=FQzGIzJf9Nw&list=PLr7acQJbh5rzgkXOrCws2bELR8TNRIuv0&index=6) (RML7) and the one detailing the new features (RML8 - link to come)
 - Have followed the 1st tutorial for setting up the environment [jusqu'au niveau III](https://github.com/duniter/cesium/blob/master/doc/fr/development_tutorial.md)

## Level VI: Display a missing currency parameter

__Objective :__ In this level, the objective is to display in the [`Currency`](http://g1.duniter.fr/#/app/currency/view/lg/) page the monetary parameter `stepMax`.

> As a reminder, `stepMax` is the maximum distance between a member and an applicant, so that the latter can enter the web of trust.

### Modify the HTML template

Open the template file `/www/templates/currency/items_parameters.html`.

Add a new item in the list of parameters, i.e. a new `<ion-item>` tag, below the other tags of the same name:

```html
   (...)

   <ion-item class="item-icon-left">
     <i class="icon ion-steam"></i>
     <span translate>CURRENCY.VIEW.STEP_MAX</span>
     <span class="badge badge-stable">{{stepMax}}</span>
   </ion-item>
```

If you refresh the `Currency` page of your browser, you should see the change:

<img src="../fr/img/19a637b1fa847aa5bbb18565737e9e5e28729221.jpg" width="431" height="97">

### Internationalizing a Label

The `CURRENCY.VIEW.STEP_MAX` string actually represents an **internationalized message key**.
We now need to add the translation of this key.

> The icon is configured simply by the `ion-stream` CSS class. To find out which icons are available, see
[ionicons.com](http://ionicons.com/)

Open the file `www/i18n/locale-fr-FR.json` and identify the element `CURRENCY` then `VIEW`.
Add the translation for our new key:

```json
  "CURRENCY": {
   (...)

  "VIEW": {
    "TITLE": "Monnaie",
    (...)
    "SIG_WINDOW": "Maximum delay a certification can wait<br/>before being expired for non-writing.",
    "STEP_MAX": "Distance maximale dans la toile de confiance<br/>entre chaque membre et un nouvel entrant"
  }
}
```

Don't forget **to add a comma** on the preceding line...

> Note: Cesium internationalization uses the AngularJS plugin [angular-translate](https://github.com/angular-translate/angular-translate).
> Depending on the case, it is possible to use HTML tags, like here the tag `<br/>`

Refresh your browser page: the key has been translated! 

<img src="../fr/img/6bd04622dd2eb59f6d716ae9e2f114276e4ca35a.jpg" width="690" height="116">

Repeat the operation in the **other translation files** present in `www/i18n`:

```
    (...)
    "STEP_MAX": "Maximum distance between<br/>each WoT member and a newcomer"
   }  

```

### Add a dynamic variable

All that remains is to dynamically display the value of our `stepMax` parameter. We will use the `data-binding` functions that AngularJS allows.

> In AngularJS, it is a controller that manages the filling of values, typically from data obtained on the network.

Open the `CurrencyViewController` controller present in the file `www/js/controllers/currency-controllers.js`
This controller already makes a call to the Duniter API [`/blockchain/parameters`](http://cgeek.fr:9330/blockchain/parameters).

Identify the `load()` function.
Modify the return code of the `/blockchain/parameters` call, to store the `stepMax` value in the `$scope`:

```
function CurrencyViewController($scope, $q, $translate, $timeout, BMA, UIUtils, csSettings, csCurrency, csNetwork) {
  // Ajout d'une propriété qui stockera la valeur de stepMax
  // (On met ici la valeur par défaut)
  $scope.stepMax = 0;
  (...)

  $scope.load = function() {
    (...)
    
    return $q.all([

      // Get the currency parameters
      BMA.node.blockchain.parameters() 
       .then(function(json){
          $scope.currency = json.currency;
          (...)
          // Mise à jour de la valeur, à partir du résultat que renvoi le noeud Duniter
          $scope.stepMax = json.stepMax;
        }),
      (...)
```

> The '$scope' object is used to manipulate values shared between the controller and the template.
> The value we put in `$scope.stepMax` is displayed thanks to the `{{stepMax}}` instruction that you put in the HTML template.

Your browser should now display:

<img src="../fr/img/3df8cbd2133ea9e9a28855f4b50413846fdf292c.jpg" width="519" height="85">

Congratulations, you now know how to display new values in Cesium screens!

## Level VII: Publish your changes

__Objective :__  Become an official contributor, by publishing your code!

### Make a `pull request`

If you have never used git on your current machine, you will first need to define

1. your email address: `git config --global user.email "your@email.xyz"`
2. your first and last name: `git config --global user.name "First name NAME"`

The change you just made actually corresponds to [ticket #209](https://git.duniter.org/clients/cesium-grp/cesium/issues/209).
To add your modification to it, and thus **become an official contributor** of Cesium:

 * Type the command `git add` followed by the names of the files you modified or, more simply, `git add *` to add all modified files to the commit.
 * Then do a `git commit` to commit your code;
 * Finally, do a `git push` to push to your GitHub repo.
 * In GitLab, log in to your account;
 * Open your `Cesium` repository via the "Projects" > "Your projects" menu that you will find at the top left, in the navigation bar.
 * In the left menu, go to "Merge requests", and click on the "New merge request" button
 * Most of the fields are already pre-populated, so all you have to do is select the source branch (if you haven't changed your branch via the git command line, it's "master")
 * Click on `Compare branches and continue`
 * In the title the reference to the ticket: `#209`

Your contribution is now visible to Cesium developers, who will be able to integrate your code more easily.

> _Note :_ Since RML7, this ticket has been closed. You can therefore continue this level, by adding other missing variables (see next paragraph), then 
> publish your changes: the `pull request` process remains the same.

## Niveau VIII : Free modification

__Objective :__  Now it's up to you to add the missing information that seems interesting.

### Add new variables

To get your hands on the changes in Cesium, you can add other missing currency settings.
For example, among those concerning the _BlockChain_: `xpercent`, `percentRot`, `blocksRot`...

You can find their definition in the [Duniter protocol documentation](https://github.com/duniter/duniter/blob/master/doc/Protocol.md#protocol-parameters).

> _Tip:_ to separate the different parts of the screen, add a separator, i.e. a `<div>` tag with the CSS class `item item-divider`:

```html
  <div class="item item-divider">
      <span translate>CURRENCY.VIEW.BLOCKCHAIN_DIVIDER</span>
  </div>
  <!-- paramètres relatifs à la blockchain -->
```

## See more ?!

You can now continue with the following levels. We will see how to compile and deploy Cesium on Android, then how to add a plugin, and even add a dynamic graph!

[See more here >>](./development_tutorial-03-android.md)
 No newline at end of file
Original line number Original line Diff line number Diff line
## Introduction

This article is a tutorial to develop on Cesium, to compile and test the application on Android.

## Prerequisites

Before doing this tutorial, you must: 

 - Have followed the tutorials on Cesium [up to level VIII] (./development_tutorial-02.md)

## Level IX

### Objective

The objective here is to install the basic tools to compile and verify its proper functioning under Android. You will achieve: </p>

- installation of `JDK`
- installation of `Android Studio` software
- installation of  `KVM` emulator
- installation of `NDK Android` (optional - will be needed later)

### Installing software

#### Installing JDK

The JDK or _Java Development Kit_

You can download it from [Oracle](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).

<img src="../fr/img/fef4f4dfe7c2168cb27c9e7f5e399fd547ce774a.png" width="400">

Depending on your operating system, download corresponding.

Then install the file as normal, following the guided steps.

#### Install Android Studio

You can find all files at [AndroidStudio-Downloads](https://developer.android.com/studio/index.html#downloads)

For Windows download file without Android SDK:

<img src="../fr/img/3b8fa2f5c0465b13ae5ce74d49702e0c9f027866.png" width="690" height="237">

##### For Linux

All you need to do is unzip the ZIP file, open a terminal in that folder, and type the command:
```bash
./bin/studio.sh
```

##### For Windows and Mac OS

Install the executable you downloaded earlier.

##### All machines combined

At the end of the installation or at the first launch, Android Studio will tell you that you do not have an SDK and will offer to install it:

- If you have already installed it, you can indicate where it is.
- Otherwise install the version it offers.


#### Install NDK (optional)

> The NDK is used for executing code under C++, in particular the NaCL cryptography library.
> This step is currently optional (for experts only).

You can download it at: [this site](https://developer.android.com/ndk/downloads/index.html)

Warning: do not install version 12 of the NDK. It's not stable yet.

Once again downloaded the correct version, unzip the file next to your SDK.

Under Android Studio go to the menu `File > Project Structure...`

<img src="../fr/img/04e64b769cbd45b9d275cd5f81002a399a1a7684.png" width="300">

A window like this should open:

<img src="../fr/img/ceb75301172038e75f5c43b328dd7febd7bedc7e.png" width="450">

Enter the NDK installation path.

#### Install KVM emulator (optional)

For Linux / Debian only:

```bash
sudo apt-get install kvm qemu-kvm libvirt-bin bridge-utils virt-manager
sudo groupadd libvirtd
sudo adduser `id -un` libvirtd
```

##### In case of problem...

If you get this error :
```
Cannot run program "/home/eis/android-sdks/build-tools/21.1.2/aapt": error=2, Aucun fichier ou dossier de ce type
```

Install two additional compatibility libraries (solution from [this post](http://stackoverflow.com/questions/22701405/aapt-ioexception-error-2-no-such-file-or-directory-why-cant-i-build-my-grad)) :                            
```bash
sudo apt-get install lib32stdc++6 lib32z1
```


## Level X: Launching the application in Android Studio

### Project Setup

Go to the folder in which you installed cesium using the `cd` command followed by the path to the appropriate directory.

Check that you are using the version of NodeJs that Cesium needs using the command

```
node --version
```

If you are not on a v6, use the command

```
nvm use 12
```

You can now launch the installation of the Cesium project for Android:


```
ionic cordova prepare
```

Normally, this command should initialize (among other things) a `platforms/android` directory.

> This command may take a moment to complete.

Now run the build for Android:

```
ionic build android
```

Now launch Android Studio. You should arrive at this window:


<img src="../fr/img/33266d44fdbfd6c8b44e46a3664edafacaf0a316.png" width="500">

Select "Open an existing Android Studio project" and point the folder to `cesium/platforms/android`.

### Launch the application

To be able to launch an emulator, we will have to create one.

To do this, go to `Tools` > `AVD Manager`, or click on the following icon:

<img src="../fr/img/46e959d1e616e34972a41f4d120a1d4f5beb0955.png" width="690" height="42">

A window will open and offer you to create a "Virtual Device" follow the software.

If you have an Android phone you can put it in developer mode and plug it in if you want to see the app on your phone.

Then, once the emulator is created, you can click the "Play" button (<img src="../fr/img/70b2ce88a5e7aa5754f6a771cf5efed3c639a27b.png" width="46" height="44">) to launch the application.
You can also use the icon (<img src="../fr/img/b7c419b33a43f6a43c5b756074ee0c199072f7d1.png" width="40" height="44">) to launch the application in debug mode.

Android Studio will ask you which device you want to launch the app on, select emulator or phone and leave it alone.


## Level XI: Application launched by `ionic`

You can now use the `ionic` tool directly:

 - Either to launch your application on a connected phone:
  ```bash
  ionic run android
  ```

 - Either to launch it on an emulator:
  ```bash
  ionic emulate android
  ```

## The following ?!

You can now continue with the following levels. We will see there how to add a plugin to Cesium.

[See more here >>](../fr/development_tutorial-04-add_plugin.md)
 No newline at end of file
+9 −0
Original line number Original line Diff line number Diff line
{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "News",
  "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-en-GB.json",

  "home_page_url": "https://forum.duniter.org/t/new-version-of-cesium-en/11460",
  "next_url": "https://forum.duniter.org/t/new-version-of-cesium-en/11460.json"
}
+9 −0
Original line number Original line Diff line number Diff line
{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "News",
  "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-en.json",

  "home_page_url": "https://forum.duniter.org/t/new-version-of-cesium-en/11460",
  "next_url": "https://forum.duniter.org/t/new-version-of-cesium-en/11460.json"
}
+9 −0
Original line number Original line Diff line number Diff line
{
  "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"
}
+9 −0
Original line number Original line Diff line number Diff line
{
  "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"
}
+9 −0
Original line number Original line Diff line number Diff line
{
  "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"
}

doc/feed/feed-en.json

0 → 100644
+27 −0
Original line number Original line Diff line number Diff line
{
  "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/>(...)"
    }
  ]
}

doc/feed/feed-es.json

0 → 100644
+27 −0
Original line number Original line Diff line number Diff line
{
  "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/>(...)"
    }
  ]
}

doc/feed/feed-fr.json

0 → 100644
+38 −0
Original line number Original line Diff line number Diff line
{
  "version": "https://jsonfeed.org/version/1",
  "title": "Actualités",
  "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://forum.duniter.org//user_avatar/forum.duniter.org/kimamila/48/185_2.png"
  },
  "items": [
    {
      "title": "Nouvelle version 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/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": "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>"
    }
  ]
}
Original line number Original line Diff line number Diff line
# 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. 
Original line number Original line Diff line number Diff line
@@ -10,29 +10,30 @@ A vos claviers !


Ce premier niveau consiste à créer *votre propre version* des sources du logiciel et de récupérer cette copie sur votre ordinateur. Vous y produirez : 
Ce premier niveau consiste à créer *votre propre version* des sources du logiciel et de récupérer cette copie sur votre ordinateur. Vous y produirez : 


* votre propre compte *GitHub*
* votre propre compte sur le [GitLab de Duniter](https://git.duniter.org)
* votre propre version du logiciel, votre *fork*
* votre propre version du logiciel, votre *fork*
* une copie locale des fichiers de code source provenant de votre *fork*
* une copie locale des fichiers de code source provenant de votre *fork*


### Créez un compte GitHub
### Créez un compte GitLab Duniter


> Si vous disposez déjà d'un compte GitHub, vous pouvez passer cette étape.
> Si vous disposez déjà d'un compte GitLab, vous pouvez passer cette étape.


Rendez-vous sur https://github.com (site en anglais). Renseigner les 3 champs proposés :
Rendez-vous sur [https://git.duniter.org](https://git.duniter.org/users/sign_in?redirect_to_referer=yes) (site en anglais).


Dans `Register` Renseigner les 3 champs proposés :

* Nom complet
* Nom d'utilisateur
* Nom d'utilisateur
* E-mail
* E-mail
* Mot de passe
* Mot de passe


<img src="https://forum.duniter.org/uploads/default/original/1X/13ade346327b73bbf1acc97027af147eeb4e9089.png" width="346" height="325">
Vous recevrez probablement un e-mail de confirmation qu'il vous faudra valider. Une fois cette étape passée, vous devriez disposer d'un compte sur le GitLab Duniter.

Vous recevrez probablement un e-mail de confirmation qu'il vous faudra valider. Une fois cette étape passée, vous devriez disposer d'un compte GitHub .


### Forkez le dépôt principal
### Forkez le dépôt principal


Rendez-vous à l'adresse https://github.com/duniter/cesium. Cliquez sur le bouton « Fork » en dans le coin supérieur droit de la page :
Rendez-vous à l'adresse https://git.duniter.org/clients/cesium-grp/cesium.


<img src="https://forum.duniter.org/uploads/default/original/1X/3b9228c664520496d6a7e86e3f9c4c438f111914.png" width="388" height="98">
Cliquez sur le bouton « Fourcher » (ou « Fork ») en haut de la page (sous le logo).


### Installer Git
### Installer Git


@@ -49,7 +50,7 @@ Pour récupérer le code source, lancez Git en mode console.
* Sous Linux et MacOS, ouvrez tout simplement le Terminal
* Sous Linux et MacOS, ouvrez tout simplement le Terminal
* Sous Windows lancez le programme *Git Bash* :
* Sous Windows lancez le programme *Git Bash* :


<img src="https://forum.duniter.org/uploads/default/original/1X/6fc638dc0a22d88da7e84dbf0371e69747767f78.png" width="432" height="80">
<img src="./img/6fc638dc0a22d88da7e84dbf0371e69747767f78.png" width="432" height="80">


#### Clonez votre fork, en ligne de commande
#### Clonez votre fork, en ligne de commande


@@ -60,10 +61,10 @@ Vous n'avez plus qu'à retourner dans votre console Git et saisir :


    git clone <coller l'URL copiée>
    git clone <coller l'URL copiée>


ce qui donne dans mon cas : 
ce qui donne **dans mon cas** : 


```
```
git clone https://github.com/blavenie/cesium.git
git clone git@git.duniter.org:blavenie/cesium.git
Cloning into 'cesium'...
Cloning into 'cesium'...
 (...)
 (...)
Checking connectivity... done.
Checking connectivity... done.
@@ -89,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 :
Vous pouvez installer nvm avec la commande suivante :


```bash
```bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/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 5) : 
Fermez puis rouvrez votre terminal, comme indiqué. Puis, installez Node.js (choisissez la version 12) : 


```bash
```bash
nvm install 5
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
##### Outils de compilation


@@ -109,13 +110,13 @@ sudo apt-get install build-essential


#### Sous Windows
#### Sous Windows


Pour Windows, téléchargez la version 5 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é.
Puis lancez l'installeur ainsi téléchargé.


### Installer les modules Node.js de Cesium
### Installer les modules Node.js de Cesium


Cesium repose sur des librairies tierce pour fonctionner appelées *dépendances*, comme par exemple des librairies de compilation (gulp, bower, ionic).
Cesium repose sur des librairies tierce pour fonctionner appelées *dépendances*, comme par exemple des librairies de compilation (gulp, ionic, angularJS).


Le fait d'avoir cloné les sources n'est en réalité pas suffisant pour lancer l'application. Nous devons obtenir le code des dépendances pour obtenir ainsi l'ensemble du code exécutable du programme. Pour ce faire, retournez dans la console Git et déplacez-vous dans le répertoire cloné : 
Le fait d'avoir cloné les sources n'est en réalité pas suffisant pour lancer l'application. Nous devons obtenir le code des dépendances pour obtenir ainsi l'ensemble du code exécutable du programme. Pour ce faire, retournez dans la console Git et déplacez-vous dans le répertoire cloné : 


@@ -126,11 +127,13 @@ cd cesium
Puis, lancez le téléchargement et l'installation des modules Cesium à l'aide de la commande : 
Puis, lancez le téléchargement et l'installation des modules Cesium à l'aide de la commande : 


```bash
```bash
npm install -g bower gulp ionic cordova
npm install -g yarn gulp cordova@10.0.0 @ionic/cli web-ext
```
```

Puis pour les dépendances non globales :
Puis pour les dépendances non globales :

```bash
```bash
npm install
yarn
```
```


> Le processus d'installation peut prendre plusieurs minutes. En effet, il faut télécharger toutes les dépendances de Cesium et même en compiler certaines.
> Le processus d'installation peut prendre plusieurs minutes. En effet, il faut télécharger toutes les dépendances de Cesium et même en compiler certaines.
@@ -138,30 +141,19 @@ npm install
Si tout s'est bien passé, vous devriez obtenir une fin d'arborescence dans la console, et l'invité de commande devrait vous avoir rendu la main : 
Si tout s'est bien passé, vous devriez obtenir une fin d'arborescence dans la console, et l'invité de commande devrait vous avoir rendu la main : 


```bash
```bash
├── bower@1.7.9 
yarn install v1.15.2
├─┬ gulp@3.9.1 
[1/4] Resolving packages...
│ ├── archy@1.0.0 
│ ├─┬ chalk@1.1.3 
  (...)
  (...)
│ ├─┬ through2@0.5.1 
$ node -e "try { require('fs').symlinkSync(require('path').resolve('node_modules/@bower_components'), 'www/lib', 'junction') } catch (e) { }"
│ │ ├── readable-stream@1.0.34 
Done in 0.82s.
│ │ └── xtend@3.0.0 
│ └─┬ vinyl@0.2.3 
│   └── clone-stats@0.0.1 
└── shelljs@0.3.0 


npm WARN cesium@0.0.1 No repository field.
npm WARN cesium@0.0.1 No license field.

blavenie@~$
```
```


> Il se peut que vous obteniez des messages `npm WARN [...]`. Rien de grave : comme le nom du message l'indique, il s'agit simplement d'un avertissement non bloquant pour la suite des événements.
> Il se peut que vous obteniez des messages `npm WARN [...]`. Rien de grave : comme le nom du message l'indique, il s'agit simplement d'un avertissement non bloquant pour la suite des événements.


Puis installer les dépendences via bower :
Puis installer les dépendences restantes (via bower) :

```bash
```bash
bower install
npm run postintall
```
```


### Installer un IDE
### Installer un IDE
@@ -169,11 +161,13 @@ bower install
Pour développer sous NodeJS, vous pouvez utiliser l'IDE de votre choix :
Pour développer sous NodeJS, vous pouvez utiliser l'IDE de votre choix :


 * Par exemple Sublime Text (non libre) : https://www.sublimetext.com/
 * Par exemple Sublime Text (non libre) : https://www.sublimetext.com/
 * Autre possibilité : WebStorm (non libre mais fonctionnement très avancé). cf Post de cgeek sur le développement de Duniter.
 * Autres possibilités : 
    * VS Code (libre).
    * WebStorm (non libre mais fonctionnement très avancé).


### Installer Chrome et/ou Firefox
### Installer Chrome et/ou Firefox


Pour débugger plus facilement le javascript Cesium, il est plus facile Les navigateur Chrome
Pour débugger plus facilement le javascript Cesium, il est plus facile d'utiliser le navigateur Chrome


## Niveau III : maîtriser les commandes usuelles
## Niveau III : maîtriser les commandes usuelles


@@ -184,69 +178,128 @@ Ce troisième niveau permet de découvrir les quelques (cinq) commandes que vous


### Configurer Cesium
### Configurer Cesium


La configuration par défaut de notre environnement est visible dans le fichier : app/config.json
La configuration par défaut de notre environnement est visible dans le fichier `app/config.json`. Plusieurs profils y sont présents : `default`, `dev`, etc.


```bash
```json
{
{
   "default": {
   "default": {
            "APP_CONFIG": {
       "cacheTimeMs": 60000,
              "DUNITER_NODE": "cgeek.fr:9330",
       "fallbackLanguage": "en",
              "NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug",
       "rememberMe": false,
              "TIMEOUT": 4000,
       "showUDHistory": false,
              "DEBUG": false,
       "timeout": 10000,
              "NATIVE_TRANSITION": false
       "timeWarningExpireMembership": 5184000,
            }      
       "timeWarningExpire": 7776000,
       "useLocalStorage": true,
       "useRelative": true,
       "initPhase": false,
       "expertMode": false,
       "decimalCount": 4,
       "helptip": {
         "enable": true,
         "installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
       },
       },
          "duniter-fr": {
       "node": {
            "APP_CONFIG": {
         "host": "g1.duniter.org",
              "DUNITER_NODE": "cgeek.fr:9330",
         "port": "443"
              "NEW_ISSUE_LINK": "https://github.com/duniter/cesium/issues/new?labels=bug",
       },
              "TIMEOUT": 4000,
       "plugins":{
              "DEBUG": false,
         "es": {
              "NATIVE_TRANSITION": false
           "enable": true,
           "askEnable": false,
           "host": "g1.data.duniter.fr",
           "port": "443"
         }
       }
       }
     },
     },
     
     (...)
     (...)
     "dev": {
     "dev": {
            "APP_CONFIG": {
         "cacheTimeMs": 60000,
              "DUNITER_NODE": "localhost:9201",
         "fallbackLanguage": "fr-FR",
              "TIMEOUT": 4000,
         "defaultLanguage": "fr-FR",
              "DEBUG": false,
         "rememberMe": true,
              "NATIVE_TRANSITION": true
         "showUDHistory": false,
         "timeout": 6000,
         "timeWarningExpireMembership": 5184000,
         "timeWarningExpire": 7776000,
         "useLocalStorage": true,
         "useRelative": true,
         "initPhase": false,
         "expertMode": false,
         "decimalCount": 2,
         "helptip": {
           "enable": true,
         },
         "node": {
           "host": "localhost",
           "port": "9600"
         },
         "plugins":{
           "es": {
             "enable": false
           }
           }
         }
         }
       },
}
}
```
```


Nous utiliserons la configuration "dev", pour utiliser votre noeud Duniter.
Nous utiliserons la configuration "dev", pour utiliser votre noeud Duniter.
Pour activer cette configuration, lancez la commande :

Modifiez les valeurs `host` et `port` du profil de configuration `dev`, afin qu'elles correspondent à votre noeud Duniter :

```json
  "dev: {
  ...
         "node": {
           "host": "localhost",
           "port": "9600"
         },
  ...
```

Désactivez le plugin "es" (utilisé pour Cesium+) :

```json
  "dev: {
  ...
         "plugins":{
           "es": {
             "enable": false
           }
         }
  ...
```

Pour activer cette configuration, lancez maintenant la commande :


```bash
```bash
 gulp default --env dev
 gulp config --env dev
```
```


```bash
```bash
[17:32:34] Using gulpfile ~/git/duniter/cesium/gulpfile.js
[17:32:34] Using gulpfile (...)/cesium/gulpfile.js
[17:32:34] Starting 'sass'...
[17:32:34] Starting 'config'...
[17:32:34] Starting 'config'...
[17:32:34] Building `www/js/config.js` for `dev` environment...
[17:32:34] Building `www/js/config.js` for `dev` environment...
[17:32:34] Finished 'config' after 71 ms
[17:32:36] Finished 'config' after 10 μs
[17:32:36] Finished 'sass' after 1.2 s
[17:32:36] Starting 'default'...
[17:32:36] Finished 'default' after 10 μs
```
```


> Cette commande sera à relancer à cachune de vos modifications du fichier `app/config`.

Cesium est maintenant configuré pour utiliser votre noeud Duniter local.
Cesium est maintenant configuré pour utiliser votre noeud Duniter local.


### Lancer Cesium (mode web)
### Lancer Cesium (mode web)


Moment fatidique ! Il ne vous reste plus qu'à lancer l'application (en mode web) pour savoir si tout s'est bien passé et que vous êtes prêts pour la suite.
Il ne vous reste plus qu'à lancer l'application (en mode web) pour savoir si tout s'est bien passé et que vous êtes prêts pour la suite.

Lancez la commande suivante : 
Lancez la commande suivante : 


```bash
```bash
ionic serve
npm start
```
```


 > Alternative : `ionic serve`

Une fois terminée, la commande affiche : 
Une fois terminée, la commande affiche : 


```bash
```bash
@@ -262,8 +315,11 @@ Ionic server commands, enter:


ionic $ 
ionic $ 
```
```

Vous pouvez ouvrir un navigateur web à l'adresse suivante : http://localhost:8100
Vous pouvez ouvrir un navigateur web à l'adresse suivante : http://localhost:8100
Vous verrez la page d'accueil de Cesium.
Vous devriez y voir la page d'accueil de Cesium. 
 
Bravo, vous avez une installation de Cesium opérationnelle !


### Documentation
### Documentation


@@ -283,39 +339,49 @@ Chercher et répérer dans le code :
* les controllers (JS)  : www/js/controllers
* les controllers (JS)  : www/js/controllers
* les services (JS)  : www/js/services
* les services (JS)  : www/js/services


<img src="./img/a5078db3abdf71c87f245e948ce94a181b0e0f37.png" width="690" height="369">


### Aller plus loin dans le code
### Aller plus loin dans le code


Cesium s'appuie sur AngularJS. D'excellentes documentations sont présentes sur le web.
Cesium s'appuie sur AngularJS. D'excellentes documentations sont présentes sur le web.


__Note :__ La version d'AngularJS utilisée est une 1.x : la 2.x change complètement l'approche du code... La suite nous dira si Cesium passera à la version 2.
__Note :__ La version d'AngularJS utilisée est une 1.x. Les 2.x et supérieure changent complètement et impose une refonte complète... Cette refonte est prévue d'ici 2019, dans une version 2 de Cesium.


## Niveau V : Debuggage
## Niveau V : Debuggage


### Sous Chrome
### Sous Chrome


Ouvrir l'application dans Chrome à l'adresse http://localhost:8100
#### Ouvrir l'explorateur de sources

Ouvrez l'application dans Chrome à l'adresse http://localhost:8100


Ouvrir la console de développeur : "Option > Plus d'outils > Outils de développement"
Ouvrez les outils de développement :
 * Menu `Option > Plus d'outils > Outils de développement`
 * ou par le raccourcis clavier : `Ctrl + Maj + i`


Dans l'explorateur de fichier javascript : 
#### Débugger la certification d'un utilisateur


 * Chercher et visualisé le fichier "js/controllers/wot-controllers.js"
Ouvrez l'explorateur de source, puis cherchez le fichier `dist/dist_js/app/controllers/wot-controllers.js`.
 * Chercher la méthode "certifyIdentity()"
 * Placer un point d'arrêt.


Dans l'application web : 
Recherchez la méthode `$scope.certify()`, et placez y un point d'arrêt.


 * Dans le menu de gauche, cliquer sur "Annuaire";
Naviguez dans l'application Cesium de la manière suivante : 
 * Recherche un utilisateur;

 * Cliquer sur l'utilisateur pour visualiser son identité
 * Cliquez dans le menu (à gauche) `Annuaire`;
 * Cliquer sur le bouton "Certifier"
 * Recherche un utilisateur, puis visualiser son identité;
 * Dans `Certification reçues`, cliquez sur le bouton `Certifier`;
 * Vérifier que la console s'arrête sur le point d'arrêt.
 * Vérifier que la console s'arrête sur le point d'arrêt.


Pour découvrir le code, il est intéressant
<img src="./img/eca671a6d24b8e11566cfcca11b65e6c9c9c370c.png" width="690" height="223">

Découvrez le code en déroulant l'action pas à pas.

> Utiliser les touches de `F9` à `F11`, pour rentrer dans une méthode (F11), avancer pas à pas (F10) ou jusqu'au prochain point d'arrêt (F9), etc.



## La Suite ?!
## La Suite ?!


Vous pouvez maintenant poursuivre avec les niveaux qui suivent.
Vous pouvez maintenant poursuivre avec les niveaux qui suivent. Nous y verrons comment modifier un écran de Cesium.
Nous y verrons comment modifier un écran de Cesium.


[Voir la suite ici >>](./development_tutorial-02.md)
[Voir la suite ici >>](./development_tutorial-02.md)
Original line number Original line Diff line number Diff line
@@ -7,30 +7,24 @@ en les modifiant afin d'améliorer un écran de Cesium.


## Prérequis
## Prérequis


### Connaitre les fonctionnalités
Avant de faire ce tutoriel, vous devez :
  
  
Il nécessite que vous connaissiez déjà l'outil Cesium.
 - Connaitre les fonctionnalités de Cesium. Si ce n'est pas le cas, reportez vous à [la vidéo de présentation générale des fonctionnalités](https://www.youtube.com/watch?v=FQzGIzJf9Nw&list=PLr7acQJbh5rzgkXOrCws2bELR8TNRIuv0&index=6) (RML7) et à celle détaillant les nouveautés (RML8 - lien à venir)
Si ce n'est pas le cas, reportez vous à [la vidéo de présentation générale des fonctionnalités](https://www.youtube.com/watch?v=FQzGIzJf9Nw&list=PLr7acQJbh5rzgkXOrCws2bELR8TNRIuv0&index=6) (RML7) et à celle détaillant les nouveautés (RML8 - lien à venir)
 - Avoir suivi le 1er tutoriel de mise en place de l'environnement [jusqu'au niveau III](https://github.com/duniter/cesium/blob/master/doc/fr/development_tutorial.md)

### Avoir atteint le niveau III : Mise en place de l'environnement

Pour mettre en place votre environnement de développement, suivez le [1er tutoriel de mise en place de l'environnement](https://github.com/duniter/cesium/blob/master/doc/fr/development_tutorial.md) (au moins jusqu'au niveau III)


## Niveau VI : Afficher un paramètre monétaire manquant
## Niveau VI : Afficher un paramètre monétaire manquant


__Objectif :__ Dans ce niveau, l'objectif est d'afficher dans la page [`Monnaie`](http://cesium.duniter.fr/#/app/currency/view/lg/) le paramètre monétaire `stepMax`.
__Objectif :__ Dans ce niveau, l'objectif est d'afficher dans la page [`Monnaie`](http://g1.duniter.fr/#/app/currency/view/lg/) le paramètre monétaire `stepMax`.


> Pour rappel, `stepMax` est la distance maximale entre un membre et un postulant, pour que ce dernier puisse rentrer dans la toile de confiance.
> Pour rappel, `stepMax` est la distance maximale entre un membre et un postulant, pour que ce dernier puisse rentrer dans la toile de confiance.


### Modifier le template HTML
### Modifier le template HTML


Ouvrez le fichier de template `/www/templates/currency/tabs/view_parameters.html`.
Ouvrez le fichier de template `/www/templates/currency/items_parameters.html`.


Ajouter un nouvel élément dans la liste des paramètres, c'est à dire un nouveau tag `<ion-item>`, sous le tag `<ion-list>` : 
Ajouter un nouvel élément dans la liste des paramètres, c'est à dire un nouveau tag `<ion-item>`, en dessous les autres tag du même nom : 


```html
```html
 <ion-list>

   (...)
   (...)


   <ion-item class="item-icon-left">
   <ion-item class="item-icon-left">
@@ -38,13 +32,11 @@ Ajouter un nouvel élément dans la liste des paramètres, c'est à dire un nouv
     <span translate>CURRENCY.VIEW.STEP_MAX</span>
     <span translate>CURRENCY.VIEW.STEP_MAX</span>
     <span class="badge badge-stable">{{stepMax}}</span>
     <span class="badge badge-stable">{{stepMax}}</span>
   </ion-item>
   </ion-item>

 </ion-list>
```
```


Si vous rafraichissez la page `Monnaie` de votre navigateur, vous devriez observer la modification :
Si vous rafraichissez la page `Monnaie` de votre navigateur, vous devriez observer la modification :


<img src="https://forum.duniter.org/uploads/default/original/2X/1/19a637b1fa847aa5bbb18565737e9e5e28729221.jpg" width="431" height="97">
<img src="./img/19a637b1fa847aa5bbb18565737e9e5e28729221.jpg" width="431" height="97">


### Internationliser un libellé
### Internationliser un libellé


@@ -77,7 +69,7 @@ N'oubliez pas **d'ajouter une virgule** sur la ligne qui précéde...


Refarichissez la page de votre navigateur : la clef a bien été traduite ! 
Refarichissez la page de votre navigateur : la clef a bien été traduite ! 


<img src="https://forum.duniter.org/uploads/default/original/2X/6/6bd04622dd2eb59f6d716ae9e2f114276e4ca35a.jpg" width="690" height="116">
<img src="./img/6bd04622dd2eb59f6d716ae9e2f114276e4ca35a.jpg" width="690" height="116">


Recommencez l'opération dans les **autres fichiers de traduction** présents dans `www/i18n` : 
Recommencez l'opération dans les **autres fichiers de traduction** présents dans `www/i18n` : 


@@ -97,7 +89,7 @@ Il ne reste plus qu'à afficher dynamiquement la valeur de notre paramètre `ste
Ouvrez le controlleur `CurrencyViewController` présent dans le fichier `www/js/controllers/currency-controllers.js`
Ouvrez le controlleur `CurrencyViewController` présent dans le fichier `www/js/controllers/currency-controllers.js`
Ce controlleur fait déjà un appel à l'API Duniter [`/blockchain/parameters`](http://cgeek.fr:9330/blockchain/parameters).
Ce controlleur fait déjà un appel à l'API Duniter [`/blockchain/parameters`](http://cgeek.fr:9330/blockchain/parameters).


Identifiez la fonction `loadParameters()`.
Identifiez la fonction `load()`.
Modifiez le code de retour de l'appel `/blockchain/parameters`, pour stocker la valeur `stepMax` dans le `$scope` : 
Modifiez le code de retour de l'appel `/blockchain/parameters`, pour stocker la valeur `stepMax` dans le `$scope` : 


```
```
@@ -107,15 +99,13 @@ function CurrencyViewController($scope, $q, $translate, $timeout, BMA, UIUtils,
  $scope.stepMax = 0;
  $scope.stepMax = 0;
  (...)
  (...)


  $scope.loadParameter = function() {
  $scope.load = function() {
    if (!$scope.node) {
    (...)
      return;
    
    }
    var M;
    return $q.all([
    return $q.all([


    // Appel de /blockchain/parameters sur le noeud Duniter
      // Get the currency parameters
        $scope.node.blockchain.parameters() 
      BMA.node.blockchain.parameters() 
       .then(function(json){
       .then(function(json){
          $scope.currency = json.currency;
          $scope.currency = json.currency;
          (...)
          (...)
@@ -130,30 +120,51 @@ function CurrencyViewController($scope, $q, $translate, $timeout, BMA, UIUtils,


Votre navigateur doit maintenant afficher : 
Votre navigateur doit maintenant afficher : 


<img src="https://forum.duniter.org/uploads/default/original/2X/3/3df8cbd2133ea9e9a28855f4b50413846fdf292c.jpg" width="519" height="85">
<img src="./img/3df8cbd2133ea9e9a28855f4b50413846fdf292c.jpg" width="519" height="85">


Bravo, vous savez maintenant afficher de nouvelle valeurs dans les écrans de Cesium !
Bravo, vous savez maintenant afficher de nouvelle valeurs dans les écrans de Cesium !


### Devenir contributeur officiel > faire `pull request`
## Niveau VII : Publier vos modifications

__Objectif :__  Devenir contributeur officiel, en publiant votre code !


La modification que vous venez de faire correspond en réalité au [ticket gihub #209](https://github.com/duniter/cesium/issues/209).
### Faire un `pull request`

Si vous n'avez jamais utilisé git sur votre machine courante, il va d'abord falloir que vous définissiez

1. votre adresse e-mail : `git config --global user.email "votre@email.xyz"`
2. vos nom et prénom : `git config --global user.name "Prénom NOM"`

La modification que vous venez de faire correspond en réalité au [ticket #209](https://git.duniter.org/clients/cesium-grp/cesium/issues/209).
Pour lui adjoindre votre modification, et ainsi **devenir officiellement contributeur** de Cesium : 
Pour lui adjoindre votre modification, et ainsi **devenir officiellement contributeur** de Cesium : 


 * Faites un `git commit` pour valider votre code;
 * Tapez la commande `git add` suivie des noms des fichiers que vous avez modifiés ou, plus simplement `git add *` pour ajouter au commit tous les fichiers modifiés.
 * Puis un `git push` pour envoyer sur votre repo GitHub.
 * Puis faites  un `git commit` pour valider votre code;
 * Dans github, connectez sur votre compte;
 * Enfin, faites un `git push` pour envoyer sur votre repo GitHub.
 * Ouvrez votre dépot `Cesium`
 * Dans GitLab, connectez-vous sur votre compte;
 * Cliquer sur `New pull request`, en indiquant dans le titre la référence au ticket : `#209`
 * Ouvrez votre dépot `Cesium` via le menu "Projets" > "Your projects" que vous trouverez tout en haut à gauche, dans la barre de navigation.
 * Dans le menu de gauche, rendez-vous dans "Merge requests", et cliquez sur le bouton "New merge request"
 * La plupart des champs étant déjà préremplis, il ne vous reste plus qu'à sélectionner la branche source (si vous n'avez pas changé de branche via la ligne de commande git, c'est "master")
 * Cliquez sur `Compare branches and continue`
 * Dans le titre la référence au ticket : `#209`


Votre contribution est maintenant visible par les développeurs de Cesium, qui pourront plus facilement intégrer votre code.
Votre contribution est maintenant visible par les développeurs de Cesium, qui pourront plus facilement intégrer votre code.


### Pour aller plus loin : d'autres variables ?  (optionnel)
> _Note :_ Depuis les RML7, ce ticket a été fermé. Vous pouvez donc continuer ce niveau, en ajoutant d'autres variables manquantes (cf paragraphe suivant), puis 
> publier vos modifications : la démarche du `pull request` reste la même.

## Niveau VIII : Modification libre


Pour vous faire la main sur les modifications dans Cesium, vous pouvez ajouter d'autres paramètres manquants de la monnaie, notamment ceux qui concernent la Blockchain  : `xpercent`, `percentRot`, `blocksRot`...
__Objectif :__  A vous maintenant d'ajouter les informations manquantes, et qui semblent intéressantes.

### Ajouter de nouvelles variables

Pour vous faire la main sur les modifications dans Cesium, vous pouvez ajouter d'autres paramètres manquants de la monnaie.
Par exemple, parmi ceux qui concernent la _BlockChain_ : `xpercent`, `percentRot`, `blocksRot`...


Vous trouverez leur définition dans la [documentation du protocole Duniter](https://github.com/duniter/duniter/blob/master/doc/Protocol.md#protocol-parameters).
Vous trouverez leur définition dans la [documentation du protocole Duniter](https://github.com/duniter/duniter/blob/master/doc/Protocol.md#protocol-parameters).


Astuce : pour séparer les différentes partie de l'écran, ajoutez un séparateur, c'est à dire un tag `<div>` avec la classe CSS `item item-divider` :
> _Astuce :_ pour séparer les différentes partie de l'écran, ajoutez un séparateur, c'est à dire un tag `<div>` avec la classe CSS `item item-divider` :


```html
```html
  <div class="item item-divider">
  <div class="item item-divider">
@@ -162,10 +173,8 @@ Astuce : pour séparer les différentes partie de l'écran, ajoutez un séparate
  <!-- paramètres relatifs à la blockchain -->
  <!-- paramètres relatifs à la blockchain -->
```
```


Autre modification que vous pouvez faire : la correction de la formule du DU (cf [ce ticket](https://github.com/duniter/cesium/issues/210)).

## La Suite ?!
## La Suite ?!


Vous pouvez maintenant poursuivre avec les niveaux qui suivent. Nous y verrons comment déployer et tester Cesium sur un téléphone Android.
Vous pouvez maintenant poursuivre avec les niveaux qui suivent. Nous y verrons comment compiler et déployer Cesium sur Android, puis comment ajouter un plugin, et même ajouter un graphique dynamique !


[Voir la suite ici >>](./development_tutorial-03.md)
[Voir la suite ici >>](./development_tutorial-03-android.md)
 No newline at end of file
 No newline at end of file
Original line number Original line Diff line number Diff line
## Introduction

Cet article est un tutoriel pour développer sur Cesium, pour compiler et tester l'application sous Android.

## Prérequis

Avant de faire ce tutoriel, vous devez : 

 - Avoir suivi les tutoriels sur Cesium [jusqu'au niveau VII](./development_tutorial-02.md)

## Niveau IX

### Objectif

L'objectif ici est d'installer les outils de base pour compiler et vérifier son bon fonctionnement sous Android. Vous y réaliserez : </p>

- l'installation du `JDK`
- l'installation du logiciel `Android Studio`
- l'installation de l'émulateur `KVM`
- l'installation du `NDK Android` (optionnel - sera nécessaire plus tard)

### Installation des logiciels

#### Installer JDK

Le JDK ou _Java Development Kit_ 

Vous pouvez la télécharger sur le site [d'Oracle](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html).

<img src="./img/fef4f4dfe7c2168cb27c9e7f5e399fd547ce774a.png" width="400">

En fonction de votre système d'exploitation, téléchargez correspondant.

Installez ensuite le fichier normalement, en suivant les étapes guidées.

#### Installer Android Studio

Vous trouverez tous les fichiers à l'adresse [AndroidStudio-Downloads](https://developer.android.com/studio/index.html#downloads)

Pour Windows télécharger le fichier sans SDK Android:

<img src="./img/3b8fa2f5c0465b13ae5ce74d49702e0c9f027866.png" width="690" height="237">

##### Sous Linux

Il vous suffit de décompresser le fichier ZIP, d'ouvrir un terminal dans ce dossier et de taper la commande:
```bash
./bin/studio.sh
```

##### Sous Windows et Mac OS

Installez l'exécutable que vous avez précédemment téléchargé.

##### Toutes machines confondues

A la fin de l'installation ou au premier lancement, Android Studio vous indiquera que vous ne possédez pas de SDK et vous proposera de l'installer :

- Si vous l'avez déjà installé vous pouvez indiqué où il se trouve.
- Sinon installez la version qu'il vous propose.


#### Installer NDK (optionnel)

> Le NDK est utilisé pour l'exécution de code sous C++, notamment la librairie de cryptographie NaCL.
> Cette étape est pour le moment optionnelle (pour les experts seulement).

Vous pouvez le télécharger à l'adresse : [ce site](https://developer.android.com/ndk/downloads/index.html)

Attention : n'installez pas la version 12 du NDK. Elle n'est pas encore stable.

Encore une fois téléchargé la bonne version, décompressez le fichier à coté de votre SDK.

Sous Android Studio allez dans le menu `File > Project Structure...`

<img src="./img/04e64b769cbd45b9d275cd5f81002a399a1a7684.png" width="300">

Une fenêtre comme celle-ci devrait s'ouvrir : 

<img src="./img/ceb75301172038e75f5c43b328dd7febd7bedc7e.png" width="450">

Renseignez le chemin d'installation du NDK.

#### Installer l'émulateur KVM (optionnel)

Pour Linux / Debian uniquement :

```bash
sudo apt-get install kvm qemu-kvm libvirt-bin bridge-utils virt-manager
sudo groupadd libvirtd
sudo adduser `id -un` libvirtd
```

##### En cas de problème...

If you get this error :
```
Cannot run program "/home/eis/android-sdks/build-tools/21.1.2/aapt": error=2, Aucun fichier ou dossier de ce type
```

Installez deux librairies de compatibilité supplémentaires (solution provenant de [ce post](http://stackoverflow.com/questions/22701405/aapt-ioexception-error-2-no-such-file-or-directory-why-cant-i-build-my-grad)) :                            
```bash
sudo apt-get install lib32stdc++6 lib32z1
```


## Niveau X: Lancement de l'application sous Android Studio

### Configuration du projet

Placez-vous dans le dossier dans lequel vous avez installé cesium via la commande `cd` suivie du chemin vers le répertoire idoine.

Vérifiez que vous utilisez bien la version de NodeJs dont Cesium a besoin à l'aide de la commande  

```
node --version
```

Si vous n'êtes pas sur une v6, utilisez la commande 

```
nvm use 12
```

Vous pouvez maintenant lancer l'instalaltion du projet Cesium pour Android :


```
ionic cordova prepare
```

Normalement, cette commande devrait initialiser (entre autre) un répertoire `platforms/android`.

> Cette commande peut prendre un moment à se terminer.

Lancez maintenant la compilation pour Android :

```
ionic build android
```

Lancez maintenant Android Studio. Vous devriez arriver sur cette fenêtre:

<img src="./img/33266d44fdbfd6c8b44e46a3664edafacaf0a316.png" width="500">

Sélectionnez "Open an existing Android Studio project" et indiquez le dossier vers `cesium/platforms/android`.

### Lancer l'application

Pour pouvoir lancer un émulateur, on va devoir en créer un.

Pour cela, allez dans `Tools` > `AVD Manager`, ou cliquez sur l'icone suivante :

<img src="./img/46e959d1e616e34972a41f4d120a1d4f5beb0955.png" width="690" height="42">

Une fenêtre va s'ouvrir et vous proposer de créer un "Virtual Device" suivez le logiciel.

Si vous avez un téléphone Android vous pouvez le mettre en mode développeur et le brancher si vous souhaitez voir l'application sur votre téléphone.

Puis, une fois l'émulateur créé, vous pouvez cliquer le bouton "Play" (<img src="./img/70b2ce88a5e7aa5754f6a771cf5efed3c639a27b.png" width="46" height="44">) pour lancer l'application.
Vous pouvez aussi utiliser l'icone (<img src="./img/b7c419b33a43f6a43c5b756074ee0c199072f7d1.png" width="40" height="44">) pour lancer l'application en mode debug.

Android Studio vous demandera sur quel appareil vous souhaitez lancer l'application, sélectionner l'émulateur ou le téléphone et laissez faire. 


## Niveau XI: Lancement de l'application par `ionic`

Vous pouvez maintenant utiliser directement l'outil `ionic` : 

 - Soit pour lancer votre application sur une téléphone connecté :
  ```bash
  ionic run android
  ```

 - Soit pour la lancer sur une émulateur :
  ```bash
  ionic emulate android
  ```

## La Suite ?!

Vous pouvez maintenant poursuivre avec les niveaux qui suivent. Nous y verrons comment ajouter un plugin à Cesium.

[Voir la suite ici >>](./development_tutorial-04-add_plugin.md)
 No newline at end of file

doc/fr/development_tutorial-03.md

deleted100644 → 0
+0 −78
Original line number Original line Diff line number Diff line
## Introduction

Cet article est un tutoriel pour développer sur Cesium+, en utilisant les capacités de l'ES API portée par Duniter4j.

## Prérequis

Avant de faire ce tutoriel, vous devez : 
 
 - Avoir suivi les tutoriels sur Cesium [jusqu'au niveau VII](./development_tutorial-02.md)
 - Avoir suivi le tutoriel sur Duniter4j [jusqu'au niveau V](https://github.com/duniter/duniter4j/blob/master/doc/fr/development_tutorial.md).

## Niveau IX

### Objectif

L'objectif ici est de réaliser un graphique représentant l'évolution de montant du dividende universel.

Quand l'utilisateur cliquera sur le champ "dividende universel" de la page suivante : http://cesium.duniter.fr/#/app/currency/view/lg/  

### Récupérer le code (tag rml8)

Passez sur la branche du code #rml8  : https://github.com/duniter/cesium/tree/rml8

### Démarrer Cesium

Lancer Cesium : 

```bash
cd cesium
ionic serve
```
### Démarrer le noeud ElasticSearch 

Démarrer votre noeud ES :  

```bash
cd duniter4j
mvn install -DskipTests
mvn install -Prun -pl duniter4j-elasticsearch 
```

### Ajout de la librairie D3.js

D3.js est une puissante librairie JS qui permet de faire de magnifiques graphiques.

Vous pouvez utiliser `bower` pour installer la dépendance.
Puis ajouter la librairie dans la page principale de l'application : `www/index.html` 

### Gestion du controlleur 

Editer le fichier `www/js/controllers.js`, et décommenter la ligne : 
```json
   (...)
   'cesium.currency-charts.controllers',
   (...)
```

Editez le fichier `www/js/controllers/currency-charts-controllers.js`.

A vous de jouer ! Il faut : 

- Remplir la requete POST vers le noeud ES sur l'index `/test_net/block/_search`; cf méthode `$scope.loadUds()';
- Traiter le retour de la requête, pour la transformer dans le format attendu par D3.js.

### Template

Editez le template HTML, dans le fichier `www/templates/currency/charts/ud.html`

Regardez la documentation D3.js pour savoir comment faire la suite !

## La suite ?

Si vous avez réussi ce niveau, vous êtes vraiment un contributeur expert de Cesium !

Il ne vous reste qu'à publier le résultat ! ;) 

- sur le forum duniter,
- ou mieux via un `pull request` sur github.
 No newline at end of file

doc/fr/development_tutorial.md

deleted100644 → 0
+0 −385
Original line number Original line Diff line number Diff line
## Introduction

Cet article est un tutoriel d'initiation au code source du logiciel Cesium. Celui-ci vous permettra, à travers une succession d'étapes, d'accéder à la maîtrise des outils et méthodes utilisés quotidiennement par les développeurs de Cesium pour créer et modifier le logiciel.

A la fin de ce tutoriel, vous serez donc *capable de modifier le logiciel*. 

## Niveau I : récupérer le code source

Ce premier niveau consiste à créer *votre propre version* des sources du logiciel et de récupérer cette copie sur votre ordinateur. Vous y produirez : 

* votre propre compte *GitHub*
* votre propre version du logiciel, votre *fork*
* une copie locale des fichiers de code source provenant de votre *fork*

### Créez un compte GitHub

> Si vous disposez déjà d'un compte GitHub, vous pouvez passer cette étape.

Rendez-vous sur https://github.com (site en anglais). Renseigner les 3 champs proposés :

* Nom d'utilisateur
* E-mail
* Mot de passe

<img src="https://forum.duniter.org/uploads/default/original/1X/13ade346327b73bbf1acc97027af147eeb4e9089.png" width="346" height="325">

Vous recevrez probablement un e-mail de confirmation qu'il vous faudra valider. Une fois cette étape passée, vous devriez disposer d'un compte GitHub .

### Forkez le dépôt principal

Rendez-vous à l'adresse https://github.com/duniter/cesium. Cliquez sur le bouton « Fork » en dans le coin supérieur droit de la page :

<img src="https://forum.duniter.org/uploads/default/original/1X/3b9228c664520496d6a7e86e3f9c4c438f111914.png" width="388" height="98">

### Installer Git

L'installation de Git dépend de votre système d'exploitation. Suivez simplement les indications présentes sur : https://git-scm.com/

### Cloner votre fork

A ce stade, vous êtes en mesure de récupérer votre version du code source (votre *fork*), afin de pouvoir travailler dessus.

#### Ouvrez Git en ligne de commande

Pour récupérer le code source, lancez Git en mode console.

* Sous Linux et MacOS, ouvrez tout simplement le Terminal
* Sous Windows lancez le programme *Git Bash* :

<img src="https://forum.duniter.org/uploads/default/original/1X/6fc638dc0a22d88da7e84dbf0371e69747767f78.png" width="432" height="80">

#### Clonez votre fork, en ligne de commande

Retournez sur la page web GitHub, puis trouvez le bouton « Clone or download » : 
Cliquez dessus, vous pourrez alors copier l'URL de clonage en cliquant sur l'icône de valise.

Vous n'avez plus qu'à retourner dans votre console Git et saisir : 

    git clone <coller l'URL copiée>

ce qui donne dans mon cas : 

```
git clone https://github.com/blavenie/cesium.git
Cloning into 'cesium'...
 (...)
Checking connectivity... done.
```

Si vous êtes arrivés à un comportement similaire, **bravo**, vous posséder désormais le code source Cesium !
 
## Niveau II : Compilation et lancement dans un navigateur

Ce second niveau vise à obtenir les outils de base pour exécuter le code source, et vérifier son bon fonctionnement. Vous y réaliserez : 

* l'installation du moteur d'exécution JavaScript *Node.js*
* la vérification du bon fonctionnement du code source *via* le lancement de l'application, en mode web.

Si l'application se lance, vous aurez dores et déjà un environnement entièrement **fonctionnel** !

### Installer Node.js

#### Sous Linux / MacOS

Installer Node.js est devenu extrêmement simple pour ces OS : un outil vous permet d'installer la version de Node.js que vous souhaitez, en changer quand vous voulez et sans conflit avec une version précédente : il s'agit de [nvm](https://github.com/creationix/nvm).

Vous pouvez installer nvm avec la commande suivante :

```bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.1/install.sh | bash
```

Fermez puis rouvrez votre terminal, comme indiqué. Puis, installez Node.js (choisissez la version 5) : 

```bash
nvm install 5
```

Vous aurez alors la dernière version de la branche 5.x de Node.js prête à l'emploi.

##### Outils de compilation

Installer les outils nécessaires pour la compilation.
```bash
sudo apt-get install build-essential
```

#### Sous Windows

Pour Windows, téléchargez la version 5 disponible sur le site officiel de Node.js : https://nodejs.org

Puis lancez l'installeur ainsi téléchargé.

### Installer les modules Node.js de Cesium

Cesium repose sur des librairies tierce pour fonctionner appelées *dépendances*, comme par exemple des librairies de compilation (gulp, bower, ionic).

Le fait d'avoir cloné les sources n'est en réalité pas suffisant pour lancer l'application. Nous devons obtenir le code des dépendances pour obtenir ainsi l'ensemble du code exécutable du programme. Pour ce faire, retournez dans la console Git et déplacez-vous dans le répertoire cloné : 

```bash
cd cesium
```

Puis, lancez le téléchargement et l'installation des modules Cesium à l'aide de la commande : 

```bash
npm install -g bower gulp ionic@1.7.16 cordova
```

Puis pour les dépendances non globales :

```bash
npm install
```

> Le processus d'installation peut prendre plusieurs minutes. En effet, il faut télécharger toutes les dépendances de Cesium.

Si tout s'est bien passé, vous devriez obtenir une fin d'arborescence dans la console, et l'invité de commande devrait vous avoir rendu la main : 

```bash
├── bower@1.7.9 
├─┬ gulp@3.9.1 
│ ├── archy@1.0.0 
│ ├─┬ chalk@1.1.3 
 (...)
│ ├─┬ through2@0.5.1 
│ │ ├── readable-stream@1.0.34 
│ │ └── xtend@3.0.0 
│ └─┬ vinyl@0.2.3 
│   └── clone-stats@0.0.1 
└── shelljs@0.3.0 


npm WARN cesium@0.0.1 No repository field.
npm WARN cesium@0.0.1 No license field.

user1@~$
```

> Il se peut que vous obteniez des messages `npm WARN [...]`. Rien de grave : comme le nom du message l'indique, il s'agit simplement d'un avertissement non bloquant pour la suite des événements.

Puis installer les dépendences via bower :

```bash
bower install
```

### Installer un IDE

Pour développer sous NodeJS, vous pouvez utiliser l'IDE de votre choix :

 * Par exemple Sublime Text (non libre) : https://www.sublimetext.com/
 * Autre possibilité : WebStorm (non libre mais fonctionnement très avancé).

### Installer Chrome et/ou Firefox

Pour débugger plus facilement le javascript Cesium, il est plus facile d'utiliser le navigateur Chrome

## Niveau III : maîtriser les commandes usuelles

Ce troisième niveau permet de découvrir les quelques (cinq) commandes que vous utiliserez tout le temps si vous développez Cesium. Vous y apprendrez : 

* à configurer Cesium, notamment le noeud Duniter qu'il utilisera (par défaut);
* à le lancer Cesium dans votre navigateur;

### Configurer Cesium

La configuration par défaut de notre environnement est visible dans le fichier `app/config.json`. Plusieurs profils y sont présents : `default`, `dev`, etc.

```json
{
   "default": {
       "cacheTimeMs": 60000,
       "fallbackLanguage": "en",
       "rememberMe": false,
       "showUDHistory": false,
       "timeout": 10000,
       "timeWarningExpireMembership": 5184000,
       "timeWarningExpire": 7776000,
       "useLocalStorage": true,
       "useRelative": true,
       "initPhase": false,
       "expertMode": false,
       "decimalCount": 4,
       "helptip": {
         "enable": true,
         "installDocUrl": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
       },
       "node": {
         "host": "cgeek.fr",
         "port": "9330"
       },
       "plugins":{
         "es": {
           "enable": true,
           "askEnable": false,
           "host": "data.duniter.fr",
           "port": "80"
         }
       }
     },
     
     (...)
     "dev": {
         "cacheTimeMs": 60000,
         "fallbackLanguage": "fr-FR",
         "defaultLanguage": "fr-FR",
         "rememberMe": true,
         "showUDHistory": false,
         "timeout": 6000,
         "timeWarningExpireMembership": 5184000,
         "timeWarningExpire": 7776000,
         "useLocalStorage": true,
         "useRelative": true,
         "initPhase": false,
         "expertMode": false,
         "decimalCount": 2,
         "helptip": {
           "enable": true,
         },
         "node": {
           "host": "localhost",
           "port": "9600"
         },
         "plugins":{
           "es": {
             "enable": false
           }
         }
       },
}
```

Nous utiliserons la configuration "dev", pour utiliser votre noeud Duniter.

Modifiez les valeurs `host` et `port` du profil de configuration `dev`, afin qu'elles correspondent à votre noeud Duniter :

```json
  "dev: {
  ...
         "node": {
           "host": "localhost",
           "port": "9600"
         },
  ...
```

Désactivez le plugin "es" (utilisé pour Cesium+) :

```json
  "dev: {
  ...
         "plugins":{
           "es": {
             "enable": false
           }
         }
  ...
```

Pour activer cette configuration, lancez maintenant la commande :

```bash
 gulp config --env dev
```

```bash
[17:32:34] Using gulpfile ~/git/duniter/cesium/gulpfile.js
[17:32:34] Starting 'config'...
[17:32:34] Building `www/js/config.js` for `dev` environment...
[17:32:36] Finished 'config' after 10 μs
```

> Cette commande sera à relancer à cachune de vos modifications du fichier `app/config`.

Cesium est maintenant configuré pour utiliser votre noeud Duniter local.

### Lancer Cesium (mode web)

Il ne vous reste plus qu'à lancer l'application pour savoir si tout s'est bien passé et que vous êtes prêts pour la suite.

Lancez la commande suivante : 

```bash
ionic serve
```

Une fois terminée, la commande affiche : 

```bash
Running live reload server: http://localhost:35729
Watching: 0=www/**/*, 1=!www/lib/**/*
Running dev server:  http://localhost:8100
Ionic server commands, enter:
  restart or r to restart the client app from the root
  goto or g and a url to have the app navigate to the given url
  consolelogs or c to enable/disable console log output
  serverlogs or s to enable/disable server log output
  quit or q to shutdown the server and exit

ionic $ 
```

Vous pouvez ouvrir un navigateur web à l'adresse suivante : http://localhost:8100
Vous devriez y voir la page d'accueil de Cesium. 
 
Bravo, vous avez une installation de Cesium opérationnelle !

### Documentation

Cesium utilise le framework Ionic, qui a une bonne documentation : http://ionicframework.com.

Consulter ce site pour en savoir plus.

## Niveau IV : Se repérer dans le code 

### Répérer les couches logicielles

Ouvrir votre IDE, et ouvrir le projet Cesium.

Chercher et répérer dans le code : 

* les templates HTML qui porte les IHM : www/templates
* les controllers (JS)  : www/js/controllers
* les services (JS)  : www/js/services

<img src="https://forum.duniter.org/uploads/default/original/2X/a/a5078db3abdf71c87f245e948ce94a181b0e0f37.png" width="690" height="369">