1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 00:47:00 +02:00

update: forum/components/LoginButton

This commit is contained in:
Alexander Skvortsov
2020-08-10 00:51:47 -04:00
committed by Franz Liedke
parent 529f8e5f32
commit 4d45aaa9ae

View File

@@ -4,21 +4,21 @@ import Button from '../../common/components/Button';
* The `LogInButton` component displays a social login button which will open
* a popup window containing the specified path.
*
* ### Props
* ### Attrs
*
* - `path`
*/
export default class LogInButton extends Button {
static initProps(props) {
props.className = (props.className || '') + ' LogInButton';
initAttrs(attrs) {
attrs.className = (attrs.className || '') + ' LogInButton';
props.onclick = function () {
attrs.onclick = function () {
const width = 580;
const height = 400;
const $window = $(window);
window.open(
app.forum.attribute('baseUrl') + props.path,
app.forum.attribute('baseUrl') + attrs.path,
'logInPopup',
`width=${width},` +
`height=${height},` +
@@ -28,6 +28,6 @@ export default class LogInButton extends Button {
);
};
super.initProps(props);
super.initAttrs(attrs);
}
}