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
  • develop
  • feat/force-migration-check
  • feat/improve-network-scan
  • feature/android_api_19
  • feature/cordova-android-13
  • feature/encrypted_comment
  • feature/migrate-cordova-13
  • gitlab_migration_1
  • master
  • 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
  • Vivakvo-master-patch-80805
  • Vivakvo-master-patch-99327
  • dev
  • gitlab_migration_1
  • issue_4
  • issue_780
  • master
  • patch-1
  • patch-10
  • patch-11
  • patch-12
  • patch-13
  • patch-14
  • patch-15
  • patch-16
  • patch-17
  • patch-18
  • patch-19
  • patch-2
  • patch-21
  • patch-22
  • patch-23
  • patch-24
  • patch-25
  • patch-26
  • patch-3
  • patch-4
  • patch-5
  • patch-6
  • patch-7
  • patch-8
  • patch-9
  • rml8
  • undefined
  • 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
134 results
Show changes
737 files
+ 47408
236330
Compare changes
  • Side-by-side
  • Inline

Files

.bowerrc

deleted100644 → 0
+0 −3
Original line number Diff line number Diff line
{
  "directory": "www/lib"
}
+21 −16
Original line number Diff line number Diff line
# Specifies intentionally untracked files to ignore when using Git
# http://git-scm.com/docs/gitignore

/www/lib/ionic-material
/www/lib/robotodraft

/node_modules/

