mirror of
https://github.com/ascribe/onion.git
synced 2024-12-22 01:13:14 +01:00
parent
f968d6c4b9
commit
687c3a9b74
@ -33,7 +33,6 @@
|
|||||||
"react/wrap-multilines": 1
|
"react/wrap-multilines": 1
|
||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"Intercom": true,
|
|
||||||
"fetch": true,
|
"fetch": true,
|
||||||
"require": true,
|
"require": true,
|
||||||
"File": true
|
"File": true
|
||||||
|
@ -31,13 +31,6 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="main"></div>
|
<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 -->
|
<!-- actual app -->
|
||||||
<script src="<%= BASE_URL %>static/js/app.js"></script>
|
<script src="<%= BASE_URL %>static/js/app.js"></script>
|
||||||
|
@ -25,7 +25,6 @@ import EventActions from './actions/event_actions';
|
|||||||
// You can comment out the modules you don't need
|
// You can comment out the modules you don't need
|
||||||
// import DebugHandler from './third_party/debug_handler';
|
// import DebugHandler from './third_party/debug_handler';
|
||||||
import FacebookHandler from './third_party/facebook_handler';
|
import FacebookHandler from './third_party/facebook_handler';
|
||||||
import IntercomHandler from './third_party/intercom_handler';
|
|
||||||
import NotificationsHandler from './third_party/notifications_handler';
|
import NotificationsHandler from './third_party/notifications_handler';
|
||||||
import RavenHandler from './third_party/raven_handler';
|
import RavenHandler from './third_party/raven_handler';
|
||||||
|
|
||||||
|
@ -230,13 +230,6 @@ let CoaDetails = React.createClass({
|
|||||||
coaError: React.PropTypes.object
|
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() {
|
render() {
|
||||||
const { coa, coaError } = this.props;
|
const { coa, coaError } = this.props;
|
||||||
let coaDetailElement;
|
let coaDetailElement;
|
||||||
@ -246,7 +239,7 @@ let CoaDetails = React.createClass({
|
|||||||
<p>{getLangText('There was an error generating your Certificate of Authenticity.')}</p>,
|
<p>{getLangText('There was an error generating your Certificate of Authenticity.')}</p>,
|
||||||
<p>
|
<p>
|
||||||
{getLangText('Try to refresh the page. If this happens repeatedly, please ')}
|
{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>
|
</p>
|
||||||
];
|
];
|
||||||
} else if (coa && coa.url_safe) {
|
} else if (coa && coa.url_safe) {
|
||||||
|
@ -17,18 +17,12 @@ let FileDragAndDropErrorDialog = React.createClass({
|
|||||||
handleRetryFiles: React.PropTypes.func.isRequired
|
handleRetryFiles: React.PropTypes.func.isRequired
|
||||||
},
|
},
|
||||||
|
|
||||||
getRetryButton(text, openIntercom) {
|
getRetryButton(text) {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className='btn btn-default'
|
className='btn btn-default'
|
||||||
onClick={() => {
|
onClick={() => this.retryAllFiles()}>
|
||||||
if (openIntercom) {
|
|
||||||
window.Intercom('showNewMessage', getLangText("I'm having trouble uploading my file."));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.retryAllFiles()
|
|
||||||
}}>
|
|
||||||
{getLangText(text)}
|
{getLangText(text)}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
@ -13,10 +13,6 @@ const MarketErrorConsignUnavailable = React.createClass({
|
|||||||
handleSuccess: React.PropTypes.func
|
handleSuccess: React.PropTypes.func
|
||||||
},
|
},
|
||||||
|
|
||||||
contactOnIntercom() {
|
|
||||||
window.Intercom('showNewMessage', getLangText("Hi, I'm having problems consigning to %s", this.props.whitelabelName));
|
|
||||||
},
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { editions, handleSuccess, whitelabelName } = this.props;
|
const { editions, handleSuccess, whitelabelName } = this.props;
|
||||||
const multipleEditions = editions.length > 1;
|
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 ',
|
{getLangText('If this seems incorrect, or if you would still like to consign %s to %s, please ',
|
||||||
multipleEditions ? 'these Editions' : 'this Edition',
|
multipleEditions ? 'these Editions' : 'this Edition',
|
||||||
whitelabelName)}
|
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>
|
</p>
|
||||||
<button className='btn btn-default btn-wide' onClick={handleSuccess}>
|
<button className='btn btn-default btn-wide' onClick={handleSuccess}>
|
||||||
{getLangText('OK')}
|
{getLangText('OK')}
|
||||||
|
39
js/third_party/intercom_handler.js
vendored
39
js/third_party/intercom_handler.js
vendored
@ -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');
|
|
@ -534,11 +534,6 @@ fieldset[disabled] .btn-secondary.active {
|
|||||||
.ascribe-panel-wrapper {
|
.ascribe-panel-wrapper {
|
||||||
border: 1px solid $ascribe-blue-border;
|
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
|
// notifications
|
||||||
|
@ -144,10 +144,4 @@ $pr--button-color: $pr--nav-fg-prim-color;
|
|||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// intercom
|
|
||||||
#intercom-container .intercom-launcher-button {
|
|
||||||
background-color: $pr--button-color !important;
|
|
||||||
border-color: $pr--button-color !important;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -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
|
// notifications
|
||||||
.client--sluice .ascribe-global-notification-success {
|
.client--sluice .ascribe-global-notification-success {
|
||||||
background-color: lighten($simple-prize--button-color, 50%);
|
background-color: lighten($simple-prize--button-color, 50%);
|
||||||
|
@ -365,10 +365,4 @@ $vivi23--highlight-color: #2882fa;
|
|||||||
background-color: $vivi23--fg-color !important;
|
background-color: $vivi23--fg-color !important;
|
||||||
border-color: $vivi23--fg-color;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -409,10 +409,4 @@ $artcity--ter-highlight-color: #EDEDF0;
|
|||||||
border-color: $artcity--ter-highlight-color;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -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
|
// notifications
|
||||||
.client--bokk .ascribe-global-notification-success {
|
.client--bokk .ascribe-global-notification-success {
|
||||||
background-color: lighten($bokk--button-color, 50%);
|
background-color: lighten($bokk--button-color, 50%);
|
||||||
|
@ -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
|
// notifications
|
||||||
.client--cc .ascribe-global-notification-success {
|
.client--cc .ascribe-global-notification-success {
|
||||||
background-color: lighten($cc--button-color, 50%);
|
background-color: lighten($cc--button-color, 50%);
|
||||||
|
@ -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
|
// notifications
|
||||||
.client--cyland .ascribe-global-notification-success {
|
.client--cyland .ascribe-global-notification-success {
|
||||||
background-color: lighten($cyland--button-color, 50%);
|
background-color: lighten($cyland--button-color, 50%);
|
||||||
|
@ -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
|
// notifications
|
||||||
.client--ikonotv .ascribe-global-notification-success {
|
.client--ikonotv .ascribe-global-notification-success {
|
||||||
background-color: lighten($ikono--button-color, 20%);
|
background-color: lighten($ikono--button-color, 20%);
|
||||||
|
@ -375,10 +375,4 @@ $market--highlight-color: #2882fa;
|
|||||||
background-color: $market--fg-color !important;
|
background-color: $market--fg-color !important;
|
||||||
border-color: $market--fg-color;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -380,10 +380,4 @@ $polline--highlight-color: #2882fa;
|
|||||||
background-color: $polline--fg-color !important;
|
background-color: $polline--fg-color !important;
|
||||||
border-color: $polline--fg-color;
|
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user