Skip to content

Commit

Permalink
Merge branch 'master' into chore/travis-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
adlk committed Oct 25, 2017
2 parents c1f83c3 + eaf3c8f commit ca74c83
Show file tree
Hide file tree
Showing 54 changed files with 2,172 additions and 625 deletions.
19 changes: 9 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,26 @@ before_script:

script:
- yarn lint
- yarn build
- travis_wait yarn build

node_js:
- '7'

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt install libx11-dev libxext-dev
libxss-dev libxkbfile-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt install libx11-dev libxext-dev libxss-dev libxkbfile-dev; fi

cache: yarn

notifications:
email: false
slack:
secure: eVryP5RSaK0zOTZGx5zxt64dFzp0QT95XdX4R6XOgw7WUXbAatO4pLRrJzxi+Ur5bQDPD4hroewAJ77gGSUasFHVb+seiCFwHaszQtq8m8rVh9P/tUG+JP7U8gcOR7nTVhNw5HF5DUO8j8iMqpdvievBQ1KbnYALwcQQj1W/T+UbFCyWYaa3VpJCdOUnbJadeMKcMws9aSStZcQ3wUIvDG3YbpNH02lU3vjU80Y0dMFlGfm8DI9h7pdXQM4VQdyAdtf2fSYV1OMRE7lU2bJP6BX5qcq3+oYty554owVLdF4yBmaFKcB/OOqreOV/GyKLVhZtJIGg00+xTORVBl+1nyO1RsIyCd9FwvwvCRk/f/Nb5j9o96TqIRdssXM3yptVV7cXP0Qwt99BVjice4cb6fXMnu1g9e7kR4K5o/lLijw2CfGcneETj/jh479efCrf4CTX2wRZ6dggE6XQ2zxk6nVz+Y/8HrK9QrAsUlbZcJjCx4oDFCuubP6yccc3NCOd54SdFf0STVt4Yq+63eX8yJhEC2iiVrr9UHrS/9mVxG+pojhyZgOPNYeEvx99nozy2Z9txYrsB9dbqTNmNRVuZozuM8HRDL35l50ZvBALQkj0iqpIGjVEfE3+yc08Idk7Y+cLkuModxtBT4r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F6uaH9L44lLptHIhGgqAZGzwQ7z6ANJj3CJRWFbqW2/9/0+4YKhyBbE9TPIvWIXmVeoPm0nWLDfVDN2RwTGtv+oSgPS+UhcFTVanekKfrzMTVdi1jQ8LIL7Ur3DcXNhwTPuc7PjLPPuwTS2AQRkPMyyWLRAz40/YUepASRdqoVMYI+CZiwu2AZIoUr1HO1eXj/0rqC8t/mhUSOXTxNGRCP9SQTJ/FSaI5dZh3oY7bkz7uxDNbPvChcs7hPFqqhPUFIkX36DaDqjze6IqtZ6pDz7XTqzUET/Jgny9vGBypvGj5fJpYZJytqEs0SsPGQGaxSmAWjcPWQX56Tr98iwVvzAJ0hl7lJHVaEzuxoYmD0ijg2zysoZ7GPBXJg2n9W+QaS0KVuda1r+sQ6C2wY8yvi8=
bucket: franz-travis
region: eu-central-1
local_dir: out
Expand All @@ -43,11 +44,9 @@ deploy:
acl: public_read
on:
all_branches: true
secret_access_key:
secure: HB77zpnMRC0yPa0V+q8H+JzgVFC89OBFZeNdLkZ7jBOGJL2MubgrV2+Qz1JS23972uYLWhY+f0cCc/fbWA19RJ8Bj7MYP/QeSe+psI4F6ge1EjfPzMKkkEtdsUJuV5puEoRQai9sh/tjOsTSyEbwQhyLD/SUlnyimdxsFRujoltyyCqfaHMYU8N9EmS+VIgRXzTOIfQ0u1GcB7E9cnOEdjYWAvUW7vklJ4esVwmPt11KCM+JbOhdenTSr+JaBxopALWs2a3a+wpJ4rsrZlsyAisiOzvgqDlmWRYFyzmIHp0tueiMz5L7sYL/HqgDUkUMVqa3LYzc3iRLab2sm+ukYyNxNK6sNvcWj/gQtSncy5PJ9ZKga1t3CGaze4tGCdAaQdo5lPDywi3Oi3cH7q2gpuubZ5ImgAGkbEDiacZsJR5qRhUZ9gx3gVgSrhKfIx/1lPxsZ8p2LGYL84HKgENOIRWthnzkIgo8xP3ykOun5FihZ8pt3EoJG9NF08YBkMG1FOWxnI2teXb3FZSETt767Qe5DW27WE52daiExO5klgg+dX7ud9f/3G5Fv0au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swuev9mVN9X94VwVZGyNvdYD8cKKxqTsfFDZDgefnuSYUhymKSBgM4yScYF6IPNJWFWJTugtVeMJ8ivqZhwJuD20nt6x7gGB1FS6m7axxRWeyp7h0FqWU9l6ZfmwHcRziVKNTk9BB4XIqco9M2wjV/YH321IGVwtVR5y6zty10+xk38TthCOidgBurFlMKbFKH5g9K5+84dhsCW0avMlJ0+QkgId0uAVyho+09Wx4cKqXLfobpznkUX+S0Um6G/NbAaUAU+SqBsm+X9CKFsPd/YJoxLdF7eBCG/3Fy4roKg3J4mBYeXe3wVnGft8Eeg0aNpOArMSStMY337UpdV80=
- secure: WNQBUyNvjTwMFm6pPzNXZYRvgLCTgEm93vLX/0amtr6gT6N8ZsTLL5+Ht3+v51MUOsjEe6tCM4cLSh4wSuwWcSEsUjK0jiqknlpgKKl6xLeo+1t8u6BKSgTpipWqrSD24TbvMrFUyeQrqCGRdZc3Ax/F1ERD81SXcsrg2evCL8g8zsYjxSMXc44drKrvYi68s/5ALrI+oH3t2PYsGuuP1ipj5CbaizUHEa5d8TukHRl96lxoEKCQ4Sa8UXRPNQsdb3TdkVmIEPIoioWU6AMPweBWR6Ky994aKwp0wWn1adWP49v8skMYWbirENniSxShtztF/NYqPQFyoyh0WD/C/ZJPh04HlMxnmQPUROq+LxBFz8WBY1eHDmz6GxH1lDYzneTtlRa5K8izvs2+ROhpVmmKeOgWHaL1ZRMy8Cn3V88kadF7i1K9NnqB6ZPyynJJctj7o0af6Os9/ZPqWfqIOWWeXgfXVzj17xJADfh6Z9epW95hdKZjnIf9IqGAI8aYTqhVL8DKTJ+PSGhJIOEX+ERm+0U9gMlwllwjHCDhBe42zCGuLaWZ239yD1eacM0Ko7yUM+xobiiF0FlB8VI/nBOpGdeUKNLeUfikLHILWd04AVRCNaQU67GMOHekfWdGR8tEh9I/5Y6GJR0IQL5eGmDUjSN0u/Ovss4jSEBOaXo=
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<a name="5.0.0-beta.11"></a>
# [5.0.0-beta.11](https://github.com/meetfranz/franz/compare/v5.0.0-beta.10...v5.0.0-beta.11) (2017-10-24)

