Skip to content

Commit

Permalink
Merge pull request #217 from meetfranz/develop
Browse files Browse the repository at this point in the history
Beta 12
  • Loading branch information
adlk authored Nov 5, 2017
2 parents 81a427c + 21e4886 commit 84bff14
Show file tree
Hide file tree
Showing 36 changed files with 1,038 additions and 190 deletions.
20 changes: 18 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,36 @@
matrix:
include:
- os: linux
dist: trusty
sudo: required
- os: osx
osx_image: xcode8.3

language: node_js

before_script:
- yarn add global [email protected]
- yarn add global gulpjs/gulp#4.0
- yarn add global node-sass
- yarn install

script:
- yarn lint
- travis_wait yarn build

node_js:
- '7'
os: osx
osx_image: xcode8.3

before_install:
- 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: 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=

deploy:
provider: s3
access_key_id: AKIAIVRBS4YFL4ZBLCLA
Expand All @@ -29,6 +44,7 @@ deploy:
acl: public_read
on:
all_branches: true

env:
global:
- secure: fddJzSmNYVX024jnhnFXEuAK1spEYi3y3RZdWaBtjQnzoObAxkcRW263JNpXQy+b7egnp2hSy8FvlQU+L967911F5Y70Pe3An4oI72hnS3DL4Njp2Dw5PwviwMA+X2ddWhzK4+k/JU6r8jBv1FGQ6ZjwSeaO/t8UKOsE8wDBFLRhnHqoR7QbM7zmKjzh/1oofunGbHsPOHmN4f7jBwSuSFTZltEENcQg3ZP++0NHU8UJdlpfqZOkro8v4AJMngAHeHlNtjwaAHdVv+6+kkwc4E/0Cy6YNyyBkbzipyngNY3GwnwzmNzvsfICD1TGklksjBlMQq7ld7eCiaYRNvyHVEmXJ17qlq7HhxkYgNy32hPRwb5Cv6o4M4tv8qS8UUk4W1RvBJ5fcmfZGQwGXPyQ/m85RJtrNfbYtr84jYcprTnSeji/9PuZv0f87dxELYm3DYmNUa1cgJqEdLUsEd0bMwUYNLnCSfu4ea2zxwir6LSBtJJCbGKxX87s5IOTrHkrWDe+PWd52v+UjQks7MBRlJnntTWo69Yy+ayXV1TnGVOHA5znHvPOvFlAF+y8tLGd4AGvehK1SAkf0+idmc9Q9xKk0QypT3ibjJui4D50p7sSajkzz3P2pUqOS/9HmjMfPMPN+Nl+48GU0CvB2aBGhdmp9vu54VaFzUaAGNGj4WI=
Expand Down
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
<a name="5.0.0-beta.12"></a>
# [5.0.0-beta.12](https://github.com/meetfranz/franz/compare/v5.0.0-beta.11...v5.0.0-beta.12) (2017-11-05)

### Features

