Skip to content

Commit

Permalink
Merge pull request #561 from meetfranz/develop
Browse files Browse the repository at this point in the history
Franz Beta 15
  • Loading branch information
adlk authored Jan 11, 2018
2 parents ed65f97 + 2531a38 commit a4b665e
Show file tree
Hide file tree
Showing 107 changed files with 3,491 additions and 1,209 deletions.
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ matrix:
language: node_js

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

Expand All @@ -19,7 +17,7 @@ script:
- travis_wait yarn build

node_js:
- '7'
- '8'

before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt install libx11-dev libxext-dev libxss-dev libxkbfile-dev; fi
Expand Down
36 changes: 36 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,39 @@
<a name="5.0.0-beta.15"></a>
# [5.0.0-beta.15](https://github.com/meetfranz/franz/compare/v5.0.0-beta.14...v5.0.0-beta.15) (2018-01-10)


### Features

* **App:** Add option to clear app cache ([@dannyqiu](https://github.com/dannyqiu)) ([be801ff](https://github.com/meetfranz/franz/commit/be801ff))
* **App:** Add option to show/hide notification badges for muted ([893a9f6](https://github.com/meetfranz/franz/commit/893a9f6))
* **Recipes:** Add semver version validation ([5826dc3](https://github.com/meetfranz/franz/commit/5826dc3))
* **Recipes:** Add `hasHostedOption` to enable hosted & self hosted services ([03610f2](https://github.com/meetfranz/franz/commit/03610f2))
* **Services:** Add custom service icon upload ([6b97e42](https://github.com/meetfranz/franz/commit/6b97e42))
* **Services:** Add option to completely disable message badges ([cea7a5c](https://github.com/meetfranz/franz/commit/cea7a5c))
* **Services:** Improve handling of external links ([e2d6edf](https://github.com/meetfranz/franz/commit/e2d6edf))
* **Services:** Improve user experience of service search ([7e784c6](https://github.com/meetfranz/franz/commit/7e784c6))
* **Account:** Enable a user to delete their own account ([1f3df73](https://github.com/meetfranz/franz/commit/1f3df73))
* **Translations:** Improved translations. **[A million thanks to the amazing community. 🎉](http://i18n.meetfranz.com/)**



### Bug Fixes

* **App:** Allow to turn on notifications when system dnd is enabled ([3045b47](https://github.com/meetfranz/franz/commit/3045b47))
* **App:** App mute now disables notifications as well ([0fa1caf](https://github.com/meetfranz/franz/commit/0fa1caf))
* **App:** Fix service reload after waking machine up ([531531e](https://github.com/meetfranz/franz/commit/531531e))
* **App:** Fix "add services manually" message ([ac417dc](https://github.com/meetfranz/franz/commit/ac417dc))
* **i18n:** Fallback to system language or english ([9733eaf](https://github.com/meetfranz/franz/commit/9733eaf))
* **Notification:** Remove notification sound when app is muted ([53fde0c](https://github.com/meetfranz/franz/commit/53fde0c))
* **Recipes:** Enable `urlInputPrefix` for team and customURL ([873957d](https://github.com/meetfranz/franz/commit/873957d))
* **Services:** Ctrl/Cmd+R now navigates back to the service root ([7293492](https://github.com/meetfranz/franz/commit/7293492))
* **Services:** Fix transparent service background ([ed0098f](https://github.com/meetfranz/franz/commit/ed0098f)), closes [#361](https://github.com/meetfranz/franz/issues/361)
* **Shortcuts:** Fixed settings shortcut inconsistency ([ca74846](https://github.com/meetfranz/franz/commit/ca74846))
* **Spell checker:** Fixed issues with spell checker ([965fdf2](https://github.com/meetfranz/franz/commit/965fdf2))
* **Translations:** Re-add Spanish to available languages. ([ad936f2](https://github.com/meetfranz/franz/commit/ad936f2))
* **Windows:** Open window when clicking on toast notification ([b82bbc8](https://github.com/meetfranz/franz/commit/b82bbc8)), closes [#370](https://github.com/meetfranz/franz/issues/370)


<a name="5.0.0-beta.14"></a>
# [5.0.0-beta.14](https://github.com/meetfranz/franz/compare/v5.0.0-beta.13...v5.0.0-beta.14) (2017-11-23)

Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ $ brew install yarn
##### Linux
[Install Yarn on Linux](https://yarnpkg.com/lang/en/docs/install/)

#### Install Gulp 4
```bash
$ yarn add global [email protected]
$ yarn add global gulpjs/gulp#4.0
```

#### Fix native modules to match current electron node version
```bash
$ yarn run rebuild
Expand Down
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ version: 5.0.0.{build}
install:
- ps: Install-Product node 8
- yarn cache clean
- yarn add global [email protected]
- yarn add global gulpjs/gulp#4.0
- yarn install

# cache:
Expand Down
Binary file modified build-helpers/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified build-helpers/images/icons/1024x1024.png
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 build-helpers/images/icons/128x128.png
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 build-helpers/images/icons/16x16.png
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 build-helpers/images/icons/24x24.png
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 build-helpers/images/icons/256x256.png
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 build-helpers/images/icons/32x32.png
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 build-helpers/images/icons/48x48.png
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 build-helpers/images/icons/512x512.png
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 build-helpers/images/icons/64x64.png
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 build-helpers/images/icons/96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,17 @@ linux:
icon: ./build-helpers/images/icons
category: Network;InstantMessaging;
executableName: franz
synopsis: "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more."
description: "Franz is your messaging app / former Emperor of Austria and combines chat & messaging services into one application. Franz currently supports Slack, WhatsApp, WeChat, HipChat, Facebook Messenger, Telegram, Google Hangouts, GroupMe, Skype and many more. You can download Franz for free for Mac & Windows."
target:
- target: AppImage
- target: deb
- target: tar.gz

nsis:
perMachine: false
oneClick: true

protocols:
name: Franz
schemes: [franz]
4 changes: 3 additions & 1 deletion gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ export function watch() {
}

export function webserver() {
gulp.src(paths.dest)
gulp.src([
paths.dest,
])
.pipe(server({
livereload: true,
}));
Expand Down
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"name": "franz",
"productName": "Franz",
"appId": "com.meetfranz.franz",
"version": "5.0.0-beta.14",
"version": "5.0.0-beta.15",
"description": "Messaging app for WhatsApp, Slack, Telegram, HipChat, Hangouts and many many more.",
"copyright": "adlk x franz - Stefan Malzner",
"main": "index.js",
"homepage": "https://meetfranz.com",
"repository": "https://github.com/meetfranz/franz.git",
"private": true,
"scripts": {
Expand Down Expand Up @@ -33,11 +34,13 @@
"babel-polyfill": "^6.23.0",
"babel-runtime": "^6.23.0",
"classnames": "^2.2.5",
"du": "^0.1.0",
"electron-fetch": "^1.1.0",
"electron-spellchecker": "^1.2.0",
"electron-spellchecker": "^1.1.2",
"electron-updater": "^2.4.3",
"electron-window-state": "^4.1.0",
"fs-extra": "^3.0.1",
"gulp-cli": "1.2.2",
"ini": "^1.3.4",
"jshashes": "^1.0.6",
"jsonwebtoken": "^7.4.1",
Expand All @@ -48,15 +51,17 @@
"mkdirp": "^0.5.1",
"mobx": "^3.1.0",
"mobx-react": "^4.1.0",
"mobx-react-form": "1.24.0",
"mobx-react-form": "^1.32.2",
"mobx-react-router": "^3.1.2",
"moment": "^2.17.1",
"normalize-url": "^1.9.1",
"pretty-bytes": "^4.0.2",
"prop-types": "^15.5.10",
"prop-types-extended": "^0.2.1",
"react": "^15.4.1",
"react-addons-css-transition-group": "^15.4.2",
"react-dom": "^15.4.1",
"react-dropzone": "^4.2.1",
"react-electron-web-view": "^2.0.1",
"react-intl": "^2.3.0",
"react-loader": "^2.4.0",
Expand Down Expand Up @@ -102,7 +107,7 @@
"gulp-sass": "^3.1.0",
"gulp-sass-variables": "^1.1.1",
"gulp-server-livereload": "^1.9.2",
"node-sass": "^4.5.3"
"node-sass": "^4.7.2"
},
"config": {
"commitizen": {
Expand Down
2 changes: 2 additions & 0 deletions src/actions/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export default {
healthCheck: {},
muteApp: {
isMuted: PropTypes.bool.isRequired,
overrideSystemMute: PropTypes.bool,
},
toggleMuteApp: {},
clearAllCache: {},
};
3 changes: 3 additions & 0 deletions src/actions/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export default {
serviceId: PropTypes.string.isRequired,
redirect: PropTypes.string,
},
clearCache: {
serviceId: PropTypes.string.isRequired,
},
setUnreadMessageCount: {
serviceId: PropTypes.string.isRequired,
count: PropTypes.object.isRequired,
Expand Down
1 change: 1 addition & 0 deletions src/actions/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ export default {
importLegacyServices: PropTypes.arrayOf(PropTypes.shape({
recipe: PropTypes.string.isRequired,
})).isRequired,
delete: {},
};
8 changes: 8 additions & 0 deletions src/api/LocalApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,12 @@ export default class LocalApi {
removeKey(key) {
return this.local.removeKey(key);
}

getAppCacheSize() {
return this.local.getAppCacheSize();
}

clearAppCache() {
return this.local.clearAppCache();
}
}
7 changes: 6 additions & 1 deletion src/api/ServicesApi.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export default class ServicesApi {
constructor(server) {
constructor(server, local) {
this.local = local;
this.server = server;
}

Expand Down Expand Up @@ -30,4 +31,8 @@ export default class ServicesApi {
reorder(data) {
return this.server.reorderService(data);
}

clearCache(serviceId) {
return this.local.clearCache(serviceId);
}
}
4 changes: 4 additions & 0 deletions src/api/UserApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ export default class UserApi {
getLegacyServices() {
return this.server.getLegacyServices();
}

delete() {
return this.server.deleteAccount();
}
}
36 changes: 34 additions & 2 deletions src/api/server/LocalApi.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import SettingsModel from '../../models/Settings';
import { remote } from 'electron';
import du from 'du';

import { getServicePartitionsDirectory } from '../../helpers/service-helpers.js';

const { session } = remote;

export default class LocalApi {
// App
Expand All @@ -15,7 +20,7 @@ export default class LocalApi {
async getAppSettings() {
const settingsString = localStorage.getItem('app');
try {
const settings = new SettingsModel(JSON.parse(settingsString) || {});
const settings = JSON.parse(settingsString) || {};
console.debug('LocalApi::getAppSettings resolves', settings);

return settings;
Expand All @@ -32,4 +37,31 @@ export default class LocalApi {
localStorage.setItem('app', JSON.stringify(settings));
}
}

// Services
async getAppCacheSize() {
const partitionsDir = getServicePartitionsDirectory();
return new Promise((resolve, reject) => {
du(partitionsDir, (err, size) => {
if (err) reject(err);

console.debug('LocalApi::getAppCacheSize resolves', size);
resolve(size);
});
});
}

async clearCache(serviceId) {
const s = session.fromPartition(`persist:service-${serviceId}`);

console.debug('LocalApi::clearCache resolves', serviceId);
return new Promise(resolve => s.clearCache(resolve));
}

async clearAppCache() {
const s = session.defaultSession;

console.debug('LocalApi::clearCache clearAppCache');
return new Promise(resolve => s.clearCache(resolve));
}
}
Loading

0 comments on commit a4b665e

Please sign in to comment.