mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 15:30:37 +05:30
Minor fixes
This commit is contained in:
parent
a7f52f2d40
commit
26caa13b5f
@ -121,7 +121,9 @@ export default class Profile extends Component {
|
|||||||
range.selectNodeContents(this.UUID);
|
range.selectNodeContents(this.UUID);
|
||||||
selection.removeAllRanges();
|
selection.removeAllRanges();
|
||||||
selection.addRange(range);
|
selection.addRange(range);
|
||||||
} catch (err) {}
|
} catch (err) {
|
||||||
|
// the browser does not support an API
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setUUID(el) {
|
setUUID(el) {
|
||||||
|
@ -33,11 +33,6 @@ export default function scrollTo(y, viewPort) {
|
|||||||
|
|
||||||
const newScrollTop = y + delta;
|
const newScrollTop = y + delta;
|
||||||
viewPort.scrollTop = newScrollTop;
|
viewPort.scrollTop = newScrollTop;
|
||||||
|
|
||||||
if (viewPort.scrollTop === 0) {
|
|
||||||
scrollWasTouched = true;
|
|
||||||
console.warn('The viewPort is not scrollable', viewPort);
|
|
||||||
}
|
|
||||||
}());
|
}());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -53,6 +53,7 @@ class ChangeUsernamePage extends Component {
|
|||||||
sendData: () => accounts.changeUsername(form.serialize())
|
sendData: () => accounts.changeUsername(form.serialize())
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.actualUsername = form.value('username');
|
this.actualUsername = form.value('username');
|
||||||
|
|
||||||
this.context.goToProfile();
|
this.context.goToProfile();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@ -64,7 +65,5 @@ import { updateUser } from 'components/user/actions';
|
|||||||
export default connect((state) => ({
|
export default connect((state) => ({
|
||||||
username: state.user.username
|
username: state.user.username
|
||||||
}), {
|
}), {
|
||||||
updateUsername: (username) => {
|
updateUsername: (username) => updateUser({username})
|
||||||
return updateUser({username});
|
|
||||||
}
|
|
||||||
})(ChangeUsernamePage);
|
})(ChangeUsernamePage);
|
||||||
|
@ -21,9 +21,14 @@ const logger = {
|
|||||||
}
|
}
|
||||||
}).install();
|
}).install();
|
||||||
|
|
||||||
window.addEventListener('unhandledrejection',
|
window.addEventListener('unhandledrejection', (event) => {
|
||||||
(event) => Raven.captureException(event.reason)
|
const error = event.reason || {};
|
||||||
);
|
const message = error.message ? `: ${error.message}` : '';
|
||||||
|
|
||||||
|
logger.info(`Unhandled rejection${message}`, {
|
||||||
|
error
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -50,7 +55,7 @@ const logger = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console[method](message, context);
|
console[method](message, context); // eslint-disable-line
|
||||||
|
|
||||||
Raven.captureException(message, {
|
Raven.captureException(message, {
|
||||||
level,
|
level,
|
||||||
|
@ -120,7 +120,7 @@ const webpackConfig = {
|
|||||||
new HtmlWebpackPlugin({
|
new HtmlWebpackPlugin({
|
||||||
template: 'src/index.ejs',
|
template: 'src/index.ejs',
|
||||||
favicon: 'src/favicon.ico',
|
favicon: 'src/favicon.ico',
|
||||||
scripts: isProduction ? [] : ['dll/vendor.dll.js'],
|
scripts: isProduction ? [] : ['/dll/vendor.dll.js'],
|
||||||
hash: false, // webpack does this for all our assets automagically
|
hash: false, // webpack does this for all our assets automagically
|
||||||
filename: 'index.html',
|
filename: 'index.html',
|
||||||
inject: false,
|
inject: false,
|
||||||
|
Loading…
Reference in New Issue
Block a user