mirror of
https://github.com/mattermost/focalboard.git
synced 2024-11-27 08:31:20 +02:00
Cleanup share board and register link UI
This commit is contained in:
parent
4d199ba8af
commit
ef390d9653
@ -19,11 +19,11 @@ type Props = {
|
||||
|
||||
type State = {
|
||||
workspace?: IWorkspace
|
||||
wasCopied?: boolean
|
||||
wasCopied: boolean
|
||||
}
|
||||
|
||||
class RegistrationLinkComponent extends React.PureComponent<Props, State> {
|
||||
state: State = {}
|
||||
state: State = {wasCopied: false}
|
||||
|
||||
componentDidMount() {
|
||||
this.loadData()
|
||||
@ -31,7 +31,7 @@ class RegistrationLinkComponent extends React.PureComponent<Props, State> {
|
||||
|
||||
private async loadData() {
|
||||
const workspace = await client.getWorkspace()
|
||||
this.setState({workspace})
|
||||
this.setState({workspace, wasCopied: false})
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
@ -49,7 +49,6 @@ class RegistrationLinkComponent extends React.PureComponent<Props, State> {
|
||||
{workspace && <>
|
||||
<div className='row'>
|
||||
<input
|
||||
key={registrationUrl}
|
||||
className='shareUrl'
|
||||
readOnly={true}
|
||||
value={registrationUrl}
|
||||
|
@ -24,11 +24,11 @@ type Props = {
|
||||
|
||||
type State = {
|
||||
sharing?: ISharing
|
||||
wasCopied?: boolean
|
||||
wasCopied: boolean
|
||||
}
|
||||
|
||||
class ShareBoardComponent extends React.PureComponent<Props, State> {
|
||||
state: State = {}
|
||||
state: State = {wasCopied: false}
|
||||
|
||||
componentDidMount() {
|
||||
this.loadData()
|
||||
@ -36,7 +36,7 @@ class ShareBoardComponent extends React.PureComponent<Props, State> {
|
||||
|
||||
private async loadData() {
|
||||
const sharing = await client.getSharing(this.props.boardId)
|
||||
this.setState({sharing})
|
||||
this.setState({sharing, wasCopied: false})
|
||||
}
|
||||
|
||||
render(): JSX.Element {
|
||||
@ -70,7 +70,6 @@ class ShareBoardComponent extends React.PureComponent<Props, State> {
|
||||
{isSharing && <>
|
||||
<div className='row'>
|
||||
<input
|
||||
key={shareUrl.toString()}
|
||||
className='shareUrl'
|
||||
readOnly={true}
|
||||
value={shareUrl.toString()}
|
||||
|
Loading…
Reference in New Issue
Block a user