Skip to content

Commit

Permalink
Merge branch 'release-0.67.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bafu committed Oct 4, 2022
2 parents b08e983 + 05d0bc0 commit 72c52e1
Show file tree
Hide file tree
Showing 24 changed files with 248 additions and 68 deletions.
37 changes: 35 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,43 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

To check the difference between the last releaes and the latest dev status, click the link above.

## [0.67.0] - 2022-10-04

### Changed

1. Camera supports 2 resolutions: max and social (#2154)
1. Remove CC from menu (#2147)
1. Update NUM price list endpoint (#2109)

### Fixed

1. Use lighter Capture icon to improve loading speed (#2123, #2110)
1. Update onboarding texts to the final version (#2078)
1. Cache and reuse JWT token until near expiration (#2121)
1. Fix typos (#2122)
1. Fix Android notification icon (#2107)

## [0.66.3] - 2022-09-21

### Changed

1. CI update: update iphone compatibility from 12.0 to 14.7

## [0.66.2] - 2022-09-20

### Fixed

1. User can click Capture after uploading is completed (#2082)
2. Press Android back button after taking photo and before pressing confirm, go back to camera (#2092)

## [0.66.1] - 2022-09-15

### Changed

1. CI update: support both qa-release and live versions

## [0.66.0] - 2022-09-15

### Added
Expand Down Expand Up @@ -1828,8 +1858,11 @@ This is the first release! _Capture Lite_ is a cross-platform app adapted from [
- Web - see the demo [here](https://github.com/numbersprotocol/capture-lite#demo-app)
- Android - the APK file `app-debug.apk` is attached to this release

[unreleased]: https://github.com/numbersprotocol/capture-lite/compare/0.66.2...HEAD
[0.66.2]: https://github.com/numbersprotocol/capture-lite/compare/0.66.0...0.66.2
[unreleased]: https://github.com/numbersprotocol/capture-lite/compare/0.67.0...HEAD
[0.67.0]: https://github.com/numbersprotocol/capture-lite/compare/0.66.3...0.67.0
[0.66.3]: https://github.com/numbersprotocol/capture-lite/compare/0.66.2...0.66.3
[0.66.2]: https://github.com/numbersprotocol/capture-lite/compare/0.66.1...0.66.2
[0.66.1]: https://github.com/numbersprotocol/capture-lite/compare/0.66.0...0.66.1
[0.66.0]: https://github.com/numbersprotocol/capture-lite/compare/0.65.0...0.66.0
[0.65.0]: https://github.com/numbersprotocol/capture-lite/compare/0.64.4...0.65.0
[0.64.4]: https://github.com/numbersprotocol/capture-lite/compare/0.64.3...0.64.4
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 "io.numbersprotocol.capturelite"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 446
versionName "0.66.3"
versionCode 447
versionName "0.67.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
Expand Down
12 changes: 8 additions & 4 deletions android/app/src/main/res/drawable/ic_capture_lite.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
<vector android:height="53dp" android:viewportHeight="52.98"
android:viewportWidth="47.52" android:width="47.537937dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#fff" android:pathData="M47.44,8.08l-5.16,6.44A20.45,20.45 0,0 0,27.69 7.86a18.45,18.45 0,1 0,0 36.89,21.64 21.64,0 0,0 14.59,-6.21l5.24,5.84A29.76,29.76 0,0 1,27.24 53C11.9,53 0,41.38 0,26.34 0,11.45 12.05,0 27.54,0A28.9,28.9 0,0 1,47.44 8.08Z"/>
<path android:fillColor="#6ee4d3" android:pathData="M17.74,26.42a10.23,9.98 0,1 0,20.46 0a10.23,9.98 0,1 0,-20.46 0z"/>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="1000dp"
android:height="1000dp"
android:viewportWidth="1000"
android:viewportHeight="1000">
<path
android:pathData="M719.4,248.6L480.8,10h-216L10,264.9v470.8L242.7,735.7c14.2,0 27.9,5.7 37.9,15.7l238.6,238.6h216l254.9,-254.9L990,264.3h-232.7c-14.2,0 -27.9,-5.7 -37.9,-15.7ZM680.2,733.8L319.9,733.8c-29.6,0 -53.6,-24 -53.6,-53.6L266.2,319.8c0,-29.6 24,-53.6 53.6,-53.6h360.3c29.6,0 53.6,24 53.6,53.6v360.3c0,29.6 -24,53.6 -53.6,53.6Z"
android:fillColor="#d17dff"/>
</vector>
4 changes: 2 additions & 2 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.7;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.66.3;
MARKETING_VERSION = 0.67.0;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = io.numbersprotocol.capturelite;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -394,7 +394,7 @@
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.7;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.66.3;
MARKETING_VERSION = 0.67.0;
PRODUCT_BUNDLE_IDENTIFIER = io.numbersprotocol.capturelite;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = NumbersAppDistributionV2;
Expand Down
8 changes: 4 additions & 4 deletions ios/App/Configuration.storekit
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"locale" : "en_US"
}
],
"productID" : "cap_lite_consumable_bronze_pack_099",
"productID" : "capture_lite_consumable_bronze_pack_099",
"referenceName" : "Bronze Pack",
"type" : "Consumable"
},
Expand All @@ -30,7 +30,7 @@
"locale" : "en_US"
}
],
"productID" : "cap_lite_consumable_silver_pack_199",
"productID" : "capture_lite_consumable_silver_pack_199",
"referenceName" : "Silver Pack",
"type" : "Consumable"
},
Expand All @@ -45,7 +45,7 @@
"locale" : "en_US"
}
],
"productID" : "cap_lite_consumable_gold_pack_299",
"productID" : "capture_lite_consumable_gold_pack_299",
"referenceName" : "Gold Pack",
"type" : "Consumable"
},
Expand All @@ -60,7 +60,7 @@
"locale" : "en_US"
}
],
"productID" : "cap_lite_consumable_platinum_pack_399",
"productID" : "capture_lite_consumable_platinum_pack_399",
"referenceName" : "Platinum Pack",
"type" : "Consumable"
}
Expand Down
12 changes: 6 additions & 6 deletions 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": "capture-lite",
"version": "0.66.3",
"version": "0.67.0",
"author": "numbersprotocol",
"homepage": "https://numbersprotocol.io/",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ export class AppComponent {
'capture-rebrand-arrow-left',
'capture-rebrand-share',
'capture-rebrand-more-horiz',
'capture',
'profile',
'search',
];

