Skip to content

Commit

Permalink
feat: show update notes when first using app
Browse files Browse the repository at this point in the history
  • Loading branch information
tomfong committed Jan 9, 2022
1 parent df68752 commit cf9a600
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 7 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,15 @@ Thanks for your support!

## Changelogs

### 1.4.0 (Current)
### 1.5.0 (Current)

- Support Black color theme
- Support zooming in QR code
- Vibration effect update
- Minor UI update
- Improve performance and fix issues

#### 1.4.0

- Migrated the app to Capacitor
- Improve experience when using "Special Actions" feature in Result page
Expand Down
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "com.tomfong.simpleqr"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 10400
versionName "1.4.0.20211225"
versionCode 10500
versionName "1.5.0.20220110"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-qr",
"version": "1.4.0",
"version": "1.5.0",
"author": "Tom Fong",
"homepage": "https://tomfong-io.web.app",
"scripts": {
Expand Down
16 changes: 16 additions & 0 deletions src/app/pages/scan/scan.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,11 @@ export class ScanPage implements OnInit {
await this.qrScanner.prepare().then(
async (status: QRScannerStatus) => {
if (status.authorized) {
if (this.env.notShowUpdateNotes === false) {
this.env.notShowUpdateNotes = true;
this.env.storageSet("not-show-update-notes", 'yes');
await this.showUpdateNotes();
}
await this.scanQr();
}
},
Expand Down Expand Up @@ -397,4 +402,15 @@ export class ScanPage implements OnInit {
await Haptics.impact({ style: ImpactStyle.Medium });
}
}

async showUpdateNotes() {
const alert = await this.alertController.create({
header: this.translate.instant("UPDATE_NOTES"),
subHeader: this.env.appVersionNumber,
message: this.translate.instant("UPDATE.UPDATE_NOTES"),
buttons: [this.translate.instant("OK")],
cssClass: ['left-align', 'alert-bg']
});
await alert.present();
}
}
11 changes: 11 additions & 0 deletions src/app/services/env.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export class EnvService {
public scanRecordLogging: 'on' | 'off' = 'on';
public vibration: 'on' | 'on-haptic' | 'on-scanned' | 'off' = 'on';
public notShowHistoryTutorial: boolean = false;
public notShowUpdateNotes: boolean = false;
public searchEngine: 'google' | 'bing' | 'yahoo' | 'duckduckgo' = 'google';

public readonly APP_FOLDER_NAME: string = 'SimpleQR';
Expand Down Expand Up @@ -120,6 +121,15 @@ export class EnvService {
}
}
);
this.storageGet("not-show-update-notes").then(
value => {
if (value !== null && value !== undefined) {
this.notShowUpdateNotes = (value === 'yes' ? true : false);
} else {
this.notShowUpdateNotes = false;
}
}
);
this.storageGet("search-engine").then(
value => {
if (value !== null && value !== undefined) {
Expand Down Expand Up @@ -200,6 +210,7 @@ export class EnvService {
this.scanRecordLogging = 'on';
this.vibration = 'on';
this.notShowHistoryTutorial = false;
this.notShowUpdateNotes = false;
this.searchEngine = 'google';
this._scanRecords = [];
this._bookmarks = [];
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 @@ -220,6 +220,6 @@
"TAP_TO_ZOOM_IN": "Tap to zoom in"
},
"UPDATE": {
"UPDATE_NOTES": "<ul><li>Improve experience when using \"Special Actions\" feature in Result page</li><li>Show barcode type when scanning</li><li>Redesigned UI and UX</li><li>Improved performace and fixed issues</li></ul>"
"UPDATE_NOTES": "<ul><li>Support Black color theme</li><li>Support zooming in QR code</li><li>Vibration effect update</li><li>Minor UI update</li><li>Improve performace and fix known issues</li></ul>"
}
}
2 changes: 1 addition & 1 deletion src/assets/i18n/zh-HK.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,6 @@
"TAP_TO_ZOOM_IN": "輕觸以放大"
},
"UPDATE": {
"UPDATE_NOTES": "<ul><li>改善使用結果頁「特別動作」功能時的體驗</li><li>掃碼時顯示條碼類別</li><li>重新設計的界面和體驗</li><li>改善效能及修正已知問題</li></ul>"
"UPDATE_NOTES": "<ul><li>支援黑色主題</li><li>支援 QR 碼放大</li><li>震動效果更新</li><li>小幅度的界面更新</li><li>改善效能及修正已知問題</li></ul>"
}
}

0 comments on commit cf9a600

Please sign in to comment.