Skip to content
This repository has been archived by the owner on Aug 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #515 from bunqCommunity/master
Browse files Browse the repository at this point in the history
Release 0.9.7
  • Loading branch information
Crecket authored Apr 28, 2019
2 parents 340217a + 20876b2 commit 0dafda4
Show file tree
Hide file tree
Showing 58 changed files with 3,882 additions and 4,184 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
matrix:
include:
- os: osx
osx_image: xcode9.2
osx_image: xcode9.4
language: node_js
node_js: '9'
node_js: '10'
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- os: linux
services: docker
language: generic
sudo: required
node_js: '9'
node_js: '10'

addons:
apt:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017 bunqCommunity
Copyright (c) 2019 bunqCommunity

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
4 changes: 2 additions & 2 deletions bunqdesktop.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>bunqdesktop</id>
<version>0.9.6</version>
<version>0.9.7</version>
<!-- <packageSourceUrl>Where is this Chocolatey package located (think GitHub)? packageSourceUrl is highly recommended for the community feed</packageSourceUrl>-->
<!-- owners is a poor name for maintainers of the package. It sticks around by this name for compatibility reasons. It basically means you. -->
<owners>bunqCommunity</owners>
Expand All @@ -25,7 +25,7 @@
<summary>The unofficial, free and open source desktop application for the bunq API</summary>
<description>A desktop implementation for bunq's API. This app does everything within the application so you don't have to worry about sharing your API key with anyone else!</description>

<releaseNotes>https://github.com/bunqCommunity/bunqDesktop/releases/tag/0.9.6</releaseNotes>
<releaseNotes>https://github.com/bunqCommunity/bunqDesktop/releases/tag/0.9.7</releaseNotes>
</metadata>
<files>
<!-- this section controls what actually gets packaged into the Chocolatey package -->
Expand Down
2 changes: 1 addition & 1 deletion chocolatey/chocolateyInstall.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$name = 'bunqDesktop'
$installerType = 'exe'
$url = 'https://github.com/bunqCommunity/bunqDesktop/releases/download/0.9.6/bunqDesktop-0.9.6.exe'
$url = 'https://github.com/bunqCommunity/bunqDesktop/releases/download/0.9.7/bunqDesktop-0.9.7.exe'
$silentArgs = '/silent'