/platforms/*
/platforms/ios
/platforms/android
/resources/android/build/local.properties
/resources/android/build/Cesium.keystore
/resources/android/build/*.keystore
/resources/android/build/release-signing.properties
/plugins/
.idea/
.vscode/
.local/
.directory
/*.iml
/npm-debug.log
/package-lock.json
/yarn-error.log

/www/lib/*
!/www/lib/ionic
/www/js/config.js
/www/dist
/hooks/playstore-config.json
/dist/web
/dist/android
/dist/*.sha256

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

/scripts/sdkmanager.log

.directory
/www/js/config.js
/www/dist
/www/lib

# Generated CSS
/www/css/ionic.app.css
@@ -38,8 +43,8 @@
/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

/env.sh
/npm-debug.log
/package-lock.json
/Cesium.keystore
 No newline at end of file
.run/*
+94 −52
Original line number Diff line number Diff line
# ---------------------------------------------------------------
# Global
# ---------------------------------------------------------------

# default image
image: node:12

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

fast-build:
  stage: build
  image: $CI_REGISTRY_IMAGE
# ---------------------------------------------------------------
# Global variables
# ---------------------------------------------------------------

variables:
    CI_BUILD_IMAGE: $CI_REGISTRY_IMAGE/build:develop

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

.docker:
  image: docker:latest
  tags: [redshift]
  services:
    - docker:dind
  before_script:
    - mv /customCache/node_modules ./
    - cp -rf /customCache/www ./
    - cp -rf /customCache/hooks ./
    - 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:
    - node ./node_modules/gulp/bin/gulp build:web
    - yarn install
    - yarn run build:web
  after_script:
    - ls -la platforms/web/
    - du -csh platforms/web/
    - ls -la dist/web/
    - du -csh dist/web/
  artifacts:
    untracked: true
    paths:
      - platforms/web
      - dist/web
    expire_in: 60 minutes

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

failsafe-build:
  extends: .build
  stage: alt_build
  when: on_failure
  image: node:6
  script:
    - npm install
    - npm run postinstall
#    - node ./node_modules/gulp/bin/gulp config --env default_fr
    - node ./node_modules/gulp/bin/gulp build:web
  artifacts:
    untracked: true
    paths:
      - platforms/web
    expire_in: 60 minutes
  before_script:
    - yarn global add gulp
  only:
    - master
    - tags
docker-for-fast-build:
    - develop

docker:ci:
  extends: .docker
  stage: alt_build
  when: on_failure
  allow_failure: true
  tags:
    - doppler-docker
  image: docker:latest
  services:
    - docker:dind
  script:
    - echo 'FROM node:6' > Dockerfile
    - echo 'WORKDIR /customCache' >> Dockerfile
    # 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
    - echo 'RUN du -s `find . -maxdepth 1 | egrep -v "^\.$"`>/before.txt' >> Dockerfile
    - echo 'RUN npm install' >> Dockerfile
    - echo 'RUN npm run postinstall' >> Dockerfile
    - echo 'RUN du -s `find . -maxdepth 1 | egrep -v "^\.$"`>/after.txt' >> 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
    - echo "RUN diff /before.txt /after.txt || true" >> Dockerfile
    - docker login -u "gitlab-ci-token" -p "$CI_BUILD_TOKEN" $CI_REGISTRY
    - docker build --pull -t "$CI_REGISTRY_IMAGE" .
    - docker push "$CI_REGISTRY_IMAGE"
    # 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: publish
  image: node:6
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ls -la public || true
    - mv platforms/web/www public
    - mv dist/web/www public
  artifacts:
    untracked: true
    paths:
      - public
  only:
    - master

mirror:
  stage: publish
  stage: deploy
  image: liaohuqiu/rsync
  before_script:
    - eval $(ssh-agent -s)
@@ -89,22 +133,20 @@ mirror:
      [[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >
      ~/.ssh/config
  script:
    - mv platforms/web/www public
    - 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-web:
  stage: publish
  image: node:6
release:
  stage: deploy
  variables:
    GIT_STRATEGY: none
  script:
    - ls -la www || true
    - mv platforms/web/www www
    - mv dist/web/www www
  artifacts:
    untracked: true
    paths:
+4 −4
Original line number Diff line number Diff line
[submodule "cesium-desktop"]
	path = platforms/desktop
[submodule "dist/desktop"]
	path = dist/desktop
	url = git@git.duniter.org:clients/cesium-grp/cesium-desktop.git
[submodule "cesium-android"]
	path = platforms/android
[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 Diff line number Diff line
--install.ignore-engines true
+31 −73
Original line number Diff line number Diff line
FROM     ubuntu:16.04
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 \
    ANDROID_HOME=/opt/android-sdk-linux \
    NODE_VERSION=6.17.1 \
    NPM_VERSION=6.10.3 \
    IONIC_VERSION=1.7.16 \
    BOWER_VERSION=1.8.0 \
    CORDOVA_VERSION=9.0.0 \
    GRADLE_VERSION=4.1 \
    NDK_VERSION=r10e
    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 apt-get update &&  \
    apt-get install -y git wget curl unzip build-essential ruby ruby-dev ruby-ffi gcc make && \
    curl --retry 3 -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" && \
    tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 && \
    rm "node-v$NODE_VERSION-linux-x64.tar.gz" && \
    npm install -g npm@"$NPM_VERSION" && \
    npm install -g bower@"$BOWER_VERSION" cordova@"$CORDOVA_VERSION" ionic@"$IONIC_VERSION" && \
    npm cache clear --force

# install python-software-properties (so you can do add-apt-repository)
RUN apt-get update && apt-get install -y -q python-software-properties software-properties-common  && \
    add-apt-repository ppa:webupd8team/java -y && \
    echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
    apt-get update && apt-get -y install oracle-java8-installer

#ANDROID STUFF
RUN echo ANDROID_HOME="${ANDROID_HOME}" >> /etc/environment && \
    dpkg --add-architecture i386 && \
    apt-get update && \
    apt-get install -y --force-yes expect ant wget zipalign libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 qemu-kvm kmod && \
    apt-get clean && \
    apt-get autoclean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install Android SDK
RUN cd /opt && \
    wget --output-document=android-sdk.tgz --quiet http://dl.google.com/android/android-sdk_r24.4.1-linux.tgz && \
    tar xzf android-sdk.tgz && \
    rm -f android-sdk.tgz && \
    chown -R root. /opt

RUN cd /opt/ && \
  wget --output-document=android-ndk.zip --quiet  https://dl.google.com/android/repository/android-ndk-$NDK_VERSION-linux-x86_64.zip && \
  unzip android-ndk.zip && \
  rm android-ndk.zip && \
  chown -R root. /opt

# Install Gradle
RUN wget https://services.gradle.org/distributions/gradle-"$GRADLE_VERSION"-bin.zip && \
    mkdir /opt/gradle && \
    unzip -d /opt/gradle gradle-"$GRADLE_VERSION"-bin.zip && \
    rm -rf gradle-"$GRADLE_VERSION"-bin.zip

# Setup environment

ENV PATH ${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:/opt/tools:/opt/gradle/gradle-"$GRADLE_VERSION"/bin
RUN apk update && \
        apk add ca-certificates wget curl git && \
        update-ca-certificates && \
    apk add --update python make g++

# Install sdk elements
COPY resources/android/build/tools /opt/tools
RUN chmod u+x /opt/tools/*.sh
RUN ["/opt/tools/android-accept-licenses.sh", "android update sdk --all --no-ui --filter platform-tools,tools,build-tools-26.0.0,android-26,build-tools-25.0.0,android-25,extra-android-support,extra-android-m2repository,extra-google-m2repository"]
RUN unzip ${ANDROID_HOME}/temp/*.zip -d ${ANDROID_HOME}
# 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"

# Install source code
#RUN git config --global user.email "user.name@domain.com" && \
#    git config --global user.name "User Name" && \
RUN git clone git@git.duniter.org:clients/cesium-grp/cesium.git && \
    cd cesium && \
    npm install
# copy source tree
COPY ./ ./

# Restore cordova platforms
RUN cd cesium && \
    ionic state restore
RUN test -f package.json || git clone https://github.com/duniter/cesium.git && cd cesium

# TODO: Test First Build so that it will be faster later
##  ionic cordova build android --prod --no-interactive --release
# 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
WORKDIR /cesium
EXPOSE 8100 35729
CMD ["ionic", "serve"]
CMD ["yarn", "run", "start"]
+24 −84
Original line number Diff line number Diff line
@@ -2,12 +2,25 @@

# Cesium

 - [Unhosted webapp](https://unhosted.org) client for any [Duniter](https://duniter.org) crypto-currency.
 - Manage your wallet, certify your friends, and more ! 
 - [Web site](https://cesium.app)
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!

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)

## Install

### As a web extension (Firefox, Chrome)

 - Download the [latest extension release](https://github.com/duniter/cesium/releases/latest)
 
 - Drag/drop the file into your browser;
 
 - Confirm the installation.
 
 That's it! A new button is appeared, on the top right corner.
 
### On desktop computer

 - Download the [latest release](https://github.com/duniter/cesium/releases/latest)
@@ -27,85 +40,9 @@
    * Manual installation: download then install the `.apk` from your smartphone;
    * [Play Store](https://play.google.com/store/apps/details?id=fr.duniter.cesium);
 - iOS
    * Coming soon...;

### As a web site

#### First installation

Cesium can be easily installed on most web server : 

 - Download the [latest release](https://github.com/duniter/cesium/releases/latest) (file `cesium-vx.y.z-web.zip`); 
 - Unpack into an empty directory;
 - Configure the web server engine (e.g. apache, nginx):
    * Add a new virtual host, that use the directory as `web root`. 
    * Make sure the file `index.html` exist inside this directory.

#### Update to last version

On Linux distributions, an update script can be used to update your Cesium web site:
    * [App Store](https://apps.apple.com/us/app/cesium-%C4%9F1/id1471028018);

```
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 may need root permission to write files. If so just replace `| bash` with `| sudo bash`.

#### Changing default settings 

To change default configuration, on a Cesium web site:

  - 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](doc/configuration.md).
 
#### Yunohost package
    
@@ -118,11 +55,14 @@ A [Development Guide](doc/development_guide.md) is available to learn :
 - Development best practices.
 
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.

## Donate

To help developers with donation, use the [Cesium Team Ğ1 account](https://g1.duniter.fr#/app/wot/CitdnuQgZ45tNFCagay7Wh12gwwHM8VLej1sWmfHWnQX/) (public key: `CitdnuQgZ45tNFCagay7Wh12gwwHM8VLej1sWmfHWnQX`) 
To help developers with donation, use the [Cesium Team Ğ1 account](https://demo.cesium.app#/app/wot/CitdnuQgZ45tNFCagay7Wh12gwwHM8VLej1sWmfHWnQX/) (public key: `CitdnuQgZ45tNFCagay7Wh12gwwHM8VLej1sWmfHWnQX`) 

## License

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

Please read also our [privacy policy](./doc/privacy_policy.md).
 No newline at end of file
+107 −173
Original line number Diff line number Diff line
{
  "default": {
    "cacheTimeMs": 300000,
    "demo": false,
    "readonly": false,
    "fallbackLanguage": "en",
    "rememberMe": true,
    "showUDHistory": true,
    "timeout": 40000,
    "timeout": 30000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpire": 7776000,
    "minConsensusPeerCount": 10,
    "keepAuthIdle": 600,
    "useLocalStorage": true,
    "useRelative": false,
    "expertMode": false,
    "decimalCount": 2,
    "httpsMode": false,
    "shareBaseUrl": "https://g1.duniter.fr",
    "shareBaseUrl": "https://demo.cesium.app/",
    "helptip": {
      "enable": true,
      "installDocUrl": {
        "fr-FR": "https://duniter.org/fr/wiki/duniter/installer/",
        "en": "https://duniter.org/en/wiki/duniter/install/"
        "fr-FR": "https://duniter.fr/wiki/doc/installer/",
        "en": "https://duniter.org/wiki/doc/install/"
      }
    },
    "license": {
      "ca": "license/license_g1-ca",
      "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",
      "es-ES": "license/license_g1-es-ES"
    },
    "node": {
      "host": "g1.duniter.org",
      "port": 443
      "it-IT": "license/license_g1-it-IT",
      "pt-PT": "license/license_g1-pt-PT"
    },
    "feed": {
      "jsonFeed": {
        "ca": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-ca.json",
        "de-DE": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-de-DE.json",
        "en": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-en.json",
        "en-GB": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-en-GB.json",
        "eo-EO": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-eo-EO.json",
        "es-ES": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-es-ES.json",
        "fr-FR": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-fr-FR.json",
        "it-IT": "https://raw.githubusercontent.com/duniter/cesium/master/doc/feed/1.1/feed-it-IT.json",
        "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,
      "maxAgeInMonths": 3,
      "maxCount": 3
    },
    "fallbackNodes": [
      {
        "host": "g1.nordstrom.duniter.org",
        "port": 443
      },
      {
        "host": "g1.cgeek.fr",
        "host": "g1.e-is.pro",
        "port": 443
      },
      {
        "host": "g1.monnaielibreoccitanie.org",
        "host": "vit.fdn.org",
        "port": 443
      },
      {
        "host": "g1.le-sou.org",
        "port": 443
      },
      {
        "host": "g1.duniter.fr",
        "port": 443
      }
    ],
    "developers": [
      {"name": "Benoit Lavenier", "pubkey": "38MEAZN68Pz1DTvT3tqgxx4yQP6snJCQhPqEFxbDk4aE"}
    ],
    "plugins":{
      "es": {
        "enable": true,
        "askEnable": true,
        "useRemoteStorage": true,
        "host": "g1.data.duniter.fr",
        "port": 443,
        "fallbackNodes": [
          {
            "host": "g1.data.le-sou.org",
        "host": "g1.cgeek.fr",
        "port": 443
      },
      {
            "host": "g1.data.duniter.fr",
            "port": 443
          }
        ],
        "notifications": {
          "txSent": true,
          "txReceived": true,
          "certSent": true,
          "certReceived": true
        },
        "defaultCountry": "France"
      }
    }
  },

  "default_fr": {
    "cacheTimeMs": 300000,
    "fallbackLanguage": "fr",
    "rememberMe": true,
    "showUDHistory": true,
    "timeout": 300000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpire": 7776000,
    "keepAuthIdle": 600,
    "useLocalStorage": true,
    "useRelative": false,
    "expertMode": false,
    "decimalCount": 2,
    "httpsMode": false,
    "shareBaseUrl": "https://g1.duniter.fr",
    "helptip": {
      "enable": true,
      "installDocUrl": {
        "fr-FR": "https://duniter.org/fr/wiki/duniter/installer/",
        "en": "https://duniter.org/en/wiki/duniter/install/"
      }
    },
    "license": {
      "fr-FR": "license/license_g1-fr-FR",
      "en": "license/license_g1-en"
    },
    "node": {
      "host": "g1.duniter.fr",
        "host": "g1.mithril.re",
        "port": 443
      },
    "fallbackNodes": [
      {
        "host": "g1.duniter.fr",
        "host": "g1.duniter.org",
        "port": 443
      },
      {
        "host": "g1.monnaielibreoccitanie.org",
        "host": "g1.le-sou.org",
        "port": 443
      },
      {
        "host": "g1.le-sou.org",
        "host": "duniter.pini.fr",
        "port": 443
      },
      {
        "host": "duniter.normandie-libre.fr",
        "host": "g1.moul.re",
        "port": 443
      },
      {
        "host": "g1.duniter.org",
        "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":{
      "es": {
        "enable": true,
        "askEnable": true,
        "useRemoteStorage": true,
        "host": "g1.data.duniter.fr",
        "host": "g1.data.e-is.pro",
        "port": 443,
        "fallbackNodes": [
          {
            "host": "g1.data.le-sou.org",
            "host": "g1.data.presles.fr",
            "port": 443
          },
          {
            "host": "g1.data.duniter.fr",
            "port": 443
          }
        ],
        "notifications": {
          "txSent": true,
          "txReceived": true,
          "certSent": true,
          "certReceived": true
        },
        "defaultCountry": "France"
      }
    }
  },

  "le-sou": {
    "cacheTimeMs": 300000,
    "fallbackLanguage": "fr-FR",
    "defaultLanguage": "fr-FR",
    "rememberMe": true,
    "timeout": 30000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpire": 7776000,
    "keepAuthIdle": 600,
    "useLocalStorage": true,
    "useRelative": false,
    "expertMode": false,
    "decimalCount": 2,
    "httpsMode": false,
    "shareBaseUrl": "https://g1.le-sou.org",
    "helptip": {
      "enable": true,
      "installDocUrl": {
        "fr-FR": "https://www.le-sou.org/devenir-noeud/",
        "en": "https://duniter.org/en/wiki/duniter/install/"
      }
    },
    "license": {
      "fr-FR": "license/license_g1-fr-FR",
      "en": "license/license_g1-en"
    },
    "node": {
      "host": "g1.le-sou.org",
            "host": "g1.data.le-sou.org",
            "port": 443
          },
    "fallbackNodes": [
          {
        "host": "g1.duniter.org",
            "host": "g1.data.brussels.ovh",
            "port": 443
          },
          {
        "host": "g1.duniter.fr",
            "host": "g1.data.pini.fr",
            "port": 443
      }
    ],
    "plugins":{
      "es": {
        "enable": true,
        "askEnable": true,
        "useRemoteStorage": true,
        "host": "g1.data.le-sou.org",
        "port": 443,
        "fallbackNodes": [
          },
          {
            "host": "g1.data.le-sou.org",
            "host": "g1.data.mithril.re",
            "port": 443
          },
          {
            "host": "g1.data.duniter.fr",
            "host": "g1.data.e-is.pro",
            "port": 443
          }
        ],
@@ -231,24 +140,28 @@
    }
  },


  "g1-test": {
    "cacheTimeMs": 300000,
    "demo": false,
    "readonly": false,
    "fallbackLanguage": "en",
    "rememberMe": true,
    "timeout": 300000,
    "showUDHistory": true,
    "timeout": 30000,
    "timeWarningExpireMembership": 5184000,
    "timeWarningExpire": 7776000,
    "minConsensusPeerCount": -1,
    "useLocalStorage": true,
    "useRelative": false,
    "expertMode": true,
    "decimalCount": 2,
    "shareBaseUrl": "https://g1.duniter.fr",
    "httpsMode": false,
    "shareBaseUrl": "https://g1-test.cesium.app",
    "helptip": {
      "enable": false,
      "installDocUrl": {
        "fr-FR": "https://duniter.org/fr/wiki/duniter/installer/",
        "en": "https://github.com/duniter/duniter/blob/master/doc/install-a-node.md"
        "fr-FR": "https://duniter.fr/wiki/doc/installer/",
        "en": "https://duniter.org/wiki/doc/install/"
      }
    },
    "node": {
@@ -257,16 +170,26 @@
    },
    "fallbackNodes": [
      {
        "host": "g1-test.cgeek.fr",
        "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":{
      "es": {
        "enable": true,
        "askEnable": true,
        "useRemoteStorage": true,
        "host": "g1-test.data.duniter.fr",
        "enable": false,
        "askEnable": false,
        "useRemoteStorage": false,
        "host": "g1-test.data.e-is.pro",
        "port": 443,
        "notifications": {
          "txSent": true,
@@ -281,6 +204,8 @@

  "dev": {
    "cacheTimeMs": 300000,
    "demo": false,
    "readonly": false,
    "fallbackLanguage": "fr-FR",
    "defaultLanguage": "fr-FR",
    "rememberMe": true,
@@ -295,16 +220,21 @@
    "helptip": {
      "enable": false,
      "installDocUrl": {
        "fr-FR": "https://duniter.org/fr/wiki/duniter/installer/",
        "fr-FR": "https://duniter.fr/wiki/doc/installer/",
        "en": "https://duniter.org/en/wiki/duniter/install/"
      }
    },
    "license": {
      "en": "license/license_g1-en",
      "fr-FR": "license/license_g1-fr-FR",
      "en": "license/license_g1-en"
      "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": {
      "host": "g1.duniter.fr",
      "host": "g1.e-is.pro",
      "port": 443
    },
    "fallbackNodes": [{
@@ -312,7 +242,7 @@
        "port": 443
      },
      {
        "host": "g1.duniter.fr",
        "host": "g1.e-is.pro",
        "port": 443
      }
    ],
@@ -329,7 +259,7 @@
            "port": 443
          },
          {
            "host": "g1.data.duniter.fr",
            "host": "g1.data.e-is.pro",
            "port": 443
          }
        ],
@@ -344,9 +274,6 @@
      "graph": {
        "enable": true
      },
      "neo4j": {
        "enable": true
      },
      "rml9": {
        "enable": true
      }
@@ -355,6 +282,8 @@

  "dev_g1": {
    "cacheTimeMs": 300000,
    "demo": false,
    "readonly": false,
    "fallbackLanguage": "en",
    "rememberMe": true,
    "showUDHistory": true,
@@ -369,11 +298,19 @@
    "httpsMode": false,
    "helptip": {
      "enable": false,
      "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/en/wiki/duniter/install/"
      }
    },
    "license": {
      "fr-FR": "license/license_g1-fr-FR.txt",
      "en": "license/license_g1-en.txt"
      "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": {
      "host": "g1.duniter.org",
@@ -391,9 +328,6 @@
      "graph": {
        "enable": true
      },
      "neo4j": {
        "enable": true
      },
      "rml9": {
        "enable": true
      }

bower.json

deleted100644 → 0
+0 −35
Original line number Diff line number Diff line
{
  "name": "cesium",
  "private": "true",
  "devDependencies": {
    "ionic": "driftyco/ionic-bower#1.3.5",
    "ionic-material": "0.4.2"
  },
  "dependencies": {
    "angular-messages": "1.3.13",
    "robotodraft": "1.1.0",
    "angular-moment": "^0.10.3",
    "angular-animate": "1.5.3",
    "angular-sanitize": "1.5.3",
    "angular": "1.5.3",
    "angular-bind-notifier": "^1.1.7",
    "angular-image-crop": "^2.0.0",
    "ng-idle": "^1.3.2",
    "chart.js": "chartjs#^2.6.0",
    "Leaflet.awesome-markers": "^2.0.2",
    "leaflet-search": "^2.7.2",
    "angular-leaflet-directive": "angular-leaflet#^0.10.0",
    "Leaflet.EasyButton": "~1.3.2",
    "leaflet.loading": "Leaflet.loading#^0.1.24",
    "ui-leaflet": "^2.0.0",
    "leaflet.markercluster": "0.5",
    "Leaflet.FeatureGroup.SubGroup": "0.1.2",
    "ion-digit-keyboard": "skol-pro/ion-digit-keyboard"
  },
  "resolutions": {
    "angular": "1.5.3",
    "ionic": "1.3.5",
    "angular-animate": "1.5.3",
    "angular-sanitize": "1.5.3"
  }
}
+63 −27
Original line number Diff line number Diff line
<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="104012" id="fr.duniter.cesium" ios-CFBundleIdentifier="org.duniter.cesium" version="1.4.12" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<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">
    <name>Cesium</name>
    <description>
    An simple App for Duniter wallet
      Cesium Wallet for Ğ1 libre currency
    </description>
    <author email="contact@e-is.pro">
      E-IS PRO
@@ -15,41 +15,61 @@
    <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" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="4000" />
    <preference name="SplashScreenDelay" value="2500" />
    <preference name="KeyboardDisplayRequiresUserAction" value="false" />
    <preference name="KeyboardResizeMode" value="ionic" />
    <preference name="xwalkVersion" value="19" />
    <preference name="xwalkMultipleApk" value="false" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="android-targetSdkVersion" value="28" />
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="StatusBarBackgroundColor" value="#000" />
    <preference name="StatusBarStyle" value="lightcontent" />
    <allow-navigation href="*" />
    <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">
        <param name="ios-package" onload="true" value="CDVStatusBar" />
    </feature>
    <feature name="Device">
        <param name="android-package" onload="true" value="org.apache.cordova.device.Device" />
    </feature>
    <feature name="MiniSodium">
        <param name="android-package" onload="true" value="me.lockate.plugins.MiniSodium" />
    <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">
        <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="mdpi" src="resources/android/icon/drawable-mdpi-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="xxhdpi" src="resources/android/icon/drawable-xxhdpi-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-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
@@ -62,6 +82,9 @@
        <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-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 name="ios">
        <preference name="BackupWebStorage" value="local" />
@@ -109,27 +132,40 @@
        <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>
    <engine name="android" spec="^6.4.0" />
    <engine name="ios" spec="^5.1.0-dev" />
    <plugin name="cordova-plugin-camera" spec="^2.4.1" />
    <plugin name="cordova-plugin-console" spec="^1.0.7" />
    <plugin name="cordova-plugin-device" spec="^1.1.6" />
    <plugin name="cordova-plugin-dialogs" spec="^1.3.3" />
    <plugin name="cordova-plugin-minisodium" spec="^1.0.1" />
    <plugin name="cordova-plugin-secure-storage" spec="^2.6.8" />
    <plugin name="cordova-plugin-splashscreen" spec="^3.2.2" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.2" />
    <plugin name="cordova-plugin-vibration" spec="^2.1.5" />
    <plugin name="cordova-plugin-camera" spec="^4.1.0">
        <variable name="CAMERA_USAGE_DESCRIPTION" value="Add picture to the user profile" />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Take a picture for the user profile" />
        <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-whitelist" spec="^1.3.2" />
    <plugin name="cordova-plugin-x-toast" spec="^2.6.0" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
    <plugin name="cordova-plugin-minisodium" spec="https://github.com/E-IS/cordova-plugin-minisodium.git" />
    <plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/phonegap/phonegap-plugin-barcodescanner.git">
        <variable name="CAMERA_USAGE_DESCRIPTION" value="Scan QRCode" />
    <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>
+1 −0
Original line number Diff line number Diff line
Subproject commit 17788c85b43b1fa75287a80454349948068cc457
+1 −0
Original line number Diff line number Diff line
Subproject commit 7f899bf2139dd7238840019d4365377341171f6d
Original line number Diff line number Diff line
# Android Builds
# Build Cesium for Android

Cesium can be build as Android App.
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.

@@ -16,9 +16,9 @@ After that you should be able to start the application using `npm start`, and to

You can choose to install
 
- on Linux, install OpenJDK 8:
- on Linux, install OpenJDK 11:
 
  * ``sudo apt-get install openjdk-8-jdk``
  * ``sudo apt-get install openjdk-11-jdk``
    
- or Oracle JDK 8 (all platforms supported):
  

doc/build_desktop.md

0 → 100644
+7 −0
Original line number 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.
Original line number Diff line number Diff line
# Cesium docker image

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

## Build

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

or with interactive bash 

```bash
 sudo docker build . -ti cesium/release bash
 docker build . -t cesium/release
```

## Run

```bash
 sudo docker run -ti --net host -p 8100:8100 -p 35729:35729 -v ~/.gradle:/root/.gradle -v \$PWD:/cesium:rw --privileged cesium/release
 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
Original line number Diff line number Diff line
# iOS Builds
# Build Cesium for iOS

Cesium can be build as desktop application for iOS. .

@@ -60,7 +60,7 @@ sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
## Install Node JS

1. Install NVM (node.js version manager) :
2. Install node.js v5  
2. Install node.js 16
3. Install common node.js dependencies
 
```bash
@@ -70,7 +70,7 @@ export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm

# Node.js
nvm install 6
nvm install 16

# node-pre-gyp
npm install -g nw-gyp node-pre-gyp
@@ -82,7 +82,7 @@ npm install -g nw-gyp node-pre-gyp

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

3. Install project dependencies :

doc/build_ubuntu.md

deleted100644 → 0
+0 −109
Original line number Diff line number Diff line
# Ubuntu Builds

Cesium can be build as desktop application for Ubuntu, or as App on Ubuntu phone. Such builds use cross-architecture [click targets](https://developer.ubuntu.com/en/phone/apps/sdk/tutorials/click-targets-and-device-kits/) and the specific Apache Cordova platform `ubuntu`.

## 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 Ubuntu SDK 

Source documentation [here](https://developer.ubuntu.com/en/phone/platform/sdk/installing-the-sdk/) and [here](https://cordova.apache.org/docs/en/latest/guide/platforms/ubuntu/index.html)

Install the SDK :

```bash
sudo add-apt-repository ppa:ubuntu-sdk-team/ppa
sudo apt update
sudo apt install ubuntu-sdk
```

Install "click" packaging tools:

```bash
sudo apt-get install click cmake libicu-dev pkg-config devscripts qtbase5-dev qtchooser qtdeclarative5-dev qtfeedback5-dev qtlocation5-dev qtmultimedia5-dev qtpim5-dev libqt5sensors5-dev qtsystems5-dev 

```
> Alternatively (not tested): 
> `sudo click chroot -a armhf -f ubuntu-sdk-15.04 install cmake libicu-dev:armhf pkg-config qtbase5-dev:armhf qtchooser qtdeclarative5-dev:armhf qtfeedback5-dev:armhf qtlocation5-dev:armhf qtmultimedia5-dev:armhf qtpim5-dev:armhf libqt5sensors5-dev:armhf qtsystems5-dev:armhf`



## Add Ubuntu platform to the Ionic project

```bash
cd cesium
ionic platform add ubuntu
```

## Running Ubuntu SDK IDE (optional)
 
To debug or configure the Ubuntu builds easily, you can use the Ubuntu SDK IDE.
 
```bash
ubuntu-sdk-ide
```

> Note: Before launching the IDE, make sure your user has the unix group `lxd`. If not, simply execute this command:
> `sudo usermod -a -G lxd mon_user`


## Build Debian package 

Cesium can be built on a `amd64` architecture. 

1. Generate the `click` source code:

```bash
cd cesium
ionic build ubuntu --release
```

2. Then build the project:
 
```bash
cd platforms/ubuntu/native/cesium
debuild
```

This should generate the `.deb` in directory `<cesium>/platforms/ubuntu/native`. 

> This step will required a valid (and installed) GPG key, to sign the `.deb` file.
> The key should match the `author` field of the file `<cesium>/config.xml`.
> To be able to your own GPG key, change the author. 

### Build for Ubuntu Phone

Cesium can be built on a `armhf` architecture.

Install `armhf` build platform:

```bash
sudo click chroot -a armhf -f ubuntu-sdk-15.04 create
```

Then install some dependencies inside the `armhf` chroot:  
 
```bash
sudo click chroot -a armhf -f ubuntu-sdk-15.04 install cmake libicu-dev:armhf pkg-config qtbase5-dev:armhf qtchooser qtdeclarative5-dev:armhf qtfeedback5-dev:armhf qtlocation5-dev:armhf qtmultimedia5-dev:armhf qtpim5-dev:armhf libqt5sensors5-dev:armhf qtsystems5-dev:armhf 
```

Build the phone application  

```bash
cd cesium
ionic build ubuntu --device
```

> To test your application on phone, execute :
> `ionic run ubuntu --device`



## Publishing to Ubuntu App Store

Follow steps on https://developer.ubuntu.com/en/publish/
 No newline at end of file

doc/build_web.md

0 → 100644
+26 −0
Original line number 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 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
Original line number Diff line number Diff line
# Version v1.2.10

## Settings
- If Duniter node is down, settings cannot be stored locally - fix [#788](https://git.duniter.org/clients/cesium-grp/cesium/issues/788)
## All platforms

## My account
- Le nombre de notifications affiché est incorrect - fix [#745](https://git.duniter.org/clients/cesium-grp/cesium/issues/745)

## Cesium+ features

### Settings
- Allow to use Cesium+ Pod in version v1.1.3+
 No newline at end of file
- [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)
Original line number Diff line number Diff line
# Version v1.2.6

## WoT identity
- Fix JS error when browsing a identity (identity without certifications)
## All platforms

## My account
- Display a warn when distance rule failed - fix [#777](https://git.duniter.org/clients/cesium-grp/cesium/issues/777)
### WoT identity
- [fix] Fix JS error when browsing a identity (identity without certifications)

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

## Cesium+ features
### 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)

### Notifications
- Fix JS error when displaying a warning in the notifications popover
 No newline at end of file
### Cesium+ > Notifications

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

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

## My wallets
- Display the total balance of wallets
- Show the default (main) wallet 
- 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) 
### My operations

## Cesium+ features
- [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)

### Messages
- 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
### 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
Original line number Diff line number Diff line
# Version v1.3.0

## Desktop version
## Desktop

- Upgrade to NW.js v0.35.3
- Better Duniter configuration detection (keyring and node)
Original line number Diff line number Diff line
# Version v1.3.1

## Desktop version
## Desktop

- [enh] Display logs in terminal
- [enh] Add option `--debug` to show debug logs
+5 −0
Original line number 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 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
Original line number Diff line number Diff line
# Version v1.3.8

## All build
## 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)
+7 −0
Original line number 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 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 Diff line number Diff line
# Version v1.4.1

## Desktop

- [fix] Fix fullscreen mode, on desktop build
+12 −0
Original line number 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 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 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 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 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 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 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 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 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 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 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
Original line number Diff line number Diff line

# Deploy Cesium
# 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.

## Bash script
## Another Bash script  
 
This is a bash script example, that you can use to deploy the latest release.
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.
 
@@ -34,6 +126,7 @@ 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`
Original line number Diff line number Diff line
# Development Guide

## Prerequisite  
## In a post-it

To build Cesium, you will have to: 
```bash
# Install NodeJS v16
nvm use 16
npm install -g yarn 

  - Installing build tools:
```
 sudo apt-get install build-essential
```
# Clone and compile from source
git clone git@git.duniter.org:clients/cesium-grp/cesium.git
cd cesium
yarn

  - Installing [nvm](https://github.com/creationix/nvm)
```
  wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
# Run the App !
yarn run start
```

> Then reload your terminal, for instance by executing the commande `bash`

  - Configure NodeJS to use a version 6: (**WARNING**: upper version will NOT work !) 
## 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
   ```
  nvm install 6

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
    ```

  - Installing node.js build tools:
    > 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
    ```
   npm install -g gulp bower@1.8.0 cordova@9.0.0 ionic@1.7.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
### Get the source code and dependencies
   
  - Getting source and installing project dependencies:    
```
1. Getting the source code:    
  ```bash
     git clone git@git.duniter.org:clients/cesium-grp/cesium.git
  cd cesium
  npm install
  ```
  
  - Installing Cordova plugins (need for platforms specific builds)   
2. Install project dependencies:    
   ```bash
      cd cesium
      yarn
   ```
  ionic state restore
  ionic browser add crosswalk@12.41.296.5

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 a new directory `platforms/android`
   This should create new directories `platforms/android` and `platforms/ios`.

> To remind: check that your command line is configured:
   > As a reminder: check that your command line is well configured:
   > - You must place yourself in the directory of the application: `cd cesium`
> - and be configured for NodeJs v6: `nvm use 6` (please check using the command `node --version`)

   > - and working with NodeJs **v16**: `nvm use 16` (please check using the command `node --version`)
    
## Prepare environment, then compile and launch

 - To configure your build environment :
### Prepare configuration file

    * Add your environment config into `app/config.json`
Configure Cesium default settings :
 
    * Update default configuration, using the command:
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 the configuration file used by cesium, at `www/js/config.json`.
  This will update a configuration file `www/js/config.json`.
 
  - Compiling and running Cesium:
```
  npm start
### Compile and launch

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

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

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

  - Open a web browser at address: [localhost:8100](http://localhost:8100). The application should be running.

## Best practices for development
### 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 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 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 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 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 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 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 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 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 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 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 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 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 Diff line number Diff line
@@ -90,16 +90,16 @@ Installer Node.js est devenu extrêmement simple pour ces OS : un outil vous per
Vous pouvez installer nvm avec la commande suivante :

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

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

```bash
nvm install 6
nvm install 12
```

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

##### Outils de compilation

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

#### Sous Windows

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

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

### 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é : 

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

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

Puis pour les dépendances non globales :

```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.
@@ -141,23 +141,11 @@ 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 : 

```bash
├── bower@1.7.9 
├─┬ gulp@3.9.1 
│ ├── archy@1.0.0 
│ ├─┬ chalk@1.1.3 
yarn install v1.15.2
[1/4] Resolving packages...
  (...)
│ ├─┬ 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@~$
$ node -e "try { require('fs').symlinkSync(require('path').resolve('node_modules/@bower_components'), 'www/lib', 'junction') } catch (e) { }"
Done in 0.82s.
```

> 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.
Original line number Diff line number Diff line
@@ -119,14 +119,14 @@ node --version
Si vous n'êtes pas sur une v6, utilisez la commande 

```
nvm use 6
nvm use 12
```

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


```
ionic state restore
ionic cordova prepare
```

Normalement, cette commande devrait initialiser (entre autre) un répertoire `platforms/android`.
Original line number Diff line number Diff line
@@ -414,13 +414,13 @@ La communauté AngularJS est très active : de nombreux plugins, de tous genres,
Généralement, installer un nouveau plugin AngularJS est très simple. Il suffit d'executer la commande suivante pour que le téléchargement de la librairie soit fait : 
 
```bash
 > bower install <nom_du_plugin_AngularJS>
 > bower install ---save <nom_du_plugin_AngularJS>
```

Le chemin de la librairie installée doit ensuite être ajouté à la main, dans le fichier `www/index.html` : 
Le chemin de la librairie installée doit ensuite être ajouté à la main, dans le fichier `www/index.html`. Par exemple: : 

```html
<script src="lib/ionic/js/angular/angular-file-saver.bundle.js"></script>
<script src="lib/angular-file-saver/dist/dist/angular-file-saver.bundle.js"></script>
```

### 5 minutes de dev : Top chrono !
Original line number Diff line number Diff line
## Privacy policy

Android build allow user to upload user profile (avatar, pictures) used by the Cesium+ extension.
Cesium Android allow user to upload user profile (avatar, pictures), when the Cesium+ extension has been enable in settings.

### Cesium+ profile

Privacy policy are : 
 
- Profile data and avatar are public data;
- Profile data and avatar on an [ES Duniter4j node](https://github.com/duniter/duniter4j); Open Cesium+ settings to known the node address;  
- To totally remove your profile and avatar (if you use our official server [data.gtest.duniter.fr](http://data.gtest.duniter.fr)), please contact us at https://github.com/blavenie.
 No newline at end of file
- Profile data and avatar on an [Cesium+ node](https://github.com/duniter/cesium-plus-pod); Open Cesium+ settings to know the node address;  
- User can remove profile and avatar (open the Settings page, then use the options menu).
 No newline at end of file

github.sh

deleted100755 → 0
+0 −131
Original line number Diff line number Diff line
#!/bin/bash

### Control that the script is run on `dev` branch
branch=`git rev-parse --abbrev-ref HEAD`
if [[ ! "$branch" = "master" ]];
then
  echo ">> This script must be run under \`master\` branch"
  exit 1
fi

### Get version to release
current=`grep -P "version\": \"\d+.\d+.\d+(\w*)" package.json | grep -m 1 -oP "\d+.\d+.\d+(\w*)"`
if [[ "_$current" == "_" ]]; then
  echo "Unable to read the current version in 'package.json'. Please check version format is: x.y.z (x and y should be an integer)."
  exit 1;
fi
echo "Current version: $current"

### Get repo URL
PROJECT_NAME=cesium
REPO="duniter/cesium"
REPO_API_URL=https://api.github.com/repos/$REPO
REPO_PUBLIC_URL=https://github.com/$REPO

###  get auth token
GITHUB_TOKEN=`cat ~/.config/${PROJECT_NAME}/.github`
if [[ "_$GITHUB_TOKEN" != "_" ]]; then
    GITHUT_AUTH="Authorization: token $GITHUB_TOKEN"
else
    echo "ERROR: Unable to find github authentication token file: "
    echo " - You can create such a token at https://github.com/settings/tokens > 'Generate a new token'."
    echo " - Then copy the token and paste it in the file '~/.config/${PROJECT_NAME}/.github' using a valid token."
    exit 1
fi

case "$1" in
  del)
    result=`curl -i "$REPO_API_URL/releases/tags/v$current"`
    release_url=`echo "$result" | grep -P "\"url\": \"[^\"]+"  | grep -oP "$REPO_API_URL/releases/\d+"`
    if [[ $release_url != "" ]]; then
        echo "Deleting existing release..."
        curl -H 'Authorization: token $GITHUB_TOKEN'  -XDELETE $release_url
    fi
  ;;

  pre|rel)
    if [[ "_$2" != "_" ]]; then

      if [[ $1 = "pre" ]]; then
        prerelease="true"
      else
        prerelease="false"
      fi

      description=`echo $2`
      if [[ "_$description" = "_" ]]; then
          description="Release v$current"
      fi

      result=`curl -s -H ''"$GITHUT_AUTH"'' "$REPO_API_URL/releases/tags/v$current"`
      release_url=`echo "$result" | grep -P "\"url\": \"[^\"]+" | grep -oP "https://[A-Za-z0-9/.-]+/releases/\d+"`
      if [[ "_$release_url" != "_" ]]; then
        echo "Deleting existing release... $release_url"
        result=`curl -H ''"$GITHUT_AUTH"'' -s -XDELETE $release_url`
        if [[ "_$result" != "_" ]]; then
            error_message=`echo "$result" | grep -P "\"message\": \"[^\"]+" | grep -oP ": \"[^\"]+\""`
            echo "Delete existing release failed with error$error_message"
            exit 1
        fi
      else
        echo "Release not exists yet on github."
      fi

      echo "Creating new release..."
      echo " - tag: v$current"
      echo " - description: $description"
      result=`curl -H ''"$GITHUT_AUTH"'' -s $REPO_API_URL/releases -d '{"tag_name": "v'"$current"'","target_commitish": "master","name": "'"$current"'","body": "'"$description"'","draft": false,"prerelease": '"$prerelease"'}'`
      #echo "DEBUG - $result"
      upload_url=`echo "$result" | grep -P "\"upload_url\": \"[^\"]+"  | grep -oP "https://[A-Za-z0-9/.-]+"`

      if [[ "_$upload_url" = "_" ]]; then
        echo "Failed to create new release for repo $REPO."
        echo "Server response:"
        echo "$result"
        exit 1
      fi

      ###  Sending files
      echo "Uploading files to ${upload_url} ..."
      dirname=$(pwd)

      ZIP_FILE="$dirname/platforms/web/build/${PROJECT_NAME}-v$current-web.zip"
      if [[ -f "${ZIP_FILE}" ]]; then
        result=$(curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: application/zip' -T "${ZIP_FILE}" "${upload_url}?name=${PROJECT_NAME}-v${current}-web.zip")
        browser_download_url=$(echo "$result" | grep -P "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "\"browser_download_url\":[ ]?\"[^\"]+"  | grep -oP "https://[A-Za-z0-9/.-]+")
        ZIP_SHA256=$(sha256sum "${ZIP_FILE}")
        echo " - ${browser_download_url}  | SHA256 Checksum: ${ZIP_SHA256}"
      else
        echo " - ERROR: Web release (ZIP) not found! Skipping."
      fi

      APK_FILE="${dirname}/platforms/android/build/outputs/apk/release/android-release.apk"
      if [[ -f "${APK_FILE}" ]]; then
        result=$(curl -s -H ''"$GITHUT_AUTH"'' -H 'Content-Type: application/vnd.android.package-archive' -T "${APK_FILE}" "${upload_url}?name=${PROJECT_NAME}-v${current}-android.apk")
        browser_download_url=$(echo "$result" | grep -P "\"browser_download_url\":[ ]?\"[^\"]+" | grep -oP "\"browser_download_url\":[ ]?\"[^\"]+"  | grep -oP "https://[A-Za-z0-9/.-]+")
        APK_SHA256=$(sha256sum "${APK_FILE}")
        echo " - ${browser_download_url}  | SHA256 Checksum: ${APK_SHA256}"
      else
        echo "- ERROR: Android release (APK) not found! Skipping."
      fi

      echo "-----------------------------------------"
      echo "Successfully uploading files !"
      echo " -> Release url: ${REPO_PUBLIC_URL}/releases/tag/v${current}"
      exit 0
    else
      echo "Wrong arguments"
      echo "Usage:"
      echo " > ./github.sh del|pre|rel <release_description>"
      echo "With:"
      echo " - del: delete existing release"
      echo " - pre: use for pre-release"
      echo " - rel: for full release"
      exit 1
    fi
    ;;
  *)
    echo "No task given"
    exit 1
    ;;
esac
+1400 −445

File changed.

Preview size limit exceeded, changes collapsed.

hooks/README.md

deleted100755 → 0
+0 −83
Original line number Diff line number Diff line
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->
# Cordova Hooks

This directory may contain scripts used to customize cordova commands. This
directory used to exist at `.cordova/hooks`, but has now been moved to the
project root. Any scripts you add to these directories will be executed before
and after the commands corresponding to the directory name. Useful for
integrating your own build systems or integrating with version control systems.

__Remember__: Make your scripts executable.

## Hook Directories
The following subdirectories will be used for hooks:

    after_build/
    after_compile/
    after_docs/
    after_emulate/
    after_platform_add/
    after_platform_rm/
    after_platform_ls/
    after_plugin_add/
    after_plugin_ls/
    after_plugin_rm/
    after_plugin_search/
    after_prepare/
    after_run/
    after_serve/
    before_build/
    before_compile/
    before_docs/
    before_emulate/
    before_platform_add/
    before_platform_rm/
    before_platform_ls/
    before_plugin_add/
    before_plugin_ls/
    before_plugin_rm/
    before_plugin_search/
    before_prepare/
    before_run/
    before_serve/
    pre_package/ <-- Windows 8 and Windows Phone only.

## Script Interface

All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables:

* CORDOVA_VERSION - The version of the Cordova-CLI.
* CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios).
* CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer)
* CORDOVA_HOOK - Path to the hook that is being executed.
* CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate)

If a script returns a non-zero exit code, then the parent cordova command will be aborted.


## Writing hooks

We highly recommend writting your hooks using Node.js so that they are
cross-platform. Some good examples are shown here:

[http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/)
+0 −68
Original line number Diff line number Diff line
#!/usr/bin/env node
"use strict";
var gulp = require('gulp');
var gutil = require('gulp-util');
var path = require("path");

var cmd = process.env.CORDOVA_CMDLINE;
var rootdir = process.argv[2];
var argv = require('yargs').argv;

var skip = true;
if (/*cmd.indexOf("--release") > -1 || */cmd.indexOf("--playstore") > -1) {
    skip = false;
}

