Skip to content

Commit

Permalink
Official public release revisions
Browse files Browse the repository at this point in the history
  • Loading branch information
Manbearpixel committed May 20, 2019
1 parent 2364485 commit daa5248
Show file tree
Hide file tree
Showing 25 changed files with 145 additions and 148 deletions.
5 changes: 3 additions & 2 deletions App_Resources/Android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android" package="__PACKAGE__" android:versionCode="400" android:versionName="0.4.0">
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" package="__PACKAGE__" android:versionCode="403" android:versionName="0.4.3">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" />
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="__APILEVEL__" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application android:name="com.tns.NativeScriptApplication" android:allowBackup="true" android:icon="@mipmap/logo" android:roundIcon="@mipmap/logo_round" android:label="@string/app_name" android:theme="@style/AppTheme" android:windowSoftInputMode="stateHidden | adjustPan" android:usesCleartextTraffic="true">
<application android:name="com.tns.NativeScriptApplication" android:allowBackup="false" android:fullBackupContent="false" tools:replace="android:allowBackup" android:icon="@mipmap/logo" android:roundIcon="@mipmap/logo_round" android:label="@string/app_name" android:theme="@style/AppTheme" android:windowSoftInputMode="stateHidden | adjustPan" android:usesCleartextTraffic="true">
<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_odin_notification" />
<meta-data android:name="com.google.firebase.messaging.default_notification_color" android:resource="@color/odin_light_blue" />
<activity android:name="com.tns.NativeScriptActivity" android:label="@string/title_activity_kimera" android:configChanges="keyboardHidden|orientation|screenSize" android:windowSoftInputMode="stateAlwaysHidden|adjustPan" android:theme="@style/LaunchScreenTheme">
Expand Down
4 changes: 2 additions & 2 deletions App_Resources/iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.4.0</string>
<string>0.4.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.4.0</string>
<string>0.4.3</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
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": "odin.chat.client",
"version": "0.4.0",
"version": "0.4.3",
"description": "ODIN Chat, private conversations with cryptocurrency wallet developed on NativeScript",
"nativescript": {
"id": "org.odinblockchain.messenger",
Expand Down
28 changes: 17 additions & 11 deletions src/app/create-account/index/index.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component, OnInit, ViewChild, ElementRef, AfterViewInit } from '@angular/core';
import { Page, View } from 'tns-core-modules/ui/page/page';
import { screen } from 'tns-core-modules/platform/platform';
import { Animation } from 'ui/animation';
import { screen, isAndroid, device } from 'tns-core-modules/platform/platform';
import { Animation } from 'tns-core-modules/ui/animation';
import { GridLayout } from 'tns-core-modules/ui/layouts/grid-layout/grid-layout';
import { SwipeDirection } from 'tns-core-modules/ui/gestures/gestures';
import { setOrientation, disableRotation } from 'nativescript-orientation';
import { RouterExtensions } from 'nativescript-angular/router';
import * as app from 'tns-core-modules/application';

const firebase = require('nativescript-plugin-firebase');
declare var android: any;
Expand Down Expand Up @@ -39,15 +40,20 @@ export class IndexComponent implements OnInit, AfterViewInit {
this.isTransitioning = false;
this.allowGoBack = false;

// Span the background under status bar on Android
// if (isAndroid && device.sdkVersion >= '21') {
// const activity = app.android.startActivity;
// const win = activity.getWindow();
// // win.addFlags(android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN);
// // win.addFlags(android.view.WindowManager.LayoutParams.FLAG_SECURE); // disable screenshots
// // win.addFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
// // win.addFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
// }
try {
// Span the background under status bar on Android
if (isAndroid && device.sdkVersion >= '21') {
const activity = app.android.startActivity;
const win = activity.getWindow();
// win.addFlags(android.view.WindowManager.LayoutParams.FLAG_FULLSCREEN);
// win.addFlags(android.view.WindowManager.LayoutParams.FLAG_SECURE); // disable screenshots
win.clearFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);
win.clearFlags(android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS);
}
} catch (err) {
console.log('Unable to unset translucent settings');
}

