Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:wireapp/wire-webapp into yarn-stuff
Browse files Browse the repository at this point in the history
* 'dev' of github.com:wireapp/wire-webapp:
  eslint no-else-return rule (#954)
  Reenable Firefox 45 for ESR support but disable calling
  Calling v3 optimizations (WEBAPP-3772) (#937)
  ES6: Migrated "auth" directory (#947)
  ES6: Migrated GeoLocation (#951)
  • Loading branch information
lipis committed Mar 28, 2017
2 parents 07912b2 + 863107e commit b7ec505
Show file tree
Hide file tree
Showing 51 changed files with 1,491 additions and 1,079 deletions.
6 changes: 6 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ globals:
_: true
$: true
amplify: true
describe: true
expect: true
it: true
ko: true
LRUCache: true
pako: true
Raygun: true
wire: true
z: true

Expand All @@ -22,6 +27,7 @@ rules:
indent: [2, 2, {SwitchCase: 1}]
keyword-spacing: 2
no-dupe-class-members: 2
no-else-return: 2
no-multi-spaces: 2
no-shadow: 2
no-unused-expressions: 2
Expand Down
2 changes: 2 additions & 0 deletions app/page/template/_dist/app.htm
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@
<script src="/script/calling/payloads/ICECandidateInfo.js"></script>
<script src="/script/calling/payloads/SDPInfo.js"></script>
<!-- Calling/Rtc -->
<script src="/script/calling/rtc/DataChannelState.js"></script>
<script src="/script/calling/rtc/ICEConnectionState.js"></script>
<script src="/script/calling/rtc/ICEGatheringState.js"></script>
<script src="/script/calling/rtc/MediaStreamError.js"></script>
Expand All @@ -334,6 +335,7 @@
<script src="/script/calling/handler/CallSignalingHandler.js"></script>
<script src="/script/calling/handler/CallStateHandler.js"></script>
<!-- Calling/Mapper -->
<script src="/script/calling/mapper/ECallMessageMapper.js"></script>
<script src="/script/calling/mapper/ICECandidateMapper.js"></script>
<script src="/script/calling/mapper/SDPMapper.js"></script>
<!-- Calling/Entities -->
Expand Down
4 changes: 2 additions & 2 deletions app/page/template/list/conversations.htm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<div class="calls-controls-row">
<div class="button button-pill button-full button-small button-theme-red"
data-uie-name="do-call-controls-call-decline"
data-bind="click: $parent.on_ignore_call, l10n_text: z.string.call_decline">
data-bind="click: $parent.on_reject_call, l10n_text: z.string.call_decline">
</div>
<!-- ko if: call().is_remote_video_send() -->
<div class="button button-pill button-full button-small button-theme-green"
Expand Down Expand Up @@ -139,7 +139,7 @@
<div class="calls-controls-action calls-controls-action-end-call">
<div class="up">
<div class="button-round button-round-theme-red icon-end-call"
data-uie-name="do-call-controls-call-ignore"
data-uie-name="do-call-controls-call-leave"
data-bind="click: $parent.on_leave_call"></div>
</div>
<div class="down">
Expand Down
3 changes: 1 addition & 2 deletions app/script/assets/AssetMetaDataBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ z.assets.AssetMetaDataBuilder = {
return this._build_audio_metdadata(file);
} else if (this.is_image(file)) {
return this._build_image_metdadata(file);
} else {
return Promise.resolve();
}
return Promise.resolve();
},

is_audio(file) {
Expand Down
47 changes: 0 additions & 47 deletions app/script/auth/AccessTokenError.coffee

This file was deleted.

62 changes: 62 additions & 0 deletions app/script/auth/AccessTokenError.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* Wire
* Copyright (C) 2016 Wire Swiss GmbH
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*
*/

'use strict';

window.z = window.z || {};
window.z.auth = z.audio || {};

window.z.auth.AccessTokenError = class AccessTokenError extends Error {
constructor(type) {
super();
this.name = this.constructor.name;
this.stack = (new Error()).stack;
this.type = type || z.audio.AccessTokenError.TYPE.UNKNOWN;

switch (this.type) {
case z.auth.AccessTokenError.TYPE.NOT_FOUND_IN_CACHE:
this.message = 'No cached access token found in Local Storage';
break;
case z.auth.AccessTokenError.TYPE.REFRESH_IN_PROGRESS:
this.message = 'Access Token request already in progress';
break;
case z.auth.AccessTokenError.TYPE.RETRIES_EXCEEDED:
this.message = 'No. of retries to get Access Token exceeded';
break;
case z.auth.AccessTokenError.TYPE.REQUEST_FAILED:
this.message = 'Request to POST for access token failed';
break;
case z.auth.AccessTokenError.TYPE.REQUEST_FORBIDDEN:
this.message = 'Request to POST for access token forbidden';
break;
}
}

static get TYPE() {
return {
NOT_FOUND_IN_CACHE: 'z.auth.AccessTokenError.TYPE.NOT_FOUND_IN_CACHE',
REFRESH_IN_PROGRESS: 'z.auth.AccessTokenError.TYPE.REFRESH_IN_PROGRESS',
REQUEST_FAILED: 'z.auth.AccessTokenError.TYPE.REQUEST_FAILED',
REQUEST_FORBIDDEN: 'z.auth.AccessTokenError.TYPE.REQUEST_FORBIDDEN',
RETRIES_EXCEEDED: 'z.auth.AccessTokenError.TYPE.RETRIES_EXCEEDED',
};
}
};


Loading

0 comments on commit b7ec505

Please sign in to comment.