if (rootdir && !skip) {

  // go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for(var x=0; x<platforms.length; x++) {

    var platform = platforms[x].trim().toLowerCase();
    var platformRoot = path.join(rootdir, 'platforms', platform);

    // Deploy for Android
    if(platform == 'android') {

     var apkFileLocation = path.join(platformRoot, 'build/outputs/apk/android-release.apk');

      console.log('Publishing APK file [' + apkFileLocation + '] to playstore...');

      var config = require('../playstore-config.json');

      if(!config) {
        gutil.log(gutil.colors.red("ERROR => Could not load `hooks/playstore-config.json` file!"));
        return;
      }
      if(!config.client_email || !config.private_key) {
        gutil.log(gutil.colors.red("ERROR => Could not found 'client_email' or 'private_key' in 'hooks/playstore-config.json' file."));
        return;
      }

      var publisher = require('playup')(config);

      publisher.upload(apkFileLocation,
      {
        track: 'production',
        recentChanges: {
          'fr-FR': 'New stable release'
        }
      })
      .then(function (data) {
        console.log(' > APK file successfully deployed to Playstore !');
      })
      .catch(function(err) {
        console.log('ERROR while publsihing to playtore: \n' + err);
      })

    }

    else {
      // TODO : deploy other for platforms
    }

  }
}
+0 −94
Original line number Diff line number Diff line
#!/usr/bin/env node

