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

Target

Select target project
  • cordeliaze/cesium
  • pfouque06/cesium
  • wellno1/cesium
  • 1000i100/cesium
  • vincentux/cesium
  • calbasi/cesium
  • thomasbromehead/cesium
  • matograine/cesium
  • clients/cesium-grp/cesium
  • cedricmenec/cesium
  • Pamplemousse/cesium
  • etienneleba/cesium
  • tnntwister/cesium
  • scanlegentil/cesium
  • morvanc/cesium
  • yyy/cesium
  • Axce/cesium
  • Bertrandbenj/cesium
  • Lupus/cesium
  • elmau/cesium
  • MartinDelille/cesium
  • tykayn/cesium
  • numeropi/cesium
  • Vivakvo/cesium
  • pokapow/cesium
  • pini-gh/cesium
  • anam/cesium
  • RavanH/cesium
  • bpresles/cesium
  • am97/cesium
  • tuxmain/cesium
  • jytou/cesium
  • oliviermaurice/cesium
  • 666titi999/cesium
  • Yvv/cesium
35 results
Show changes
Showing
with 1073 additions and 296 deletions
{
"compileOnSave": false
}
{
"name": "cesium",
"version": "1.4.2",
"description": "Cesium Wallet for G1 currency",
"version": "1.7.14",
"description": "Cesium Wallet for G1 libre currency",
"author": "Benoit Lavenier <benoit.lavenier@e-is.pro>",
"license": "AGPL-3.0",
"homepage": "https://cesium.app",
"repository": {
"type": "git",
"url": "git@git.duniter.org:clients/cesium/cesium.git"
},
"scripts": {
"postinstall": "bower install --allow-root && rm hooks/minify-conf.json hooks/uglify-config.json hooks/after_prepare/ionic-minify.js hooks/after_prepare/uglify.js",
"install-platforms": "ionic state restore",
"clean": "gulp clean webClean webExtClean && rm -rf dist/web dist/android && rm -f desktop/**/cesium-*.deb desktop/**/cesium-*.exe platforms/android/**/*.apk",
"postinstall": "node scripts/node/postinstall.js",
"gulp": "gulp",
"lint": "gulp lint",
"install-platforms": "ionic cordova prepare",
"start": "ionic serve",
"start:webExt": "gulp webExtCompile && web-ext run --source-dir ./dist/web/ext/ --devtools",
"start:android": "ionic cordova run android --color",
"docker:build": "sudo docker build . -t cesium/release",
"docker:run": "sudo docker run -ti --rm -p 8100:8100 -p 35729:35729 -v .:/cesium:rw cesium/release",
"build:web": "config --env default && gulp build:web --release"
"build": "gulp build",
"build:web": "gulp config --env default && gulp webBuild --release",
"build:webExt": "gulp config --env default && gulp webExtBuild --release",
"build:android": "ionic cordova build android --warning-mode=none --color --release -- -- --packageType=apk",
"build:ios": "ionic cordova build ios --warning-mode=none --color --release"
},
"keywords": [
"duniter",
"cesium",
"g1",
"ionic",
"angular",
"angularjs",
"cordova",
"crypto-currency"
],
"author": "Benoit Lavenier <benoit.lavenier@e-is.pro>",
"license": "AGPL-3.0",
"readmeFilename": "README.md",
"bugs": {
"url": "https://git.duniter.org/clients/cesium-grp/cesium/issues",
"new": "https://git.duniter.org/clients/cesium-grp/cesium/issues/new"
},
"dependencies": {
"cordova": "^7.1.0",
"cordova-android": "^6.2.3",
"cordova-ios": "^4.5.5",
"cordova-plugin-camera": "^2.4.1",
"cordova-plugin-compat": "^1.1.0",
"cordova-plugin-console": "^1.0.7",
"cordova-plugin-crosswalk-webview": "^2.3.0",
"cordova-plugin-device": "^1.1.6",
"cordova-plugin-dialogs": "^1.3.3",
"cordova-plugin-inappbrowser": "^1.7.1",
"cordova-plugin-minisodium": "^1.0.0",
"cordova-plugin-secure-storage": "^2.6.8",
"cordova-plugin-splashscreen": "^3.2.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-vibration": "^2.1.5",
"cordova-plugin-websocket": "^0.12.2",
"cordova-plugin-whitelist": "^1.3.2",
"cordova-plugin-x-toast": "^2.6.0",
"ionic-plugin-keyboard": "^2.2.1",
"moment": "~2.19.3",
"numeral": "1.5.3",
"phonegap-plugin-barcodescanner": "git+https://github.com/phonegap/phonegap-plugin-barcodescanner.git"
"@bower_components/Leaflet.EasyButton": "CliffCloud/Leaflet.EasyButton#v2.4.0",
"@bower_components/Leaflet.FeatureGroup.SubGroup": "ghybs/Leaflet.FeatureGroup.SubGroup#v0.1.2",
"@bower_components/Leaflet.awesome-markers": "lvoogdt/Leaflet.awesome-markers#v2.0.2",
"@bower_components/aes-js": "ricmoo/aes-js#v3.1.2",
"@bower_components/angular": "angular/bower-angular#v1.5.11",
"@bower_components/angular-animate": "angular/bower-angular-animate#v1.5.11",
"@bower_components/angular-bind-notifier": "aeisenberg/angular-bind-notifier#v1.1.11",
"@bower_components/angular-cache": "jmdobry/angular-cache#4.6.0",
"@bower_components/angular-chart.js": "jtblin/angular-chart#1.1.1",
"@bower_components/angular-expose-api": "duniter-cesium/angular-expose-api#0.3.1",
"@bower_components/angular-file-saver": "alferov/angular-file-saver#1.1.3",
"@bower_components/angular-fullscreen-toggle": "duniter-cesium/angular-fullscreen-toggle#1.0.4",
"@bower_components/angular-image-crop": "duniter-cesium/angular-image-crop#v2.0.2",
"@bower_components/angular-leaflet-directive": "duniter-cesium/angular-leaflet-directive#0.10.1",
"@bower_components/angular-messages": "angular/bower-angular-messages#v1.5.11",
"@bower_components/angular-moment": "urish/angular-moment#1.3.0",
"@bower_components/angular-resource": "angular/bower-angular-resource#v1.5.11",
"@bower_components/angular-sanitize": "angular/bower-angular-sanitize#v1.5.11",
"@bower_components/angular-screenmatch": "bensurman/angular-screenmatch#v1.0.1",
"@bower_components/angular-simple-logger": "nmccready/angular-simple-logger#0.1.7",
"@bower_components/angular-translate": "PascalPrecht/bower-angular-translate#2.18.2",
"@bower_components/angular-ui-router": "angular-ui/angular-ui-router-bower#0.2.18",
"@bower_components/blob-polyfill": "bjornstar/blob-polyfill#~1.0.20150320",
"@bower_components/chart.js": "chartjs/Chart.js#v2.9.3",
"@bower_components/ion-digit-keyboard": "skol-pro/ion-digit-keyboard#973b90c2fc",
"@bower_components/ionic": "driftyco/ionic-bower#v1.3.5",
"@bower_components/ionic-material": "zachsoft/Ionic-Material#v0.4.2",
"@bower_components/jdenticon": "dmester/jdenticon#3.1.0",
"@bower_components/js-nacl": "tonyg/js-nacl#1.4.0",
"@bower_components/js-scrypt": "tonyg/js-scrypt#v1.2.0",
"@bower_components/leaflet": "Leaflet/Leaflet#v0.7.7",
"@bower_components/leaflet-search": "stefanocudini/leaflet-search#v2.7.2",
"@bower_components/leaflet.loading": "ebrelsford/Leaflet.loading#v0.1.24",
"@bower_components/leaflet.markercluster": "Leaflet/Leaflet.markercluster#v0.5.0",
"@bower_components/moment": "moment/moment#2.24.0",
"@bower_components/ng-idle": "HackedByChinese/ng-idle#1.3.2",
"@bower_components/ngCordova": "driftyco/ng-cordova#v0.1.27-alpha",
"@bower_components/numeral": "adamwdraper/Numeral-js#1.5.6",
"@bower_components/qrcode-generator": "kazuhikoarase/qrcode-generator#js1.4.4",
"@bower_components/robotodraft": "raibutera/robotodraft#1.1.0",
"@bower_components/socket.io": "socketio/socket.io#^1.7.4",
"@bower_components/socket.io-client": "socketio/socket.io-client#^1.7.4",
"@bower_components/ui-leaflet": "angular-ui/ui-leaflet#v2.0.0",
"@bower_components/underscore": "jashkenas/underscore#1.10.2",
"through2": "^4.0.2",
"uuid": "3.2.1"
},
"devDependencies": {
"bower": "^1.8.0",
"cordova-uglify": "^0.2.3",
"del": "^2.2.0",
"@ionic/cli": "~6.20.9",
"@ionic/v1-toolkit": "^3.2.20",
"@prantlf/gulp-jsonlint": "^2.4.0",
"ansi-colors": "^4.1.1",
"cordova": "^11.1.0",
"cordova-android": "^10.1.2",
"cordova-clipboard": "^1.3.0",
"cordova-fetch": "^4.0.0",
"cordova-ios": "^6.3.0",
"cordova-plugin-androidx-adapter": "^1.1.3",
"cordova-plugin-camera": "^5.0.3",
"cordova-plugin-customurlscheme": "^5.0.2",
"cordova-plugin-device": "^2.1.0",
"cordova-plugin-dialogs": "^2.0.2",
"cordova-plugin-file": "^8.0.0",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^5.0.0",
"cordova-plugin-network-information": "~3.0.0",
"cordova-plugin-secure-storage-android10": "~6.0.7",
"cordova-plugin-splashscreen": "^6.0.2",
"cordova-plugin-statusbar": "^3.0.0",
"cordova-plugin-vibration": "^3.1.1",
"cordova-plugin-websocket": "^0.12.2",
"cordova-plugin-x-toast": "^2.7.3",
"del": "^5.1.0",
"delete-empty": "^0.1.3",
"event-stream": "3.3.4",
"fs": "^0.0.2",
"fancy-log": "^1.3.3",
"glob": "^5.0.15",
"gulp": "^3.9.1",
"gulp-angular-templatecache": "^1.8.0",
"graceful-fs": "^4.2.3",
"gulp": "^4.0.2",
"gulp-angular-templatecache": "^3.0.1",
"gulp-angular-translate": "^0.1.4",
"gulp-base64": "^0.1.3",
"gulp-bump": "^2.1.0",
"gulp-clean": "^0.3.2",
"gulp-clean-css": "^2.0.10",
"gulp-concat": "^2.2.0",
"gulp-concat-css": "^2.3.0",
"gulp-base64-v2": "^1.0.4",
"gulp-bump": "^3.1.3",
"gulp-clean": "^0.4.0",
"gulp-clean-css": "^4.3.0",
"gulp-cli": "^2.3.0",
"gulp-css-base64": "^1.3.4",
"gulp-csso": "^2.0.0",
"gulp-filter": "^4.0.0",
"gulp-csso": "^4.0.1",
"gulp-debug": "^4.0.0",
"gulp-filter": "^6.0.0",
"gulp-footer": "^2.0.2",
"gulp-header": "^2.0.7",
"gulp-header": "^2.0.9",
"gulp-html-remove": "^0.1.1",
"gulp-htmlmin": "^2.0.0",
"gulp-jshint": "^2.0.1",
"gulp-markdown": "^1.2.0",
"gulp-ng-annotate": "^2.0.0",
"gulp-ng-constant": "^1.1.0",
"gulp-remove-code": "^1.0.2",
"gulp-rename": "^1.2.0",
"gulp-replace": "^0.5.4",
"gulp-rev": "^7.0.0",
"gulp-rev-replace": "^0.4.3",
"gulp-sass": "^2.2.0",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^2.0.0",
"gulp-useref": "^3.1.0",
"gulp-util": "^3.0.8",
"gulp-zip": "^3.2.0",
"ionic": "^1.7.16",
"ionic-minify": "^2.0.8",
"jshint": "^2.9.2",
"gulp-htmlmin": "^5.0.1",
"gulp-jshint": "^2.1.0",
"gulp-markdown": "^5.0.1",
"gulp-ng-annotate": "^2.1.0",
"gulp-ng-constant": "^1.2.0",
"gulp-remove-code": "^3.0.4",
"gulp-rename": "^2.0.0",
"gulp-replace": "^1.0.0",
"gulp-sass": "^5.1.0",
"gulp-sort": "^2.0.0",
"gulp-sourcemaps": "^2.6.5",
"gulp-sri-hash": "^2.2.1",
"gulp-uglify-es": "^2.0.0",
"gulp-useref": "^4.0.1",
"gulp-zip": "^5.0.2",
"ionic-plugin-keyboard": "^2.2.1",
"jshint": "^2.12.0",
"jshint-stylish": "^2.2.1",
"lazypipe": "^1.0.2",
"map-stream": "0.0.7",
"merge2": "^1.3.0",
"mv": "^2.1.1",
"node-sass": "^3.3.3",
"playup": "^1.0.2",
"shelljs": "^0.3.0",
"yargs": "^4.3.1"
"node-sass": "^9.0.0",
"phonegap-plugin-barcodescanner": "^8.1.0",
"playup": "^1.1.0",
"vinyl-fs": "^3.0.3",
"web-ext": "^7.9.0",
"yargs": "^5.0.0"
},
"peerDependencies": {
"gulp": "^4.0.2",
"gulp-cli": "^2.3.0",
"leaflet": "Leaflet/Leaflet#v0.7.7",
"nopt": "4.0.1"
},
"resolutions": {
"gulp": "4.0.2",
"gulp-cli": "2.3.0",
"graceful-fs": "4.2.4"
},
"cordovaPlugins": [
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-console",
"ionic-plugin-keyboard",
"cordova-plugin-device",
"cordova-plugin-statusbar",
"cordova-plugin-camera",
"cordova-plugin-websocket",
"cordova-plugin-vibration",
"cordova-plugin-dialogs",
"cordova-plugin-minisodium",
"cordova-plugin-secure-storage",
{
"locator": "https://github.com/phonegap/phonegap-plugin-barcodescanner.git",
"id": "phonegap-plugin-barcodescanner"
},
"cordova-plugin-inappbrowser",
"cordova-plugin-x-toast",
"cordova-clipboard"
],
"cordovaPlatforms": [
"android",
"ios"
],
"cordova": {
"plugins": {
"cordova-plugin-camera": {},
"cordova-plugin-console": {},
"cordova-plugin-camera": {
"CAMERA_USAGE_DESCRIPTION": "Add picture to the user profile",
"PHOTOLIBRARY_USAGE_DESCRIPTION": "Take a picture for the user profile",
"ANDROID_SUPPORT_V4_VERSION": "28.+"
},
"cordova-plugin-device": {},
"cordova-plugin-dialogs": {},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-minisodium": {},
"cordova-plugin-secure-storage": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-vibration": {},
"cordova-plugin-websocket": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-x-toast": {},
"ionic-plugin-keyboard": {},
"cordova-plugin-ionic-keyboard": {},
"phonegap-plugin-barcodescanner": {
"CAMERA_USAGE_DESCRIPTION": " "
}
"CAMERA_USAGE_DESCRIPTION": "To scan QRCode",
"ANDROID_SUPPORT_V4_VERSION": "28.+"
},
"ionic-plugin-keyboard": {},
"cordova-clipboard": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "28.+"
},
"cordova-plugin-file": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-customurlscheme": {
"URL_SCHEME": "june",
"ANDROID_SCHEME": "http",
"ANDROID_HOST": "g1.duniter.org",
"ANDROID_PATHPREFIX": "/wallet"
},
"cordova-plugin-secure-storage-android10": {},
"cordova-plugin-network-information": {}
},
"platforms": [
"android",
"ios"
"ios",
"android"
]
},
"engines": {
"node": ">= 16.17.0",
"yarn": ">= 1.22.0"
}
}
\ No newline at end of file
}
#!/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
DIRNAME=`pwd`
### Get current version (package.json)
current=`grep -oP "version\": \"\d+.\d+.\d+((a|b)[0-9]+)?" package.json | grep -oP "\d+.\d+.\d+((a|b)[0-9]+)?"`
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 current version for Android
currentAndroid=`grep -oP "android-versionCode=\"[0-9]+\"" config.xml | grep -oP "\d+"`
if [[ "_$currentAndroid" == "_" ]]; then
echo "Unable to read the current Android version in 'config.xml'. Please check version format is an integer."
exit -1;
fi
echo "Current Android version: $currentAndroid"
### Releasing
if [[ $2 =~ ^[0-9]+.[0-9]+.[0-9]+((a|b)[0-9]+)?$ && $3 =~ ^[0-9]+$ ]]; then
echo "new build version: $2"
echo "new build android version: $3"
case "$1" in
rel|pre)
# Change the version in files: 'package.json' and 'config.xml'
sed -i "s/version\": \"$current\"/version\": \"$2\"/g" package.json
currentConfigXmlVersion=`grep -oP "version=\"\d+.\d+.\d+((a|b)[0-9]+)?\"" config.xml | grep -oP "\d+.\d+.\d+((a|b)[0-9]+)?"`
sed -i "s/ version=\"$currentConfigXmlVersion\"/ version=\"$2\"/g" config.xml
sed -i "s/ android-versionCode=\"$currentAndroid\"/ android-versionCode=\"$3\"/g" config.xml
# Change version in file: 'www/manifest.json'
currentManifestJsonVersion=`grep -oP "version\": \"\d+.\d+.\d+((a|b)[0-9]+)?\"" www/manifest.json | grep -oP "\d+.\d+.\d+((a|b)[0-9]+)?"`
sed -i "s/version\": \"$currentManifestJsonVersion\"/version\": \"$2\"/g" www/manifest.json
# Bump the install.sh
sed -i "s/echo \"v.*\" #lastest/echo \"v$2\" #lastest/g" install.sh
;;
*)
echo "No task given"
exit -1
;;
esac
# Load env.sh if exists
if [[ -f "${DIRNAME}/env.sh" ]]; then
source ${DIRNAME}/env.sh $*
fi
# Check the Java version
JAVA_VERSION=`java -version 2>&1 | grep "java version" | awk '{print $3}' | tr -d \"`
if [[ $? -ne 0 ]]; then
echo "No Java JRE 1.8 found in machine. This is required for Android artifacts."
exit -1
fi
JAVA_MINOR_VERSION=`echo ${JAVA_VERSION} | awk '{split($0, array, ".")} END{print array[2]}'`
if [[ ${JAVA_MINOR_VERSION} -ne 8 ]]; then
echo "Require a Java JRE in version 1.8, but found ${JAVA_VERSION}. You can override your default JAVA_HOME in 'env.sh'."
exit -1
fi
echo "Java: $JAVA_VERSION"
# force nodejs version to 5
if [[ -d "$NVM_DIR" ]]; then
. $NVM_DIR/nvm.sh
nvm use 5
if [[ $? -ne 0 ]]; then
exit -1
fi
else
echo "nvm (Node version manager) not found (directory $NVM_DIR not found). Please install, and retry"
exit -1
fi
# Update config file
gulp config --env default_fr
echo "----------------------------------"
echo "- Compiling sources..."
echo "----------------------------------"
gulp
echo "----------------------------------"
echo "- Building Android artifact..."
echo "----------------------------------"
rm -rf platforms/android/build/outputs/release/*
ionic build android --release
if [[ $? -ne 0 ]]; then
exit -1
fi
echo "----------------------------------"
echo "- Building web artifact..."
echo "----------------------------------"
# Update config file
gulp config --env default
gulp build:web --release
if [[ $? -ne 0 ]]; then
exit -1
fi
echo "----------------------------------"
echo "- Executing git push, with tag: v$2"
echo "----------------------------------"
# Commit
cd $DIRNAME
git reset HEAD
git add package.json config.xml install.sh www/js/config.js www/manifest.json
git commit -m "v$2"
git tag "v$2"
git push
if [[ $? -ne 0 ]]; then
exit -1
fi
# Pause (wait propagation to from git.duniter.org to github)
echo " Waiting 30s, for propagation to github..."
sleep 30s
description="$4"
if [[ "_$description" == "_" ]]; then
description="Release v$2"
fi
echo "**********************************"
echo "* Uploading artifacts to Github..."
echo "**********************************"
./github.sh $1 ''"$description"''
if [[ $? -ne 0 ]]; then
exit -1
fi
echo "----------------------------------"
echo "- Building desktop artifacts..."
echo "----------------------------------"
#FIXME: ceci empêche d'etre sur le master/origin de cesium-desktop
#git submodule update --init
git submodule sync
if [[ -d "$DIRNAME/platforms/desktop" ]]; then
cd platforms/desktop
# Build desktop assets
./release.sh $2
if [[ $? -ne 0 ]]; then
exit -1
fi
else
echo "WARN: platform/desktop not found -> Skipping desktop build!"
fi;
# back to nodejs version 5
cd $DIRNAME
nvm use 5
echo "**********************************"
echo "* Build release succeed !"
echo "**********************************"
else
echo "Wrong version format"
echo "Usage:"
echo " > ./release.sh [pre|rel] <version> <android-version> <release_description>"
echo "with:"
echo " version: x.y.z"
echo " android-version: nnn"
echo " release_description: a short description of the release"
fi
These are Cordova resources. You can replace icon.png and splash.png and run
`ionic cordova resources` to generate custom icons and splash screens for your
app. See `ionic cordova resources --help` for details.
Cordova reference documentation:
- Icons: https://cordova.apache.org/docs/en/latest/config_ref/images.html
- Splash Screens: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/
FROM ubuntu:18.04
LABEL maintainer="benoit [dot] lavenier [at] e-is [dot] pro"
ENV DEBIAN_FRONTEND=noninteractive \
ANDROID_HOME=/opt/android-sdk-linux \
NODE_VERSION=10.20.0 \
NPM_VERSION=6.14.4 \
YARN_VERSION=1.22.4 \
IONIC_CLI_VERSION=6.5.0 \
CORDOVA_VERSION=8.1.2 \
CORDOVA_RES_VERSION=0.11.0 \
NATIVE_RUN_VERSION=1.0.0 \
GRADLE_VERSION=4.10.3 \
GULP_VERSION=2.2.0 \
ANDROID_NDK_VERSION=r19c \
ANDROID_SDK_VERSION=r29.0.2
# Install basics
RUN apt-get update && \
apt-get install -y git wget curl unzip build-essential software-properties-common ruby ruby-dev ruby-ffi gcc make python && \
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"
# Install global nodeJS dependencies
RUN npm install -g npm@"$NPM_VERSION" && \
npm install -g yarn@"$YARN_VERSION" gulp@"$GULP_VERSION" cordova@"$CORDOVA_VERSION" cordova-res@"$CORDOVA_RES_VERSION" @ionic/cli@"$IONIC_CLI_VERSION" && \
npm cache clear --force
# Install Cordova
RUN npm install -g cordova@"$CORDOVA_VERSION" cordova-res@"$CORDOVA_RES_VERSION" native-run@"$NATIVE_RUN_VERSION" && \
npm cache clear --force
# Install Android prerequisites
RUN echo ANDROID_HOME="${ANDROID_HOME}" >> /etc/environment && \
dpkg --add-architecture i386 && \
apt-get update && \
apt-get -y install openjdk-11-jdk-headless && \
apt-get install -y --force-yes expect ant wget zipalign libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1 qemu-kvm kmod && \
apt-get clean && \
apt-get autoclean && \
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_"$ANDROID_SDK_VERSION"-linux.tgz && \
# tar xzf android-sdk.tgz && \
# rm -f android-sdk.tgz && \
# chown -R root. /opt
#
## Install Android NDK
#RUN cd /opt/ && \
# wget --output-document=android-ndk.zip --quiet https://dl.google.com/android/repository/android-ndk-"$ANDROID_NDK_VERSION"-linux-x86_64.zip && \
# unzip android-ndk.zip && \
# rm android-ndk.zip && \
# chown -R root. /opt
# Install Gradle
#RUN cd /opt/ && \
# 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
# 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-29.0.0,android-29,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}
# Install source code
#RUN git config --global user.email "user.name@domain.com" && \
# git config --global user.name "User Name" && \
RUN git clone https://git.duniter.org/clients/cesium-grp/cesium.git && \
cd cesium && \
yarn install --ignore-engines
# Restore cordova platforms
RUN cd cesium && \
yarn run install-platforms
# TODO: Test First Build so that it will be faster later
## ionic cordova build android --prod --no-interactive --release
WORKDIR cesium
EXPOSE 8100 35729
CMD ["yarn", "run", "start"]
package com.crypho.plugins;
import android.annotation.TargetApi;
import android.app.KeyguardManager;
import android.content.Context;
import android.content.Intent;
import android.hardware.biometrics.BiometricPrompt;
import android.os.Build;
import android.os.CancellationSignal;
import android.os.Handler;
import android.provider.Settings;
import android.util.Base64;
import android.util.Log;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaArgs;
import org.apache.cordova.CordovaPlugin;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.lang.reflect.Method;
import java.util.Hashtable;
import java.util.Map;
import java.util.concurrent.Executor;
/**
* CHANGES :
* 31/05/2023 - BLA - Report MR as a workaround for issue #6 (https://github.com/Sotam/cordova-plugin-secure-storage-android10/issues/6)
* TODO: remove this file after new release, with this fixed issue
*/
public class SecureStorage extends CordovaPlugin {
private static final String TAG = "SecureStorage";
private static final boolean SUPPORTED = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT;
private static final Boolean IS_API_29_AVAILABLE = Build.VERSION.SDK_INT >= Build.VERSION_CODES.M;
private static final Integer DEFAULT_AUTHENTICATION_VALIDITY_TIME = 60 * 60 * 24; // Fallback to 24h. Workaround to avoid asking for credentials too "often"
private static final String MSG_NOT_SUPPORTED = "API 19 (Android 4.4 KitKat) is required. This device is running API " + Build.VERSION.SDK_INT;
private static final String MSG_DEVICE_NOT_SECURE = "Device is not secure";
private static final String MSG_KEYS_FAILED = "Generate RSA Encryption Keys failed. ";
private Hashtable<String, SharedPreferencesHandler> SERVICE_STORAGE = new Hashtable<String, SharedPreferencesHandler>();
private String INIT_SERVICE;
private String INIT_PACKAGENAME;
private volatile CallbackContext secureDeviceContext, generateKeysContext, unlockCredentialsContext;
private volatile boolean generateKeysContextRunning = false;
private AbstractRSA rsa = RSAFactory.getRSA();
@Override
public void onResume(boolean multitasking) {
if (secureDeviceContext != null) {
if (isDeviceSecure()) {
secureDeviceContext.success();
} else {
secureDeviceContext.error(MSG_DEVICE_NOT_SECURE);
}
secureDeviceContext = null;
}
if (unlockCredentialsContext != null) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
cordova.getThreadPool().execute(new Runnable() {
public void run() {
if (unlockCredentialsContext != null) {
String alias = service2alias(INIT_SERVICE);
if (rsa.userAuthenticationRequired(alias)) {
unlockCredentialsContext.error("User not authenticated");
}
unlockCredentialsContext.success();
unlockCredentialsContext = null;
}
}
});
}
}
}
@Override
public boolean execute(String action, CordovaArgs args, final CallbackContext callbackContext) throws JSONException {
if (!SUPPORTED) {
Log.w(TAG, MSG_NOT_SUPPORTED);
callbackContext.error(MSG_NOT_SUPPORTED);
return false;
}
if ("init".equals(action)) {
String service = args.getString(0);
JSONObject options = args.getJSONObject(1);
String packageName = options.optString("packageName", getContext().getPackageName());
Context ctx = null;
// Solves #151. By default, we use our own ApplicationContext
// If packageName is provided, we try to get the Context of another Application with that packageName
try {
ctx = getPackageContext(packageName);
} catch (Exception e) {
// This will fail if the application with given packageName is not installed
// OR if we do not have required permissions and cause a security violation
Log.e(TAG, "Init failed :", e);
callbackContext.error(e.getMessage());
}
INIT_PACKAGENAME = ctx.getPackageName();
String alias = service2alias(service);
INIT_SERVICE = service;
SharedPreferencesHandler PREFS = new SharedPreferencesHandler(alias, ctx);
SERVICE_STORAGE.put(service, PREFS);
if (!isDeviceSecure()) {
Log.e(TAG, MSG_DEVICE_NOT_SECURE);
callbackContext.error(MSG_DEVICE_NOT_SECURE);
} else if (!rsa.encryptionKeysAvailable(alias)) {
// Encryption Keys aren't available, proceed to generate them
Integer userAuthenticationValidityDuration = options.optInt("userAuthenticationValidityDuration", DEFAULT_AUTHENTICATION_VALIDITY_TIME);
generateKeysContext = callbackContext;
generateEncryptionKeys(userAuthenticationValidityDuration);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT) {
unlockCredentialsLegacy();
}
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && rsa.userAuthenticationRequired(alias)) {
// User has to confirm authentication via device credentials.
String title = options.optString("unlockCredentialsTitle", null);
String description = options.optString("unlockCredentialsDescription", null);
unlockCredentialsContext = callbackContext;
unlockCredentials(title, description);
} else {
initSuccess(callbackContext);
}
return true;
}
if ("set".equals(action)) {
final String service = args.getString(0);
final String key = args.getString(1);
final String value = args.getString(2);
final String cipherMode = args.isNull(3) ? null : args.getString(3); // Close #6 - cipherMode is optional
final String adata = service;
cordova.getThreadPool().execute(new Runnable() {
public void run() {
try {
JSONObject result = AES.encrypt(value.getBytes(), adata.getBytes(), cipherMode);
byte[] aes_key = Base64.decode(result.getString("key"), Base64.DEFAULT);
byte[] aes_key_enc = rsa.encrypt(aes_key, service2alias(service));
result.put("key", Base64.encodeToString(aes_key_enc, Base64.DEFAULT));
if (cipherMode != null) result.put("mode", cipherMode);
getStorage(service).store(key, result.toString());
callbackContext.success(key);
} catch (Exception e) {
Log.e(TAG, "Encrypt failed :", e);
callbackContext.error(e.getMessage());
}
}
});
return true;
}
if ("get".equals(action)) {
final String service = args.getString(0);
final String key = args.getString(1);
String value = getStorage(service).fetch(key);
if (value != null) {
JSONObject json = new JSONObject(value);
final byte[] encKey = Base64.decode(json.getString("key"), Base64.DEFAULT);
final JSONObject data = json.getJSONObject("value");
final byte[] ct = Base64.decode(data.getString("ct"), Base64.DEFAULT);
final byte[] iv = Base64.decode(data.getString("iv"), Base64.DEFAULT);
final byte[] adata = Base64.decode(data.getString("adata"), Base64.DEFAULT);
cordova.getThreadPool().execute(new Runnable() {
public void run() {
try {
byte[] decryptedKey = rsa.decrypt(encKey, service2alias(service));
String cipherMode = data.isNull("mode") ? null : data.getString("mode");
String decrypted = new String(AES.decrypt(ct, decryptedKey, iv, adata, cipherMode));
callbackContext.success(decrypted);
} catch (Exception e) {
Log.e(TAG, "Decrypt failed :", e);
callbackContext.error(e.getMessage());
}
}
});
} else {
callbackContext.error("Key [" + key + "] not found.");
}
return true;
}
if ("secureDevice".equals(action)) {
// Open the Security Settings screen. The app developer should inform the user about
// the security requirements of the app and initialize again after the user has changed the screen-lock settings
secureDeviceContext = callbackContext;
secureDevice();
return true;
}
if ("remove".equals(action)) {
String service = args.getString(0);
String key = args.getString(1);
getStorage(service).remove(key);
callbackContext.success(key);
return true;
}
if ("keys".equals(action)) {
String service = args.getString(0);
callbackContext.success(new JSONArray(getStorage(service).keys()));
return true;
}
if ("clear".equals(action)) {
String service = args.getString(0);
getStorage(service).clear();
callbackContext.success();
return true;
}
return false;
}
private boolean isDeviceSecure() {
KeyguardManager keyguardManager = (KeyguardManager) (getContext().getSystemService(Context.KEYGUARD_SERVICE));
try {
Method isSecure = null;
isSecure = keyguardManager.getClass().getMethod("isDeviceSecure");
return ((Boolean) isSecure.invoke(keyguardManager)).booleanValue();
} catch (Exception e) {
return keyguardManager.isKeyguardSecure();
}
}
private String service2alias(String service) {
String res = INIT_PACKAGENAME + "." + service;
return res;
}
private SharedPreferencesHandler getStorage(String service) {
return SERVICE_STORAGE.get(service);
}
private void initSuccess(CallbackContext context) {
context.success();
}
/**
* Create the Confirm Credentials screen.
* You can customize the title and description or Android will provide a generic one for you if you leave it null
*
* @param title
* @param description
*/
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void unlockCredentials(final String title, final String description) {
cordova.getActivity().runOnUiThread(new Runnable() {
public void run() {
if (IS_API_29_AVAILABLE && isDeviceSecure()) {
// Building a biometric prompt instance with custom title and description.
BiometricPrompt.Builder biometricPromptBuilder = new BiometricPrompt.Builder(getContext());
biometricPromptBuilder.setTitle(title);
biometricPromptBuilder.setDescription(description);
//biometricPromptBuilder.setDeviceCredentialAllowed(true);
BiometricPrompt biometricPrompt = biometricPromptBuilder.build();
CancellationSignal cancellationSignal = new CancellationSignal();
final Executor executor = getExecutor();
// Launching the credential confirmation popup to get biometric validation.
// If biometric is not available will open the other unlock methods.
biometricPrompt.authenticate(cancellationSignal, executor, new BiometricPrompt.AuthenticationCallback() {
@Override
public void onAuthenticationError(int errorCode, CharSequence errString) {
super.onAuthenticationError(errorCode, errString);
}
@Override
public void onAuthenticationHelp(int helpCode, CharSequence helpString) {
super.onAuthenticationHelp(helpCode, helpString);
}
@Override
public void onAuthenticationSucceeded(BiometricPrompt.AuthenticationResult result) {
super.onAuthenticationSucceeded(result);
}
@Override
public void onAuthenticationFailed() {
super.onAuthenticationFailed();
}
});
} else {
KeyguardManager keyguardManager = (KeyguardManager) (getContext().getSystemService(Context.KEYGUARD_SERVICE));
Intent intent = keyguardManager.createConfirmDeviceCredentialIntent(title, description);
if (intent != null) {
startActivity(intent);
} else {
Log.e(TAG, "Error creating Confirm Credentials Intent");
unlockCredentialsContext.error("Cant't unlock credentials, error creating Confirm Credentials Intent");
}
}
}
});
}
@TargetApi(Build.VERSION_CODES.KITKAT)
private void unlockCredentialsLegacy() {
cordova.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
Intent intent = new Intent("com.android.credentials.UNLOCK");
startActivity(intent);
}
});
}
/**
* Generate Encryption Keys in the background.
*
* @param userAuthenticationValidityDuration User authentication validity duration in seconds
*/
private void generateEncryptionKeys(final Integer userAuthenticationValidityDuration) {
if (generateKeysContext != null && !generateKeysContextRunning) {
cordova.getThreadPool().execute(new Runnable() {
public void run() {
generateKeysContextRunning = true;
try {
String alias = service2alias(INIT_SERVICE);
SharedPreferencesHandler storage = getStorage(INIT_SERVICE);
if(storage.isEmpty()){
//Solves Issue #96. The RSA key may have been deleted by changing the lock type.
getStorage(INIT_SERVICE).clear();
rsa.createKeyPair(getContext(), alias, userAuthenticationValidityDuration);
}
generateKeysContext.success();
} catch (Exception e) {
Log.e(TAG, MSG_KEYS_FAILED, e);
generateKeysContext.error(MSG_KEYS_FAILED + e.getMessage());
} finally {
generateKeysContext = null;
generateKeysContextRunning = false;
}
}
});
}
}
/**
* Open Security settings screen.
*/
private void secureDevice() {
cordova.getActivity().runOnUiThread(new Runnable() {
public void run() {
try {
Intent intent = new Intent(Settings.ACTION_SECURITY_SETTINGS);
startActivity(intent);
} catch (Exception e) {
Log.e(TAG, "Error opening Security settings to secure device : ", e);
secureDeviceContext.error(e.getMessage());
}
}
});
}
private Context getContext() {
return cordova.getActivity().getApplicationContext();
}
/**
* Creates a executor with handler to run runnable tasks.
*/
private Executor getExecutor() {
return new Executor() {
@Override
public void execute(Runnable command) {
Handler handler = new Handler();
handler.post(command);
}
};
}
private Context getPackageContext(String packageName) throws Exception {
Context pkgContext = null;
Context context = getContext();
if (context.getPackageName().equals(packageName)) {
pkgContext = context;
} else {
pkgContext = context.createPackageContext(packageName, 0);
}
return pkgContext;
}
private void startActivity(Intent intent) {
cordova.getActivity().startActivity(intent);
}
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}
distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-6.7.1-all.zip
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.13176"
android:scaleY="0.13176"
android:translateX="21.06"
android:translateY="21.06">
<path
android:pathData="M390.99,122.28C418.21,157.18 434.92,200.28 441.2,248.24C441.19,276.71 435.71,305.29 425.31,333.28C371.1,416.73 274.95,449.21 167.67,434.28C136.41,416.04 109.01,390.08 86.27,358.02C67.78,323.79 57.94,284.4 56.49,242.06C62.21,199.77 79.62,161.91 106.3,129.62C162.52,85.44 239.03,70.18 321.97,82.52C345.51,92.54 368.66,105.88 390.99,122.28Z"
android:fillColor="#FFFFFF"/>
<path
android:pathData="M324.59,193.42C253.25,304.2 169.63,334.67 69.9,336.41 103.72,398.97 170.29,441.08 246.33,440.09 336.19,438.92 411.25,377.91 434.1,295.46c-1.39,-3.41 -3.21,-7.05 -5.6,-10.94C419.62,272.2 388.77,215.98 324.59,193.42Z"
android:strokeAlpha="0.5"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#ffd086"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.5"
android:strokeLineCap="butt"/>
<path
android:pathData="M325.15,193.01C313.98,258.43 269.08,312.3 279.75,354.31C293.25,407.44 238.77,419.51 194.51,433.92C211.05,438.17 228.43,440.32 246.33,440.09C349.9,438.74 433.81,357.9 440.79,256.35C432.31,253.94 424.15,250.27 418.61,244.08C401.68,225.19 358.22,204.63 325.15,193.01Z"
android:strokeAlpha="0.5"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#270b0b"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.4969697"
android:strokeLineCap="butt"/>
<path
android:pathData="M325.15,193.01C313.98,258.43 269.08,312.3 279.75,354.31C293.25,407.44 238.77,419.51 194.51,433.92C211.05,438.17 228.43,440.32 246.33,440.09C349.9,438.74 433.81,357.9 440.79,256.35C432.31,253.94 424.15,250.27 418.61,244.08C401.68,225.19 358.22,204.63 325.15,193.01Z"
android:strokeAlpha="0.5"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#CB8903"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.4969695"
android:strokeLineCap="butt"/>
<path
android:pathData="M282.69,180.67l12.17,0l0,13.22l-12.17,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#fabb37"
android:strokeColor="#00000000"/>
<path
android:pathData="M212.74,136.72l11.59,0l0,12.65l-11.59,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#ffd086"
android:strokeColor="#00000000"/>
<path
android:pathData="M238.53,145.83l15.81,0l0,15.81l-15.81,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#fabb37"
android:strokeColor="#00000000"/>
<path
android:pathData="M237.68,259.52l24.24,0l0,24.24l-24.24,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#fbc14c"
android:strokeColor="#00000000"/>
<path
android:pathData="M240.39,168.03l15.81,0l0,15.81l-15.81,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#fabb37"
android:strokeColor="#00000000"/>
<path
android:pathData="M266.3,235.13l12.65,0l0,13.7l-12.65,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#cc8902"
android:strokeColor="#00000000"/>
<path
android:pathData="M291.24,210.5l9.48,0l0,9.48l-9.48,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#fabb37"
android:strokeColor="#00000000"/>
<path
android:pathData="M257.07,213.16l15.81,0l0,15.81l-15.81,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#fabb37"
android:strokeColor="#00000000"/>
<path
android:pathData="M195.22,294.95l20.02,0l0,21.08l-20.02,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#fbc14c"
android:strokeColor="#00000000"/>
<path
android:pathData="M214.18,264.4l13.7,0l0,15.81l-13.7,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#fbc14c"
android:strokeColor="#00000000"/>
<path
android:pathData="M243.16,237.52l-12.69,0l-0,12.65l12.69,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#cc8902"
android:strokeColor="#00000000"/>
<path
android:pathData="M270.34,192.67l10.54,0l0,11.59l-10.54,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#ffd086"
android:strokeColor="#00000000"/>
<path
android:pathData="M280.22,163.07l-12.69,0l-0,12.65l12.69,0z"
android:strokeAlpha="0.99607843"
android:strokeWidth="18.07"
android:fillColor="#cc8902"
android:strokeColor="#00000000"/>
<path
android:pathData="M324.59,193.42C253.25,304.2 169.63,334.67 69.9,336.41 103.72,398.97 170.29,441.08 246.33,440.09 336.19,438.92 411.25,377.91 434.1,295.46c-1.39,-3.41 -3.21,-7.05 -5.6,-10.94C419.62,272.2 388.77,215.98 324.59,193.42Z"
android:strokeLineJoin="miter"
android:strokeWidth="1.22"
android:fillColor="#00000000"
android:strokeColor="#FF7A00"
android:fillType="evenOdd"
android:strokeLineCap="butt"/>
<path
android:pathData="M325.15,193.01C313.98,258.43 269.08,312.3 279.75,354.31C293.25,407.44 238.77,419.51 194.51,433.92C211.05,438.17 228.43,440.32 246.33,440.09C349.9,438.74 433.81,357.9 440.79,256.35C432.31,253.94 424.15,250.27 418.61,244.08C401.68,225.19 358.22,204.63 325.15,193.01Z"
android:strokeLineJoin="miter"
android:strokeWidth="1.22"
android:fillColor="#00000000"
android:strokeColor="#FF7A00"
android:fillType="evenOdd"
android:fillAlpha="0.993939"
android:strokeLineCap="butt"/>
<path
android:pathData="M325.15,193.01C313.98,258.43 269.08,312.3 279.75,354.31C293.25,407.44 238.77,419.51 194.51,433.92C211.05,438.17 228.43,440.32 246.33,440.09C349.9,438.74 433.81,357.9 440.79,256.35C432.31,253.94 424.15,250.27 418.61,244.08C401.68,225.19 358.22,204.63 325.15,193.01Z"
android:strokeLineJoin="miter"
android:strokeWidth="1.22"
android:fillColor="#00000000"
android:strokeColor="#FF7A00"
android:fillType="evenOdd"
android:fillAlpha="0.993939"
android:strokeLineCap="butt"/>
<path
android:pathData="M266.14,38.46C265.06,38.16 263.98,37.87 262.89,37.58C228.32,28.5 193.55,26.83 160.25,31.59C374.63,22.72 466.78,173.24 439.31,353.41L448.18,354.83C474.18,190.78 402.95,76.25 266.14,38.46Z"
android:strokeAlpha="0.78"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#40B2FF"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.78"
android:strokeLineCap="butt"/>
<path
android:pathData="M56.03,323.9C56.23,325 56.44,326.1 56.66,327.2C63.6,362.26 77.29,394.27 96.11,422.14C-5.53,233.18 89.61,84.53 263.67,30.53L261.07,21.93C102.15,70.22 30.25,184.32 56.03,323.9Z"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#40B2FF"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:strokeLineCap="butt"/>
<path
android:pathData="M389.87,100.01C389.17,99.13 388.47,98.26 387.77,97.39C365.23,69.64 338.16,47.76 308.48,31.93C486.7,151.39 472.15,327.28 343.56,456.43L349.89,462.81C467.76,345.8 477.93,211.31 389.87,100.01Z"
android:strokeAlpha="0.4"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#40B2FF"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.4"
android:strokeLineCap="butt"/>
<path
android:pathData="M336.1,461.47C337.19,461.24 338.29,461 339.38,460.76C374.27,452.98 405.94,438.52 433.35,419.03C246.89,525.18 95.99,433.65 37.82,260.94L29.29,263.74C81.38,421.45 197.19,490.59 336.1,461.47Z"
android:strokeAlpha="0.84"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#40B2FF"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.84"
android:strokeLineCap="butt"/>
<path
android:pathData="M27.33,237.68C26.96,238.73 26.58,239.79 26.22,240.85C14.56,274.64 10.29,309.19 12.52,342.75C19.8,128.32 176.83,47.74 354.42,88.69L356.5,79.94C194.87,41.69 75.31,104.1 27.33,237.68Z"
android:strokeAlpha="0.4"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#40B2FF"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.4"
android:strokeLineCap="butt"/>
<path
android:pathData="M454.96,190.72C454.78,189.62 454.59,188.51 454.39,187.41C448.03,152.24 434.87,120 416.51,91.83C515.01,282.44 417.42,429.5 242.48,480.61L244.94,489.26C404.64,443.6 478.43,330.7 454.96,190.72Z"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#40B2FF"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:strokeLineCap="butt"/>
<path
android:pathData="M209.13,466.55C210.17,466.96 211.21,467.36 212.26,467.75C245.73,480.32 280.15,485.53 313.75,484.2C99.6,471.12 23.31,311.96 69.06,135.55L60.38,133.23C17.75,293.76 76.9,414.98 209.13,466.55Z"
android:strokeAlpha="0.4"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#40B2FF"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.4"
android:strokeLineCap="butt"/>
<path
android:pathData="M63.73,120.32C62.89,121.06 62.06,121.81 61.22,122.56C34.72,146.54 14.3,174.74 0.08,205.22C109.88,20.89 286.3,26.04 422.11,147.57L428.15,140.91C305.02,29.44 170.18,26.45 63.73,120.32Z"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#40B2FF"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:strokeLineCap="butt"/>
<path
android:pathData="M454.1,283.08C454.5,282.03 454.89,280.98 455.28,279.93C467.58,246.37 472.52,211.9 470.92,178.31C459.53,392.57 300.99,470.13 124.22,425.78L121.97,434.48C282.84,475.83 403.58,415.72 454.1,283.08Z"
android:strokeAlpha="0.4"
android:strokeLineJoin="miter"
android:strokeWidth="1"
android:fillColor="#40B2FF"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="0.4"
android:strokeLineCap="butt"/>
<path
android:pathData="M254.38,72.68L254.38,100.08C254.1,100.08 253.82,100.08 253.54,100.08C252.06,100.08 250.59,100.1 249.13,100.14L249.13,72.68ZM412.91,252.64L435.5,252.64L435.5,257.88L413.04,257.88C413.03,256.14 412.98,254.39 412.91,252.64ZM254.38,418.61L254.38,437.84L249.13,437.84L249.13,418.56C250.6,418.6 252.07,418.62 253.54,418.62C253.82,418.62 254.1,418.62 254.38,418.61ZM94.05,257.88L70.34,257.88L70.34,252.64L94.19,252.64C94.11,254.38 94.06,256.13 94.05,257.88Z"
android:fillColor="#402800"
android:strokeColor="#00000000"/>
<path
android:pathData="M344.19,97.81L324.35,132.18C323.6,131.76 322.85,131.35 322.09,130.94L341.96,96.52ZM376.66,181.7L409.26,162.88L410.55,165.11L378.01,183.89C377.57,183.16 377.11,182.43 376.66,181.7ZM381.52,328.7L410.55,345.46L409.26,347.69L380.27,330.95C380.69,330.2 381.11,329.45 381.52,328.7ZM327.98,384.68L344.19,412.76L341.96,414.04L325.76,385.98C326.5,385.55 327.24,385.12 327.98,384.68ZM178.81,384.26L161.61,414.04L159.38,412.76L176.61,382.92C177.34,383.37 178.07,383.81 178.81,384.26ZM125.96,329.42L94.31,347.69L93.03,345.46L124.73,327.15C125.13,327.91 125.54,328.66 125.96,329.42ZM128.17,185.4L93.03,165.11L94.31,162.88L129.5,183.19C129.05,183.92 128.61,184.66 128.17,185.4ZM179.99,133.49L159.38,97.81L161.61,96.52L182.22,132.21C181.47,132.63 180.73,133.06 179.99,133.49Z"
android:fillColor="#402800"
android:strokeColor="#00000000"/>
<path
android:pathData="M57.77,128.85l12.17,0l0,13.22l-12.17,0z"
android:strokeAlpha="0.996078"
android:strokeWidth="21.23"
android:fillColor="#5096C8"
android:strokeColor="#00000000"/>
<path
android:pathData="M251.72,18.74l15.81,0l0,15.81l-15.81,0z"
android:strokeAlpha="0.996078"
android:strokeWidth="21.23"
android:fillColor="#5096C8"
android:strokeColor="#00000000"/>
<path
android:pathData="M411.91,131.1l24.24,0l0,24.24l-24.24,0z"
android:strokeAlpha="0.996078"
android:strokeWidth="21.23"
android:fillColor="#5096C8"
android:strokeColor="#00000000"/>
<path
android:pathData="M117.25,422.86l15.81,0l0,15.81l-15.81,0z"
android:strokeAlpha="0.996078"
android:strokeWidth="21.23"
android:fillColor="#5096C8"
android:strokeColor="#00000000"/>
<path
android:pathData="M341.23,451.63l12.65,0l0,13.7l-12.65,0z"
android:strokeAlpha="0.996078"
android:strokeWidth="21.23"
android:fillColor="#5096C8"
android:strokeColor="#00000000"/>
<path
android:pathData="M437.64,343.09l15.81,0l0,15.81l-15.81,0z"
android:strokeAlpha="0.996078"
android:strokeWidth="21.23"
android:fillColor="#5096C8"
android:strokeColor="#00000000"/>
<path
android:pathData="M236.58,475.23l20.02,0l0,21.08l-20.02,0z"
android:strokeAlpha="0.996078"
android:strokeWidth="21.23"
android:fillColor="#5096C8"
android:strokeColor="#00000000"/>
<path
android:pathData="M39.7,256.15l-12.69,0l-0,12.65l12.69,0z"
android:strokeAlpha="0.996078"
android:strokeWidth="21.23"
android:fillColor="#5096C8"
android:strokeColor="#00000000"/>
<path
android:pathData="M154.53,230.66C148.8,230.66 144.28,232.57 140.96,236.38C137.65,240.2 135.99,245.42 135.99,252.05C135.99,258.86 137.59,264.13 140.79,267.85C143.98,271.57 148.54,273.43 154.45,273.43C158.09,273.43 162.23,272.77 166.89,271.47L166.89,276.78C163.28,278.13 158.82,278.81 153.53,278.81C145.85,278.81 139.93,276.48 135.76,271.83C131.59,267.17 129.5,260.55 129.5,251.97C129.5,246.6 130.51,241.9 132.52,237.86C134.53,233.82 137.42,230.71 141.21,228.52C145,226.34 149.46,225.25 154.59,225.25C160.06,225.25 164.84,226.24 168.92,228.24L166.36,233.44C162.41,231.59 158.47,230.66 154.53,230.66ZM193.47,278.81C187.69,278.81 183.14,277.05 179.8,273.54C176.46,270.02 174.79,265.14 174.79,258.89C174.79,252.59 176.34,247.59 179.44,243.88C182.54,240.18 186.71,238.32 191.93,238.32C196.83,238.32 200.7,239.93 203.55,243.15C206.4,246.37 207.83,250.62 207.83,255.9L207.83,259.64L180.93,259.64C181.04,264.22 182.2,267.7 184.4,270.08C186.6,272.46 189.69,273.65 193.68,273.65C197.88,273.65 202.04,272.76 206.15,271.01L206.15,276.28C204.06,277.18 202.08,277.83 200.22,278.23C198.36,278.61 196.11,278.81 193.47,278.81M191.86,243.27C188.73,243.27 186.23,244.3 184.36,246.34C182.5,248.38 181.4,251.21 181.07,254.83L201.49,254.83C201.49,251.1 200.66,248.24 198.99,246.26C197.33,244.27 194.95,243.27 191.86,243.27ZM242.76,267.44C242.76,271.08 241.4,273.88 238.7,275.85C235.99,277.82 232.18,278.81 227.29,278.81C222.11,278.81 218.07,277.99 215.17,276.35L215.17,270.87C217.05,271.82 219.06,272.56 221.21,273.11C223.36,273.65 225.43,273.92 227.43,273.92C230.52,273.92 232.9,273.43 234.56,272.45C236.22,271.46 237.05,269.96 237.05,267.94C237.05,266.42 236.39,265.12 235.08,264.04C233.76,262.96 231.18,261.68 227.36,260.21C223.73,258.85 221.14,257.67 219.61,256.66C218.07,255.65 216.93,254.51 216.19,253.22C215.44,251.94 215.06,250.41 215.06,248.62C215.06,245.44 216.36,242.93 218.95,241.09C221.54,239.24 225.09,238.32 229.61,238.32C233.81,238.32 237.92,239.18 241.94,240.89L239.83,245.7C235.91,244.08 232.36,243.27 229.18,243.27C226.37,243.27 224.26,243.71 222.83,244.59C221.41,245.48 220.7,246.69 220.7,248.23C220.7,249.28 220.96,250.17 221.5,250.9C222.04,251.64 222.9,252.34 224.09,253.01C225.27,253.67 227.55,254.64 230.93,255.9C235.56,257.58 238.68,259.28 240.31,260.99C241.94,262.7 242.76,264.85 242.76,267.44ZM257.99,278.1L252.07,278.1L252.07,239.04L257.99,239.04L257.99,278.1M251.57,228.45C251.57,227.1 251.91,226.11 252.57,225.48C253.24,224.84 254.07,224.53 255.07,224.53C256.02,224.53 256.84,224.85 257.53,225.49C258.22,226.13 258.56,227.12 258.56,228.45C258.56,229.78 258.22,230.77 257.53,231.43C256.84,232.08 256.02,232.4 255.07,232.4C254.07,232.4 253.24,232.08 252.57,231.43C251.91,230.77 251.57,229.78 251.57,228.45ZM275.93,239.04L275.93,264.38C275.93,267.56 276.66,269.93 278.11,271.5C279.56,273.07 281.83,273.86 284.92,273.86C289,273.86 291.99,272.74 293.88,270.51C295.77,268.27 296.71,264.63 296.71,259.56L296.71,239.04L302.63,239.04L302.63,278.1L297.74,278.1L296.89,272.86L296.57,272.86C295.36,274.78 293.68,276.25 291.53,277.28C289.38,278.3 286.93,278.81 284.17,278.81C279.42,278.81 275.86,277.68 273.49,275.43C271.13,273.17 269.95,269.56 269.95,264.59L269.95,239.04L275.93,239.04ZM364.57,278.1L364.57,252.68C364.57,249.57 363.91,247.24 362.58,245.68C361.25,244.13 359.18,243.35 356.37,243.35C352.69,243.35 349.97,244.41 348.21,246.52C346.45,248.64 345.58,251.89 345.58,256.29L345.58,278.1L339.66,278.1L339.66,252.68C339.66,249.57 338.99,247.24 337.66,245.68C336.33,244.13 334.26,243.35 331.43,243.35C327.72,243.35 325.01,244.46 323.28,246.68C321.56,248.9 320.7,252.55 320.7,257.61L320.7,278.1L314.78,278.1L314.78,239.04L319.59,239.04L320.55,244.38L320.84,244.38C321.96,242.48 323.54,241 325.57,239.93C327.6,238.86 329.87,238.32 332.39,238.32C338.5,238.32 342.49,240.53 344.37,244.95L344.65,244.95C345.82,242.91 347.5,241.29 349.71,240.11C351.92,238.92 354.44,238.32 357.27,238.32C361.68,238.32 364.99,239.46 367.19,241.73C369.39,244 370.48,247.63 370.48,252.62L370.48,278.1L364.57,278.1Z"
android:fillColor="#402800"/>
</group>
</vector>
resources/android/store/logo_512px.png

