Skip to content

Commit

Permalink
Merge pull request #2644 from numbersprotocol/milestone-v230209
Browse files Browse the repository at this point in the history
Milestone v230209
  • Loading branch information
tammyyang authored Mar 2, 2023
2 parents cc7ad41 + 1a7ead9 commit 10fddb1
Show file tree
Hide file tree
Showing 29 changed files with 328 additions and 92 deletions.
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

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

## [0.75.0] - 2023-03-02

### Added

1. Feature swap explore tab with profile tab (#2590)
2. Feature add faq page (#2588)
3. Feature crop ux flow improvement (#2587)
4. Feature increase android minimum required os (#2586)

### Fixed

1. Fixed unify iframe post messages in wallets page (#2613)
2. Fixed unify iframe post messages (#2589)
3. Fixed android 11 splash screen (#2585)

## [0.74.2] - 2023-02-14

### Fixed
Expand Down Expand Up @@ -2042,10 +2057,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.74.2...HEAD
[unreleased]: https://github.com/numbersprotocol/capture-lite/compare/0.75.0...HEAD
[0.75.0]: https://github.com/numbersprotocol/capture-lite/compare/0.74.2...0.75.0
[0.74.2]: https://github.com/numbersprotocol/capture-lite/compare/0.74.1...0.74.2
[0.74.1]: https://github.com/numbersprotocol/capture-lite/compare/0.74.0...0.74.1
[0.74.0]: https://github.com/numbersprotocol/capture-lite/compare/0.73.0...0.74.0
[0.74.0]: https://github.com/numbersprotocol/capture-lite/compare/0.73.1...0.74.0
[0.73.1]: https://github.com/numbersprotocol/capture-lite/compare/0.72.4...0.73.1
[0.72.4]: https://github.com/numbersprotocol/capture-lite/compare/0.72.3...0.72.4
[0.72.3]: https://github.com/numbersprotocol/capture-lite/compare/0.72.2...0.72.3
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 474
versionName "0.74.2"
versionCode 750
versionName "0.75.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildFeatures {
Expand Down
8 changes: 8 additions & 0 deletions android/app/src/main/res/drawable/splash_centered.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list android:opacity="opaque"
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/splash" />
<item>
<bitmap android:gravity="center" android:src="@drawable/splash" />
</item>
</layer-list>
2 changes: 1 addition & 1 deletion android/app/src/main/res/values-v26/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- These styles will be applied to Android API 26 and above-->
<style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
<!-- Splash Screen Related configs -->
<item name="android:background">@drawable/splash</item>
<item name="android:background">@drawable/splash_centered</item>
<!-- App Launch Bar Related configs -->
<item name="android:windowNoTitle">true</item>
<item name="android:windowActionBar">false</item>
Expand Down
2 changes: 1 addition & 1 deletion android/variables.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ext {
minSdkVersion = 22
minSdkVersion = 28
compileSdkVersion = 32
targetSdkVersion = 32
androidxActivityVersion = '1.4.0'
Expand Down
8 changes: 4 additions & 4 deletions ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -368,13 +368,13 @@
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 750;
DEVELOPMENT_TEAM = G7NB5YCKAP;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = G7NB5YCKAP;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.74.2;
MARKETING_VERSION = 0.75.0;
OTHER_SWIFT_FLAGS = "$(inherited) \"-D\" \"COCOAPODS\" \"-DDEBUG\"";
PRODUCT_BUNDLE_IDENTIFIER = io.numbersprotocol.capturelite;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -395,13 +395,13 @@
CODE_SIGN_ENTITLEMENTS = App/App.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 750;
DEVELOPMENT_TEAM = G7NB5YCKAP;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = G7NB5YCKAP;
INFOPLIST_FILE = App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 0.74.2;
MARKETING_VERSION = 0.75.0;
PRODUCT_BUNDLE_IDENTIFIER = io.numbersprotocol.capturelite;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = NumbersAppDistributionV4;
Expand Down
4 changes: 2 additions & 2 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.74.2",
"version": "0.75.0",
"author": "numbersprotocol",
"homepage": "https://numbersprotocol.io/",
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,11 @@ const routes: Routes = [
m => m.TermsOfUsePageModule
),
},
{
path: 'faq',
loadChildren: () =>
import('./features/faq/faq.module').then(m => m.FaqPageModule),
},
];
@NgModule({
imports: [
Expand Down
14 changes: 9 additions & 5 deletions src/app/features/data-policy/data-policy.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BehaviorSubject, fromEvent } from 'rxjs';
import { tap } from 'rxjs/operators';
import { BUBBLE_IFRAME_URL } from '../../shared/dia-backend/secret';
import { BubbleToIonicPostMessage } from '../../shared/iframe/iframe';
import { NetworkService } from '../../shared/network/network.service';

@UntilDestroy()
Expand Down Expand Up @@ -31,11 +32,14 @@ export class DataPolicyPage {
.pipe(
tap(event => {
const postMessageEvent = event as MessageEvent;
if (postMessageEvent.data === 'iframe-on-load') {
this.iframeLoaded$.next(true);
}
if (postMessageEvent.data === 'iframeBackButtonClicked') {
this.navController.back();
const data = postMessageEvent.data as BubbleToIonicPostMessage;
switch (data) {
case BubbleToIonicPostMessage.IFRAME_ON_LOAD:
this.iframeLoaded$.next(true);
break;
case BubbleToIonicPostMessage.IFRAME_BACK_BUTTON_CLICKED:
this.navController.back();
break;
}
}),
untilDestroyed(this)
Expand Down
17 changes: 17 additions & 0 deletions src/app/features/faq/faq-routing.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { FaqPage } from './faq.page';

const routes: Routes = [
{
path: '',
component: FaqPage,
},
];

@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
})
export class FaqPageRoutingModule {}
12 changes: 12 additions & 0 deletions src/app/features/faq/faq.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { NgModule } from '@angular/core';

import { FaqPageRoutingModule } from './faq-routing.module';

import { SharedModule } from '../../shared/shared.module';
import { FaqPage } from './faq.page';

@NgModule({
imports: [SharedModule, FaqPageRoutingModule],
declarations: [FaqPage],
})
export class FaqPageModule {}
24 changes: 24 additions & 0 deletions src/app/features/faq/faq.page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<ng-container *ngIf="(networkConnected$ | async) === false; else bubbleIframe">
<mat-toolbar>
<button
routerLink=".."
routerDirection="back"
mat-mini-fab
class="capture-rebranded-button"
>
<mat-icon>arrow_back</mat-icon>
</button>
<span>{{ 'faq' | transloco }}</span>
</mat-toolbar>
<div class="no-network-text">
{{ 'message.networkNotConnected' | transloco }}
</div>
</ng-container>

<ng-template #bubbleIframe>
<iframe [src]="iframeUrl | safeResourceUrl" class="bubble-iframe"></iframe>
<ion-spinner
*ngIf="(iframeLoaded$ | async) !== true"
name="lines-sharp"
></ion-spinner>
</ng-template>
39 changes: 39 additions & 0 deletions src/app/features/faq/faq.page.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
mat-toolbar {
span {
padding-right: 40px;
font-style: normal;
font-weight: 500;
font-size: 16px;
line-height: 21px;
text-align: center;
color: white;
}

.capture-rebranded-button {
margin: 0 4px;
background: #ffffff40 !important; /* stylelint-disable-line declaration-no-important */
color: white !important; /* stylelint-disable-line declaration-no-important */
backdrop-filter: blur(4px);
box-shadow: none;
}
}

.no-network-text {
font-size: 18px;
margin: auto;
}

.bubble-iframe {
background-color: black;
width: 100vw;
height: 100vh;
border: 0;
}

ion-spinner {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
scale: 1.5;
}
26 changes: 26 additions & 0 deletions src/app/features/faq/faq.page.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { SharedTestingModule } from '../../shared/shared-testing.module';

import { FaqPage } from './faq.page';

describe('FaqPage', () => {
let component: FaqPage;
let fixture: ComponentFixture<FaqPage>;

beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [FaqPage],
imports: [SharedTestingModule],
}).compileComponents();

fixture = TestBed.createComponent(FaqPage);
component = fixture.componentInstance;
fixture.detectChanges();
})
);

it('should create', () => {
expect(component).toBeTruthy();
});
});
49 changes: 49 additions & 0 deletions src/app/features/faq/faq.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import { Component } from '@angular/core';
import { NavController } from '@ionic/angular';
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';
import { BehaviorSubject, fromEvent } from 'rxjs';
import { tap } from 'rxjs/operators';
import { BUBBLE_IFRAME_URL } from '../../shared/dia-backend/secret';
import { BubbleToIonicPostMessage } from '../../shared/iframe/iframe';
import { NetworkService } from '../../shared/network/network.service';

@UntilDestroy()
@Component({
selector: 'app-faq',
templateUrl: './faq.page.html',
styleUrls: ['./faq.page.scss'],
})
export class FaqPage {
readonly networkConnected$ = this.networkService.connected$;
readonly iframeUrl = `${BUBBLE_IFRAME_URL}/version-v230207-sam/faq`;
readonly iframeLoaded$ = new BehaviorSubject(false);

constructor(
private readonly networkService: NetworkService,
private readonly navController: NavController
) {}

ionViewDidEnter() {
this.processIframeEvents();
}

processIframeEvents() {
fromEvent(window, 'message')
.pipe(
tap(event => {
const postMessageEvent = event as MessageEvent;
const data = postMessageEvent.data as BubbleToIonicPostMessage;
switch (data) {
case BubbleToIonicPostMessage.IFRAME_ON_LOAD:
this.iframeLoaded$.next(true);
break;
case BubbleToIonicPostMessage.IFRAME_BACK_BUTTON_CLICKED:
this.navController.back();
break;
}
}),
untilDestroyed(this)
)
.subscribe();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h4 id="network-action-name">{{ order.network_app_name_text }}</h4>
</ion-col>
<ion-col align="end">
<ion-label
>{{ order.price_number | number: '1.2-2' }}
>{{ order.price_number | number: '1.4-4' }}
{{ order.cost_token_ticker_text || 'NUM' }}</ion-label
>
</ion-col>
Expand All @@ -84,7 +84,7 @@ <h4 id="network-action-name">{{ order.network_app_name_text }}</h4>
</ion-col>
<ion-col align="end">
<ion-label
>{{ order.gas_fee_number | number: '1.2-2' }}
>{{ order.gas_fee_number | number: '1.4-4' }}
{{ order.cost_token_ticker_text || 'NUM' }}</ion-label
>
</ion-col>
Expand All @@ -96,7 +96,7 @@ <h4 id="network-action-name">{{ order.network_app_name_text }}</h4>
</ion-col>
<ion-col align="end">
<ion-label
>{{ order.total_cost_number | number: '1.2-2' }}
>{{ order.total_cost_number | number: '1.4-4' }}
{{ order.cost_token_ticker_text || 'NUM' }}</ion-label
>
</ion-col>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
(processabort)="handleEditorProcessAbort()"
(processerror)="handelEditorProcessError()"
(process)="handleEditorProcess($event)"
(update)="handleEditorUpdate($event)"
></pintura-editor>
</div>

Expand Down
Loading

0 comments on commit 10fddb1

Please sign in to comment.