// Add Platform Class
// v1.0
// Automatically adds the platform class to the body tag
// after the `prepare` command. By placing the platform CSS classes
// directly in the HTML built for the platform, it speeds up
// rendering the correct layout/style for the specific platform
// instead of waiting for the JS to figure out the correct classes.

var fs = require('fs');
var path = require('path');

var rootdir = process.argv[2];

function addPlatformBodyTag(indexPath, platform) {
  // add the platform class to the body tag
  try {
    var platformClass = 'platform-' + platform;
    var cordovaClass = 'platform-cordova platform-webview';

    var html = fs.readFileSync(indexPath, 'utf8');

    var bodyTag = findBodyTag(html);
    if(!bodyTag) return; // no opening body tag, something's wrong

    if(bodyTag.indexOf(platformClass) > -1) return; // already added

    var newBodyTag = bodyTag;

    var classAttr = findClassAttr(bodyTag);
    if(classAttr) {
      // body tag has existing class attribute, add the classname
      var endingQuote = classAttr.substring(classAttr.length-1);
      var newClassAttr = classAttr.substring(0, classAttr.length-1);
      newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote;
      newBodyTag = bodyTag.replace(classAttr, newClassAttr);

    } else {
      // add class attribute to the body tag
      newBodyTag = bodyTag.replace('>', ' class="' + platformClass + ' ' + cordovaClass + '">');
    }

    html = html.replace(bodyTag, newBodyTag);

    fs.writeFileSync(indexPath, html, 'utf8');

    process.stdout.write('add to body class: ' + platformClass + '\n');
  } catch(e) {
    process.stdout.write(e);
  }
}

function findBodyTag(html) {
  // get the body tag
  try{
    return html.match(/<body(?=[\s>])(.*?)>/gi)[0];
  }catch(e){}
}

