mirror of
https://github.com/netzbegruenung/jitsi-meet-electron.git
synced 2024-05-12 13:36:06 +02:00
Add placeholder for conference field
Also, create a couple of auxiliary functions so we save some indentation in the main render function.
This commit is contained in:
parent
c50e6344f7
commit
639848e910
|
@ -90,35 +90,12 @@ class Welcome extends Component<Props, State> {
|
||||||
* @returns {ReactElement}
|
* @returns {ReactElement}
|
||||||
*/
|
*/
|
||||||
render() {
|
render() {
|
||||||
const { state } = this.props.location;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Page navigation = { <Navbar /> }>
|
<Page navigation = { <Navbar /> }>
|
||||||
<AtlasKitThemeProvider mode = 'light'>
|
<AtlasKitThemeProvider mode = 'light'>
|
||||||
<Wrapper>
|
<Wrapper>
|
||||||
<Header>
|
{ this._renderHeader() }
|
||||||
<SpotlightTarget name = 'conference-url'>
|
{ this._renderBody() }
|
||||||
<Form onSubmit = { this._onFormSubmit }>
|
|
||||||
<FieldTextStateless
|
|
||||||
autoFocus = { true }
|
|
||||||
isInvalid = { state && state.error }
|
|
||||||
isLabelHidden = { true }
|
|
||||||
onChange = { this._onURLChange }
|
|
||||||
shouldFitContainer = { true }
|
|
||||||
type = 'text'
|
|
||||||
value = { this.state.url } />
|
|
||||||
</Form>
|
|
||||||
</SpotlightTarget>
|
|
||||||
<Button
|
|
||||||
appearance = 'primary'
|
|
||||||
onClick = { this._onJoin }
|
|
||||||
type = 'button'>
|
|
||||||
GO
|
|
||||||
</Button>
|
|
||||||
</Header>
|
|
||||||
<Body>
|
|
||||||
<RecentList />
|
|
||||||
</Body>
|
|
||||||
<Onboarding section = 'welcome-page' />
|
<Onboarding section = 'welcome-page' />
|
||||||
</Wrapper>
|
</Wrapper>
|
||||||
</AtlasKitThemeProvider>
|
</AtlasKitThemeProvider>
|
||||||
|
@ -191,6 +168,53 @@ class Welcome extends Component<Props, State> {
|
||||||
url: event.currentTarget.value
|
url: event.currentTarget.value
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the body for the welcome page.
|
||||||
|
*
|
||||||
|
* @returns {ReactElement}
|
||||||
|
*/
|
||||||
|
_renderBody() {
|
||||||
|
return (
|
||||||
|
<Body>
|
||||||
|
<RecentList />
|
||||||
|
</Body>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the header for the welcome page.
|
||||||
|
*
|
||||||
|
* @returns {ReactElement}
|
||||||
|
*/
|
||||||
|
_renderHeader() {
|
||||||
|
const locationState = this.props.location.state;
|
||||||
|
const locationError = locationState && locationState.error;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Header>
|
||||||
|
<SpotlightTarget name = 'conference-url'>
|
||||||
|
<Form onSubmit = { this._onFormSubmit }>
|
||||||
|
<FieldTextStateless
|
||||||
|
autoFocus = { true }
|
||||||
|
isInvalid = { locationError }
|
||||||
|
isLabelHidden = { true }
|
||||||
|
onChange = { this._onURLChange }
|
||||||
|
placeholder = 'Enter a name for your conference'
|
||||||
|
shouldFitContainer = { true }
|
||||||
|
type = 'text'
|
||||||
|
value = { this.state.url } />
|
||||||
|
</Form>
|
||||||
|
</SpotlightTarget>
|
||||||
|
<Button
|
||||||
|
appearance = 'primary'
|
||||||
|
onClick = { this._onJoin }
|
||||||
|
type = 'button'>
|
||||||
|
GO
|
||||||
|
</Button>
|
||||||
|
</Header>
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect()(Welcome);
|
export default connect()(Welcome);
|
||||||
|
|
Loading…
Reference in a new issue