-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* centralize loading overlay logic * re-enable console log easter-egg * revert unwanted environment.ts change * fix migration service * remove bloat popover logic * lint refactor * create password service for home page * Refactor home page code to remove unused event listeners * refactor countdown timer precision using rxjs * Reorganize components to reside in its page's folders * Refactor home page code to remove unused event listeners * moved add account modal logic to its component * remove unused service injection * Refactor account modal component to better handle camera status * Refactor account modal component to enable closing when scan is not active and avoid being stuck * fixes #22
- Loading branch information
Showing
41 changed files
with
883 additions
and
719 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "authleu", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"author": "Leonardo 'Leu' Pereira <[email protected]>", | ||
"homepage": "https://github.com/jlcvp/AuthLeu", | ||
"description": "Open source authenticator and 2fa code generator to use across multiple devices and platforms", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 0 additions & 59 deletions
59
src/app/components/countdown-timer/countdown-timer.component.ts
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
86 changes: 86 additions & 0 deletions
86
src/app/home/components/account-modal/account-modal.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>{{ "ADD_ACCOUNT_MODAL.TITLE" | translate }}</ion-title> | ||
<ion-buttons slot="end"> | ||
<ion-button (click)="dismiss()" [disabled]="isScanActive && !isCameraSettled "><ion-icon slot="icon-only" name="close-outline"></ion-icon></ion-button> | ||
</ion-buttons> | ||
</ion-toolbar> | ||
</ion-header> | ||
<ion-content class="ion-padding"> | ||
<ng-container *ngIf="isScanActive;else manualForm"> | ||
<ngx-scanner-qrcode #qrscanner="scanner" (event)="onQRCodeScanned($event, qrscanner)" | ||
[config]="qrScannerOpts"></ngx-scanner-qrcode> | ||
<ion-grid> | ||
<ion-row> | ||
<ion-col size="auto"> | ||
</ion-col> | ||
<ion-col></ion-col> | ||
<ion-col size="auto"> | ||
<ion-button size="large" [disabled]="!isCameraSettled" (click)="cycleCamera()"> | ||
<ion-icon slot="icon-only" name="sync-outline"></ion-icon> | ||
</ion-button> | ||
</ion-col> | ||
</ion-row> | ||
<ion-row> | ||
<ion-col size="12"> | ||
<ion-button size="large" expand="block" (click)="manualInputAction()"> | ||
<ion-icon slot="start" name="create-outline"></ion-icon> | ||
{{ "ADD_ACCOUNT_MODAL.MANUAL_INPUT" | translate }} | ||
</ion-button> | ||
</ion-col> | ||
</ion-row> | ||
</ion-grid> | ||
</ng-container> | ||
<ng-template #manualForm> | ||
<ion-button size="large" expand="block" (click)="scanCode()"> | ||
<ion-icon slot="start" name="qr-code-outline"></ion-icon> | ||
{{ "ADD_ACCOUNT_MODAL.SCAN_QR_CODE" | translate }} | ||
</ion-button> | ||
<form [formGroup]="validations_form" (ngSubmit)="createAccount(validations_form.value)"> | ||
<ion-item> | ||
<ion-input label="{{ 'ADD_ACCOUNT_MODAL.LABEL' | translate }}" labelPlacement="stacked" formControlName="label" | ||
placeholder="{{ 'ADD_ACCOUNT_MODAL.EXAMPLI_GRATIA_SHORT' | translate }} Google:[email protected]"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-input label="{{ 'ADD_ACCOUNT_MODAL.SECRET_KEY' | translate }}" labelPlacement="stacked" | ||
formControlName="secret" | ||
placeholder="{{ 'ADD_ACCOUNT_MODAL.EXAMPLI_GRATIA_SHORT' | translate }} QAPERTPEO123"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-input label="{{ 'ADD_ACCOUNT_MODAL.TOKEN_SIZE' | translate }}" labelPlacement="stacked" | ||
formControlName="tokenLength" | ||
placeholder="{{ 'ADD_ACCOUNT_MODAL.EXAMPLI_GRATIA_SHORT' | translate }} 6"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-input label="{{ 'ADD_ACCOUNT_MODAL.TOKEN_INTERVAL' | translate }}" labelPlacement="stacked" | ||
formControlName="interval" | ||
placeholder="{{ 'ADD_ACCOUNT_MODAL.EXAMPLI_GRATIA_SHORT' | translate }} 30"></ion-input> | ||
</ion-item> | ||
<ion-item> | ||
<ion-label position="stacked">{{ "ADD_ACCOUNT_MODAL.LOGO" | translate }}</ion-label> | ||
<ion-searchbar placeholder="{{ 'SEARCH' | translate }}" class="ion-padding-top" [debounce]="250" | ||
[value]="draftLogoSearchTxt" (ionInput)="handleSearchLogo($event)"></ion-searchbar> | ||
<ion-grid class="full-row"> | ||
<ion-row class="full-row"> | ||
<ion-col size-xs="6" size-sm="4" size="4"> | ||
<ion-card class="logo-card" (click)="selectLogo('')" [ngClass]="{ 'selected-logo': !draftLogoURL }"> | ||
<ion-img class="ion-padding logo-img" [src]="'assets/icon/favicon.png'"></ion-img> | ||
<p>{{ "ADD_ACCOUNT_MODAL.NO_LOGO" | translate }}</p> | ||
</ion-card> | ||
</ion-col> | ||
<ion-col size-xs="6" size-sm="4" *ngFor="let logoResult of searchLogoResults"> | ||
<ion-card class="logo-card" (click)="selectLogo(logoResult)" | ||
[ngClass]="{ 'selected-logo': logoResult === draftLogoURL }"> | ||
<ion-img class="ion-padding ion-margin logo-img" [src]="logoResult"></ion-img> | ||
</ion-card> | ||
</ion-col> | ||
</ion-row> | ||
</ion-grid> | ||
<p *ngIf="searchLogoResults.length > 0">Logos provided by <a href="https://brandfetch.com">Brandfetch</a> | ||
</p> | ||
</ion-item> | ||
<ion-button expand="block" [disabled]="!validations_form.valid" type="submit">{{ "ADD_ACCOUNT_MODAL.SAVE" | | ||
translate }}</ion-button> | ||
</form> | ||
</ng-template> | ||
</ion-content> |
20 changes: 20 additions & 0 deletions
20
src/app/home/components/account-modal/account-modal.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
.full-row { | ||
width: 100%; | ||
} | ||
|
||
.selected-logo { | ||
border: 3px solid var(--ion-color-danger); | ||
} | ||
|
||
.logo-img { | ||
background-color: whitesmoke; | ||
box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2); | ||
} | ||
|
||
.logo-card { | ||
aspect-ratio: 1; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} |
Oops, something went wrong.