mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Intro.js Fixes and better client side logging (#11480)
* fix intro.js button and border for username modal * fix unhandled error and add better logging
This commit is contained in:
@@ -1275,7 +1275,9 @@ export default {
|
||||
});
|
||||
|
||||
this.$root.$emit('bv::hide::modal', 'avatar-modal');
|
||||
this.$router.push('/');
|
||||
if (this.$route.path !== '/') {
|
||||
this.$router.push('/');
|
||||
}
|
||||
this.$store.dispatch('user:set', {
|
||||
'flags.welcomed': true,
|
||||
});
|
||||
|
||||
@@ -48,7 +48,6 @@
|
||||
margin: 2px;
|
||||
position: relative;
|
||||
|
||||
height: 131px;
|
||||
min-height: 131px !important;
|
||||
width: 400px;
|
||||
max-width: 400px;
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
border: solid 1px $gray-500;
|
||||
}
|
||||
|
||||
input {
|
||||
input.form-control:not(:focus):not(:active) {
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
import Vue from 'vue';
|
||||
|
||||
export function setUpLogging () { // eslint-disable-line import/prefer-default-export
|
||||
window.onerror = function windowOnError (message, source, lineno, colno, error) {
|
||||
console.error('Unhandled error JS code.');
|
||||
console.error('Message:', message);
|
||||
console.error('Source:', source);
|
||||
console.error('Line:', lineno, 'Column:', colno);
|
||||
console.error('Error;', error);
|
||||
};
|
||||
|
||||
let _LTracker = window._LTracker || []; // eslint-disable-line
|
||||
_LTracker.push({ // eslint-disable-line
|
||||
logglyKey: process.env.LOGGLY_CLIENT_TOKEN, // eslint-disable-line no-process-env
|
||||
@@ -6,4 +16,25 @@ export function setUpLogging () { // eslint-disable-line import/prefer-default-e
|
||||
tag: 'ClientJS',
|
||||
json: true,
|
||||
});
|
||||
|
||||
window.onunhandledrejection = event => {
|
||||
console.error(`Unhandled promise rejection: ${event.reason}`);
|
||||
console.error('Full info:', event);
|
||||
_LTracker.push({
|
||||
event,
|
||||
});
|
||||
};
|
||||
|
||||
Vue.config.errorHandler = (err, vm, info) => {
|
||||
console.error('Unhandled error in Vue.js code.');
|
||||
console.error('Error:', err);
|
||||
console.error('Component where it occured:', vm);
|
||||
console.error('Info:', info);
|
||||
|
||||
_LTracker.push({
|
||||
err,
|
||||
vm,
|
||||
info,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
@@ -180,6 +180,7 @@ export default {
|
||||
exitOnOverlayClick: false,
|
||||
steps: opts.steps,
|
||||
doneLabel: this.$t('letsgo'),
|
||||
buttonClass: 'btn btn-small btn-primary',
|
||||
});
|
||||
intro.start();
|
||||
intro.oncomplete(() => {
|
||||
|
||||
Reference in New Issue
Block a user