1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-22 01:13:14 +01:00

remove Intercom

* closes #197
This commit is contained in:
Matthias Kretschmann 2018-05-23 16:35:43 +02:00
parent f968d6c4b9
commit 687c3a9b74
Signed by: m
GPG Key ID: 606EEEF3C479A91F
18 changed files with 4 additions and 145 deletions

View File

@ -33,7 +33,6 @@
"react/wrap-multilines": 1
},
"globals": {
"Intercom": true,
"fetch": true,
"require": true,
"File": true

View File

@ -32,13 +32,6 @@
<body>
<div id="main"></div>
<!-- Intercom library -->
<script>
(function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic('reattach_activator');ic('update',intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement('script');s.type='text/javascript';s.async=true;
s.src='https://widget.intercom.io/widget/{app_id}';
var x=d.getElementsByTagName('script')[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent('onload',l);}else{w.addEventListener('load',l,false);}}})()
</script>
<!-- actual app -->
<script src="<%= BASE_URL %>static/js/app.js"></script>
</body>

View File

@ -25,7 +25,6 @@ import EventActions from './actions/event_actions';
// You can comment out the modules you don't need
// import DebugHandler from './third_party/debug_handler';
import FacebookHandler from './third_party/facebook_handler';
import IntercomHandler from './third_party/intercom_handler';
import NotificationsHandler from './third_party/notifications_handler';
import RavenHandler from './third_party/raven_handler';

View File

@ -230,13 +230,6 @@ let CoaDetails = React.createClass({
coaError: React.PropTypes.object
},
contactOnIntercom() {
const { coaError, editionId } = this.props;
window.Intercom('showNewMessage', getLangText("Hi, I'm having problems generating a Certificate of Authenticity for Edition: %s", editionId));
console.logGlobal(new Error(`Coa couldn't be created for edition: ${editionId}`), coaError);
},
render() {
const { coa, coaError } = this.props;
let coaDetailElement;
@ -246,7 +239,7 @@ let CoaDetails = React.createClass({
<p>{getLangText('There was an error generating your Certificate of Authenticity.')}</p>,
<p>
{getLangText('Try to refresh the page. If this happens repeatedly, please ')}
<a style={{ cursor: 'pointer' }} onClick={this.contactOnIntercom}>{getLangText('contact us')}</a>.
<a style={{ cursor: 'pointer' }} href="mailto:support@ascribe.io">{getLangText('contact us')}</a>.
</p>
];
} else if (coa && coa.url_safe) {

View File

@ -17,18 +17,12 @@ let FileDragAndDropErrorDialog = React.createClass({
handleRetryFiles: React.PropTypes.func.isRequired
},
getRetryButton(text, openIntercom) {
getRetryButton(text) {
return (
<button
type="button"
className='btn btn-default'
onClick={() => {
if (openIntercom) {
window.Intercom('showNewMessage', getLangText("I'm having trouble uploading my file."));
}
this.retryAllFiles()
}}>
onClick={() => this.retryAllFiles()}>
{getLangText(text)}
</button>
);

View File

@ -13,10 +13,6 @@ const MarketErrorConsignUnavailable = React.createClass({
handleSuccess: React.PropTypes.func
},
contactOnIntercom() {
window.Intercom('showNewMessage', getLangText("Hi, I'm having problems consigning to %s", this.props.whitelabelName));
},
render() {
const { editions, handleSuccess, whitelabelName } = this.props;
const multipleEditions = editions.length > 1;
@ -39,7 +35,7 @@ const MarketErrorConsignUnavailable = React.createClass({
{getLangText('If this seems incorrect, or if you would still like to consign %s to %s, please ',
multipleEditions ? 'these Editions' : 'this Edition',
whitelabelName)}
<strong><a style={{ cursor: 'pointer' }} onClick={this.contactOnIntercom}>{getLangText('contact us')}</a></strong>.
<strong><a style={{ cursor: 'pointer' }} href="mailto:support@ascribe.io">{getLangText('contact us')}</a></strong>.
</p>
<button className='btn btn-default btn-wide' onClick={handleSuccess}>
{getLangText('OK')}

View File

@ -1,39 +0,0 @@
'use strict';
import { altThirdParty } from '../alt';
import EventActions from '../actions/event_actions';
import { getSubdomain } from '../utils/general_utils';
class IntercomHandler {
constructor() {
this.bindActions(EventActions);
this.loaded = false;
}
onUserDidAuthenticate(user) {
if (this.loaded) {
return;
}
window.Intercom('boot', {
app_id: 'oboxh5w1',
email: user.email,
subdomain: getSubdomain(),
widget: {
activator: '#IntercomDefaultWidget'
}
});
console.log('Intercom loaded');
this.loaded = true;
}
onUserDidLogout() {
// kill intercom (with fire)
window.Intercom('shutdown');
this.loaded = false;
}
}
export default altThirdParty.createStore(IntercomHandler, 'IntercomHandler');

View File

@ -534,11 +534,6 @@ fieldset[disabled] .btn-secondary.active {
.ascribe-panel-wrapper {
border: 1px solid $ascribe-blue-border;
}
// intercom stuff
#intercom-container .intercom-launcher-button {
background-color: $ascribe--button-default-color !important;
border-color: $ascribe--button-default-color !important;
}
// notifications

View File

@ -144,10 +144,4 @@ $pr--button-color: $pr--nav-fg-prim-color;
text-transform: capitalize;
}
}
// intercom
#intercom-container .intercom-launcher-button {
background-color: $pr--button-color !important;
border-color: $pr--button-color !important;
}
}

View File

@ -155,14 +155,6 @@
}
}
// intercom stuff
.client--sluice {
#intercom-container .intercom-launcher-button {
background-color: $simple-prize--button-color !important;;
border-color: $simple-prize--button-color !important;;
}
}
// notifications
.client--sluice .ascribe-global-notification-success {
background-color: lighten($simple-prize--button-color, 50%);

View File

@ -365,10 +365,4 @@ $vivi23--highlight-color: #2882fa;
background-color: $vivi23--fg-color !important;
border-color: $vivi23--fg-color;
}
// intercom
#intercom-container .intercom-launcher-button {
background-color: $vivi23--button-default-color !important;
border-color: $vivi23--button-default-color !important;
}
}

View File

@ -409,10 +409,4 @@ $artcity--ter-highlight-color: #EDEDF0;
border-color: $artcity--ter-highlight-color;
}
}
// intercom
#intercom-container .intercom-launcher-button {
background-color: $artcity--button-default-color !important;
border-color: $artcity--button-default-color !important;
}
}

