1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-24 08:22:29 +02:00

Almost removed all the octo-button class

This commit is contained in:
Jesús Espino 2020-11-01 17:35:25 +01:00
parent f658f6654e
commit 28568db1bf
7 changed files with 43 additions and 46 deletions

View File

@ -53,10 +53,6 @@
&.narrow { &.narrow {
width: 220px; width: 220px;
} }
> .octo-button {
color: #909090;
text-align: left;
}
} }
.octo-board-hidden-item { .octo-board-hidden-item {

View File

@ -40,4 +40,16 @@
color: rgba(var(--main-fg), 0.4); color: rgba(var(--main-fg), 0.4);
} }
} }
&.add-content {
.Button {
opacity: 0;
color: rgba(var(--main-fg), 0.6);
}
&:hover {
.Button {
opacity: 1;
}
}
}
} }

View File

@ -208,38 +208,36 @@ class CardDetail extends React.Component<Props, State> {
{contentElements} {contentElements}
</div> </div>
<div className='CardDetail content'> <div className='CardDetail content add-content'>
<div className='octo-hoverpanel octo-hover-container'> <MenuWrapper>
<MenuWrapper> <Button>
<div className='octo-button octo-hovercontrol octo-hover-item'> <FormattedMessage
<FormattedMessage id='CardDetail.add-content'
id='CardDetail.add-content' defaultMessage='Add content'
defaultMessage='Add content' />
/> </Button>
</div> <Menu position='top'>
<Menu> <Menu.Text
<Menu.Text id='text'
id='text' name={intl.formatMessage({id: 'CardDetail.text', defaultMessage: 'Text'})}
name={intl.formatMessage({id: 'CardDetail.text', defaultMessage: 'Text'})} onClick={() => {
onClick={() => { const block = new MutableTextBlock()
const block = new MutableTextBlock() block.parentId = card.id
block.parentId = card.id block.order = cardTree.contents.length * 1000
block.order = cardTree.contents.length * 1000 mutator.insertBlock(block, 'add text')
mutator.insertBlock(block, 'add text') }}
}} />
/> <Menu.Text
<Menu.Text id='image'
id='image' name={intl.formatMessage({id: 'CardDetail.image', defaultMessage: 'Image'})}
name={intl.formatMessage({id: 'CardDetail.image', defaultMessage: 'Image'})} onClick={() => Utils.selectLocalFile(
onClick={() => Utils.selectLocalFile( (file) => mutator.createImageBlock(card.id, file, cardTree.contents.length * 1000),
(file) => mutator.createImageBlock(card.id, file, cardTree.contents.length * 1000), '.jpg,.jpeg,.png',
'.jpg,.jpeg,.png', )}
)} />
/>
</Menu> </Menu>
</MenuWrapper> </MenuWrapper>
</div>
</div> </div>
</> </>
) )

View File

@ -21,14 +21,6 @@
color: rgba(var(--main-fg), 0.8); color: rgba(var(--main-fg), 0.8);
flex-grow: 1; flex-grow: 1;
margin-left: 5px; margin-left: 5px;
.octo-button {
display: none;
}
&:focus {
.octo-button {
display: block;
}
}
} }
} }

View File

@ -46,7 +46,6 @@
line-height: 17px; line-height: 17px;
} }
.octo-button,
.octo-editable, .octo-editable,
.octo-propertyvalue .octo-propertyvalue
{ {

View File

@ -1,4 +1,4 @@
.ButtonWithMenu.octo-button { .ButtonWithMenu {
display: flex; display: flex;
align-items: stretch; align-items: stretch;
text-align: center; text-align: center;

View File

@ -19,7 +19,7 @@ export default class ButtonWithMenu extends React.PureComponent<Props> {
return ( return (
<div <div
onClick={this.props.onClick} onClick={this.props.onClick}
className='ButtonWithMenu octo-button' className='ButtonWithMenu'
title={this.props.title} title={this.props.title}
> >
<div className='button-text'> <div className='button-text'>