function findClassAttr(bodyTag) {
  // get the body tag's class attribute
  try{
    return bodyTag.match(/ class=["|'](.*?)["|']/gi)[0];
  }catch(e){}
}

if (rootdir) {

  // go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for(var x=0; x<platforms.length; x++) {
    // open up the index.html file at the www root
    try {
      var platform = platforms[x].trim().toLowerCase();
      var indexPath;

      if(platform == 'android') {
        indexPath = path.join('platforms', platform, 'assets', 'www', 'index.html');
      } else {
        indexPath = path.join('platforms', platform, 'www', 'index.html');
      }

      if(fs.existsSync(indexPath)) {
        addPlatformBodyTag(indexPath, platform);
      }

    } catch(e) {
      process.stdout.write(e);
    }
  }

}
+0 −108
Original line number Diff line number Diff line
#!/usr/bin/env node
"use strict";
var gulp = require('gulp');
var path = require("path");
var removeCode = require('gulp-remove-code');
var removeHtml = require('gulp-html-remove');
var es = require('event-stream');
var ngAnnotate = require('gulp-ng-annotate');
var htmlmin = require('gulp-htmlmin');

var rootdir = process.argv[2];

if (rootdir) {

  // go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for(var x=0; x<platforms.length; x++) {

    var platform = platforms[x].trim().toLowerCase();

    var wwwPath;
    if(platform == 'android') {
      wwwPath = path.join(rootdir, 'platforms', platform, 'assets', 'www');
    } else {
      wwwPath = path.join(rootdir, 'platforms', platform, 'www');
    }

    var pluginPath = path.join(wwwPath, 'plugins') + '/es';

    // Log
    //console.log('['+process.mainModule.filename+'] Removing code for platform '+platform+'\n');

    // Compute options {device-<platform>: true}
    var platformRemoveCodeOptions = {};
    platformRemoveCodeOptions[platform] = true; // = {<platform>: true}

    var htmlminOptions = {removeComments: true, collapseWhitespace: true};

    // Do not remove desktop code for iOS and macOS (support for tablets and desktop macs)
    if (platform !== 'ios' && platform !== 'osx') {
      // Removing unused code for device...
      es.concat(
        // Remove unused HTML tags
        gulp.src(path.join(wwwPath, 'templates', '**', '*.html'))
          .pipe(removeCode({device: true}))
          .pipe(removeCode(platformRemoveCodeOptions))
          .pipe(removeHtml('.hidden-xs.hidden-sm'))
          .pipe(removeHtml('.hidden-device'))
          .pipe(removeHtml('[remove-if][remove-if="device"]'))
          .pipe(htmlmin(htmlminOptions))
          .pipe(gulp.dest(wwwPath + '/templates')),

        gulp.src(path.join(pluginPath, '**', '*.html'))
          .pipe(removeCode({device: true}))
          .pipe(removeCode(platformRemoveCodeOptions))
          .pipe(removeHtml('.hidden-xs.hidden-sm'))
          .pipe(removeHtml('.hidden-device'))
          .pipe(removeHtml('[remove-if][remove-if="device"]'))
          .pipe(htmlmin(htmlminOptions))
          .pipe(gulp.dest(pluginPath)),

        gulp.src(path.join(wwwPath, 'index.html'))
          .pipe(removeCode({device: true}))
          .pipe(removeCode(platformRemoveCodeOptions))
          .pipe(removeHtml('.hidden-xs.hidden-sm'))
          .pipe(removeHtml('.hidden-device'))
          .pipe(removeHtml('[remove-if][remove-if="device"]'))
          .pipe(htmlmin(/*no options, to build comments*/))
          .pipe(gulp.dest(wwwPath)),

        // Remove unused JS code + add ng annotations
        gulp.src(path.join(wwwPath, 'js', '**', '*.js'))
          .pipe(removeCode({device: true}))
          .pipe(removeCode(platformRemoveCodeOptions))
          .pipe(ngAnnotate({single_quotes: true}))
          .pipe(gulp.dest(wwwPath + '/dist/dist_js/app')),

        gulp.src([pluginPath + '/js/**/*.js'])
          .pipe(removeCode({device: true}))
          .pipe(removeCode(platformRemoveCodeOptions))
          .pipe(ngAnnotate({single_quotes: true}))
          .pipe(gulp.dest(wwwPath + '/dist/dist_js/plugins'))
      );
    } else {
      es.concat(
        gulp.src(path.join(wwwPath, 'templates', '**', '*.html'))
          .pipe(htmlmin(htmlminOptions))
          .pipe(gulp.dest(wwwPath + '/templates')),

        gulp.src(path.join(pluginPath, '**', '*.html'))
          .pipe(htmlmin(htmlminOptions))
          .pipe(gulp.dest(pluginPath)),

        gulp.src(path.join(wwwPath, 'index.html'))
          .pipe(gulp.dest(wwwPath)),

        gulp.src(path.join(wwwPath, 'js', '**', '*.js'))
          .pipe(ngAnnotate({single_quotes: true}))
          .pipe(gulp.dest(wwwPath + '/dist/dist_js/app')),

        gulp.src([pluginPath + '/js/**/*.js'])
          .pipe(gulp.dest(wwwPath + '/dist/dist_js/plugins'))
      );
    }
  }
}
+0 −48
Original line number Diff line number Diff line
#!/usr/bin/env node
"use strict";
var gulp = require('gulp');
var path = require("path");
var templateCache = require('gulp-angular-templatecache');
var es = require('event-stream');
var rootdir = process.argv[2];

if (rootdir) {

  // go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for(var x=0; x<platforms.length; x++) {

    var platform = platforms[x].trim().toLowerCase();

    var wwwPath;
    if(platform == 'android') {
      wwwPath = path.join(rootdir, 'platforms', platform, 'assets', 'www');
    } else {
      wwwPath = path.join(rootdir, 'platforms', platform, 'www');
    }

    var distJsPath = path.join(wwwPath, 'dist', 'dist_js', 'app');
    var pluginDistJsPath = path.join(wwwPath, 'dist', 'dist_js', 'plugins');

    // Concat templates into a JS
    es.concat(
      gulp.src(path.join(wwwPath, 'templates', '**', '*.html'))
        .pipe(templateCache({
          standalone:true,
          module:"cesium.templates",
          root: "templates/"
         }))
        .pipe(gulp.dest(distJsPath)),

       gulp.src(path.join(wwwPath, 'plugins', '*', 'templates', '**', '*.html'))
         .pipe(templateCache({
           standalone:true,
           module:"cesium.plugins.templates",
           root: "plugins/"
          }))
         .pipe(gulp.dest(pluginDistJsPath))
     );
  }
}
+0 −40
Original line number Diff line number Diff line
#!/usr/bin/env node
"use strict";
var gulp = require('gulp');
var path = require("path");
var es = require('event-stream');
var rootdir = process.argv[2];
var ngTranslate = require('gulp-angular-translate');

if (rootdir) {

  // go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for(var x=0; x<platforms.length; x++) {

    var platform = platforms[x].trim().toLowerCase();

    var wwwPath;
    if(platform == 'android') {
      wwwPath = path.join(rootdir, 'platforms', platform, 'assets', 'www');
    } else {
      wwwPath = path.join(rootdir, 'platforms', platform, 'www');
    }

    var distJsPath = path.join(wwwPath, 'dist', 'dist_js', 'app');
    var pluginDistJsPath = path.join(wwwPath, 'dist', 'dist_js', 'plugins');

    // Concat templates into a JS
    es.concat(
      gulp.src(wwwPath + '/i18n/locale-*.json')
        .pipe(ngTranslate({standalone:true, module: 'cesium.translations'}))
        .pipe(gulp.dest(distJsPath)),

      gulp.src(wwwPath + '/plugins/*/i18n/locale-*.json')
        .pipe(ngTranslate({standalone:true, module: 'cesium.plugins.translations'}))
        .pipe(gulp.dest(pluginDistJsPath))
     );
  }
}

hooks/after_prepare/040_useref.js

deleted100755 → 0
+0 −62
Original line number Diff line number Diff line
#!/usr/bin/env node
"use strict";
var gulp = require('gulp');
var path = require("path");
var es = require('event-stream');
var useref = require('gulp-useref');
var filter = require('gulp-filter');
var uglify = require('gulp-uglify');
var csso = require('gulp-csso');
var rev = require('gulp-rev');
var revReplace = require('gulp-rev-replace');

var cmd = process.env.CORDOVA_CMDLINE;
var rootdir = process.argv[2];

var skip = true;
if (cmd.indexOf("--release") > -1 || cmd.indexOf("--useref") > -1) {
    skip = false;
}

if (rootdir && !skip) {

  // go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for(var x=0; x<platforms.length; x++) {

    var platform = platforms[x].trim().toLowerCase();

    var wwwPath;
    if(platform == 'android') {
      wwwPath = path.join(rootdir, 'platforms', platform, 'assets', 'www');
    } else {
      wwwPath = path.join(rootdir, 'platforms', platform, 'www');
    }

    var indexPath = path.join(wwwPath, 'index.html');

    var jsFilter = filter(["**/*.js", "!**/vendor/*", '!**/config.js'], { restore: true });
    var cssFilter = filter("**/*.css", { restore: true });
    var revFilesFilter = filter(['**/*', '!**/index.html', '!**/config.js'], { restore: true });
    var uglifyOptions = {beautify: false};

    // Removing unused code for device...
    es.concat(
      gulp.src(indexPath)
        .pipe(useref())      // Concatenate with gulp-useref
        .pipe(jsFilter)
        .pipe(uglify(uglifyOptions))             // Minify any javascript sources
        .pipe(jsFilter.restore)
        .pipe(cssFilter)
        .pipe(csso())               // Minify any CSS sources
        .pipe(cssFilter.restore)
        .pipe(revFilesFilter)
        .pipe(rev())                // Rename the concatenated files (but not index.html)
        .pipe(revFilesFilter.restore)
        .pipe(revReplace())         // Substitute in new filenames
        .pipe(gulp.dest(wwwPath))
     );
  }
}
Original line number Diff line number Diff line
#!/usr/bin/env node
"use strict";
var gulp = require('gulp');
var gutil = require('gulp-util');
var allConfig = require('../../app/config.json');
var path = require("path");
var del = require('del');

var cmd = process.env.CORDOVA_CMDLINE;
var rootdir = process.argv[2];
var argv = require('yargs').argv;

var skip = true;
if (cmd.indexOf("--release") > -1 || cmd.indexOf("--useref") > -1) {
    skip = false;
}

if (rootdir && !skip) {

  // go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for(var x=0; x<platforms.length; x++) {

    var platform = platforms[x].trim().toLowerCase();

    var wwwPath;
    if(platform == 'android') {
      wwwPath = path.join(rootdir, 'platforms', platform, 'assets', 'www');
    } else {
      wwwPath = path.join(rootdir, 'platforms', platform, 'www');
    }

    // Log
    //console.log('['+process.mainModule.filename+'] Cleaning unused directories');

    // Clean unused directories
    del([
      path.join(wwwPath, 'i18n'),
      path.join(wwwPath, 'js'),
      path.join(wwwPath, 'templates'),
      path.join(wwwPath, 'css'),
      path.join(wwwPath, 'dist'),
      path.join(wwwPath, 'js'),
      path.join(wwwPath, 'cordova-js-src'),
      path.join(wwwPath, 'plugins', 'es'),
      path.join(wwwPath, 'plugins', 'graph'),
      path.join(wwwPath, 'plugins', 'map'),
      path.join(wwwPath, 'plugins', 'rml9'),
      path.join(wwwPath, 'lib', '**'),
      // Keep Ionic lib/ionic/fonts directory
      '!'+path.join(wwwPath, 'lib'),
      '!'+path.join(wwwPath, 'lib', 'ionic'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', '**'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Black'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Black', '**'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Bold'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Bold', '**'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'BoldItalic'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'BoldItalic', '**'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Italic'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Italic', '**'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Light'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Light', '**'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Medium'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Medium', '**'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Regular'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Regular', '**'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Thin'),
      '!'+path.join(wwwPath, 'lib', 'ionic', 'fonts', 'robotdraft', 'Thin', '**')
    ]);
  }
}
Original line number Diff line number Diff line
#!/usr/bin/env node
"use strict";
var gulp = require('gulp');
var path = require("path");
var replace = require('gulp-replace');

var rootdir = process.argv[2];

if (rootdir) {

  // go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for(var x=0; x<platforms.length; x++) {

    var platform = platforms[x].trim().toLowerCase();

    if(platform == 'android') {
      var platformPath = path.join(rootdir, 'platforms', platform);
      var androidManifestFile = path.join(platformPath, 'AndroidManifest.xml');

      // Clean unused directories
      console.log('-----------------------------------------');
      console.log(' Updating file: ' + androidManifestFile);
      gulp.src(androidManifestFile)

        // Add 'tools' namespace to root tag
        .pipe(replace(/(xmlns:android="http:\/\/schemas.android.com\/apk\/res\/android")\s*>/g, '$1 xmlns:tools="http://schemas.android.com/tools">'))

        // remove all <uses-sdk>
        .pipe(replace(/<uses-sdk [^>]+\/>/g, ''))

        // add <uses-sdk> (replace 'targetSdkversion' and add tools:overrideLibrary)
        .pipe(replace(/(<\/manifest>)/, '    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" tools:overrideLibrary="org.kaliumjni.lib" />\n$1'))

        .pipe(gulp.dest(platformPath));

      console.log('-----------------------------------------');

    }


  }
}
+0 −67
Original line number Diff line number Diff line
#!/usr/bin/env node
"use strict";
var fs = require('fs');
var glob = require('glob');
var path = require('path')

// See: https://stackoverflow.com/questions/49162538/running-cordova-build-android-unable-to-find-attribute-androidfontvariation

var rootdir = process.argv[2];