View File

@ -186,14 +186,6 @@ $bokk--nav-bt:#FFFFFF;
}
}
// intercom stuff
.client--bokk {
#intercom-container .intercom-launcher-button {
background-color: $bokk--button-color !important;;
border-color: $bokk--button-color !important;;
}
}
// notifications
.client--bokk .ascribe-global-notification-success {
background-color: lighten($bokk--button-color, 50%);

View File

@ -178,14 +178,6 @@ $cc--button-color: $cc--nav-fg-prim-color;
}
}
// intercom stuff
.client--cc {
#intercom-container .intercom-launcher-button {
background-color: $cc--button-color !important;;
border-color: $cc--button-color !important;;
}
}
// notifications
.client--cc .ascribe-global-notification-success {
background-color: lighten($cc--button-color, 50%);

View File

@ -197,14 +197,6 @@ $cyland--button-sec-color: #515151;
}
}
// intercom stuff
.client--cyland {
#intercom-container .intercom-launcher-button {
background-color: $cyland--button-color !important;;
border-color: $cyland--button-color !important;;
}
}
// notifications
.client--cyland .ascribe-global-notification-success {
background-color: lighten($cyland--button-color, 50%);

View File

@ -515,15 +515,6 @@ $ikono--font: 'Helvetica Neue', 'Helvetica', sans-serif !important;
}
// intercom stuff
.client--ikonotv {
#intercom-container .intercom-launcher-button {
background-color: $ikono--button-color !important;;
border-color: $ikono--button-color !important;;
}
}
// notifications
.client--ikonotv .ascribe-global-notification-success {
background-color: lighten($ikono--button-color, 20%);

View File

@ -375,10 +375,4 @@ $market--highlight-color: #2882fa;
background-color: $market--fg-color !important;
border-color: $market--fg-color;
}
// intercom
#intercom-container .intercom-launcher-button {
background-color: $market--button-default-color !important;
border-color: $market--button-default-color !important;
}
}

View File

@ -380,10 +380,4 @@ $polline--highlight-color: #2882fa;
background-color: $polline--fg-color !important;
border-color: $polline--fg-color;
}
// intercom
#intercom-container .intercom-launcher-button {
background-color: $polline--button-default-color !important;
border-color: $polline--button-default-color !important;
}
}