mirror of
https://github.com/flarum/core.git
synced 2025-08-07 08:56:38 +02:00
update: forum/components/LoginButton
This commit is contained in:
committed by
Franz Liedke
parent
529f8e5f32
commit
4d45aaa9ae
@@ -4,21 +4,21 @@ import Button from '../../common/components/Button';
|
|||||||
* The `LogInButton` component displays a social login button which will open
|
* The `LogInButton` component displays a social login button which will open
|
||||||
* a popup window containing the specified path.
|
* a popup window containing the specified path.
|
||||||
*
|
*
|
||||||
* ### Props
|
* ### Attrs
|
||||||
*
|
*
|
||||||
* - `path`
|
* - `path`
|
||||||
*/
|
*/
|
||||||
export default class LogInButton extends Button {
|
export default class LogInButton extends Button {
|
||||||
static initProps(props) {
|
initAttrs(attrs) {
|
||||||
props.className = (props.className || '') + ' LogInButton';
|
attrs.className = (attrs.className || '') + ' LogInButton';
|
||||||
|
|
||||||
props.onclick = function () {
|
attrs.onclick = function () {
|
||||||
const width = 580;
|
const width = 580;
|
||||||
const height = 400;
|
const height = 400;
|
||||||
const $window = $(window);
|
const $window = $(window);
|
||||||
|
|
||||||
window.open(
|
window.open(
|
||||||
app.forum.attribute('baseUrl') + props.path,
|
app.forum.attribute('baseUrl') + attrs.path,
|
||||||
'logInPopup',
|
'logInPopup',
|
||||||
`width=${width},` +
|
`width=${width},` +
|
||||||
`height=${height},` +
|
`height=${height},` +
|
||||||
@@ -28,6 +28,6 @@ export default class LogInButton extends Button {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
super.initProps(props);
|
super.initAttrs(attrs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user