if (rootdir) {
// go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for (var x = 0; x < platforms.length; x++) {
    try {
      var platform = platforms[x].trim().toLowerCase();

      if (platform == 'android') {
        var build_dir = rootdir + '/resources/android/build';
        var android_dir = rootdir + '/platforms/android';
        var build_files = build_dir + '/**/*.*';

        console.log('-----------------------------------------');
        if (fs.existsSync(android_dir) && fs.existsSync(build_dir)) {

          var mkdirp = function(dir) {
            var parent = path.dirname(dir);
            if (!fs.existsSync(parent)){
              mkdirp(parent);
            }
            if (!fs.existsSync(dir)){
              fs.mkdirSync(dir);
            }
          };

          glob(build_files, null, function(er, files) {
            files.forEach(function(file) {
              console.log(' Copy ' + file + ' to ' + android_dir);
              var dest_file = file.replace(build_dir, android_dir);
              mkdirp(path.dirname(dest_file));
              fs.createReadStream(file).pipe(fs.createWriteStream(dest_file));
            });
          });

          var gradle_file = build_dir + '/build-extras.gradle';
          if (!fs.existsSync(gradle_file)) {
            console.log( ' File ' + gradle_file + ' not found. Skipping copy to /platforms/android');
          }

          var signing_file = build_dir + '/release-signing.properties';
          if (!fs.existsSync(signing_file)) {
            console.log( ' File ' + signing_file + ' not found. Skipping copy to /platforms/android');
            console.log( '   WARNING: Release APK files will not be signed !');
          }

        } else {
            console.log( ' Directory ' + build_dir + ' not found. Skipping copy to /platforms/android');
        }
        console.log('-----------------------------------------');
      }
    } catch (e) {
      process.stdout.write(e);
    }
  }
}
+0 −38
Original line number Diff line number Diff line
#!/usr/bin/env node
"use strict";
var gulp = require('gulp');
var path = require("path");
var replace = require('gulp-replace');

var rootdir = process.argv[2];

if (rootdir) {

  // go through each of the platform directories that have been prepared
  var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);

  for(var x=0; x<platforms.length; x++) {

    var platform = platforms[x].trim().toLowerCase();

    if(platform == 'ubuntu') {
      var platformPath = path.join(rootdir, 'platforms', platform);
      var ionicConfigFile = path.join(platformPath, 'config.xml');

      // Clean unused directories
      console.log('-----------------------------------------');
      console.log(' Updating file: ' + ionicConfigFile);
      gulp.src(ionicConfigFile)

        // change App ID into 'duniter-cesium'
        .pipe(replace(/id="fr.duniter.cesium"/g, 'id="cesium"'))

        .pipe(gulp.dest(platformPath));

      console.log('-----------------------------------------');
    }


  }
}

hooks/before_prepare/02_jshint.js

deleted100755 → 0
+0 −79
Original line number Diff line number Diff line
#!/usr/bin/env node

var fs = require('fs');
var path = require('path');
var jshint = require('jshint').JSHINT;
var async = require('async');

var foldersToProcess = [
    'js',
    'js/controllers',
    'js/entities',
    'js/services',
    'plugins/es/js',
    'plugins/es/js/controllers',
    'plugins/es/js/entities',
    'plugins/es/js/services'
];

foldersToProcess.forEach(function(folder) {
    processFiles("www/" + folder);
});

function processFiles(dir, callback) {
    var errorCount = 0;
    fs.readdir(dir, function(err, list) {
        if (err) {
            console.log('processFiles err: ' + err);
            return;
        }
        async.eachSeries(list, function(file, innercallback) {
            file = dir + '/' + file;
            fs.stat(file, function(err, stat) {
                if(!stat.isDirectory()) {
                    if(path.extname(file) === ".js") {
                        lintFile(file, function(hasError) {
                            if(hasError) {
                                errorCount++;
                            }
                            innercallback();
                        });
                    } else {
                        innercallback();
                    }
                } else {
                    innercallback();
                }
            });
        }, function(error) {
            if(errorCount > 0) {
                process.exit(1);
            }
        });
    });
}

function lintFile(file, callback) {
    console.log("Linting '" + file + "'");
    fs.readFile(file, function(err, data) {
        if(err) {
            console.error('Error: ' + err);
            return;
        }
        if(jshint(data.toString())) {
            //console.log('File ' + file + ' has no errors.');
            //console.log('-----------------------------------------');
            callback(false);
        } else {
            console.error("Errors in file '" + file + "':");
            var out = jshint.data(),
            errors = out.errors;
            for(var j = 0; j < errors.length; j++) {
                console.error( " Line " + errors[j].line + ':' + errors[j].character + ' -> ' + errors[j].reason + ' -> ' +
errors[j].evidence);
            }
            console.log('-----------------------------------------');
            callback(true);
        }
    });
}
+22 −30
Original line number Diff line number Diff line
@@ -6,16 +6,10 @@ is_installed() {
  type "$1" > /dev/null 2>&1
}

if [ "_$1" != "_" ]; then
  CESIUM_DIR="$1"
fi
if [ "_$CESIUM_DIR" = "_" ]; then
  DIRNAME=`pwd`
  CESIUM_DIR="$DIRNAME/cesium"
fi
CESIUM_DIR=${1:-$(pwd)/cesium}

latest_version() {
  echo "v1.4.12" #lastest
  echo "v1.7.16" # lastest
}

api_release_url() {
@@ -39,16 +33,15 @@ download() {

install_from_github() {

  local RELEASE=`curl -XGET -i $(api_release_url)`
  local CESIUM_URL=`echo "$RELEASE" | grep -P "\"browser_download_url\": \"[^\"]+" | grep -oP "https://[a-zA-Z0-9/.-]+-web.zip"`
  local CESIUM_ARCHIVE=$CESIUM_DIR/cesium.zip
  if [ -d "$CESIUM_DIR" ]; then
    if [ -f "$CESIUM_ARCHIVE" ]; then
      echo "WARNING: Deleting existing archive [$CESIUM_ARCHIVE]"
      rm $CESIUM_ARCHIVE
    fi
  else
  local RELEASE=$(curl -XGET -i "$(api_release_url)")
  local CESIUM_URL=$(echo "$RELEASE" | grep -P '"browser_download_url": "[^"]+' | grep -oP "https://[a-zA-Z0-9/.-]+-web.zip" | head -n 1)
  local CESIUM_ARCHIVE="$CESIUM_DIR/cesium.zip"

  if [ ! -d "$CESIUM_DIR" ]; then
    mkdir -p "$CESIUM_DIR"
  elif [ -f "$CESIUM_ARCHIVE" ]; then
    echo "WARNING: Deleting existing archive [$CESIUM_ARCHIVE]"
    rm "$CESIUM_ARCHIVE"
  fi

  echo "Downloading [$CESIUM_URL]"
@@ -56,23 +49,23 @@ install_from_github() {
    echo >&2 "Failed to download '$CESIUM_URL'"
    return 4
  }
  echo "Unarchive to $CESIUM_DIR"
  unzip -o $CESIUM_ARCHIVE -d $CESIUM_DIR
  rm $CESIUM_ARCHIVE

  echo
  echo "Unarchiving to $CESIUM_DIR"
  unzip -o "$CESIUM_ARCHIVE" -d "$CESIUM_DIR"
  rm "$CESIUM_ARCHIVE"

  echo "Cesium successfully installed at $CESIUM_DIR"
}

do_install() {

  if ! is_installed "curl"; then
    echo "=> curl is not available. You will likely need to install 'curl' package."
  if ! is_installed "curl" && ! is_installed "wget"; then
    echo "=> Neither 'curl' nor 'wget' is available. Please install one of them."
    exit 1
  fi

  if ! is_installed "unzip"; then
    echo "=> unzip is not available. You will likely need to install 'unzip' package."
    echo "=> 'unzip' is not available. You will likely need to install the 'unzip' package."
    exit 1
  fi

@@ -84,10 +77,9 @@ do_install() {
# during the execution of the install script
#
reset() {
  unset -f reset is_installed latest_version \
    download install_from_github do_install
  unset -f reset is_installed latest_version api_release_url download install_from_github do_install
}

[ "_$CESIUM_ENV" = "_testing" ] || do_install $1
[ "_$CESIUM_ENV" = "_testing" ] || do_install "$1"

} # this ensures the entire script is downloaded #

ionic.config.json

0 → 100644
+14 −0
Original line number Diff line number Diff line
{
  "name": "Cesium",
  "type": "ionic1",
  "integrations": {
    "cordova": {}
  },
  "type": "ionic1",
  "watchPatterns": [
    "www/index.html",
    "www/dist/**/*",
    "www/css/*.css"
  ],
  "yarn": true
}

ionic.project

deleted100644 → 0
+0 −22
Original line number Diff line number Diff line
{
  "name": "Cesium",
  "app_id": "",
  "watchPatterns": [
    "www/**/*",
    "!www/dist/**/*",
    "!www/lib/**/*",
    "!www/css/*.app.css"
  ],
  "gulpStartupTasks": [
    "serve:before",
    "watch"
  ],
  "defaultBrowser": "chrome",
  "browsers": [
    {
      "platform": "android",
      "browser": "crosswalk",
      "version": "12.41.296.5"
    }
  ]
}
 No newline at end of file
+3 −1
Original line number Diff line number Diff line
{}
 No newline at end of file
{
  "compileOnSave": false
}

license_g1-eo-EO.md

deleted100644 → 0
+0 −97
Original line number Diff line number Diff line
Licencc Ğ1 - v0.2.9
===================

:dato: 2017-04-04 12:59
:modifita: 2019-07-14 12:00

**Licenco de la mono kaj promeso de respondeco.**

Ĉiu atestado de nova membro de Ğ1 devas antaŭe akompaniĝi per transdono de tiu ĉi licenco de la mono Ğ1, pri kiu la atestanto devas certiĝi, ke ĝi estis studita, komprenita kaj akceptita de la persono, kiu estos atestita.

Ĉiu okazo de renkontiĝo rilate al Ğ1 devus akompaniĝi per transdono de tiu ĉi licenco, kiu povas esti laŭte legata, kaj transdonita ĉiamaniere.

Reto de Fido Ğ1 (RdF Ğ1)
------------------------------

**Averto :** Atesti ne estas nur certiĝi, ke vi renkontis la personon, tio estas certigi al la komunumo Ğ1, ke vi sufiĉe bone konas la atestitan personon, kaj ke vi tiel scipovos facile kontakti lin/ŝin, kaj kapablos malkovri duoblan konton kreitan de persono atestita de vi mem, aŭ alitipajn problemojn (malapero...), farante komparajn kontrolojn, kiuj eventuale ebligos elmontri la problemon.

**Ege rekomendindaj konsiloj**

Bone koni personon supozigas, ke vi scipovas kontakti lin/ŝin per pluraj rimedoj malsamaj (fizika, elektronika, alitipa...), sed ankaŭ ke vi konas plurajn personojn, kiuj konas lin/ŝin same bone, kaj kiuj ankaŭ scipovas kontakti lin/ŝin simile. Aparte se vi ne bone konas neniun el ties aliaj atestantoj, tio estas forta indiko, ke vi ne bone konas la personon, kaj tia atestaĵo ekas signalon al la tuta komunumo Ğ1. Kaze de nesufiĉa kono, necesas nepre ne atesti.

Neniam atestu sola, sed akompanata de almenaŭ unu alia membro de la RdF Ğ1 por eviti ĉian manipulan eraron. Kaze de eraro, tuj avertu aliajn membrojn de la RdF Ğ1.

Antaŭ ĉiu atestado, ne forgesu kontroli, ĉu tiu konto (ĉu ĝi estas validigota aŭ jam membro) jam ricevis unu aŭ plurajn atestaĵojn. Laŭnecese petu informojn por konkakti tiujn aliajn atestantojn por kune kontroli, ke vi bone konas la personon, kiu kreis la novan konton, kaj ankaŭ ties publikan ŝlosilon.

Kontrolu ke la atestoto bone regas sian konton: bona rimedo por kontroli tion estas sendi kelkajn Ğ1 al la celata konto, kaj poste peti resendon al via propra konto. Tio certigas, ke la atestoto bone regas sian privatan ŝlosilon.

Kontrolu ke viaj kontaktoj bone studis kaj komprenis la licencon Ğ1 ĝisdatan.

Se vi ekkonscias, ke efektiva aŭ ebla atestanto de la koncernata konto ne konas la koncernatan personon, tuj avertu fakulojn pri la temo inter viaj konatoj de la RdF Ğ1, por ke la valid-procezo estu kontrolita de la RdF Ğ1.

Kiam vi estas membro de la RdF Ğ1, kaj ke vi estas atestonta novan konton:


**Vi certiĝis:**

1°) ke vi sufiĉe bone konas (ne nur "vide" konas) la personon, kiu deklaras regi tiun publikan ŝlosilon (novan konton). Vidu la ĉi-suprajn ege rekomendindajn konsilojn por certiĝi "bone koni".

2°) ke vi persone kontrolis kun li/ŝi, ke temas ja pri tiu publika ŝlosilo, kiun vi estas atestonta (vidu ĉi-suprajn konsilojn).

3°) ke vi bone kontrolis kun la koncernata persono, ke li/ŝi ja kreis sian Duniter-dokumenton pri konto-nuligo, kiu laŭbezone ebligos al li/ŝi malaktivigi sian membro-statuson (kaze de konto-ŝtelo, ID-ŝanĝo, erare kreita konto, ktp.).

4a°) ke vi fizike renkontis la personon por certiĝi, ke ja lin/ŝin vi bone konas, kaj ke ja li/ŝi uzas tiun publikan ŝlosilon.

4b°) aŭ ke vi distance kontrolis la ligon persono/publik-ŝlosilo kontaktante la personon per pluraj komunikiloj malsamaj, kiel paper-poŝto + sociaj retoj + forumo + retpoŝto + video-konferenco + telefono (rekoni la voĉon). Ĉar se oni povas fiuzi retadreson aŭ forum-konton, estos multe pli malfacile fiuzi kvar malsamajn komunikilojn, kaj imiti la aspekton (vidan) kaj plie la voĉon de la persono.