72 KiB

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain>
</domain-config>
</network-security-config>
# Manifest V3 migration
This folder `chrome-ext` has been created in order to prepare to Manifest V3 format.
This is working well for Chrome, but not yet for Firefox.
/**
* Add browser actions, for WebExtension
* (e.g. to open Cesium in a tab, when integrated as a Firefox extension).
*
* See https://forum.duniter.org/t/premiere-version-du-module-cesium-pour-firefox/6944
*
**/
var browser, chrome;
browser = browser || chrome;
var action = browser.browserAction || (chrome && chrome.action);
var browserExtensionRequirements = browser.tabs && action && action.onClicked;
// If integrated as a browser extension
if (browserExtensionRequirements) {
console.debug("[extension] Initializing...");
/**
* Open Cesium in a new browser's tab
*/
function openInTab() {
console.debug("[extension] Opening Cesium...")
browser.tabs.create({
url: "index.html"
});
}
// Adding browser action
action.onClicked.addListener(openInTab);
// FIXME: finish this code
function checkNotifications() {
console.debug("[extension] Checking for notifications...");
action.setBadgeText({
text: '0'
});
action.setBadgeBackgroundColor({
color: '#387EF5' // = $positive color - see the SCSS theme
});
// Loop, after a delay
setTimeout(function() {
checkNotifications();
}, 60 * 1000 /*1min*/);
}
//checkNotifications();
}
else {
console.error("[extension] Cannot init extension: missing some API requirements (action or tabs");
}
{
"manifest_version": 2,
"name": "Cesium",
"version": "1.7.12",
"description": "Cesium Wallet for Ğ1 libre currency",
"icons": {
"32": "img/logo_32px.png",
"60": "img/logo_60px.png",
"96": "img/logo_96px.png",
"144": "img/logo_144px.png",
"192": "img/logo.svg"
},
"permissions": [
"storage"
],
"host_permissions": [
"file:///*",
"*://*/*"
],
"background": {
"service_worker": "background.js",
"scripts": ["background.js"]
},
"browser_action" : {
"default_icon": {
"32": "img/logo_32px.png",
"60": "img/logo_60px.png",
"96": "img/logo_96px.png",
"128": "img/logo_128px.png"
}
},
"action": {
"default_icon": {
"32": "img/logo_32px.png",
"60": "img/logo_60px.png",
"96": "img/logo_96px.png",
"144": "img/logo_144px.png",
"192": "img/logo.svg"
}
}
}
resources/firefoxos/icon/logo_128px.png

13.1 KiB

resources/firefoxos/icon/logo_60px.png

5.23 KiB

File added
<svg xmlns="http://www.w3.org/2000/svg" id="flag-icons-es-ct" viewBox="0 0 640 480">
<path fill="#fcdd09" d="M0 0h640v480H0z"/>
<path stroke="#da121a" stroke-width="60" d="M0 90h810m0 120H0m0 120h810m0 120H0" transform="scale(.79012 .88889)"/>
</svg>
\ No newline at end of file
File added