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:
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
|
||||
* 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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user