for (const iconName of captureRebrandedIconNames) {
Expand Down
27 changes: 27 additions & 0 deletions src/app/features/home/custom-camera/custom-camera.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,33 @@
</div>
</div>
</ng-container>

<!-- fab placed in the center of the content with a list on each side -->
<ion-fab
*ngIf="(mode$ | ngrxPush) === 'capture'"
vertical="start"
style="margin-top: 80px"
horizontal="end"
slot="fixed"
>
<ion-fab-button size="small">
{{
cameraQuality === 'hq'
? t('customCamera.max')
: t('customCamera.social')
}}
</ion-fab-button>

<ion-fab-list side="bottom">
<ion-fab-button (click)="setCameraQuality('hq')">
{{ t('customCamera.max') }}
</ion-fab-button>
<ion-fab-button (click)="setCameraQuality('low')">
{{ t('customCamera.social') }}
</ion-fab-button>
</ion-fab-list>
</ion-fab>

<ng-container *ngIf="(mode$ | ngrxPush) === 'pre-publish'">
<app-pre-publish-mode
[curCaptureFilePath]="curCaptureFilePath"
Expand Down
11 changes: 11 additions & 0 deletions src/app/features/home/custom-camera/custom-camera.page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,17 @@ ion-content {
--background: transparent;
}

ion-fab-button {
font-size: 14px;
width: 64px;

--border-radius: 8px;
}

ion-fab-list {
right: 8px;
}

mat-icon {
color: #f2f2f2;
font-size: 36px;
Expand Down
10 changes: 10 additions & 0 deletions src/app/features/home/custom-camera/custom-camera.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export class CustomCameraPage implements OnInit, OnDestroy {
maxZoomFactor = 0;
curZoomFactor = 0;

cameraQuality: 'low' | 'hq' = 'hq';
cameraGesture: any;

private backButtonPrioritySubscription?: Subscription;

get canZoomInOut() {
Expand Down Expand Up @@ -141,6 +144,7 @@ export class CustomCameraPage implements OnInit, OnDestroy {

async startPreviewCamera() {
await this.customCameraService.startPreviewCamera();
await this.customCameraService.setCameraQuality(this.cameraQuality);
await this.syncCameraState();
}

Expand Down Expand Up @@ -248,6 +252,12 @@ export class CustomCameraPage implements OnInit, OnDestroy {
});
}

setCameraQuality(quality: 'low' | 'hq') {
this.cameraQuality = quality;
this.customCameraService.setCameraQuality(quality);
// TODO: send change camera quality command to native side
}

private removeCurrentCapture() {
this.customCameraService.removeFile(this.curCaptureFilePath);
this.curCaptureFilePath = undefined;
Expand Down
6 changes: 6 additions & 0 deletions src/app/features/home/custom-camera/custom-camera.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,12 @@ export class CustomCameraService {
return false;
}

async setCameraQuality(quality: 'low' | 'hq'): Promise<void> {
if (!this.isNativePlatform) return;

await PreviewCamera.setQuality({ quality });
}

private get isNativePlatform() {
return this.platform.is('ios') || this.platform.is('android');
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/features/home/details/details.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class DetailsPage {

readonly iframeUrlWithJWTToken$ = combineLatest([
this.activeDetailedCapture$,
defer(() => this.diaBackendAuthService.queryJWTToken$()),
this.diaBackendAuthService.cachedQueryJWTToken$,
]).pipe(
distinctUntilChanged(),
map(([detailedCapture, token]) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
<ng-template #bubbleIframe>
<div
*ngIf="
bubbleIframeUrlWithJWTToken$ | ngrxPush as bubbleIframeUrlWithJWTToken
bubbleIframeUrlWithCachedJWTToke$
| ngrxPush as bubbleIframeUrlWithCachedJWTToken
"
>
<iframe
[src]="bubbleIframeUrlWithJWTToken | safeResourceUrl"
[src]="bubbleIframeUrlWithCachedJWTToken | safeResourceUrl"
class="bubble-iframe"
></iframe>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { Component } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { defer } from 'rxjs';
import { map } from 'rxjs/operators';
import { DiaBackendAuthService } from '../../../../shared/dia-backend/auth/dia-backend-auth.service';
import { BUBBLE_IFRAME_URL } from '../../../../shared/dia-backend/secret';
import { ErrorService } from '../../../../shared/error/error.service';
import { NetworkService } from '../../../../shared/network/network.service';

@Component({
Expand All @@ -13,20 +10,17 @@ import { NetworkService } from '../../../../shared/network/network.service';
styleUrls: ['./explore-tab.component.scss'],
})
export class ExploreTabComponent {
readonly bubbleIframeUrlWithJWTToken$ = defer(() => {
return this.diaBackendAuthService.queryJWTToken$().pipe(
readonly bubbleIframeUrlWithCachedJWTToke$ =
this.diaBackendAuthService.cachedQueryJWTToken$.pipe(
map(token => {
return `${BUBBLE_IFRAME_URL}/?token=${token.access}&refresh_token=${token.refresh}`;
})
);
});

readonly networkConnected$ = this.networkService.connected$;

constructor(
private readonly sanitizer: DomSanitizer,
private readonly networkService: NetworkService,
private readonly diaBackendAuthService: DiaBackendAuthService,
private readonly errorService: ErrorService
private readonly diaBackendAuthService: DiaBackendAuthService
) {}
}

0 comments on commit 72c52e1

Please sign in to comment.