diff --git a/android/app/build.gradle b/android/app/build.gradle index d9824703ba1db8464cbdadeec19a7655d93752fa..298c4a50e317b6989c24973bc8e32b9eefd95f75 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -13,8 +13,8 @@ android { minSdkVersion rootProject.ext.minSdkVersion compileSdkVersion rootProject.ext.compileSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 2000051 - versionName "2.0.0-alpha51" + versionCode 2000052 + versionName "2.0.0-alpha52" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" aaptOptions { // Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps. diff --git a/electron/package.json b/electron/package.json index 2aa6ecb35f37396d51227850f49853dca039c9ac..540ffd3e9e229768d1ab52b1de60fdc2fc846e86 100644 --- a/electron/package.json +++ b/electron/package.json @@ -1,6 +1,6 @@ { "name": "cesium2s", - "version": "2.0.0-alpha51", + "version": "2.0.0-alpha52", "description": "Cesium², running on Duniter v2s (Substrate).", "author": { "name": "Benoit Lavenier", diff --git a/install.sh b/install.sh index 9075626bdbf6b8162ba40cfa03d3578bc39e2678..0cce2c3a15ad383f0a617048ba2250d5257f0795 100755 --- a/install.sh +++ b/install.sh @@ -14,7 +14,7 @@ INSTALL_DIR=${1:-$(pwd)/${PROJECT_NAME}} INSTALL_ENV=testing latest_version() { - echo "2.0.0-alpha51" #lastest + echo "2.0.0-alpha52" #lastest } api_release_url() { diff --git a/package-lock.json b/package-lock.json index 7db0a5722a58249fafbe8f57db0f47c8de4eb2d2..962830e1415fd87a920d8429e0ec6cbe9066a4ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cesium", - "version": "2.0.0-alpha50", + "version": "2.0.0-alpha51", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cesium", - "version": "2.0.0-alpha50", + "version": "2.0.0-alpha51", "license": "AGPL-3.0", "dependencies": { "@angular/animations": "^18.2.13", diff --git a/package.json b/package.json index 9ae86976ae02687d5ea0fefae09e38e82538ebbf..bb4b7be7613b7947b5835f4c057761954a909e64 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cesium", - "version": "2.0.0-alpha51", + "version": "2.0.0-alpha52", "description": "Manage G1 wallet", "author": "Benoit Lavenier <benoit.lavenier@e-is.pro>", "homepage": "https://cesium.app", diff --git a/resources/webext/manifest.json b/resources/webext/manifest.json index ce71bb3e70dd156d2ec43d5633b93119773cb817..00aa6d826803dd36434c38c74bc921563430d433 100644 --- a/resources/webext/manifest.json +++ b/resources/webext/manifest.json @@ -1,8 +1,8 @@ { "manifest_version": 2, "name": "cesium2s", - "version": "2.0.0.51", - "version_name": "2.0.0-alpha51", + "version": "2.0.0.52", + "version_name": "2.0.0-alpha52", "short_name": "Cesium²", "description": "Manage G1 wallet", "author": "Benoit Lavenier <benoit.lavenier@e-is.pro>", diff --git a/src/app/account/accounts.service.ts b/src/app/account/accounts.service.ts index 6f7f71bca7ffbd61fee257a135c77bd3fde836e5..04d79ea3cfa1977adfbccf3c240939e3298951f8 100644 --- a/src/app/account/accounts.service.ts +++ b/src/app/account/accounts.service.ts @@ -197,10 +197,10 @@ export class AccountsService extends RxStartableService<AccountsState> { }); // Add Dev account - // if (!environment.production) { - // const devAccount = await this.addDevAccount(accounts); - // if (devAccount) accounts.push(devAccount); - // } + if (!environment.production) { + const devAccount = await this.addDevAccount(accounts); + if (devAccount) accounts.push(devAccount); + } // Load account's data try { @@ -227,7 +227,7 @@ export class AccountsService extends RxStartableService<AccountsState> { const data = environment.dev?.auth; // Set password to AAAAA (or those defined in environment) - this._password = data?.password || 'AAAAA'; + this._password = data?.password || '12345'; if (!data || (!data.v1 && !data.v2)) return; // Skip if no dev account defined data.meta = { @@ -722,6 +722,8 @@ export class AccountsService extends RxStartableService<AccountsState> { const toAccountRefereePercent = await this.wot.getRefereePercentByAccount(to); if (toAccountRefereePercent > this.network.currency.params.minAccessibleReferees / 1000000000) { certType = CertType.CertRenewal; + } else { + certType = CertType.CertCreation; } break; } @@ -880,18 +882,16 @@ export class AccountsService extends RxStartableService<AccountsState> { return this.settings.get('biometricAuth') && isNotNilOrBlank(this.storage.get('validationCode')); } - async getActionConfirmation(mobile: boolean, from: Account, message?: string, retry?: number): Promise<boolean> { + async getActionConfirmation(mobile: boolean, from: Account, retryUsed?: number): Promise<boolean> { let validation = false; - let retryUsed = retry ?? 0; + const maxRetry = 3; + retryUsed = retryUsed ?? 0; const isBiometricEnabled = await this.isBiometricEnabled(); if (mobile && isBiometricEnabled) { validation = await this.getBiometricAuth(); } else { const modal = await this.modalCtrl.create({ component: ValidationModal, - componentProps: { - message, - }, }); await modal.present(); @@ -904,11 +904,14 @@ export class AccountsService extends RxStartableService<AccountsState> { } } - if (validation === false && retryUsed < 4) { + if (validation === false && retryUsed < maxRetry) { retryUsed++; - const { role } = await this.openRetryAlert(retryUsed); + // if (mobile) { + const { role } = await this.openRetryAlert(maxRetry - retryUsed); if (role === 'cancel') return false; - validation = await this.getActionConfirmation(mobile, from, message, retryUsed); + // } + + validation = await this.getActionConfirmation(mobile, from, retryUsed); } if (!validation && isBiometricEnabled) { diff --git a/src/app/account/auth/auth.controller.ts b/src/app/account/auth/auth.controller.ts index 76717b836b5e0a22289769e26921b5270ebce2da..cbdf0fb33b6cfa94fb12f8f964929f0395c82b0c 100644 --- a/src/app/account/auth/auth.controller.ts +++ b/src/app/account/auth/auth.controller.ts @@ -7,12 +7,12 @@ import { AuthModal, AuthModalOptions } from '@app/account/auth/auth.modal'; import { Router } from '@angular/router'; import { RegisterModal, RegisterModalOptions } from '@app/account/register/register.modal'; import { Account, LoginMethods, LoginMethodType, LoginOptions, SelectAccountOptions, UnlockOptions } from '@app/account/account.model'; -import { UnlockModal } from '@app/account/unlock/unlock.modal'; import { AccountListComponent, AccountListComponentInputs } from '@app/account/list/account-list.component'; import { setTimeout } from '@rx-angular/cdk/zone-less/browser'; import { AppEvent } from '@app/shared/types'; import { IAuthController } from '@app/account/auth/auth.model'; import { ListPopover, ListPopoverOptions } from '@app/shared/popover/list.popover'; +import { ValidationModal } from '@app/transfer/send/transfer-validation/validation.modal'; @Injectable() export class AuthController implements IAuthController { @@ -108,7 +108,7 @@ export class AuthController implements IAuthController { async unlock(opts?: UnlockOptions): Promise<string> { const modal = await this.modalCtrl.create({ - component: UnlockModal, + component: ValidationModal, componentProps: opts, }); await modal.present(); diff --git a/src/app/account/unlock/unlock.form.html b/src/app/account/unlock/unlock.form.html index 085f3a236e5e71fbca9350b25b44ad38de17b3d7..9a366d6579138eaaa59a9da42fc292ae8343428c 100644 --- a/src/app/account/unlock/unlock.form.html +++ b/src/app/account/unlock/unlock.form.html @@ -6,6 +6,7 @@ <ion-item lines="none" class="ion-padding-top"> <ion-input + type="tel" [formControl]="control" [label]="'AUTH.PASSPHRASE' | translate" labelPlacement="floating" diff --git a/src/app/account/unlock/unlock.form.ts b/src/app/account/unlock/unlock.form.ts index 99d1a0093539acfe63e74d5de9ccb32949f7e2de..ef6d4c3a63a8ab6eeea4a9459105f411e921fa80 100644 --- a/src/app/account/unlock/unlock.form.ts +++ b/src/app/account/unlock/unlock.form.ts @@ -90,7 +90,7 @@ export class UnlockForm extends AppForm<string> implements OnInit { let value = event.target['value'] || ''; // Removes non alphanumeric characters - value = value.toUpperCase().replace(/[^A-Z]+/g, ''); + value = value.toUpperCase().replace(/[^0-9]+/g, ''); if (value.length > this.maxLength) { event.preventDefault(); diff --git a/src/app/account/wallet/wallet.page.ts b/src/app/account/wallet/wallet.page.ts index b25a600e748e7ff4431ae3f585536acd67b6455b..03b68e8e5b5c6df9bbc874ce604005a87976727f 100644 --- a/src/app/account/wallet/wallet.page.ts +++ b/src/app/account/wallet/wallet.page.ts @@ -53,7 +53,6 @@ export class WalletPage extends AppPage<WalletState> implements OnInit { static NEW = Object.freeze(<Account>{ address: '', }); - IdentityStatusEnum = IdentityStatusEnum; protected qrCodeValue: string; diff --git a/src/app/certification/verification/verification.modal.html b/src/app/certification/verification/verification.modal.html index 241bb17b34324c921ee7d151ffe722c88d7ca309..efdf91710da6a4b252e9845f1085b2e7f1564769 100644 --- a/src/app/certification/verification/verification.modal.html +++ b/src/app/certification/verification/verification.modal.html @@ -32,24 +32,22 @@ } </ion-list> </ion-content> -@if (!mobile) { - <ion-footer> - <ion-toolbar> - <ion-row class="ion-no-padding"> - <ion-col size="4"></ion-col> - <!-- buttons --> - <ion-col size="8"> - <ion-button color="light" (click)="cancel()"> - <ion-label translate>COMMON.BTN_CLOSE</ion-label> - </ion-button> +<ion-footer> + <ion-toolbar> + <ion-row class="ion-no-padding"> + <ion-col size="4"></ion-col> + <!-- buttons --> + <ion-col size="8"> + <ion-button color="light" (click)="cancel()"> + <ion-label translate>COMMON.BTN_CLOSE</ion-label> + </ion-button> - <ion-button [disabled]="!isCompleted()" (click)="doSubmit()"> - <ion-icon slot="start" name="checkmark-outline"></ion-icon> - <ion-label translate>COMMON.BTN_YES_CONTINUE</ion-label> - </ion-button> - </ion-col> - <ion-col size="4"></ion-col> - </ion-row> - </ion-toolbar> - </ion-footer> -} + <ion-button [disabled]="!isCompleted()" (click)="doSubmit()"> + <ion-icon slot="start" name="checkmark-outline"></ion-icon> + <ion-label translate>COMMON.BTN_YES_CONTINUE</ion-label> + </ion-button> + </ion-col> + <ion-col size="4"></ion-col> + </ion-row> + </ion-toolbar> +</ion-footer> diff --git a/src/app/certification/verification/verification.modal.ts b/src/app/certification/verification/verification.modal.ts index 9396514a3f1fe0ee8503b0edec0a0b151daa6e6c..5170b53e18dfec6f23db85b5ccafec81108d6a3d 100644 --- a/src/app/certification/verification/verification.modal.ts +++ b/src/app/certification/verification/verification.modal.ts @@ -103,7 +103,7 @@ export class VerificationModal extends AppPage<VerificationModalState> { doSubmit() { return this.viewCtrl.dismiss( - this.isCompleted() && this.certificationSteps.every((step) => this.answers.get(step.labelKey) === step.expectedResponse) + this.isCompleted() && this.certificationModalConfig.steps.every((step) => this.answers.get(step.labelKey) === step.expectedResponse) ); } } diff --git a/src/app/scan/scan.component.html b/src/app/scan/scan.component.html index 4b7ea01c9eb1f699e248eeadd3da6e2d0fc17d24..10401c45861f347683b8ec3b9eb9cdf30331aca0 100644 --- a/src/app/scan/scan.component.html +++ b/src/app/scan/scan.component.html @@ -1 +1 @@ -<ion-content color="transparent"></ion-content> +<ion-content [color]="'transparent'"></ion-content> diff --git a/src/app/scan/scan.component.scss b/src/app/scan/scan.component.scss index aa7ade0f9ec8b5bad5226a48d4248b6bb338b7c5..507353bb8795a8760cc29e8b99a5f8bb1d5c352f 100644 --- a/src/app/scan/scan.component.scss +++ b/src/app/scan/scan.component.scss @@ -1,4 +1,10 @@ :host { - --ion-background-color: transparent; - --background: transparent; + --ion-background-color: transparent !important; + --background: transparent !important; + +} + +::ng-deep .md body.dark { + --ion-background-color: transparent !important; + --background: transparent !important; } diff --git a/src/app/settings/settings.page.html b/src/app/settings/settings.page.html index c380572a7e6dc7b2ef574d758c83222dcaef12ad..4da7ed29d9d087cb5893a0c5636fd4862e964816 100644 --- a/src/app/settings/settings.page.html +++ b/src/app/settings/settings.page.html @@ -144,15 +144,15 @@ </ion-select> </ion-item> - <!-- @if (canBiometric) {--> - <ion-item> - <ion-icon slot="start" name="finger-print"></ion-icon> - <ion-label color="dark" translate>SETTINGS.BIOMETRIC</ion-label> - <ion-toggle [(ngModel)]="biometricAuth" (click)="toggleBiometricAuth()"> - <ion-label color="medium" translate></ion-label> - </ion-toggle> - </ion-item> - <!-- }--> + @if (canBiometric) { + <ion-item> + <ion-icon slot="start" name="finger-print"></ion-icon> + <ion-label color="dark" translate>SETTINGS.BIOMETRIC</ion-label> + <ion-toggle [(ngModel)]="biometricAuth" (click)="toggleBiometricAuth()"> + <ion-label color="medium" translate></ion-label> + </ion-toggle> + </ion-item> + } </ion-list> <!-- buttons --> diff --git a/src/app/settings/settings.page.ts b/src/app/settings/settings.page.ts index ff031086954b2133f5ff8d608d66fc0d463aaf58..6b04f77bda1dc0e26700393dbab1c797a1962023 100644 --- a/src/app/settings/settings.page.ts +++ b/src/app/settings/settings.page.ts @@ -123,10 +123,7 @@ export class SettingsPage extends AppPage<SettingsPageState> implements OnInit { // Detect changes this._state.hold( this._state - .select( - ['locale', 'peer', 'indexer', 'pod', 'ipfsGateway', 'unAuthDelayMs', 'displayUnit', 'selectedRedeemPeriod', 'expertMode', 'biometricAuth'], - (s) => s - ) + .select(['locale', 'peer', 'indexer', 'pod', 'ipfsGateway', 'unAuthDelayMs', 'displayUnit', 'selectedRedeemPeriod', 'expertMode'], (s) => s) .pipe(skip(1)), () => { if (this.mobile) { diff --git a/src/app/transfer/send/transfer.page.html b/src/app/transfer/send/transfer.page.html index 3384f5c85ff4ebf8ca341cb3bd59df031eb0cfd4..6822a46341f3997ab75f6266b2c030cb4d3db308 100644 --- a/src/app/transfer/send/transfer.page.html +++ b/src/app/transfer/send/transfer.page.html @@ -101,9 +101,9 @@ <ion-item lines="none"> <ion-toggle [(ngModel)]="showComment"></ion-toggle> <ion-label class="ion-text-start" color="medium" translate>TRANSFER.BTN_ADD_COMMENT</ion-label> - <ion-badge slot="end" *ngIf="amount && fee" color="medium"> - {{ 'TRANSFER.FEE' | translate: { fee: fee, currency: currency.symbol } }} - </ion-badge> + <!-- <ion-badge slot="end" *ngIf="amount && fee" color="medium">--> + <!-- {{ 'TRANSFER.FEE' | translate: { fee: fee, currency: currency.symbol } }}--> + <!-- </ion-badge>--> </ion-item> <ion-item *ngIf="showComment"> diff --git a/src/assets/i18n/fr.json b/src/assets/i18n/fr.json index 130315790b7943c4ad4f1bffcf871ed9a40bf84a..f60dd6c15fe4c51ede20482a0dda28ade2f0b559 100644 --- a/src/assets/i18n/fr.json +++ b/src/assets/i18n/fr.json @@ -730,7 +730,7 @@ "COMMENT": "Commentaire" }, "CERTIFICATION_MODAL": { - "CHECKLIST_TITLE": "Vérifications avant certification", + "CHECKLIST_TITLE": "Vérifications", "INFOS": "La sécurité de la monnaie Ğ1 repose sur chaque membre. Avant de certifier l'identité de cette personne, vous devez avoir fait quelques vérifications à son propos. Veuillez répondre aux questions suivantes :", "REMINDER_TITLE": "Rappel", "CHECKLIST_CONDITIONS_NOT_MET": "La certification n'a pas été envoyée. Les vérifications semblent insuffisantes. Veuillez vérifier de nouveau chaque point auprès de la personne à certifier.", diff --git a/src/environments/environment.ts b/src/environments/environment.ts index f7b7ae635ff5e4dba985498874e85672132a2d60..58f4da67af1c4c6a41ba2afb314766c993628a42 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -101,6 +101,7 @@ export const environment = <Environment>{ // 'http://localhost:8080' /* GDev endpoints */ 'https://pagu.re', + 'https://gyroi.de', ], defaultDistanceFileUrls: [ diff --git a/src/manifest.json b/src/manifest.json index 3454a153be6bd873cd3673aaf10e2df17b3460b0..6cc2b644842051adc8012dfa3783a2e51681eeda 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "short_name": "Cesium", "name": "Cesium2", "manifest_version": 2, - "version": "2.0.0-alpha51", + "version": "2.0.0-alpha52", "default_locale": "fr", "description": "Cesium Wallet for Ğ1 libre currency", "icons": [