firebase.analytics.setScreenName({
screenName: 'Create Account'
}).then(() => {});
Expand Down
4 changes: 2 additions & 2 deletions src/app/help/help.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { RadSideDrawer } from 'nativescript-ui-sidedrawer';
import * as app from 'application';
import * as utilityModule from 'utils/utils';
import * as app from 'tns-core-modules/application';
import * as utilityModule from 'tns-core-modules/utils/utils';

const firebase = require('nativescript-plugin-firebase');

Expand Down
16 changes: 8 additions & 8 deletions src/app/home/home.component.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Component, OnInit, OnDestroy, AfterViewInit } from "@angular/core";
import { Page } from "ui/page";
import { RouterExtensions } from "nativescript-angular/router";
import { StorageService } from "~/app/shared";
import { AccountService } from "~/app/shared/services";
import { Account } from "~/app/shared/models/identity";
import { Component, OnInit, OnDestroy, AfterViewInit } from '@angular/core';
import { Page } from 'tns-core-modules/ui/page';
import { RouterExtensions } from 'nativescript-angular/router';
import { StorageService } from '~/app/shared';
import { AccountService } from '~/app/shared/services';
import { Account } from '~/app/shared/models/identity';

@Component({
selector: "Splashscreen",
selector: 'Splashscreen',
moduleId: module.id,
templateUrl: "./home.component.html",
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
export class HomeComponent implements OnInit, OnDestroy {
Expand Down
4 changes: 2 additions & 2 deletions src/app/lib/Seeder.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import SecureRandom from './SecureRandom';
import { Observable, EventData } from "data/observable";
import { Observable, EventData } from 'tns-core-modules/data/observable';
import * as shajs from 'sha.js'

export default class Seeder extends Observable {
Expand Down Expand Up @@ -71,7 +71,7 @@ export default class Seeder extends Observable {
hex.push((bytes[i] >>> 4).toString(16));
hex.push((bytes[i] & 0xF).toString(16));
}
return hex.join("");
return hex.join('');
}

public sha256Seed = function() {
Expand Down
4 changes: 2 additions & 2 deletions src/app/messenger/index/index.component.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Component, OnInit } from '@angular/core';
import { isAndroid } from 'ui/page';
import { isAndroid } from 'tns-core-modules/ui/page';
import { RadSideDrawer } from 'nativescript-ui-sidedrawer';
import * as app from 'tns-core-modules/application';
import { TouchGestureEventData } from 'tns-core-modules/ui/gestures';
import { GridLayout } from 'ui/layouts/grid-layout';
import { GridLayout } from 'tns-core-modules/ui/layouts/grid-layout';
import { RouterExtensions } from 'nativescript-angular/router';
import { IdentityService } from '~/app/shared/services/identity.service';
import { Contact, Message } from '~/app/shared/models/messenger';
Expand Down
2 changes: 1 addition & 1 deletion src/app/messenger/message/message.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { alert } from 'tns-core-modules/ui/dialogs';
import { ObservableArray } from 'tns-core-modules/data/observable-array';

import * as Clipboard from 'nativescript-clipboard';
import { TextField } from 'ui/text-field';
import { TextField } from 'tns-core-modules/ui/text-field';
import { Contact, Message } from '~/app/shared/models/messenger';
import { IdentityService } from '~/app/shared/services/identity.service';
import { Account } from '~/app/shared/models/identity';
Expand Down
6 changes: 3 additions & 3 deletions src/app/settings/index/index.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { RadSideDrawer } from 'nativescript-ui-sidedrawer';
import * as app from 'tns-core-modules/application';
import { UserModel } from '~/app/shared/user.model';
import { PreferencesService } from '~/app/shared/preferences.service';
import { alert, confirm } from 'ui/dialogs';
import { isAndroid, isIOS, device } from 'platform';
import { Page } from 'ui/page';
import { alert, confirm } from 'tns-core-modules/ui/dialogs';
import { isAndroid, device } from 'tns-core-modules/platform';
import { Page } from 'tns-core-modules/ui/page';
import { Account } from '~/app/shared/models/identity';
import { IdentityService } from '~/app/shared/services/identity.service';
import { StorageService } from '~/app/shared';
Expand Down
2 changes: 1 addition & 1 deletion src/app/shared/models/identity/account.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Message } from '../messenger/message.model';
import { Contact } from '../messenger';
import { SignalAddress, SignedPreKey, PublicPreKey, PreKeyBundle, SignalClientContact } from '../signal';
import { Client } from '../messenger/client.model';
import { request, HttpResponse } from 'http';
import { request, HttpResponse } from 'tns-core-modules/http';
import Hashids from 'hashids';

export interface IRemoteContact {
Expand Down
22 changes: 11 additions & 11 deletions src/app/shared/osm-client.service.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable } from "@angular/core";
import { request } from "http";
import { PreferencesService } from "./preferences.service";
import { Injectable } from '@angular/core';
import { request } from 'tns-core-modules/http';
import { PreferencesService } from './preferences.service';


export interface IRegistrationData {
Expand Down Expand Up @@ -38,7 +38,7 @@ export class OSMClientService {
return new Promise((resolve, reject) => {
request({
url: `${this._pref.preferences.api_url}/keys/?user=${contactIdentity}`,
method: "GET"
method: 'GET'
}).then((response) => {
if (response.statusCode !== 200) {
console.log('OSMClientService... RESPONSE');
Expand Down Expand Up @@ -70,7 +70,7 @@ export class OSMClientService {
return new Promise((resolve, reject) => {
request({
url: `${this._pref.preferences.api_url}/keys/count?user=${hashAccountName}`,
method: "GET"
method: 'GET'
}).then((response) => {
if (response.statusCode !== 200) {
console.log('OSMClientService... RESPONSE');
Expand Down Expand Up @@ -109,8 +109,8 @@ export class OSMClientService {
return new Promise((resolve, reject) => {
request({
url: `${this._pref.preferences.api_url}/keys`,
method: "PUT",
headers: { "Content-Type": "application/json" },
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
content: JSON.stringify(clientDetails)
}).then((response) => {
if (response.statusCode !== 200) {
Expand Down Expand Up @@ -152,8 +152,8 @@ export class OSMClientService {
return new Promise((resolve, reject) => {
request({
url: `${this._pref.preferences.api_url}/messages`,
method: "PUT",
headers: { "Content-Type": "application/json" },
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
content: JSON.stringify(putMessageBody)
}).then((response) => {
if (response.statusCode !== 200) {
Expand Down Expand Up @@ -186,7 +186,7 @@ export class OSMClientService {
return new Promise((resolve, reject) => {
request({
url: `${this._pref.preferences.api_url}/messages?deviceId=${deviceId}&registrationId=${registrationId}`,
method: "GET",
method: 'GET',
}).then((response) => {
if (response.statusCode !== 200) {
console.log('OSMClientService... RESPONSE');
Expand Down Expand Up @@ -218,7 +218,7 @@ export class OSMClientService {
return new Promise((resolve, reject) => {
request({
url: `${this._pref.preferences.api_url}/messages?key=${messageKey}`,
method: "DELETE",
method: 'DELETE',
}).then((response) => {
if (response.statusCode !== 200) {
console.log('OSMClientService... RESPONSE');
Expand Down
9 changes: 3 additions & 6 deletions src/app/shared/preferences.service.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { Injectable } from "@angular/core";
import { fromObject, fromObjectRecursive, Observable, PropertyChangeData } from "tns-core-modules/data/observable";
// import { StorageService } from "./storage.service";
import { alert } from "ui/dialogs";
import { environment } from "~/environments/environment";
import { Injectable } from '@angular/core';
import { environment } from '~/environments/environment';
import {
getBoolean,
setBoolean,
Expand All @@ -13,7 +10,7 @@ import {
hasKey,
remove,
clear
} from "tns-core-modules/application-settings";
} from 'tns-core-modules/application-settings';


@Injectable()
Expand Down
3 changes: 2 additions & 1 deletion src/app/shared/ui/input-field/input-field.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "~/app-variables.scss";
$odin-blue: #00A8B6;
$odin-red: #CC4F49;

.input-field {
margin-top: 20;
Expand Down
6 changes: 3 additions & 3 deletions src/app/shared/ui/input-field/input-field.component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component, OnInit, Input, forwardRef, AfterViewInit, Output, EventEmitter } from "@angular/core";
import { Component, Input, forwardRef, Output, EventEmitter } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import { ReturnKeyType } from "tns-core-modules/ui/editable-text-base/editable-text-base";
import { ReturnKeyType } from 'tns-core-modules/ui/editable-text-base/editable-text-base';
import * as Clipboard from 'nativescript-clipboard';
import { SnackBar } from "nativescript-snackbar";
import { SnackBar } from 'nativescript-snackbar';

@Component({
moduleId: module.id,
Expand Down
4 changes: 2 additions & 2 deletions src/app/shared/ui/round-button/round-button.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<GridLayout #roundButtonWrap
class="round-button-wrap btn-theme-{{theme}}"
class="round-button-wrap"
[class.busy]="busy"
[class.disabled]="disabled"

rows="auto"
horizontalAlignment="center">
<StackLayout class="cta">
<StackLayout class="cta cta-bonus">
<Button class="shadow"></Button>
<Button class="overlay" [text]="text" (tap)="onTap($event)"></Button>
</StackLayout>
Expand Down
6 changes: 5 additions & 1 deletion src/app/shared/ui/round-button/round-button.component.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
@import "~/app-variables.scss";
$odin-blue-light: #41C0D1;
$odin-blue: #00A8B6;
$odin-white: #FCF9F1;
$odin-green-light: #88A881;
$odin-green: #619772;

.round-button-wrap {
height: 62;
Expand Down
13 changes: 4 additions & 9 deletions src/app/shared/ui/round-button/round-button.component.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import { Component, OnInit, AfterContentInit, AfterViewInit, OnDestroy, ViewChild, ElementRef, NgZone, Input, Output, EventEmitter } from "@angular/core";
import { Page } from "tns-core-modules/ui/page/page";
import { setOrientation, disableRotation } from "nativescript-orientation";
import Seeder from '~/app/lib/Seeder';
import SecureRandom from '~/app/lib/SecureRandom';
import { TouchGestureEventData } from "tns-core-modules/ui/gestures/gestures";
import { AnimationCurve } from "tns-core-modules/ui/enums/enums";
import { Component, OnInit, AfterViewInit, ViewChild, ElementRef, Input, Output, EventEmitter } from '@angular/core';
import { AnimationCurve } from 'tns-core-modules/ui/enums/enums';

@Component({
selector: "RoundButton, [RoundButton]",
moduleId: module.id,
templateUrl: "./round-button.component.html",
selector: 'RoundButton, [RoundButton]',
templateUrl: './round-button.component.html',
styleUrls: ['./round-button.component.css']
})
export class RoundButtonComponent implements OnInit, AfterViewInit {
Expand Down
19 changes: 6 additions & 13 deletions src/app/shared/user.model.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import { Injectable } from "@angular/core";
import { fromObject, fromObjectRecursive, Observable, PropertyChangeData } from "tns-core-modules/data/observable";
import { Injectable } from '@angular/core';
import { Observable } from 'tns-core-modules/data/observable';
import { StorageService } from './index';
import { OSMClientService } from './osm-client.service';
import { RouterExtensions } from "nativescript-angular/router";
import { ObservableArray, ChangedData } from "tns-core-modules/data/observable-array";

import { ODIN } from '~/app/bundle.odin';

import Hashids from 'hashids';
import { alert } from "ui/dialogs";

import { RouterExtensions } from 'nativescript-angular/router';
import { LibsignalProtocol } from 'nativescript-libsignal-protocol';

export class UserSaveData {
Expand Down Expand Up @@ -222,10 +215,10 @@ export class UserModel extends Observable {

await this._store.clearStorage();
await this.clearSaveData();
this._router.navigate(["/splashscreen"], { clearHistory: true });
this._router.navigate(['/splashscreen'], { clearHistory: true });

this.notify({
eventName: "ClearSession",
eventName: 'ClearSession',
object: this
});

Expand Down Expand Up @@ -257,7 +250,7 @@ export class UserModel extends Observable {
};

this.notify({
eventName: "SaveDataPurged",
eventName: 'SaveDataPurged',
object: this
});

Expand Down
Loading

0 comments on commit daa5248

Please sign in to comment.