### Features

* **Settings:** Add option to disable system tray icon ([c62f3fc](https://github.com/meetfranz/franz/commit/c62f3fc)), closes [#2](https://github.com/meetfranz/franz/issues/2)
* **Service:** Display URL of hyperlinks ([a0cec4d](https://github.com/meetfranz/franz/commit/a0cec4d)), closes [#47](https://github.com/meetfranz/franz/issues/47) ([GustavoKatel](https://github.com/GustavoKatel))
* **App:** Add tab cycling with ctrl[+shift]+tab or ctrl+[pageup|pagedown] ([e58f558](https://github.com/meetfranz/franz/commit/
e58f558)), closes [#35](https://github.com/meetfranz/franz/issues/35) ([GustavoKatel](https://github.com/GustavoKatel))
* **Translation:** Add Brazilian Portuguese ([phmigotto](https://github.com/phmigotto))
* **Translation:** Add Dutch ([cpeetersburg](https://github.com/cpeetersburg), [Blizzke](https://github.com/Blizzke))
* **Translation:** Add Flemish ([Blizzke](https://github.com/Blizzke), [mroeling](https://github.com/mroeling))
* **Translation:** Add German ([rherwig](https://github.com/rherwig), [berndstelzl](https://github.com/berndstelzl))
* **Translation:** Add Greek ([apo-mak](https://github.com/apo-mak))
* **Translation:** Add French ([Shadorc](https://github.com/Shadorc), [ShiiFu](https://github.com/ShiiFu))
* **Translation:** Add Japanese ([koma-private](https://github.com/koma-private))
* **Translation:** Add Polish ([grzeswol](https://github.com/grzeswol))
* **Translation:** Add Russian ([vaseker](https://github.com/vaseker))
* **Translation:** Add Ukrainian ([Kietzmann](https://github.com/Kietzmann))

### Bug Fixes

* **App:** Force Franz to use single window ([2ae409e](https://github.com/meetfranz/franz/commit/2ae409e)), closes [#29](https://github.com/meetfranz/franz/issues/29)
* **Onboarding:** Fix enable/disable service import toggle ([23174f9](https://github.com/meetfranz/franz/commit/23174f9))
* **Onboarding:** Fix service import ([99d1c01](https://github.com/meetfranz/franz/commit/99d1c01)), closes [#22](https://github.com/meetfranz/franz/issues/22)
* **Payment:** Fix payment window when name contains special character ([a854614](https://github.com/meetfranz/franz/commit/a854614))
* **macOS:** Add macOS dark theme system tray icon ([55805f1](https://github.com/meetfranz/franz/commit/55805f1)), closes [#1](https://github.com/meetfranz/franz/issues/1)
* **Windows:** Fix enable/disable autostart on login ([eca7f3b](https://github.com/meetfranz/franz/commit/eca7f3b)), closes [#17](https://github.com/meetfranz/franz/issues/17)
* **Windows:** Fix multiple system tray icons when opening/closing Franz ([5b9b0c7](https://github.com/meetfranz/franz/commit/5b9b0c7))
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many mor

### Preparations

#### Install OS Dependencies
##### Linux (Debian/Ubuntu)
```bash
$ apt install libx11-dev libxext-dev libxss-dev libxkbfile-dev
```
#### Install Linux OS dependencies
[Guide: Linux distribution specific dependencies](docs/linux.md)

#### Install yarn
##### MacOS
Expand Down
11 changes: 11 additions & 0 deletions docs/linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Linux distribution specific dependencies

## Debian/Ubuntu
```bash
$ apt install libx11-dev libxext-dev libxss-dev libxkbfile-dev
```

## Fedora
```bash
$ dnf-install libX11-devel libXext-devel libXScrnSaver-devel libxkbfile-devel
```
2 changes: 1 addition & 1 deletion electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ directories:
app: ./build
output: ./out

forceCodeSigning: true
# forceCodeSigning: true

compression: maximum

Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "franz",
"productName": "Franz",
"appId": "com.meetfranz.franz",
"version": "5.0.0-beta.10",
"version": "5.0.0-beta.11",
"description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.",
"copyright": "adlk x franz - Stefan Malzner",
"main": "index.js",
Expand All @@ -18,6 +18,7 @@
"prebuild": "gulp build",
"build": "node_modules/.bin/electron-builder --publish onTag",
"rebuild": "node_modules/.bin/electron-rebuild",
"precommit": "yarn lint",
"commit": "git-cz",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s"
},
Expand Down Expand Up @@ -63,7 +64,7 @@
"react-tooltip": "^3.2.7",
"route-parser": "^0.0.5",
"smoothscroll-polyfill": "^0.3.4",
"tar.gz": "^1.0.5",
"tar": "^4.0.2",
"uuid": "^3.0.1"
},
"devDependencies": {
Expand All @@ -82,7 +83,7 @@
"cz-conventional-changelog": "^2.0.0",
"del": "^2.2.2",
"dotenv": "^4.0.0",
"electron": "^1.7.6",
"electron": "^1.7.9",
"electron-builder": "19.15.1",
"electron-packager": "^8.7.0",
"electron-rebuild": "^1.6.0",
Expand Down
2 changes: 2 additions & 0 deletions src/actions/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export default {
setActive: {
serviceId: PropTypes.string.isRequired,
},
setActiveNext: {},
setActivePrev: {},
showAddServiceInterface: {
recipeId: PropTypes.string.isRequired,
},
Expand Down
56 changes: 41 additions & 15 deletions src/api/server/ServerApi.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os from 'os';
import path from 'path';
import targz from 'tar.gz';
import tar from 'tar';
import fs from 'fs-extra';
import { remote } from 'electron';

Expand Down Expand Up @@ -293,7 +293,11 @@ export default class ServerApi {
const buffer = await res.buffer();
fs.writeFileSync(archivePath, buffer);

await targz().extract(archivePath, recipeTempDirectory);
tar.x({
file: archivePath,
cwd: recipeTempDirectory,
sync: true,
});

const { id } = fs.readJsonSync(path.join(recipeTempDirectory, 'package.json'));
const recipeDirectory = path.join(recipesDirectory, id);
Expand Down Expand Up @@ -443,6 +447,10 @@ export default class ServerApi {

// Helper
async _mapServiceModels(services) {
const recipes = services.map(s => s.recipeId);

await this._bulkRecipeCheck(recipes);

return Promise.all(services
.map(async service => await this._prepareServiceModel(service)) // eslint-disable-line
);
Expand All @@ -454,19 +462,8 @@ export default class ServerApi {
recipe = this.recipes.find(r => r.id === service.recipeId);

if (!recipe) {
console.warn(`Recipe '${service.recipeId}' not installed, trying to fetch from server`);

await this.getRecipePackage(service.recipeId);

console.debug('Rerun ServerAPI::getInstalledRecipes');
await this.getInstalledRecipes();

recipe = this.recipes.find(r => r.id === service.recipeId);

if (!recipe) {
console.warn(`Could not load recipe ${service.recipeId}`);
return null;
}
console.warn(`Recipe ${service.recipeId} not loaded`);
return null;
}

return new ServiceModel(service, recipe);
Expand All @@ -476,6 +473,35 @@ export default class ServerApi {
}
}

async _bulkRecipeCheck(unfilteredRecipes) {
// Filter recipe duplicates as we don't need to download 3 Slack recipes
const recipes = unfilteredRecipes.filter((elem, pos, arr) => arr.indexOf(elem) === pos);

return Promise.all(recipes
.map(async (recipeId) => {
let recipe = this.recipes.find(r => r.id === recipeId);

if (!recipe) {
console.warn(`Recipe '${recipeId}' not installed, trying to fetch from server`);

await this.getRecipePackage(recipeId);

console.debug('Rerun ServerAPI::getInstalledRecipes');
await this.getInstalledRecipes();

recipe = this.recipes.find(r => r.id === recipeId);

if (!recipe) {
console.warn(`Could not load recipe ${recipeId}`);
return null;
}
}

return recipe;
}),
).catch(err => console.error(err));
}

_mapRecipePreviewModel(recipes) {
return recipes.map((recipe) => {
try {
Expand Down
Binary file added src/assets/images/tray/darwin-dark/tray-active.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/tray/darwin-dark/tray-unread.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/images/tray/darwin-dark/tray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/components/auth/Import.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export default class Import extends Component {
<tr
key={service.id}
className="service-table__row"
onClick={() => service.$('add').set(!service.$('add').value)}
>
<td className="service-table__toggle">
<Toggle
Expand Down
8 changes: 8 additions & 0 deletions src/components/auth/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import { defineMessages, intlShape } from 'react-intl';

import { isDevMode, useLiveAPI } from '../../environment';
import Form from '../../lib/Form';
import { required, email } from '../../helpers/validation-helpers';
import Input from '../ui/Input';
import Button from '../ui/Button';
import Link from '../ui/Link';
import Infobox from '../ui/Infobox';


import { globalError as globalErrorPropType } from '../../prop-types';

Expand Down Expand Up @@ -117,6 +120,11 @@ export default class Login extends Component {
alt=""
/>
<h1>{intl.formatMessage(messages.headline)}</h1>
{isDevMode && !useLiveAPI && (
<Infobox type="warning">
In Dev Mode your data is not persistent. Please use the live app for accesing the production API.
</Infobox>
)}
{isTokenExpired && (
<p className="error-message center">{intl.formatMessage(messages.tokenExpired)}</p>
)}
Expand Down
7 changes: 7 additions & 0 deletions src/components/auth/Signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import { defineMessages, intlShape } from 'react-intl';

import { isDevMode, useLiveAPI } from '../../environment';
import Form from '../../lib/Form';
import { required, email, minLength } from '../../helpers/validation-helpers';
import Input from '../ui/Input';
import Radio from '../ui/Radio';
import Button from '../ui/Button';
import Link from '../ui/Link';
import Infobox from '../ui/Infobox';

import { globalError as globalErrorPropType } from '../../prop-types';

Expand Down Expand Up @@ -145,6 +147,11 @@ export default class Signup extends Component {
alt=""
/>
<h1>{intl.formatMessage(messages.headline)}</h1>
{isDevMode && !useLiveAPI && (
<Infobox type="warning">
In Dev Mode your data is not persistent. Please use the live app for accesing the production API.
</Infobox>
)}
<Radio field={form.$('accountType')} showLabel={false} />
<div className="grid__row">
<Input field={form.$('firstname')} focus />
Expand Down
24 changes: 24 additions & 0 deletions src/components/services/content/ServiceWebview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Webview from 'react-electron-web-view';
import classnames from 'classnames';

import ServiceModel from '../../../models/Service';
import StatusBarTargetUrl from '../../ui/StatusBarTargetUrl';

@observer
export default class ServiceWebview extends Component {
Expand All @@ -20,6 +21,8 @@ export default class ServiceWebview extends Component {

state = {
forceRepaint: false,
targetUrl: '',
statusBarVisible: false,
};

componentDidMount() {
Expand All @@ -33,6 +36,17 @@ export default class ServiceWebview extends Component {
});
}

updateTargetUrl = (event) => {
let visible = true;
if (event.url === '' || event.url === '#') {
visible = false;
}
this.setState({
targetUrl: event.url,
statusBarVisible: visible,
});
}

webview = null;

render() {
Expand All @@ -47,6 +61,13 @@ export default class ServiceWebview extends Component {
'services__webview--force-repaint': this.state.forceRepaint,
});

let statusBar = null;
if (this.state.statusBarVisible) {
statusBar = (
<StatusBarTargetUrl text={this.state.targetUrl} />
);
}

return (
<div className={webviewClasses}>
<Webview
Expand All @@ -62,11 +83,14 @@ export default class ServiceWebview extends Component {
webview: this.webview.view,
})}

onUpdateTargetUrl={this.updateTargetUrl}

useragent={service.userAgent}

disablewebsecurity
allowpopups
/>
{statusBar}
</div>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/components/settings/settings/EditSettingsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ export default class EditSettingsForm extends Component {
<h2>{intl.formatMessage(messages.headlineGeneral)}</h2>
<Toggle field={form.$('autoLaunchOnStart')} />
<Toggle field={form.$('runInBackground')} />
<Toggle field={form.$('enableSystemTray')} />
{process.platform === 'win32' && (
<Toggle field={form.$('minimizeToSystemTray')} />
)}
Expand Down
Loading

0 comments on commit ca74c83

Please sign in to comment.