Skip to content

Commit 84bff14

Browse files
authored
Merge pull request meetfranz#217 from meetfranz/develop
Beta 12
2 parents 81a427c + 21e4886 commit 84bff14

36 files changed

+1038
-190
lines changed

.travis.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,36 @@
1+
matrix:
2+
include:
3+
- os: linux
4+
dist: trusty
5+
sudo: required
6+
- os: osx
7+
osx_image: xcode8.3
8+
19
language: node_js
10+
211
before_script:
312
- yarn add global [email protected]
413
- yarn add global gulpjs/gulp#4.0
514
- yarn add global node-sass
615
- yarn install
16+
717
script:
818
- yarn lint
919
- travis_wait yarn build
20+
1021
node_js:
1122
- '7'
12-
os: osx
13-
osx_image: xcode8.3
23+
24+
before_install:
25+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt install libx11-dev libxext-dev libxss-dev libxkbfile-dev; fi
26+
1427
cache: yarn
28+
1529
notifications:
1630
email: false
1731
slack:
1832
secure: NjEDG+6YvJvFNwRT8t8XyVR145m+Pb1pmYgdBeuhqtJbMAr0IOb0lLLW9ixKEsL1NU+0R58QGiG9qqY+lLnMNpDYjzluFo0gQtl2NJrULT4xUFDSu65XTwoutKyvj+hoCsHiwrSrO2dHTx3ZK2vsSueg+8jM/xss7dTLA6BcTYl14wTOU37PqFQZk9JYR+Dfq1Jjhy/mq4BiAsb/1clNIulkjmRjSm6R0XT4ZsZZfj0ifXhL4cLGsUv2n+iePiX6bLwZPFjXV1COYTBafbCu17gw3nRMdNMMTDLbwrXXdJZFS/EjFOPgOhwF7CkZ3kSpB2ZIcAJxG7iAUl5j+jHBXc5dafRbjzE4oYve1vPexLoV3NjV76uANUFkcli6eHYD0uJoUJGBRbRGWp+8Bbw9EcBsn4s3vbf5XqHX3S46zvGgqX+LyhyMJQtEG/iv+9XOsOql18ryyejij0z1K7DxpI0gLV1ATZCphY1Fyz1yZDGlYN4ej/Rl2P1Q3yXilweJRF7Ts04w4U9iuP1u598/w++CKSu4q4EeEuqT/hIeFQUKUkwCEsO4xa39vhLPaxKrG9UEUH8OXN+NPZyTAK/LKuIX7C56O1kwvWNMWlPmTcvsq2RghvNTwgSGUIO0EKZKrQYAEG3Y/veSt5CgZoNzLgc/6Xj+g7daxUo9heLy26A=
33+
1934
deploy:
2035
provider: s3
2136
access_key_id: AKIAIVRBS4YFL4ZBLCLA
@@ -29,6 +44,7 @@ deploy:
2944
acl: public_read
3045
on:
3146
all_branches: true
47+
3248
env:
3349
global:
3450
- secure: fddJzSmNYVX024jnhnFXEuAK1spEYi3y3RZdWaBtjQnzoObAxkcRW263JNpXQy+b7egnp2hSy8FvlQU+L967911F5Y70Pe3An4oI72hnS3DL4Njp2Dw5PwviwMA+X2ddWhzK4+k/JU6r8jBv1FGQ6ZjwSeaO/t8UKOsE8wDBFLRhnHqoR7QbM7zmKjzh/1oofunGbHsPOHmN4f7jBwSuSFTZltEENcQg3ZP++0NHU8UJdlpfqZOkro8v4AJMngAHeHlNtjwaAHdVv+6+kkwc4E/0Cy6YNyyBkbzipyngNY3GwnwzmNzvsfICD1TGklksjBlMQq7ld7eCiaYRNvyHVEmXJ17qlq7HhxkYgNy32hPRwb5Cv6o4M4tv8qS8UUk4W1RvBJ5fcmfZGQwGXPyQ/m85RJtrNfbYtr84jYcprTnSeji/9PuZv0f87dxELYm3DYmNUa1cgJqEdLUsEd0bMwUYNLnCSfu4ea2zxwir6LSBtJJCbGKxX87s5IOTrHkrWDe+PWd52v+UjQks7MBRlJnntTWo69Yy+ayXV1TnGVOHA5znHvPOvFlAF+y8tLGd4AGvehK1SAkf0+idmc9Q9xKk0QypT3ibjJui4D50p7sSajkzz3P2pUqOS/9HmjMfPMPN+Nl+48GU0CvB2aBGhdmp9vu54VaFzUaAGNGj4WI=

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
<a name="5.0.0-beta.12"></a>
2+
# [5.0.0-beta.12](https://github.com/meetfranz/franz/compare/v5.0.0-beta.11...v5.0.0-beta.12) (2017-11-05)
3+
4+
### Features
5+
6+
* **Menu:** Add "About Franz" Menu item to Windows/Linux ([a21b770](https://github.com/meetfranz/franz/commit/a21b770))
7+
* **Menu:** Add menu item to toggle (service) dev tools ([e8da383](https://github.com/meetfranz/franz/commit/e8da383))
8+
* **Translation:** Add italian translation ([ab348cc](https://github.com/meetfranz/franz/commit/ab348cc)) ([dnlup](https://github.com/dnlup))
9+
10+
11+
### Bug Fixes
12+
13+
* **App:** Add checks to service url validation to prevent app freeze ([db8515f](https://github.com/meetfranz/franz/commit/db8515f))
14+
* **macOS:** Fix disable launch Franz on start ([34bba09](https://github.com/meetfranz/franz/commit/34bba09))
15+
* **Windows:** Launch Franz on start when selected ([34bba09](https://github.com/meetfranz/franz/commit/34bba09))
16+
* **Onboarding:** Fix issue with import of on-premise services ([7c7d27d](https://github.com/meetfranz/franz/commit/7c7d27d))
17+
* **Shortcuts:** Flip shortcut to navigate to next/previous service ([37d5923](https://github.com/meetfranz/franz/commit/37d5923))
18+
* **Windows:** Open Window when app is pinned to taskbar and minimized to system tray ([777814a](https://github.com/meetfranz/franz/commit/777814a))
19+
* **Recipes:** Recipe developers don't need Premium Supporter Account for debugging ([7a9947a](https://github.com/meetfranz/franz/commit/7a9947a)), closes [#23](https://github.com/meetfranz/franz/issues/23)
20+
21+
22+
123
<a name="5.0.0-beta.11"></a>
224
# [5.0.0-beta.11](https://github.com/meetfranz/franz/compare/v5.0.0-beta.10...v5.0.0-beta.11) (2017-10-24)
325

electron-builder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ linux:
2929
- target: deb
3030

3131
nsis:
32-
perMachine: true
32+
perMachine: false
3333
oneClick: true

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "franz",
33
"productName": "Franz",
44
"appId": "com.meetfranz.franz",
5-
"version": "5.0.0-beta.11",
5+
"version": "5.0.0-beta.12",
66
"description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.",
77
"copyright": "adlk x franz - Stefan Malzner",
88
"main": "index.js",
@@ -27,12 +27,13 @@
2727
"license": "Apache-2.0",
2828
"dependencies": {
2929
"@paulcbetts/system-idle-time": "^1.0.4",
30+
"address-rfc2822": "^2.0.1",
31+
"auto-launch": "https://github.com/meetfranz/node-auto-launch.git",
3032
"babel-polyfill": "^6.23.0",
3133
"babel-runtime": "^6.23.0",
3234
"classnames": "^2.2.5",
3335
"electron-fetch": "^1.1.0",
3436
"electron-spellchecker": "^1.2.0",
35-
"electron-squirrel-startup": "^1.0.0",
3637
"electron-updater": "^2.4.3",
3738
"electron-window-state": "^4.1.0",
3839
"fs-extra": "^3.0.1",

src/actions/service.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export default {
6363
needle: PropTypes.string.isRequired,
6464
},
6565
resetFilter: {},
66+
resetStatus: {},
6667
reorder: {
6768
oldIndex: PropTypes.number.isRequired,
6869
newIndex: PropTypes.number.isRequired,

src/api/server/ServerApi.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ export default class ServerApi {
499499

500500
return recipe;
501501
}),
502-
).catch(err => console.error(err));
502+
).catch(err => console.error('Can\'t load recipe', err));
503503
}
504504

505505
_mapRecipePreviewModel(recipes) {
@@ -562,9 +562,16 @@ export default class ServerApi {
562562
.filter(file => fs.statSync(path.join(recipesDirectory, file)).isDirectory() && file !== 'temp');
563563

564564
const recipes = paths.map((id) => {
565-
// eslint-disable-next-line
566-
const Recipe = require(id)(RecipeModel);
567-
return new Recipe(loadRecipeConfig(id));
565+
let Recipe;
566+
try {
567+
// eslint-disable-next-line
568+
Recipe = require(id)(RecipeModel);
569+
return new Recipe(loadRecipeConfig(id));
570+
} catch (err) {
571+
console.error(err);
572+
}
573+
574+
return false;
568575
}).filter(recipe => recipe.id).map((data) => {
569576
const recipe = data;
570577

@@ -579,7 +586,7 @@ export default class ServerApi {
579586

580587
return recipes;
581588
} catch (err) {
582-
console.debug('Folder `recipe/dev` does not exist');
589+
console.debug('Could not load dev recipes');
583590
return false;
584591
}
585592
}

src/components/layout/Sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export default class Sidebar extends Component {
5252
<button
5353
onClick={openSettings}
5454
className="sidebar__settings-button"
55-
data-tip={`Settings (${ctrlKey}+,)`}
55+
data-tip={`${intl.formatMessage(messages.settings)} (${ctrlKey}+,)`}
5656
>
5757
{isPremiumUser && (
5858
<span className="emoji">
Lines changed: 72 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,78 @@
1-
import React from 'react';
2-
import { observer } from 'mobx-react';
1+
import React, { Component } from 'react';
2+
import { observer, PropTypes as MobxPropTypes } from 'mobx-react';
3+
import PropTypes from 'prop-types';
34
import { SortableContainer } from 'react-sortable-hoc';
5+
import { defineMessages, intlShape } from 'react-intl';
46

57
import TabItem from './TabItem';
68
import { ctrlKey } from '../../../environment';
79

8-
export default SortableContainer(observer(({
9-
services,
10-
setActive,
11-
reload,
12-
toggleNotifications,
13-
deleteService,
14-
disableService,
15-
openSettings,
16-
}) => (
17-
<ul
18-
className="tabs"
19-
>
20-
{services.map((service, index) => (
21-
<TabItem
22-
key={service.id}
23-
clickHandler={() => setActive({ serviceId: service.id })}
24-
service={service}
25-
index={index}
26-
shortcutIndex={index + 1}
27-
reload={() => reload({ serviceId: service.id })}
28-
toggleNotifications={() => toggleNotifications({ serviceId: service.id })}
29-
deleteService={() => deleteService({ serviceId: service.id })}
30-
disableService={() => disableService({ serviceId: service.id })}
31-
openSettings={openSettings}
32-
/>
33-
))}
34-
<li>
35-
<button
36-
className="sidebar__add-service"
37-
onClick={() => openSettings({ path: 'recipes' })}
38-
data-tip={`Add new service (${ctrlKey}+N)`}
10+
const messages = defineMessages({
11+
addNewService: {
12+
id: 'sidebar.addNewService',
13+
defaultMessage: '!!!Add new service',
14+
},
15+
});
16+
17+
@observer
18+
class TabBarSortableList extends Component {
19+
static propTypes = {
20+
services: MobxPropTypes.arrayOrObservableArray.isRequired,
21+
setActive: PropTypes.func.isRequired,
22+
openSettings: PropTypes.func.isRequired,
23+
reload: PropTypes.func.isRequired,
24+
toggleNotifications: PropTypes.func.isRequired,
25+
deleteService: PropTypes.func.isRequired,
26+
disableService: PropTypes.func.isRequired,
27+
}
28+
29+
static contextTypes = {
30+
intl: intlShape,
31+
};
32+
33+
render() {
34+
const {
35+
services,
36+
setActive,
37+
reload,
38+
toggleNotifications,
39+
deleteService,
40+
disableService,
41+
openSettings,
42+
} = this.props;
43+
44+
const { intl } = this.context;
45+
46+
return (
47+
<ul
48+
className="tabs"
3949
>
40-
<span className="mdi mdi-plus" />
41-
</button>
42-
</li>
43-
</ul>
44-
)));
50+
{services.map((service, index) => (
51+
<TabItem
52+
key={service.id}
53+
clickHandler={() => setActive({ serviceId: service.id })}
54+
service={service}
55+
index={index}
56+
shortcutIndex={index + 1}
57+
reload={() => reload({ serviceId: service.id })}
58+
toggleNotifications={() => toggleNotifications({ serviceId: service.id })}
59+
deleteService={() => deleteService({ serviceId: service.id })}
60+
disableService={() => disableService({ serviceId: service.id })}
61+
openSettings={openSettings}
62+
/>
63+
))}
64+
<li>
65+
<button
66+
className="sidebar__add-service"
67+
onClick={() => openSettings({ path: 'recipes' })}
68+
data-tip={`${intl.formatMessage(messages.addNewService)} (${ctrlKey}+N)`}
69+
>
70+
<span className="mdi mdi-plus" />
71+
</button>
72+
</li>
73+
</ul>
74+
);
75+
}
76+
}
77+
78+
export default SortableContainer(TabBarSortableList);

src/components/settings/services/EditServiceForm.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ const messages = defineMessages({
6969
export default class EditServiceForm extends Component {
7070
static propTypes = {
7171
recipe: PropTypes.instanceOf(Recipe).isRequired,
72-
// service: PropTypes.oneOfType([
73-
// PropTypes.object,
74-
// PropTypes.instanceOf(Service),
75-
// ]),
7672
service(props, propName) {
7773
if (props.action === 'edit' && !(props[propName] instanceof Service)) {
7874
return new Error(`'${propName}'' is expected to be of type 'Service'
@@ -207,7 +203,7 @@ export default class EditServiceForm extends Component {
207203
)}
208204
{recipe.hasCustomUrl && (
209205
<TabItem title={intl.formatMessage(messages.tabOnPremise)}>
210-
{user.isPremium ? (
206+
{user.isPremium || recipe.author.find(a => a.email === user.email) ? (
211207
<div>
212208
<Input field={form.$('customUrl')} />
213209
{form.error === 'url-validation-error' && (

src/containers/settings/ServicesScreen.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default class ServicesScreen extends Component {
1818

1919
componentWillUnmount() {
2020
this.props.actions.service.resetFilter();
21+
this.props.actions.service.resetStatus();
2122
}
2223

2324
deleteService() {
@@ -70,6 +71,7 @@ ServicesScreen.wrappedComponent.propTypes = {
7071
toggleService: PropTypes.func.isRequired,
7172
filter: PropTypes.func.isRequired,
7273
resetFilter: PropTypes.func.isRequired,
74+
resetStatus: PropTypes.func.isRequired,
7375
}).isRequired,
7476
}).isRequired,
7577
};

src/i18n/languages.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,8 @@ module.exports = {
1010
pl: 'Polish',
1111
ru: 'Русский',
1212
ua: 'Українська',
13+
it: 'Italian',
14+
'es-ES': 'Español - España',
15+
'zh-Hant': 'Chinese (Traditional)',
16+
'nb-NO': 'Norsk',
1317
};

src/i18n/locales/de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"infobar.buttonInstallUpdate": "Neustarten & Aktualisierung installieren",
6161
"infobar.requiredRequestsFailed": "Dienste und Benutzerinformationen konnten nicht geladen werden",
6262
"sidebar.settings": "Einstellungen",
63+
"sidebar.addNewService": "!!!Add new service",
6364
"services.welcome": "Willkommen bei Franz",
6465
"services.getStarted": "Loslegen",
6566
"settings.account.headline": "Konto",

src/i18n/locales/el-GR.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"infobar.buttonInstallUpdate": "Επανεκκίνηση & εγκατάσταση ενημερώσεων",
6161
"infobar.requiredRequestsFailed": "Δεν ήταν δυνατή η φόρτωση υπηρεσιών και πληροφοριών χρηστών",
6262
"sidebar.settings": "Ρυθμίσεις",
63+
"sidebar.addNewService": "!!!Add new service",
6364
"services.welcome": "Καλώς ορίσατε στον Franz",
6465
"services.getStarted": "Ξεκινήστε",
6566
"settings.account.headline": "Λογαριασμός",

src/i18n/locales/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"infobar.buttonInstallUpdate": "Restart & install update",
6161
"infobar.requiredRequestsFailed": "Could not load services and user information",
6262
"sidebar.settings": "Settings",
63+
"sidebar.addNewService": "Add new service",
6364
"services.welcome": "Welcome to Franz",
6465
"services.getStarted": "Get started",
6566
"settings.account.headline": "Account",

0 commit comments

Comments
 (0)