* **Menu:** Add "About Franz" Menu item to Windows/Linux ([a21b770](https://github.com/meetfranz/franz/commit/a21b770))
* **Menu:** Add menu item to toggle (service) dev tools ([e8da383](https://github.com/meetfranz/franz/commit/e8da383))
* **Translation:** Add italian translation ([ab348cc](https://github.com/meetfranz/franz/commit/ab348cc)) ([dnlup](https://github.com/dnlup))


### Bug Fixes

* **App:** Add checks to service url validation to prevent app freeze ([db8515f](https://github.com/meetfranz/franz/commit/db8515f))
* **macOS:** Fix disable launch Franz on start ([34bba09](https://github.com/meetfranz/franz/commit/34bba09))
* **Windows:** Launch Franz on start when selected ([34bba09](https://github.com/meetfranz/franz/commit/34bba09))
* **Onboarding:** Fix issue with import of on-premise services ([7c7d27d](https://github.com/meetfranz/franz/commit/7c7d27d))
* **Shortcuts:** Flip shortcut to navigate to next/previous service ([37d5923](https://github.com/meetfranz/franz/commit/37d5923))
* **Windows:** Open Window when app is pinned to taskbar and minimized to system tray ([777814a](https://github.com/meetfranz/franz/commit/777814a))
* **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)



<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)

Expand Down
2 changes: 1 addition & 1 deletion electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ linux:
- target: deb

nsis:
perMachine: true
perMachine: false
oneClick: true
5 changes: 3 additions & 2 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.11",
"version": "5.0.0-beta.12",
"description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.",
"copyright": "adlk x franz - Stefan Malzner",
"main": "index.js",
Expand All @@ -27,12 +27,13 @@
"license": "Apache-2.0",
"dependencies": {
"@paulcbetts/system-idle-time": "^1.0.4",
"address-rfc2822": "^2.0.1",
"auto-launch": "https://github.com/meetfranz/node-auto-launch.git",
"babel-polyfill": "^6.23.0",
"babel-runtime": "^6.23.0",
"classnames": "^2.2.5",
"electron-fetch": "^1.1.0",
"electron-spellchecker": "^1.2.0",
"electron-squirrel-startup": "^1.0.0",
"electron-updater": "^2.4.3",
"electron-window-state": "^4.1.0",
"fs-extra": "^3.0.1",
Expand Down
1 change: 1 addition & 0 deletions src/actions/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export default {
needle: PropTypes.string.isRequired,
},
resetFilter: {},
resetStatus: {},
reorder: {
oldIndex: PropTypes.number.isRequired,
newIndex: PropTypes.number.isRequired,
Expand Down
17 changes: 12 additions & 5 deletions src/api/server/ServerApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,7 @@ export default class ServerApi {

return recipe;
}),
).catch(err => console.error(err));
).catch(err => console.error('Can\'t load recipe', err));
}

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

const recipes = paths.map((id) => {
// eslint-disable-next-line
const Recipe = require(id)(RecipeModel);
return new Recipe(loadRecipeConfig(id));
let Recipe;
try {
// eslint-disable-next-line
Recipe = require(id)(RecipeModel);
return new Recipe(loadRecipeConfig(id));
} catch (err) {
console.error(err);
}

return false;
}).filter(recipe => recipe.id).map((data) => {
const recipe = data;

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

return recipes;
} catch (err) {
console.debug('Folder `recipe/dev` does not exist');
console.debug('Could not load dev recipes');
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/layout/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default class Sidebar extends Component {
<button
onClick={openSettings}
className="sidebar__settings-button"
data-tip={`Settings (${ctrlKey}+,)`}
data-tip={`${intl.formatMessage(messages.settings)} (${ctrlKey}+,)`}
>
{isPremiumUser && (
<span className="emoji">
Expand Down
110 changes: 72 additions & 38 deletions src/components/services/tabs/TabBarSortableList.js
Original file line number Diff line number Diff line change
@@ -1,44 +1,78 @@
import React from 'react';
import { observer } from 'mobx-react';
import React, { Component } from 'react';
import { observer, PropTypes as MobxPropTypes } from 'mobx-react';
import PropTypes from 'prop-types';
import { SortableContainer } from 'react-sortable-hoc';
import { defineMessages, intlShape } from 'react-intl';

import TabItem from './TabItem';
import { ctrlKey } from '../../../environment';

export default SortableContainer(observer(({
services,
setActive,
reload,
toggleNotifications,
deleteService,
disableService,
openSettings,
}) => (
<ul
className="tabs"
>
{services.map((service, index) => (
<TabItem
key={service.id}
clickHandler={() => setActive({ serviceId: service.id })}
service={service}
index={index}
shortcutIndex={index + 1}
reload={() => reload({ serviceId: service.id })}
toggleNotifications={() => toggleNotifications({ serviceId: service.id })}
deleteService={() => deleteService({ serviceId: service.id })}
disableService={() => disableService({ serviceId: service.id })}
openSettings={openSettings}
/>
))}
<li>
<button
className="sidebar__add-service"
onClick={() => openSettings({ path: 'recipes' })}
data-tip={`Add new service (${ctrlKey}+N)`}
const messages = defineMessages({
addNewService: {
id: 'sidebar.addNewService',
defaultMessage: '!!!Add new service',
},
});

@observer
class TabBarSortableList extends Component {
static propTypes = {
services: MobxPropTypes.arrayOrObservableArray.isRequired,
setActive: PropTypes.func.isRequired,
openSettings: PropTypes.func.isRequired,
reload: PropTypes.func.isRequired,
toggleNotifications: PropTypes.func.isRequired,
deleteService: PropTypes.func.isRequired,
disableService: PropTypes.func.isRequired,
}

static contextTypes = {
intl: intlShape,
};

render() {
const {
services,
setActive,
reload,
toggleNotifications,
deleteService,
disableService,
openSettings,
} = this.props;

const { intl } = this.context;

return (
<ul
className="tabs"
>
<span className="mdi mdi-plus" />
</button>
</li>
</ul>
)));
{services.map((service, index) => (
<TabItem
key={service.id}
clickHandler={() => setActive({ serviceId: service.id })}
service={service}
index={index}
shortcutIndex={index + 1}
reload={() => reload({ serviceId: service.id })}
toggleNotifications={() => toggleNotifications({ serviceId: service.id })}
deleteService={() => deleteService({ serviceId: service.id })}
disableService={() => disableService({ serviceId: service.id })}
openSettings={openSettings}
/>
))}
<li>
<button
className="sidebar__add-service"
onClick={() => openSettings({ path: 'recipes' })}
data-tip={`${intl.formatMessage(messages.addNewService)} (${ctrlKey}+N)`}
>
<span className="mdi mdi-plus" />
</button>
</li>
</ul>
);
}
}

export default SortableContainer(TabBarSortableList);
6 changes: 1 addition & 5 deletions src/components/settings/services/EditServiceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,6 @@ const messages = defineMessages({
export default class EditServiceForm extends Component {
static propTypes = {
recipe: PropTypes.instanceOf(Recipe).isRequired,
// service: PropTypes.oneOfType([
// PropTypes.object,
// PropTypes.instanceOf(Service),
// ]),
service(props, propName) {
if (props.action === 'edit' && !(props[propName] instanceof Service)) {
return new Error(`'${propName}'' is expected to be of type 'Service'
Expand Down Expand Up @@ -207,7 +203,7 @@ export default class EditServiceForm extends Component {
)}
{recipe.hasCustomUrl && (
<TabItem title={intl.formatMessage(messages.tabOnPremise)}>
{user.isPremium ? (
{user.isPremium || recipe.author.find(a => a.email === user.email) ? (
<div>
<Input field={form.$('customUrl')} />
{form.error === 'url-validation-error' && (
Expand Down
2 changes: 2 additions & 0 deletions src/containers/settings/ServicesScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default class ServicesScreen extends Component {

componentWillUnmount() {
this.props.actions.service.resetFilter();
this.props.actions.service.resetStatus();
}

deleteService() {
Expand Down Expand Up @@ -70,6 +71,7 @@ ServicesScreen.wrappedComponent.propTypes = {
toggleService: PropTypes.func.isRequired,
filter: PropTypes.func.isRequired,
resetFilter: PropTypes.func.isRequired,
resetStatus: PropTypes.func.isRequired,
}).isRequired,
}).isRequired,
};
4 changes: 4 additions & 0 deletions src/i18n/languages.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ module.exports = {
pl: 'Polish',
ru: 'Русский',
ua: 'Українська',
it: 'Italian',
'es-ES': 'Español - España',
'zh-Hant': 'Chinese (Traditional)',
'nb-NO': 'Norsk',
};
1 change: 1 addition & 0 deletions src/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"infobar.buttonInstallUpdate": "Neustarten & Aktualisierung installieren",
"infobar.requiredRequestsFailed": "Dienste und Benutzerinformationen konnten nicht geladen werden",
"sidebar.settings": "Einstellungen",
"sidebar.addNewService": "!!!Add new service",
"services.welcome": "Willkommen bei Franz",
"services.getStarted": "Loslegen",
"settings.account.headline": "Konto",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/el-GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"infobar.buttonInstallUpdate": "Επανεκκίνηση & εγκατάσταση ενημερώσεων",
"infobar.requiredRequestsFailed": "Δεν ήταν δυνατή η φόρτωση υπηρεσιών και πληροφοριών χρηστών",
"sidebar.settings": "Ρυθμίσεις",
"sidebar.addNewService": "!!!Add new service",
"services.welcome": "Καλώς ορίσατε στον Franz",
"services.getStarted": "Ξεκινήστε",
"settings.account.headline": "Λογαριασμός",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"infobar.buttonInstallUpdate": "Restart & install update",
"infobar.requiredRequestsFailed": "Could not load services and user information",
"sidebar.settings": "Settings",
"sidebar.addNewService": "Add new service",
"services.welcome": "Welcome to Franz",
"services.getStarted": "Get started",
"settings.account.headline": "Account",
Expand Down
Loading

0 comments on commit 84bff14

Please sign in to comment.