Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mobile notifications #1624

Merged
merged 25 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a0b05c0
Add mobile notification view
ManfredKarrer Jul 10, 2018
253eb4c
Remove WebCamAppLauncher
ManfredKarrer Jul 10, 2018
b86c03e
Add notifications for offers, trades and disputes
ManfredKarrer Jul 10, 2018
9ee9b93
Merge branch 'master' into notifications
ManfredKarrer Jul 11, 2018
fa20815
Fix threading issue
ManfredKarrer Jul 11, 2018
5dec138
Add JavaFXWebcam window
ManfredKarrer Jul 13, 2018
0832f3a
Improve UI, fix productionMode
ManfredKarrer Jul 15, 2018
751567d
Add price alerts
ManfredKarrer Jul 15, 2018
a957145
Add testMsg for all types
ManfredKarrer Jul 15, 2018
4c2366b
Add descriptor
ManfredKarrer Jul 16, 2018
d2e8c0c
Add tests
ManfredKarrer Jul 16, 2018
24915af
Add check for android
ManfredKarrer Jul 16, 2018
af08f57
Merge branch 'master' into notifications
ManfredKarrer Jul 23, 2018
dbad395
Merge branch 'master' into notifications
ManfredKarrer Aug 5, 2018
4ce22ec
Cleanups
ManfredKarrer Aug 5, 2018
4a0c8b6
Prepare for custom binary:
ManfredKarrer Aug 6, 2018
703bc08
Handle no-webcam case
ManfredKarrer Aug 9, 2018
671daac
Add more logs
ManfredKarrer Aug 10, 2018
be5d191
Remove iphone 6 warning
ManfredKarrer Aug 11, 2018
7e1dcba
Merge branch 'master' into notifications
ManfredKarrer Aug 12, 2018
c3e7fe0
Improve price alerts
ManfredKarrer Aug 13, 2018
bbc1306
Add market price alerts
ManfredKarrer Aug 14, 2018
a8b5b1e
Add download link. Filter own offers
ManfredKarrer Aug 14, 2018
c03f4c1
Merge branch 'master' into notifications
ManfredKarrer Aug 15, 2018
6499772
Fix version number
ManfredKarrer Aug 15, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
buildscript {
repositories {
mavenLocal()
jcenter()
}
dependencies {
Expand All @@ -15,7 +16,7 @@ apply plugin: 'witness'
apply plugin: 'com.github.johnrengelman.shadow'

group = 'network.bisq'
version = '0.7.1-SNAPSHOT'
version = '0.8.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we only do this during the release?


sourceCompatibility = 1.8

Expand All @@ -33,25 +34,29 @@ tasks.withType(JavaCompile) {
sourceSets.main.resources.srcDirs += ['src/main/java'] // to copy fxml and css files

repositories {
mavenLocal()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this only for testing purposes locally?

jcenter()
maven { url 'https://jitpack.io' }
maven { url 'https://raw.githubusercontent.com/JesusMcCloud/tor-binary/master/release/' }
maven { url 'https://dl.bintray.com/jerady/maven' }
}

dependencies {
compile 'network.bisq:bisq-p2p:-SNAPSHOT'
compile 'network.bisq:bisq-core:-SNAPSHOT'
compile 'network.bisq:bisq-common:-SNAPSHOT'
compile 'network.bisq:bisq-p2p:0.8.0'
compile 'network.bisq:bisq-core:0.8.0'
compile 'network.bisq:bisq-common:0.8.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here: I think this should be -SNAPSHOT when merging

compile 'org.controlsfx:controlsfx:8.0.6_20'
compile 'org.reactfx:reactfx:2.0-M3'
compile 'net.glxn:qrgen:1.3'
compile 'de.jensd:fontawesomefx:8.0.0'
compile 'de.jensd:fontawesomefx-commons:8.15'
compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
compile 'com.googlecode.jcsv:jcsv:1.4.0'
compile 'com.github.sarxos:webcam-capture:0.3.12'


compileOnly 'org.projectlombok:lombok:1.16.16'
annotationProcessor 'org.projectlombok:lombok:1.16.16'
//annotationProcessor 'org.projectlombok:lombok:1.16.16'
testCompile('org.mockito:mockito-core:2.8.9') {
exclude(module: 'objenesis')
}
Expand All @@ -61,7 +66,7 @@ dependencies {
testCompile 'org.springframework:spring-test:4.3.6.RELEASE'
testCompile 'com.natpryce:make-it-easy:4.0.1'
testCompileOnly 'org.projectlombok:lombok:1.16.16'
testAnnotationProcessor 'org.projectlombok:lombok:1.16.16'
//testAnnotationProcessor 'org.projectlombok:lombok:1.16.16'
}

build.dependsOn installDist
Expand Down
2 changes: 1 addition & 1 deletion package/linux/32bitBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mkdir -p deploy
set -e

# Edit version
version=0.7.1
version=0.8.0

dir="/media/sf_vm_shared_ubuntu14_32bit"

Expand Down
2 changes: 1 addition & 1 deletion package/linux/64bitBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mkdir -p deploy
set -e

# Edit version
version=0.7.1
version=0.8.0

dir="/media/sf_vm_shared_ubuntu"

Expand Down
2 changes: 1 addition & 1 deletion package/linux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

# pull base image
FROM openjdk:8-jdk
ENV version 0.7.1
ENV version 0.8.0

RUN apt-get update && apt-get install -y --no-install-recommends openjfx && rm -rf /var/lib/apt/lists/* &&
apt-get install -y vim fakeroot
Expand Down
2 changes: 1 addition & 1 deletion package/linux/rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## From https://github.com/bisq-network/bisq-desktop/issues/401#issuecomment-372091261

version=0.7.1
version=0.8.0

alien -r -g /home/$USER/Desktop/Bisq-64bit-$version.deb
find bisq-$version -type f | while read LIB; do LDDOUT=$(ldd $LIB 2>&1); LDDRETVAL=$?;if [ \( -z "${LDDOUT%%*you do not have execution permission for*}" \) -a \( $LDDRETVAL -eq 0 \) ]; then chmod -v +x $LIB;fi;done
Expand Down
2 changes: 1 addition & 1 deletion package/osx/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<key>JVMAppClasspath</key>
<string></string>
<key>JVMMainJarName</key>
<string>Bisq-0.7.1.jar</string>
<string>Bisq-0.8.0.jar</string>
<key>JVMPreferencesID</key>
<string>bisq</string>
<key>JVMOptions</key>
Expand Down
10 changes: 5 additions & 5 deletions package/osx/create_app.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ mkdir -p deploy

set -e

version="0.7.1"
version="0.8.0"

./gradlew --include-build ../common --include-build ../assets --include-build ../p2p --include-build ../core build -x test shadowJar

Expand Down Expand Up @@ -82,18 +82,18 @@ $JAVA_HOME/bin/javapackager \
-Bicon=package/osx/Bisq.icns \
-Bruntime="$JAVA_HOME/jre" \
-native dmg \
-name Bisq \
-title Bisq \
-name Bisq_notifications \
-title Bisq_notifications \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also shouldn't be changed here

-vendor Bisq \
-outdir deploy \
-srcfiles "deploy/Bisq-$version.jar" \
-appclass bisq.desktop.app.BisqAppMain \
-outfile Bisq
-outfile Bisq_notifications

rm "deploy/Bisq.html"
rm "deploy/Bisq.jnlp"

mv "deploy/bundles/Bisq-$version.dmg" "deploy/Bisq-$version.dmg"
mv "deploy/bundles/Bisq_notifications-$version.dmg" "deploy/Bisq_notifications-$version.dmg"
rm -r "deploy/bundles"

open deploy
Expand Down
2 changes: 1 addition & 1 deletion package/osx/finalize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cd ../../

version="0.7.1"
version="0.8.0"

target_dir="releases/$version"

Expand Down
2 changes: 1 addition & 1 deletion package/windows/32bitBuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:: 32 bit build
:: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php)

SET version=0.7.1
SET version=0.8.0

:: Private setup
SET outdir=\\VBOXSVR\vm_shared_windows_32bit
Expand Down
2 changes: 1 addition & 1 deletion package/windows/64bitBuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
:: 64 bit build
:: Needs Inno Setup 5 or later (http://www.jrsoftware.org/isdl.php)

SET version=0.7.1
SET version=0.8.0

:: Private setup
SET outdir=\\VBOXSVR\vm_shared_windows
Expand Down
2 changes: 1 addition & 1 deletion package/windows/Bisq.iss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[Setup]
AppId={{bisq}}
AppName=Bisq
AppVersion=0.7.1
AppVersion=0.8.0
AppVerName=Bisq
AppPublisher=Bisq
AppComments=Bisq
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/bisq/desktop/bisq.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ bg color of non edit textFields: fafafa

-bs-red: red; /* 5 usages */
-bs-error-red: #dd0000; /* 5 usages */
-bs-soft-red: #ee6664; /* 1 usages */
-bs-pink: #ff8986; /* 2 usages */
-bs-orange: #ff8a2b; /* 2 usages */
-bs-orange2: #dd6900; /* 1 usages */
Expand Down Expand Up @@ -1337,3 +1338,13 @@ textfield */
-fx-background-insets: 0, 0 0 0 0
}

/********************************************************************************************************************
* *
* Notifications *
* *
********************************************************************************************************************/

#notification-erase-button {
-fx-background-color: -bs-soft-red;
-fx-text-fill: #ffffff;
}
63 changes: 39 additions & 24 deletions src/main/java/bisq/desktop/components/InfoInputTextField.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@

import java.util.concurrent.TimeUnit;

import lombok.Getter;

import static bisq.desktop.util.FormBuilder.getIcon;

public class InfoInputTextField extends AnchorPane {

private final StringProperty text = new SimpleStringProperty();

private final InputTextField textField;
@Getter
private final InputTextField inputTextField;
@Getter
private final Label infoIcon;
@Getter
private final Label warningIcon;
private Label currentIcon;
private PopOver popover;
Expand All @@ -48,7 +53,7 @@ public class InfoInputTextField extends AnchorPane {
public InfoInputTextField() {
super();

textField = new InputTextField();
inputTextField = new InputTextField();

infoIcon = getIcon(AwesomeIcon.INFO_SIGN);
infoIcon.setLayoutY(3);
Expand All @@ -60,12 +65,12 @@ public InfoInputTextField() {

AnchorPane.setLeftAnchor(infoIcon, 7.0);
AnchorPane.setLeftAnchor(warningIcon, 7.0);
AnchorPane.setRightAnchor(textField, 0.0);
AnchorPane.setLeftAnchor(textField, 0.0);
AnchorPane.setRightAnchor(inputTextField, 0.0);
AnchorPane.setLeftAnchor(inputTextField, 0.0);

hideIcons();

getChildren().addAll(textField, infoIcon, warningIcon);
getChildren().addAll(inputTextField, infoIcon, warningIcon);
}

private void hideIcons() {
Expand Down Expand Up @@ -93,6 +98,35 @@ public void setContentForWarningPopOver(Node node) {
setActionHandlers(node);
}

public void setIconsRightAligned() {
AnchorPane.clearConstraints(infoIcon);
AnchorPane.clearConstraints(warningIcon);
AnchorPane.clearConstraints(inputTextField);

AnchorPane.setRightAnchor(infoIcon, 7.0);
AnchorPane.setRightAnchor(warningIcon, 7.0);
AnchorPane.setLeftAnchor(inputTextField, 0.0);
AnchorPane.setRightAnchor(inputTextField, 0.0);
}


///////////////////////////////////////////////////////////////////////////////////////////
// Getters/Setters
///////////////////////////////////////////////////////////////////////////////////////////

public void setText(String text) {
this.text.set(text);
}

public String getText() {
return text.get();
}


///////////////////////////////////////////////////////////////////////////////////////////
// Private
///////////////////////////////////////////////////////////////////////////////////////////

private void setActionHandlers(Node node) {

currentIcon.setManaged(true);
Expand All @@ -116,10 +150,6 @@ private void setActionHandlers(Node node) {
});
}

///////////////////////////////////////////////////////////////////////////////////////////
// Private
///////////////////////////////////////////////////////////////////////////////////////////

private void showPopOver(Node node) {
node.getStyleClass().add("default-text");

Expand All @@ -132,19 +162,4 @@ private void showPopOver(Node node) {
popover.show(currentIcon, -17);
}
}

///////////////////////////////////////////////////////////////////////////////////////////
// Getters/Setters
///////////////////////////////////////////////////////////////////////////////////////////

public InputTextField getTextField() { return textField; }

public void setText(String text) {
this.text.set(text);
}

public String getText() {
return text.get();
}

}
6 changes: 3 additions & 3 deletions src/main/java/bisq/desktop/main/account/AccountView.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
import javafx.event.EventHandler;

@FxmlView
public class AccountView extends ActivatableView<TabPane, AccountViewModel> {
public class AccountView extends ActivatableView<TabPane, Void> {

@FXML
Tab accountSettingsTab;
Expand All @@ -67,8 +67,8 @@ public class AccountView extends ActivatableView<TabPane, AccountViewModel> {
private EventHandler<KeyEvent> keyEventEventHandler;

@Inject
private AccountView(AccountViewModel model, CachingViewLoader viewLoader, Navigation navigation) {
super(model);
private AccountView(CachingViewLoader viewLoader, Navigation navigation) {
super();
this.viewLoader = viewLoader;
this.navigation = navigation;
}
Expand Down
Loading