La 4a°) tamen preferindas al la 4b°), dum la punktoj 1°) 2°) kaj 3°) estas antaŭ ĉio nepraj.

**Resumitaj reguloj de la RdF:**

Ĉiu membro havas rezervon da 100 eblaj atestaĵoj, kiujn li/ŝi povas sendi nur po 1 ĉiun 5-an tagon.

Valida 2 monatojn, atestaĵo por nova membro estas definitive aprobita nur se la atestito havas almenaŭ 4 aliajn atestaĵojn fine de tiuj 2 monatoj, alie la enir-procezo devos esti rekomencita.

Por fariĝi nova membro de la RdF Ğ1, necesas do akiri 5 atestaĵojn kaj troviĝi je distanco <= 5 paŝoj de 80% el la referencaj membroj de la RdF.

Membro de la RdF Ğ1 estas referenca membro, kiam li/ŝi ricevis kaj sendis almenaŭ Y[N] atestaĵojn, kie N estas la nombro de membroj de la RdF kaj Y[N] = plafono N^(1/5). Ekzemploj:

* por 1024 < N ≤ 3125 oni havas Y[N] = 5
* por 7776 < N ≤ 16807 oni havas Y[N] = 7
* por 59049 < N ≤ 100 000 oni havas Y[N] = 10

Ekde kiam la nova membro partoprenas en la RdF Ğ1, ties atestaĵoj restas validaj 2 jarojn.

Por resti membro necesas redoni regule sian konsenton per sia privata ŝlosilo (ĉiun 12-an monaton) kaj certiĝi daŭre havi almenaŭ 5 atestaĵojn validajn post la 2 jaroj.

Mono Ğ1
----------

Ğ1 produktiĝas per Universala Dividendo (UD) por ĉiu homa estaĵo membro de la Reto de Fido Ğ1, laŭ la formo:

* po 1 UD por ĉiu persono ĉiutage

**Kodo de la mono Ğ1**

La sumo en Ğ1 de la UD samas ĉiutage ĝis la venonta ekvinokso, kiam la UD estos tiam revalorigita laŭ la formulo (kun 1 tago = 86 400 sekundoj):

* UDtago(sekvanta ekvinokso) = UDtago(ekvinokso) + c² (M/N)(ekvinokso) / (182,625 tagoj)

kun kiel parametroj:

* c = 4,88% / ekvinokso
* UD(0) = 10,00 Ğ1

kaj kiel variabloj:

* *M* la ĉioma mona maso je ekvinokso
* *N* la nombro de membroj je ekvinokso

Programoj Ğ1 kaj licenco Ğ1
--------------------------

La programoj Ğ1 ebligantaj al la uzantoj mastrumi ties uzon de Ğ1 devas transdoni tiun licencon kun la programo, kaj ankaŭ la aron de la teknikaj parametroj de la mono Ğ1 kaj de la RdF Ğ1, kiu estas enskribita en la bloko 0 de Ğ1. Programo, kiu ne konformiĝus al tiuj devigoj de la licenco, ne estus kongrua kun Ğ1.

Por pli da precizigoj pri la teknikaj detaloj, eblas rekte konsulti la kodon de Duniter, kiu estas libera programo, kaj ankaŭ la datenojn de la blokĉeno Ğ1 ekhavante ĝin tra  ekzemplero (aŭ nodo) Duniter Ğ1.

Pli da informoj ĉe la retejo de la teamo Duniter https://www.duniter.org
 No newline at end of file

license_g1-eo-EO.txt

deleted100644 → 0
+0 −97
Original line number Diff line number Diff line
Licenco Ğ1 - v0.2.9
===================

:dato: 2017-04-04 12:59 
:modifita: 2019-07-14 12:00

**Licenco de la mono kaj promeso de respondeco.**

Ĉiu atestado de nova membro de Ğ1 devas antaŭe akompaniĝi per transdono de tiu ĉi licenco de la mono Ğ1, pri kiu la atestanto devas certiĝi, ke ĝi estis studita, komprenita kaj akceptita de la persono, kiu estos atestita.

Ĉiu okazo de renkontiĝo rilate al Ğ1 devus akompaniĝi per transdono de tiu ĉi licenco, kiu povas esti laŭte legata, kaj transdonita ĉiamaniere.

Reto de Fido Ğ1 (RdF Ğ1)
------------------------------

**Averto:** Atesti ne estas nur certiĝi, ke vi renkontis la personon, tio estas certigi al la komunumo Ğ1, ke vi sufiĉe bone konas la atestitan personon, kaj ke vi tiel scipovos facile kontakti lin/ŝin, kaj kapablos malkovri duoblan konton kreitan de persono atestita de vi mem, aŭ alitipajn problemojn (malapero...), farante komparajn kontrolojn, kiuj eventuale ebligos elmontri la problemon.

**Ege rekomendindaj konsiloj**

Bone koni personon supozigas, ke vi scipovas kontakti lin/ŝin per pluraj rimedoj malsamaj (fizika, elektronika, alitipa...), sed ankaŭ ke vi konas plurajn personojn, kiuj konas lin/ŝin same bone, kaj kiuj ankaŭ scipovas kontakti lin/ŝin simile. Aparte se vi ne bone konas neniun el ties aliaj atestantoj, tio estas forta indiko, ke vi ne bone konas la personon, kaj tia atestaĵo ekas signalon al la tuta komunumo Ğ1. Kaze de nesufiĉa kono, necesas nepre ne atesti.

Neniam atestu sola, sed akompanata de almenaŭ unu alia membro de la RdF Ğ1 por eviti ĉian manipulan eraron. Kaze de eraro, tuj avertu aliajn membrojn de la RdF Ğ1.

Antaŭ ĉiu atestado, ne forgesu kontroli, ĉu tiu konto (ĉu ĝi estas validigota aŭ jam membro) jam ricevis unu aŭ plurajn atestaĵojn. Laŭnecese petu informojn por konkakti tiujn aliajn atestantojn por kune kontroli, ke vi bone konas la personon, kiu kreis la novan konton, kaj ankaŭ ties publikan ŝlosilon.

Kontrolu ke la atestoto bone regas sian konton: bona rimedo por kontroli tion estas sendi kelkajn Ğ1 al la celata konto, kaj poste peti resendon al via propra konto. Tio certigas, ke la atestoto bone regas sian privatan ŝlosilon.

Kontrolu ke viaj kontaktoj bone studis kaj komprenis la licencon Ğ1 ĝisdatan.

Se vi ekkonscias, ke efektiva aŭ ebla atestanto de la koncernata konto ne konas la koncernatan personon, tuj avertu fakulojn pri la temo inter viaj konatoj de la RdF Ğ1, por ke la valid-procezo estu kontrolita de la RdF Ğ1.

Kiam vi estas membro de la RdF Ğ1, kaj ke vi estas atestonta novan konton:


**Vi certiĝis:**

1°) ke vi sufiĉe bone konas (ne nur "vide" konas) la personon, kiu deklaras regi tiun publikan ŝlosilon (novan konton). Vidu la ĉi-suprajn ege rekomendindajn konsilojn por certiĝi "bone koni".

2°) ke vi persone kontrolis kun li/ŝi, ke temas ja pri tiu publika ŝlosilo, kiun vi estas atestonta (vidu ĉi-suprajn konsilojn).

3°) ke vi bone kontrolis kun la koncernata persono, ke li/ŝi ja kreis sian Duniter-dokumenton pri konto-nuligo, kiu laŭbezone ebligos al li/ŝi malaktivigi sian membro-statuson (kaze de konto-ŝtelo, ID-ŝanĝo, erare kreita konto, ktp.).

4a°) ke vi fizike renkontis la personon por certiĝi, ke ja lin/ŝin vi bone konas, kaj ke ja li/ŝi uzas tiun publikan ŝlosilon.

4b°) aŭ ke vi distance kontrolis la ligon persono/publik-ŝlosilo kontaktante la personon per pluraj komunikiloj malsamaj, kiel paper-poŝto + sociaj retoj + forumo + retpoŝto + video-konferenco + telefono (rekoni la voĉon). Ĉar se oni povas fiuzi retadreson aŭ forum-konton, estos multe pli malfacile fiuzi kvar malsamajn komunikilojn, kaj imiti la aspekton (vidan) kaj plie la voĉon de la persono.

La 4a°) tamen preferindas al la 4b°), dum la punktoj 1°) 2°) kaj 3°) estas antaŭ ĉio nepraj.

**Resumitaj reguloj de la RdF:**

Ĉiu membro havas rezervon da 100 eblaj atestaĵoj, kiujn li/ŝi povas sendi nur po unu ĉiun kvinan tagon.

Valida 2 monatojn, atestaĵo por nova membro estas definitive aprobita nur se la atestito havas almenaŭ 4 aliajn atestaĵojn fine de tiuj 2 monatoj, alie la enir-procezo devos esti rekomencita.

Por fariĝi nova membro de la RdF Ğ1, necesas do akiri 5 atestaĵojn kaj troviĝi je distanco <= 5 paŝoj de 80% el la referencaj membroj de la RdF.

Membro de la RdF Ğ1 estas referenca membro, kiam li/ŝi ricevis kaj sendis almenaŭ Y[N] atestaĵojn, kie N estas la nombro de membroj de la RdF kaj Y[N] = plafono N^(1/5). Ekzemploj:

* por 1024 < N ≤ 3125 oni havas Y[N] = 5
* por 7776 < N ≤ 16807 oni havas Y[N] = 7
* por 59049 < N ≤ 100 000 oni havas Y[N] = 10

Ekde kiam la nova membro partoprenas en la RdF Ğ1, ties atestaĵoj restas validaj 2 jarojn.

Por resti membro necesas redoni regule sian konsenton per sia privata ŝlosilo (ĉiun 12-an monaton) kaj certiĝi daŭre havi almenaŭ 5 atestaĵojn validajn post la 2 jaroj.

Mono Ğ1
----------

Ğ1 produktiĝas per Universala Dividendo (UD) por ĉiu homa estaĵo membro de la Reto de Fido Ğ1, laŭ la formo:

* po 1 UD por ĉiu persono ĉiutage

**Kodo de la mono Ğ1**

La sumo en Ğ1 de la UD samas ĉiutage ĝis la venonta ekvinokso, kiam la UD estos tiam revalorigita laŭ la formulo (kun 1 tago = 86 400 sekundoj):

* UDtago(sekvanta ekvinokso) = UDtago(ekvinokso) + c² (M/N)(ekvinokso) / (182,625 tagoj)

kun kiel parametroj:

* c = 4,88% / ekvinokso
* UD(0) = 10,00 Ğ1

kaj kiel variabloj:

* *M* la ĉioma mona maso je ekvinokso
* *N* la nombro de membroj je ekvinokso

Programoj Ğ1 kaj licenco Ğ1
--------------------------

La programoj Ğ1 ebligantaj al la uzantoj mastrumi ties uzon de Ğ1 devas transdoni tiun licencon kun la programo, kaj ankaŭ la aron de la teknikaj parametroj de la mono Ğ1 kaj de la RdF Ğ1, kiu estas enskribita en la bloko 0 de Ğ1. Programo, kiu ne konformiĝus al tiuj devigoj de la licenco, ne estus kongrua kun Ğ1.

Por pli da precizigoj pri la teknikaj detaloj, eblas rekte konsulti la kodon de Duniter, kiu estas libera programo, kaj ankaŭ la datenojn de la blokĉeno Ğ1 ekhavante ĝin tra  ekzemplero (aŭ nodo) Duniter Ğ1.

Pli da informoj ĉe la retejo de la teamo Duniter https://www.duniter.org

license_g1-fr-FR.md

deleted100644 → 0
+0 −97
Original line number Diff line number Diff line
Licence Ğ1 - v0.2.9
===================

:date: 2017-04-04 12:59
:modifié: 2019-07-14 12:00

**Licence de la monnaie et engagement de responsabilité.**

Toute opération de certification d'un nouveau membre de Ğ1 doit préalablement s'accompagner de la transmission de cette licence de la monnaie Ğ1 dont le certificateur doit s'assurer qu'elle a été étudiée, comprise et acceptée par la personne qui sera certifiée.

Tout événement de rencontre concernant Ğ1 devrait s'accompagner de la transmission de cette licence, qui peut être lue à haute voix, et transmise par tout moyen.

Toile de confiance Ğ1 (TdC Ğ1)
------------------------------

**Avertissement :** Certifier n'est pas uniquement s'assurer que vous avez rencontré la personne, c'est assurer à la communauté Ğ1 que vous connaissez suffisamment bien la personne certifiée et que vous saurez ainsi la contacter facilement, et être en mesure de repérer un double compte effectué par une personne certifiée par vous-même, ou d'autres types de problèmes (disparition...), en effectuant des recoupements qui permettront de révéler le problème le cas échéant.

**Conseils fortement recommandés**