Install-ChocolateyPackage $name $installerType $silentArgs $url
44 changes: 22 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "The unofficial, free and open source desktop application for the bunq API",
"productName": "bunqDesktop",
"homepage": "https://bunqdesk.top/",
"version": "0.9.6",
"version": "0.9.7",
"author": {
"name": "bunqCommunity",
"email": "bunqcommunity@gmail.com"
Expand All @@ -15,7 +15,8 @@
"de",
"nl",
"it",
"es"
"es",
"gr"
],
"scripts": {
"webpack": "cross-env NODE_ENV=production RELEASE_MODE=true webpack --progress --colors",
Expand Down Expand Up @@ -138,8 +139,8 @@
"upath": "1.0.5"
},
"devDependencies": {
"@babel/cli": "^7.0.0",
"@babel/core": "^7.2.0",
"@babel/cli": "^7.2.3",
"@babel/core": "^7.3.4",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"@babel/plugin-proposal-decorators": "^7.0.0",
"@babel/plugin-proposal-do-expressions": "^7.0.0",
Expand All @@ -160,21 +161,20 @@
"@babel/plugin-transform-react-inline-elements": "^7.0.0",
"@babel/plugin-transform-react-jsx-source": "^7.0.0",
"@babel/plugin-transform-runtime": "^7.0.0",
"@babel/preset-env": "^7.0.0",
"@babel/preset-env": "^7.3.4",
"@babel/preset-react": "^7.0.0",
"@bunq-community/bunq-js-client": "^0.40.0",
"@bunq-community/bunq-js-client": "^0.40.2",
"@bunq-community/bunqdesktop-templates": "^1.2.0",
"@fortawesome/fontawesome-free": "^5.2.0",
"@material-ui/core": "^3.5.1",
"@material-ui/icons": "^3.0.1",
"@material-ui/lab": "^3.0.0-alpha.20",
"@types/axios": "^0.14.0",
"@types/jest": "^22.1.3",
"@material-ui/core": "^3.9.2",
"@material-ui/icons": "^3.0.2",
"@material-ui/lab": "^3.0.0-alpha.30",
"@types/jest": "^24.0.9",
"@types/moxios": "^0.4.8",
"@types/node": "^9.4.6",
"@types/react-i18next": "^7.3.2",
"animate.css": "^3.6.1",
"awaiting": "^2.0.1",
"@types/node": "^11.10.5",
"@types/react-i18next": "^8.1.0",
"animate.css": "^3.7.0",
"awaiting": "^3.0.0",
"axios": "^0.18.0",
"babel-loader": "^8.0.0",
"babel-plugin-dynamic-import-node": "^2.0.0",
Expand All @@ -187,9 +187,9 @@
"csv-parse": "^4.0.1",
"date-fns": "^2.0.0-alpha.16",
"dotenv": "^6.1.0",
"electron": "^3.0.8",
"electron-builder": "^20.34.0",
"electron-reload": "^1.2.5",
"electron": "^4.0.7",
"electron-builder": "^20.38.5",
"electron-reload": "^1.4.0",
"email-validator": "^1.1.1",
"enzyme": "^3.3.0",
"enzyme-adapter-react-16": "^1.1.1",
Expand All @@ -198,11 +198,11 @@
"gulp-batch": "^1.0.5",
"gulp-util": "^3.0.8",
"gulp-watch": "^5.0.1",
"hard-source-webpack-plugin": "^0.12.0",
"hard-source-webpack-plugin": "^0.13.1",
"html-webpack-plugin": "^3.2.0",
"iban": "^0.0.10",
"increase-memory-limit": "^1.0.6",
"jest": "^23.6.0",
"jest": "^24.1.0",
"libphonenumber-js": "^1.6.4",
"localforage": "^1.7.2",
"loglevel": "^1.6.1",
Expand All @@ -226,7 +226,7 @@
"react-json-view": "^1.17.1",
"react-loadable": "^5.4.0",
"react-map-gl": "^3.3.5",
"react-number-format": "^3.4.2",
"react-number-format": "^4.0.7",
"react-redux": "^5.0.7",
"react-router": "^4.3.1",
"react-router-dom": "^4.3.1",
Expand Down Expand Up @@ -254,7 +254,7 @@
"uglifyjs-webpack-plugin": "^1.3.0",
"universal-analytics": "^0.4.15",
"vcf": "^2.0.1",
"webpack": "^4.17.1",
"webpack": "4.19.0",
"webpack-bundle-analyzer": "^2.13.1",
"webpack-cli": "^3.1.0",
"worker-loader": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion privacy-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The terms used in this Privacy Policy have the same meanings as in our Terms and
For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information.
The information that I request is retained on your device and is not collected by me in any way

The app does use third party services that may collect information used to identify you.
The app will ask you if it may use third-party services such as Google Analytics and this can be changed at any time on the settings page. Minimal and anonymous info is collected using these services and this is done to find out which OS and languages make use of bunqDesktop.

### Log Data

Expand Down
23 changes: 18 additions & 5 deletions src/react/BunqDesktopClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,20 @@ export const ENVIRONMENT_LOCATION = "BUNQDESKTOP_ENVIRONMENT";

const DEFAULT_PASSWORD = "SOME_DEFAULT_PASSWORD";

class IndexedDbWrapper implements StorageInterface {
const sortApiKeyList = (a, b) => {
if (a.environment === "SANDBOX" && b.environment === "PRODUCTION") {
return 1;
}
if (a.environment === "PRODUCTION" && b.environment === "SANDBOX") {
return -1;
}
if (a.isOAuth && !b.isOAuth) return 1;
if (!a.isOAuth && b.isOAuth) return -1;

return a.device_name > b.device_name ? 1 : -1;
};

export class IndexedDbWrapper implements StorageInterface {
private _indexedDb: LocalForageDriver;

constructor(config: LocalForageOptions) {
Expand Down Expand Up @@ -51,7 +64,7 @@ class IndexedDbWrapper implements StorageInterface {
};
}

class BunqDesktopClient {
export class BunqDesktopClient {
public BunqJSClient: BunqJSClient;
public Logger: any;
public Store: StorageInterface;
Expand Down Expand Up @@ -412,7 +425,7 @@ class BunqDesktopClient {
* @param storedApiKeys
*/
public setStoredApiKeys(storedApiKeys) {
this.stored_api_keys = storedApiKeys;
this.stored_api_keys = storedApiKeys.sort(sortApiKeyList);
this.setStoredValue(API_KEYS_LOCATION, this.stored_api_keys);
}

Expand All @@ -424,8 +437,8 @@ class BunqDesktopClient {
const storedApiKeys = this.storedApiKeys;
storedApiKeys.splice(keyIndex, 1);

this.setStoredValue(API_KEYS_LOCATION, storedApiKeys);
this.stored_api_keys = storedApiKeys;
this.stored_api_keys = storedApiKeys.sort(sortApiKeyList);
this.setStoredValue(API_KEYS_LOCATION, this.stored_api_keys);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const styles = {
position: "absolute",
width: 68,
height: 68,
left: 20,
left: 12,
top: 7
}
};
const AccountAvatarCircularProgress = ({ account, theme, style = {} }) => {
const AccountAvatarCircularProgress = ({ account, theme, selected = false, style = {} }) => {
let isSavingsAccount = false;
if (account.accountType === "MonetaryAccountSavings") {
isSavingsAccount = true;
Expand All @@ -32,13 +32,15 @@ const AccountAvatarCircularProgress = ({ account, theme, style = {} }) => {
style={{
...styles.overlayCircular,
zIndex: 2,
left: selected ? 12 : 16,
...style
}}
/>
<div
style={{
...styles.overlayCircular,
zIndex: 1,
left: selected ? 12 : 16,
...style
}}
>
Expand Down
15 changes: 7 additions & 8 deletions src/react/Components/AccountList/AccountListItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { connectGetBudget } from "../../Functions/ConnectGetPermissions";

import { accountsSelectAccount } from "../../Actions/accounts.js";
import { addAccountIdFilter, removeAccountIdFilter, toggleAccountIdFilter } from "../../Actions/filters";
import LinearProgress from "../LinearProgress";

const styles = {
bigAvatar: {
Expand Down Expand Up @@ -94,21 +93,21 @@ class AccountListItem extends React.Component {

// check if any of the selected account ids are for this account
let displayStyle = {
height: 83
height: 83,
paddingLeft: 20
};
let circularLeftPostion = 20;
let accountIsSelected = false;
let displayAsSelected = false;
if (selectedAccountIds.length !== 0) {
// check if the selected account ids list contains this account
accountIsSelected = selectedAccountIds.some(id => id === account.id);
// switch if toggle is true
const isSelected = toggleAccountIds ? !accountIsSelected : accountIsSelected;
displayAsSelected = toggleAccountIds ? !accountIsSelected : accountIsSelected;

if (isSelected) {
circularLeftPostion = 16;
if (displayAsSelected) {
displayStyle = {
borderLeft: "4px solid #1da1f2",
paddingLeft: 20,
paddingLeft: 16,
height: 83
};
}
Expand All @@ -129,7 +128,7 @@ class AccountListItem extends React.Component {

return (
<ListItem {...listItemProps} style={displayStyle} divider>
<AccountAvatarCircularProgress account={account} style={{ left: circularLeftPostion }} />
<AccountAvatarCircularProgress account={account} selected={displayAsSelected} />
<Avatar style={styles.bigAvatar}>
<LazyAttachmentImage
height={60}
Expand Down
6 changes: 3 additions & 3 deletions src/react/Components/AliasList.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";
import { CopyToClipboard } from "react-copy-to-clipboard";
import ListItem from "@material-ui/core/ListItem";
import ListItemText from "@material-ui/core/ListItemText";
import ListItemIcon from "@material-ui/core/ListItemIcon";
Expand All @@ -11,6 +10,7 @@ import PersonIcon from "@material-ui/icons/Person";
import UrlIcon from "@material-ui/icons/Link";

import { formatIban } from "../Functions/Utils";
import CopyToClipboardWrap from "../Components/CopyToClipboardWrap";

export default ({ aliasses, copiedValue = () => {} }) => {
return aliasses.map(alias => {
Expand All @@ -35,9 +35,9 @@ export default ({ aliasses, copiedValue = () => {} }) => {
return (
<ListItem button dense={true}>
<ListItemIcon>{icon}</ListItemIcon>
<CopyToClipboard text={alias.value} onCopy={copiedValue(alias.type)}>
<CopyToClipboardWrap text={alias.value} onCopy={copiedValue(alias.type)}>
<ListItemText primary={value} />
</CopyToClipboard>
</CopyToClipboardWrap>
</ListItem>
);
});
Expand Down
12 changes: 12 additions & 0 deletions src/react/Components/CopyToClipboardWrap.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from "react";
import { CopyToClipboard } from "react-copy-to-clipboard";

export default props => {
const { onCopy, ...otherProps } = props;
const onCopyWrap = copiedText => {
navigator.clipboard.writeText(copiedText);
if (onCopy) onCopy(copiedText);
};

return <CopyToClipboard onCopy={onCopyWrap} {...otherProps} />;
};
6 changes: 3 additions & 3 deletions src/react/Components/ExportDialog.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from "react";
import CopyToClipboard from "react-copy-to-clipboard";
import Dialog from "@material-ui/core/Dialog";
import DialogActions from "@material-ui/core/DialogActions";
import DialogContent from "@material-ui/core/DialogContent";
Expand All @@ -9,6 +8,7 @@ import Slide from "@material-ui/core/Slide";
import TranslateButton from "./TranslationHelpers/Button";
import ReactJsonWrapper from "./ReactJsonWrapper";
import { anonymizeObject } from "../Functions/Utils";
import CopyToClipboardWrap from "../Components/CopyToClipboardWrap";

const Transition = props => <Slide direction="right" {...props} />;

Expand Down Expand Up @@ -65,11 +65,11 @@ export default class ExportDialog extends React.Component {
{anonymize ? "Original" : "Anonymize"}
</TranslateButton>

<CopyToClipboard text={jsonPretty}>
<CopyToClipboardWrap text={jsonPretty}>
<TranslateButton variant="outlined" onClick={closeModal}>
Copy
</TranslateButton>
</CopyToClipboard>
</CopyToClipboardWrap>

<TranslateButton variant="contained" onClick={closeModal} color="primary">
Ok
Expand Down
4 changes: 2 additions & 2 deletions src/react/Components/FilterComponents/FilterDrawer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class FilterDrawer extends React.Component {
id="from-date"
helperText={t("From date")}
emptyLabel={t("No filter")}
format="MMMM dd, YYYY"
format="MMMM dd, yyyy"
disableFuture
style={styles.dateInput}
maxDate={this.props.dateToFilter}
Expand All @@ -378,7 +378,7 @@ class FilterDrawer extends React.Component {
id="to-date"
helperText={t("To date")}
emptyLabel={t("No filter")}
format="MMMM dd, YYYY"
format="MMMM dd, yyyy"
disableFuture
style={styles.dateInput}
minDate={this.props.dateFromFilter}
Expand Down
Loading

0 comments on commit 0dafda4

Please sign in to comment.