0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-07 20:42:44 +00:00

Small refactor to fix broken error popup

This commit is contained in:
Trevor Buckner
2023-04-04 23:41:44 -04:00
parent 8958238342
commit 2cb6acc090
3 changed files with 81 additions and 84 deletions

View File

@@ -1,77 +1,75 @@
.navItem { .navItem.error {
&.error { position : relative;
position : relative; background-color : @red;
background-color : @red; }
}
.errorContainer{ .errorContainer{
animation-name: glideDown; animation-name: glideDown;
animation-duration: 0.4s; animation-duration: 0.4s;
position : absolute; position : absolute;
top : 100%; top : 100%;
left : 50%; left : 50%;
z-index : 1000; z-index : 1000;
width : 140px; width : 140px;
padding : 3px; padding : 3px;
color : white; color : white;
background-color : #333;
border : 3px solid #444;
border-radius : 5px;
transform : translate(-50% + 3px, 10px);
text-align : center;
font-size : 10px;
font-weight : 800;
text-transform : uppercase;
a{
color : @teal;
}
&:before {
content: "";
width: 0px;
height: 0px;
position: absolute;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid transparent;
border-bottom: 10px solid #444;
left: 53px;
top: -23px;
}
&:after {
content: "";
width: 0px;
height: 0px;
position: absolute;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid transparent;
border-bottom: 10px solid #333;
left: 53px;
top: -19px;
}
.deny {
width : 48%;
margin : 1px;
padding : 5px;
background-color : #333; background-color : #333;
border : 3px solid #444; display : inline-block;
border-radius : 5px; border-left : 1px solid #666;
transform : translate(-50% + 3px, 10px); .animate(background-color);
text-align : center; &:hover{
font-size : 10px; background-color : red;
font-weight : 800;
text-transform : uppercase;
a{
color : @teal;
} }
&:before { }
content: ""; .confirm {
width: 0px; width : 48%;
height: 0px; margin : 1px;
position: absolute; padding : 5px;
border-left: 10px solid transparent; background-color : #333;
border-right: 10px solid transparent; display : inline-block;
border-top: 10px solid transparent; color : white;
border-bottom: 10px solid #444; .animate(background-color);
left: 53px; &:hover{
top: -23px; background-color : teal;
}
&:after {
content: "";
width: 0px;
height: 0px;
position: absolute;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid transparent;
border-bottom: 10px solid #333;
left: 53px;
top: -19px;
}
.deny {
width : 48%;
margin : 1px;
padding : 5px;
background-color : #333;
display : inline-block;
border-left : 1px solid #666;
.animate(background-color);
&:hover{
background-color : red;
}
}
.confirm {
width : 48%;
margin : 1px;
padding : 5px;
background-color : #333;
display : inline-block;
color : white;
.animate(background-color);
&:hover{
background-color : teal;
}
} }
} }
} }

View File

@@ -254,6 +254,15 @@ const EditPage = createClass({
</div> </div>
</div> </div>
} }
{this.state.alertTrashedGoogleBrew &&
<div className='errorContainer' onClick={this.closeAlerts}>
This brew is currently in your Trash folder on Google Drive!<br />If you want to keep it, make sure to move it before it is deleted permanently!<br />
<div className='confirm'>
OK
</div>
</div>
}
</Nav.item>; </Nav.item>;
}, },
@@ -335,16 +344,6 @@ const EditPage = createClass({
const shareLink = this.processShareId(); const shareLink = this.processShareId();
return <Navbar> return <Navbar>
{this.state.alertTrashedGoogleBrew &&
<div className='errorContainer' onClick={this.closeAlerts}>
This brew is currently in your Trash folder on Google Drive!<br />If you want to keep it, make sure to move it before it is deleted permanently!<br />
<div className='confirm'>
OK
</div>
</div>
}
<Nav.section> <Nav.section>
<Nav.item className='brewTitle'>{this.state.brew.title}</Nav.item> <Nav.item className='brewTitle'>{this.state.brew.title}</Nav.item>
</Nav.section> </Nav.section>