diff --git a/build/css/main.css b/build/css/main.css index a530acbf..fb34f6b5 100644 --- a/build/css/main.css +++ b/build/css/main.css @@ -5984,5 +5984,5 @@ body { .btn-navigation { position: fixed; top: 10px; - right: 15px; + right: 10px; font-size: 15px; } diff --git a/lib/browser/modules/analytics.js b/lib/browser/modules/analytics.js index b5775670..4695aab9 100644 --- a/lib/browser/modules/analytics.js +++ b/lib/browser/modules/analytics.js @@ -32,7 +32,8 @@ window.MIXPANEL_CUSTOM_LIB_URL = '../bower_components/mixpanel/mixpanel.js'; require('../../../bower_components/mixpanel/mixpanel-jslib-snippet.js'); require('../../../bower_components/angular-mixpanel/src/angular-mixpanel'); const analytics = angular.module('Etcher.analytics', [ - 'analytics.mixpanel' + 'analytics.mixpanel', + 'Etcher.settings' ]); analytics.config(function($mixpanelProvider) { @@ -55,21 +56,32 @@ analytics.config(function($mixpanelProvider) { // TrackJS integration // http://docs.trackjs.com/tracker/framework-integrations analytics.config(function($provide) { - $provide.decorator('$exceptionHandler', function($delegate, $window) { + $provide.decorator('$exceptionHandler', function($delegate, $window, $injector) { return function(exception, cause) { - $window.trackJs.track(exception); + const SettingsService = $injector.get('SettingsService'); + + if (SettingsService.data.errorReporting) { + $window.trackJs.track(exception); + } + $delegate(exception, cause); }; }); - $provide.decorator('$log', function($delegate, $window) { + $provide.decorator('$log', function($delegate, $window, $injector) { // Save the original $log.debug() let debugFn = $delegate.debug; $delegate.debug = function(message) { message = new Date() + ' ' + message; - $window.trackJs.console.debug(message); + + const SettingsService = $injector.get('SettingsService'); + + if (SettingsService.data.errorReporting) { + $window.trackJs.console.debug(message); + } + debugFn.call(null, message); }; @@ -77,7 +89,7 @@ analytics.config(function($provide) { }); }); -analytics.service('AnalyticsService', function($log, $mixpanel) { +analytics.service('AnalyticsService', function($log, $mixpanel, SettingsService) { let self = this; /** @@ -115,10 +127,14 @@ analytics.service('AnalyticsService', function($log, $mixpanel) { */ this.logEvent = function(message, data) { - // Clone data before passing it to `mixpanel.track` - // since this function mutates the object adding - // some custom private Mixpanel properties. - $mixpanel.track(message, _.clone(data)); + if (SettingsService.data.errorReporting) { + + // Clone data before passing it to `mixpanel.track` + // since this function mutates the object adding + // some custom private Mixpanel properties. + $mixpanel.track(message, _.clone(data)); + + } if (data) { message += ` (${JSON.stringify(data)})`; diff --git a/lib/css/desktop.css b/lib/css/desktop.css index 5481873a..2c77c9cb 100644 --- a/lib/css/desktop.css +++ b/lib/css/desktop.css @@ -34,3 +34,7 @@ body { overflow: auto; -webkit-overflow-scrolling: touch; } + +button:focus { + outline: none !important; +} diff --git a/lib/index.html b/lib/index.html index aae44be1..f12a2618 100644 --- a/lib/index.html +++ b/lib/index.html @@ -26,6 +26,10 @@
+ +
diff --git a/lib/scss/main.scss b/lib/scss/main.scss index 61e53c9c..e4cfc947 100644 --- a/lib/scss/main.scss +++ b/lib/scss/main.scss @@ -187,6 +187,6 @@ body { .btn-navigation { position: fixed; top: 10px; - right: 15px; + right: 10px; font-size: 15px; } diff --git a/screenshot.png b/screenshot.png index 45069bf4..34821f62 100644 Binary files a/screenshot.png and b/screenshot.png differ