Skip to content

Commit

Permalink
Merge pull request #24 from tomfong/dev
Browse files Browse the repository at this point in the history
finetune result page; fix icon not show when offline
  • Loading branch information
tomfong authored Dec 23, 2021
2 parents 291089f + 3202ae2 commit 4164bdd
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 117 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Thanks for your support!

## Changelogs

### 1.3.0 / 1.3.1 (Current)
### 1.3.0 - 1.3.2 (Current)

- Redesign UI/UX
- Add vibration on/off setting
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.tomfong.simpleqr" version="1.3.1.20211223" 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">
<widget id="com.tomfong.simpleqr" version="1.3.2.20211223" 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>Simple QR</name>
<description>A simple app for scanning and managing QR code</description>
<author email="[email protected]" href="https://tomfong-personal-page.web.app">Tom Fong</author>
Expand Down
7 changes: 6 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-qr",
"version": "1.3.1",
"version": "1.3.2",
"author": "Tom Fong",
"homepage": "https://tomfong-personal-page.web.app",
"scripts": {
Expand Down Expand Up @@ -60,6 +60,7 @@
"es6-promise-plugin": "^4.2.2",
"human-signals": "^2.1.0",
"jsqr": "^1.4.0",
"material-design-icons": "^3.0.1",
"moment": "^2.29.1",
"osenv": "^0.1.5",
"properties-parser": "^0.3.1",
Expand Down
4 changes: 2 additions & 2 deletions src/app/pages/history/history.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class HistoryPage {
await this.loadItems();
this.deleteToast = await this.toastController.create({
message: this.translate.instant('MSG.UNDO_DELETE'),
duration: 5000,
duration: 3000,
mode: "ios",
color: "light",
position: "bottom",
Expand Down Expand Up @@ -138,7 +138,7 @@ export class HistoryPage {
await this.loadItems();
this.deleteToast = await this.toastController.create({
message: this.translate.instant('MSG.UNDO_DELETE'),
duration: 5000,
duration: 3000,
mode: "ios",
color: "light",
position: "bottom",
Expand Down
111 changes: 2 additions & 109 deletions src/app/pages/result/result.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</ion-row>

<ion-row
*ngIf="(contentType === 'phone' || contentType === 'sms') && qrCodeContent && qrCodeContent.trim().length > 0">
*ngIf="(contentType === 'phone' || contentType === 'sms') && qrCodeContent && qrCodeContent.trim().length > 0 && phoneNumber && phoneNumber.length > 0">
<ion-col class="ion-text-center ion-padding-horizontal">
<ion-item lines="none">
<ion-label class="content-label ion-padding-start ion-padding-bottom"
Expand Down Expand Up @@ -212,115 +212,8 @@
</ion-content>

<ion-footer mode="ios"
[ngStyle]="env.colorTheme === 'dark'? {'background-color': '#222428'} : {'background-color': 'white'}">
[ngStyle]="env.colorTheme === 'dark'? {'background-color': '#222428'} : {'background-color': '#F0F0F0'}">

<!-- <ion-row class="ion-padding-horizontal ion-margin-horizontal">
<ion-col></ion-col>
</ion-row> -->

<!-- URL -->
<!-- <ion-row *ngIf="contentType === 'url'" class="ion-padding-horizontal ion-margin-horizontal">
<ion-col>
<ion-button expand="full" color="secondary" mode="ios" (click)="browseWebsite()">
<ion-icon slot="start" name="globe-outline"></ion-icon>
<span>{{ 'BROWSE_WEBSITE' | translate }}</span>
<ion-icon class="external-link-icon" src="assets/icon/external-link.svg">
</ion-icon>
<ion-ripple-effect></ion-ripple-effect>
</ion-button>
</ion-col>
</ion-row> -->

<!-- Contact -->
<!-- <ion-row *ngIf="contentType === 'contact'" class="ion-padding-horizontal ion-margin-horizontal">
<ion-col>
<ion-button expand="full" color="secondary" mode="ios" (click)="addContact()">
<ion-icon slot="start" name="person-add-sharp"></ion-icon>
<span>{{ 'ADD_CONTACT' | translate }}</span>
<ion-ripple-effect></ion-ripple-effect>
</ion-button>
</ion-col>
</ion-row> -->

<!-- Phone Number -->
<!-- <ion-row *ngIf="contentType === 'phone'" class="ion-padding-horizontal ion-margin-horizontal">
<ion-col>
<ion-button expand="full" color="secondary" mode="ios" (click)="callPhone()">
<ion-icon slot="start" name="call"></ion-icon>
<span class="overflow: hidden; text-overflow: ellipsis;">{{ 'CALL' | translate }}</span>
<ion-ripple-effect></ion-ripple-effect>
</ion-button>
</ion-col>
<ion-col>
<ion-button expand="full" color="secondary" mode="ios" (click)="addContact()">
<ion-icon slot="start" name="person-add-sharp"></ion-icon>
<span>{{ 'ADD_CONTACT' | translate }}</span>
<ion-ripple-effect></ion-ripple-effect>
</ion-button>
</ion-col>
</ion-row> -->

<!-- SMS -->
<!-- <ion-row *ngIf="contentType === 'sms'" class="ion-padding-horizontal ion-margin-horizontal">
<ion-col>
<ion-button expand="full" color="secondary" mode="ios" (click)="sendSms()" [disabled]="!smsContent">
<ion-icon slot="start" name="send"></ion-icon>
<span>{{ 'SEND_MESSAGE' | translate }}</span>
<ion-ripple-effect></ion-ripple-effect>
</ion-button>
</ion-col>
<ion-col>
<ion-button expand="full" color="secondary" mode="ios" (click)="addContact()">
<ion-icon slot="start" name="person-add-sharp"></ion-icon>
<span>{{ 'ADD_CONTACT' | translate }}</span>
<ion-ripple-effect></ion-ripple-effect>
</ion-button>
</ion-col>
</ion-row> -->

<!-- Email -->
<!-- <ion-row *ngIf="contentType === 'email'" class="ion-padding-horizontal justify-content-around">
<ion-col>
<ion-button expand="full" color="secondary" mode="ios" (click)="sendEmail()">
<ion-icon slot="start" name="mail"></ion-icon>
<span>{{ 'SEND_EMAIL' | translate }}</span>
<ion-icon class="external-link-icon" src="assets/icon/external-link.svg">
</ion-icon>
<ion-ripple-effect></ion-ripple-effect>
</ion-button>
</ion-col>
</ion-row> -->

<!-- <ion-row *ngIf="contentType !== 'freeText'" class="ion-padding-horizontal justify-content-around">
<ion-button *ngIf="contentType === 'url'" mode="md" (click)="browseWebsite()"
[color]="env.colorTheme === 'light'? 'dark' : 'light'" fill="clear">
<ion-icon slot="icon-only" name="globe-outline"></ion-icon>
</ion-button>
<ion-button *ngIf="contentType === 'contact'" mode="md" (click)="addContact()"
[color]="env.colorTheme === 'light'? 'dark' : 'light'" fill="clear">
<ion-icon slot="icon-only" name="person-add-sharp"></ion-icon>
</ion-button>
<ion-button *ngIf="contentType === 'phone'" mode="md" (click)="callPhone()"
[color]="env.colorTheme === 'light'? 'dark' : 'light'" fill="clear">
<ion-icon slot="icon-only" name="call"></ion-icon>
</ion-button>
<ion-button *ngIf="contentType === 'phone'" mode="md" (click)="addContact()"
[color]="env.colorTheme === 'light'? 'dark' : 'light'" fill="clear">
<ion-icon slot="icon-only" name="person-add-sharp"></ion-icon>
</ion-button>
<ion-button *ngIf="contentType === 'sms'" mode="md" [disabled]="!smsContent" (click)="sendSms()"
[color]="env.colorTheme === 'light'? 'dark' : 'light'" fill="clear">
<ion-icon slot="icon-only" name="send"></ion-icon>
</ion-button>
<ion-button *ngIf="contentType === 'sms'" mode="md" (click)="addContact()"
[color]="env.colorTheme === 'light'? 'dark' : 'light'" fill="clear">
<ion-icon slot="icon-only" name="person-add-sharp"></ion-icon>
</ion-button>
<ion-button *ngIf="contentType === 'email'" mode="md" (click)="sendEmail()"
[color]="env.colorTheme === 'light'? 'dark' : 'light'" fill="clear">
<ion-icon slot="icon-only" name="mail"></ion-icon>
</ion-button>
</ion-row> -->
<ion-row class="ion-padding-horizontal justify-content-between">
<!-- General -->
<ion-button mode="md" (click)="webSearch()" [color]="env.colorTheme === 'light'? 'dark' : 'light'" fill="clear"
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"CAMERA_PERMISSION_2": "You must grant the camera permission for scanning.",
"READ_IMAGE_PERMISSION": "You must grant the storage read permission for scanning image.",
"CAMERA_PAUSED": "The camera is paused to save battery. To resume, hold the device or press Resume.<br><br>The function can be configured in Setting.",
"UNDO_DELETE": "You can undo the deletion in 5 seconds",
"UNDO_DELETE": "You can undo the deletion in 3 seconds",
"REMOVE_ALL_RECORD": "Are you sure to remove all records? <b>This action cannot be undone.</b>",
"GIVE_NAME_CONTACT": "Give a name to the contact",
"FAIL_START_ADS": "Failed to start ad",
Expand Down
2 changes: 1 addition & 1 deletion src/assets/i18n/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
"CAMERA_PERMISSION_2": "使用掃描功能,您必須授權「簡易QR」使用相機。",
"READ_IMAGE_PERMISSION": "要掃描圖片,您必須授權「簡易QR」存取儲存空間。",
"CAMERA_PAUSED": "為節省電力已暫停掃描,提起裝置或按「恢復」可繼續使用。<br><br>在「設定」可調校此功能。",
"UNDO_DELETE": "您可在5秒內復原記錄",
"UNDO_DELETE": "您可在 3 秒內復原記錄",
"RESET_APP": "確定要重設應用程式和刪除所有數據? <b>此動作無法被撤回。</b>",
"REMOVE_ALL_RECORD": "確定要刪除全部記錄? <b>此動作無法被撤回。</b>",
"GIVE_NAME_CONTACT": "請填寫名字",
Expand Down
2 changes: 2 additions & 0 deletions src/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
@import "~@ionic/angular/css/text-transformation.css";
@import "~@ionic/angular/css/flex-utils.css";

@import '~material-design-icons/iconfont/material-icons.css';

.text-center-toast {
text-align: center;
--max-width: 320px;
Expand Down

0 comments on commit 4164bdd

Please sign in to comment.