Bien connaître une personne suppose que vous êtes en mesure de la contacter par plusieurs moyens différents (physique, électronique, autre...) mais aussi que vous connaissez aussi plusieurs personnes qui la connaissent tout aussi bien et sont donc aussi en mesure de la contacter de même. Notamment si vous ne connaissez pas bien aucun de ses autres certificateurs c'est une indication forte que vous ne connaissez pas bien la personne et une certification de ce type déclenche une alerte vers toute la communauté Ğ1. En cas de connaissance insuffisante il convient de ne surtout pas certifier.

Ne certifiez jamais seul, mais accompagné d'au moins un autre membre de la TdC Ğ1 afin d'éviter toute erreur de manipulation. En cas d'erreur, prévenez immédiatement d'autres membres de la TdC Ğ1.

Avant toute certification, assurez vous de vérifier si son compte (qu'il soit en cours de validation ou déjà membre) a déjà reçu une ou plusieurs certifications. Le cas échéant demandez des informations pour entrer en contact avec ces autres certificateurs afin de vérifier ensemble que vous connaissez bien la personne concernée par la création du nouveau compte, ainsi que la clé publique correspondante.

Vérifiez que le futur certifié maîtrise bien son compte : un bon moyen de vérifier cela est de transférer quelques Ğ1 vers le compte cible, et de demander ensuite un renvoi vers votre propre compte, cela assure de la bonne maîtrise par le futur certifié de sa clé privée.

Vérifiez que vos contacts ont bien étudié et compris la licence Ğ1 à jour.

Si vous vous rendez compte qu'un certificateur effectif ou potentiel du compte concerné ne connaît pas la personne concernée, alertez immédiatement des experts du sujet au sein de vos connaissance de la TdC Ğ1, afin que la procédure de validation soit vérifiée par la TdC Ğ1.

Lorsque vous êtes membre de la TdC Ğ1 et que vous vous apprêtez à certifier un nouveau compte :


**Vous êtes vous assuré :**

1°) De suffisamment bien connaître (pas seulement de la connaître "de visu") la personne qui déclare gérer cette clé publique (nouveau compte). Voir les conseils fortement recommandés ci-dessus pour s'assurer de "bien connaître".

2°) D'avoir personnellement vérifié avec elle qu'il s'agit bien de cette clé publique que vous vous apprêtez à certifier (voir conseils ci-dessus).

3°) D'avoir bien vérifié avec la personne concernée qu'elle a bien généré son document Duniter de révocation de compte qui lui permettra le cas échéant de pouvoir désactiver son statut de membre (cas d'un vol de compte, d'un changement de ID, d'un compte créé à tort etc.).

4a°) De rencontrer la personne physiquement pour vous assurer que c'est bien elle que vous connaissez bien et qui gère cette clé publique.

4b°) Ou bien de vérifier à distance le lien personne / clé publique en contactant la personne par plusieurs moyens de communication différents, comme courrier papier + réseau social + forum + mail + vidéo conférence + téléphone (reconnaître la voix). Car si l'on peut pirater un compte mail ou un compte forum, il sera bien plus difficile d'imaginer pirater quatre moyens de communication distincts, et imiter l'apparence (vidéo) ainsi que la voix de la personne en plus.

Le 4a°) restant toutefois préférable au 4b°), tandis que les points 1°) 2°) et 3°) sont préalablement indispensables.

**Règles abrégées de la TdC :**

Chaque membre a un stock de 100 certifications possibles, qu'il ne peut émettre qu'au rythme de 1 certification / 5 jours.

Valable 2 mois, une certification pour un nouveau membre n'est définitivement adoptée que si le certifié possède au moins 4 autres certifications au bout de ces 2 mois, sinon le processus d'entrée devra être relancé.

Pour devenir un nouveau membre de la TdC Ğ1 il faut donc obtenir 5 certifications et se trouver à une distance <= 5 pas de 80% des membres référents de la TdC.

Un membre de la TdC Ğ1 est membre référent lorsqu'il a reçu et émis au moins Y[N] certifications où N est le nombre de membres de la TdC et Y[N] = plafond N^(1/5). Exemples :

* Pour 1024 < N ≤ 3125 on a Y[N] = 5
* Pour 7776 < N ≤ 16807 on a Y[N] = 7
* pour 59049 < N ≤ 100 000 on a Y[N] = 10

Une fois que le nouveau membre est partie prenante de la TdC Ğ1 ses certifications restent valables 2 ans.

Pour rester membre il faut renouveler son accord régulièrement avec sa clé privée (tous les 12 mois) et s'assurer d'avoir toujours au moins 5 certifications valides au delà des 2 ans.

Monnaie Ğ1
----------

Ğ1 se produit via un Dividende Universel (DU) pour tout être humain membre de la Toile de Confiance Ğ1, qui est de la forme :

* 1 DU par personne et par jour

**Code de la monnaie Ğ1**

Le montant en Ğ1 du DU est identique chaque jour jusqu'au prochain équinoxe où le DU sera alors réévalué selon la formule (avec 1 jour = 86 400 secondes) :

* DUjour(équinoxe suivant) = DUjour(équinoxe) + c² (M/N)(équinoxe) / (182,625 jours)

Avec comme paramètres :

* c = 4,88% / équinoxe
* DU(0) = 10,00 Ğ1

Et comme variables :

* *M* la masse monétaire totale à l'équinoxe
* *N* le nombre de membres à l'équinoxe

Logiciels Ğ1 et licence Ğ1
--------------------------

Les logiciels Ğ1 permettant aux utilisateurs de gérer leur utilisation de Ğ1 doivent transmettre cette licence avec le logiciel ainsi que l'ensemble des paramètres techniques de la monnaie Ğ1 et de la TdC Ğ1 qui sont inscrits dans le bloc 0 de Ğ1. Un logiciel qui ne remplirait pas ces obligations de la licence n'est pas compatible Ğ1.

Pour plus de précisions dans les détails techniques il est possible de consulter directement le code de Duniter qui est un logiciel libre ainsi que les données de la blockchain Ğ1 en la récupérant via une instance (ou nœud) Duniter Ğ1.

Plus d'informations sur le site de l'équipe Duniter https://www.duniter.org
 No newline at end of file

license_g1-fr-FR.txt

deleted100644 → 0
+0 −97
Original line number Diff line number Diff line
Licence Ğ1 - v0.2.9
===================

:date: 2017-04-04 12:59
:modifié: 2019-07-14 12:00

**Licence de la monnaie et engagement de responsabilité.**

Toute opération de certification d'un nouveau membre de Ğ1 doit préalablement s'accompagner de la transmission de cette licence de la monnaie Ğ1 dont le certificateur doit s'assurer qu'elle a été étudiée, comprise et acceptée par la personne qui sera certifiée.

Tout événement de rencontre concernant Ğ1 devrait s'accompagner de la transmission de cette licence, qui peut être lue à haute voix, et transmise par tout moyen.

Toile de confiance Ğ1 (TdC Ğ1)
------------------------------

**Avertissement :** Certifier n'est pas uniquement s'assurer que vous avez rencontré la personne, c'est assurer à la communauté Ğ1 que vous connaissez suffisamment bien la personne certifiée et que vous saurez ainsi la contacter facilement, et être en mesure de repérer un double compte effectué par une personne certifiée par vous-même, ou d'autres types de problèmes (disparition...), en effectuant des recoupements qui permettront de révéler le problème le cas échéant.

**Conseils fortement recommandés**

Bien connaître une personne suppose que vous êtes en mesure de la contacter par plusieurs moyens différents (physique, électronique, autre...) mais aussi que vous connaissez aussi plusieurs personnes qui la connaissent tout aussi bien et sont donc aussi en mesure de la contacter de même. Notamment si vous ne connaissez pas bien aucun de ses autres certificateurs c'est une indication forte que vous ne connaissez pas bien la personne et une certification de ce type déclenche une alerte vers toute la communauté Ğ1. En cas de connaissance insuffisante il convient de ne surtout pas certifier.

Ne certifiez jamais seul, mais accompagné d'au moins un autre membre de la TdC Ğ1 afin d'éviter toute erreur de manipulation. En cas d'erreur, prévenez immédiatement d'autres membres de la TdC Ğ1.

Avant toute certification, assurez vous de vérifier si son compte (qu'il soit en cours de validation ou déjà membre) a déjà reçu une ou plusieurs certifications. Le cas échéant demandez des informations pour entrer en contact avec ces autres certificateurs afin de vérifier ensemble que vous connaissez bien la personne concernée par la création du nouveau compte, ainsi que la clé publique correspondante.

Vérifiez que le futur certifié maîtrise bien son compte : un bon moyen de vérifier cela est de transférer quelques Ğ1 vers le compte cible, et de demander ensuite un renvoi vers votre propre compte, cela assure de la bonne maîtrise par le futur certifié de sa clé privée.

Vérifiez que vos contacts ont bien étudié et compris la licence Ğ1 à jour.

Si vous vous rendez compte qu'un certificateur effectif ou potentiel du compte concerné ne connaît pas la personne concernée, alertez immédiatement des experts du sujet au sein de vos connaissance de la TdC Ğ1, afin que la procédure de validation soit vérifiée par la TdC Ğ1.

Lorsque vous êtes membre de la TdC Ğ1 et que vous vous apprêtez à certifier un nouveau compte :


**Vous êtes vous assuré :**

1°) De suffisamment bien connaître (pas seulement de la connaître "de visu") la personne qui déclare gérer cette clé publique (nouveau compte). Voir les conseils fortement recommandés ci-dessus pour s'assurer de "bien connaître".

2°) D'avoir personnellement vérifié avec elle qu'il s'agit bien de cette clé publique que vous vous apprêtez à certifier (voir conseils ci-dessus).

3°) D'avoir bien vérifié avec la personne concernée qu'elle a bien généré son document Duniter de révocation de compte qui lui permettra le cas échéant de pouvoir désactiver son statut de membre (cas d'un vol de compte, d'un changement de ID, d'un compte créé à tort etc.).

4a°) De rencontrer la personne physiquement pour vous assurer que c'est bien elle que vous connaissez bien et qui gère cette clé publique.

4b°) Ou bien de vérifier à distance le lien personne / clé publique en contactant la personne par plusieurs moyens de communication différents, comme courrier papier + réseau social + forum + mail + vidéo conférence + téléphone (reconnaître la voix). Car si l'on peut pirater un compte mail ou un compte forum, il sera bien plus difficile d'imaginer pirater quatre moyens de communication distincts, et imiter l'apparence (vidéo) ainsi que la voix de la personne en plus.

Le 4a°) restant toutefois préférable au 4b°), tandis que les points 1°) 2°) et 3°) sont préalablement indispensables.

**Règles abrégées de la TdC :**

Chaque membre a un stock de 100 certifications possibles, qu'il ne peut émettre qu'au rythme de 1 certification / 5 jours.

Valable 2 mois, une certification pour un nouveau membre n'est définitivement adoptée que si le certifié possède au moins 4 autres certifications au bout de ces 2 mois, sinon le processus d'entrée devra être relancé.

Pour devenir un nouveau membre de la TdC Ğ1 il faut donc obtenir 5 certifications et se trouver à une distance <= 5 pas de 80% des membres référents de la TdC.

Un membre de la TdC Ğ1 est membre référent lorsqu'il a reçu et émis au moins Y[N] certifications où N est le nombre de membres de la TdC et Y[N] = plafond N^(1/5). Exemples :

* Pour 1024 < N ≤ 3125 on a Y[N] = 5
* Pour 7776 < N ≤ 16807 on a Y[N] = 7
* pour 59049 < N ≤ 100 000 on a Y[N] = 10

Une fois que le nouveau membre est partie prenante de la TdC Ğ1 ses certifications restent valables 2 ans.

Pour rester membre il faut renouveler son accord régulièrement avec sa clé privée (tous les 12 mois) et s'assurer d'avoir toujours au moins 5 certifications valides au delà des 2 ans.

Monnaie Ğ1
----------

Ğ1 se produit via un Dividende Universel (DU) pour tout être humain membre de la Toile de Confiance Ğ1, qui est de la forme :

* 1 DU par personne et par jour

**Code de la monnaie Ğ1**

Le montant en Ğ1 du DU est identique chaque jour jusqu'au prochain équinoxe où le DU sera alors réévalué selon la formule (avec 1 jour = 86 400 secondes) :

* DUjour(équinoxe suivant) = DUjour(équinoxe) + c² (M/N)(équinoxe) / (182,625 jours)

Avec comme paramètres :

* c = 4,88% / équinoxe
* DU(0) = 10,00 Ğ1

Et comme variables :

* *M* la masse monétaire totale à l'équinoxe
* *N* le nombre de membres à l'équinoxe

Logiciels Ğ1 et licence Ğ1
--------------------------

Les logiciels Ğ1 permettant aux utilisateurs de gérer leur utilisation de Ğ1 doivent transmettre cette licence avec le logiciel ainsi que l'ensemble des paramètres techniques de la monnaie Ğ1 et de la TdC Ğ1 qui sont inscrits dans le bloc 0 de Ğ1. Un logiciel qui ne remplirait pas ces obligations de la licence n'est pas compatible Ğ1.

Pour plus de précisions dans les détails techniques il est possible de consulter directement le code de Duniter qui est un logiciel libre ainsi que les données de la blockchain Ğ1 en la récupérant via une instance (ou nœud) Duniter Ğ1.

Plus d'informations sur le site de l'équipe Duniter https://www.duniter.org
 No newline at end of file