mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-15 23:18:44 +00:00
small changes
This commit is contained in:
@@ -36,7 +36,7 @@ const Nav = {
|
|||||||
{icon && <i className={icon}></i>}
|
{icon && <i className={icon}></i>}
|
||||||
</a>;
|
</a>;
|
||||||
} else {
|
} else {
|
||||||
return <button {...props} no-dismiss={noDismiss ? 'true' : 'false'} className={classes} onClick={onClick} >
|
return <button {...props} no-dismiss={noDismiss ? 'true' : undefined} className={classes} onClick={onClick} >
|
||||||
{children}
|
{children}
|
||||||
{icon && <i className={icon}></i>}
|
{icon && <i className={icon}></i>}
|
||||||
{kbd && <kbd>{kbd}</kbd>}
|
{kbd && <kbd>{kbd}</kbd>}
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ const Navbar = ({ children, brew, pageName, editor, title, currentPage, props })
|
|||||||
</Dropdown>
|
</Dropdown>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
console.log(navSlots);
|
|
||||||
return (
|
return (
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
max-width:140px;
|
max-width:150px;
|
||||||
text-wrap:wrap;
|
text-wrap:pretty;
|
||||||
|
|
||||||
&:has(> button, > a) {
|
&:has(> button, > a) {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -157,8 +157,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
&.save {
|
&.save {
|
||||||
width: 90px;
|
width:90px;
|
||||||
|
|
||||||
&.neverSaved {
|
&.neverSaved {
|
||||||
background-color: @orange;
|
background-color: @orange;
|
||||||
color: white;
|
color: white;
|
||||||
@@ -277,13 +276,10 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
height: 18px;
|
height: 15px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
margin: -5px;
|
margin: -5px;
|
||||||
translate:-5px;
|
translate:-5px;
|
||||||
&.inactive {
|
|
||||||
filter: grayscale(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -297,14 +293,19 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
text-wrap: nowrap;
|
text-wrap: nowrap;
|
||||||
|
|
||||||
&:first-child :is(button, a) {
|
&:first-child >:is(button, a) {
|
||||||
padding-left: 15px;
|
padding-left: 15px;
|
||||||
}
|
}
|
||||||
&:last-child :is(button, a) {
|
&:last-child >:is(button, a) {
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:last-child ul {
|
||||||
|
padding-right:10px;
|
||||||
|
translate:-10px 0;
|
||||||
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
background: #333;
|
background: #333;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
@@ -313,6 +314,10 @@
|
|||||||
|
|
||||||
.navItem {
|
.navItem {
|
||||||
min-height: 2.2em;
|
min-height: 2.2em;
|
||||||
|
|
||||||
|
&.save {
|
||||||
|
width:100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-section:not(:last-child, :has(+ .header)) {
|
.nav-section:not(:last-child, :has(+ .header)) {
|
||||||
|
|||||||
@@ -277,7 +277,6 @@ const EditorPage = (props)=>{
|
|||||||
|
|
||||||
//======----- Google Toggle Button -----======
|
//======----- Google Toggle Button -----======
|
||||||
const closeAlerts = (e)=>{
|
const closeAlerts = (e)=>{
|
||||||
e.stopPropagation(); //Only handle click once so alert doesn't reopen
|
|
||||||
setAlertTrashedGoogleBrew(false);
|
setAlertTrashedGoogleBrew(false);
|
||||||
setAlertNoGoogleToTransfer(false);
|
setAlertNoGoogleToTransfer(false);
|
||||||
setConfirmGoogleTransfer(false);
|
setConfirmGoogleTransfer(false);
|
||||||
@@ -310,16 +309,15 @@ const EditorPage = (props)=>{
|
|||||||
const errorExists = alertNoGoogleToTransfer || alertOwnershipToTransfer || alertTrashedGoogleBrew || confirmGoogleTransfer;
|
const errorExists = alertNoGoogleToTransfer || alertOwnershipToTransfer || alertTrashedGoogleBrew || confirmGoogleTransfer;
|
||||||
return (<>
|
return (<>
|
||||||
<Nav.header>This brew is in {saveGoogle ? 'Google Drive' : 'The Homebrewery'}</Nav.header>
|
<Nav.header>This brew is in {saveGoogle ? 'Google Drive' : 'The Homebrewery'}</Nav.header>
|
||||||
<Nav.item className='googleDriveStorage' noDismiss={errorExists} onClick={handleGoogleClick}>
|
<Nav.item className='googleDriveStorage' noDismiss='true' onClick={handleGoogleClick}>
|
||||||
{saveGoogle ? 'Transfer to Homebrewery' : 'Transfer to Drive'}
|
{saveGoogle ? 'Transfer to Homebrewery' : 'Transfer to Drive'}
|
||||||
{saveGoogle? '' : <img src={googleDriveIcon} className={saveGoogle ? '' : 'inactive'} alt='Google Drive icon' /> }
|
{saveGoogle? '' : <img src={googleDriveIcon} alt='Google Drive icon' /> }
|
||||||
</Nav.item>
|
</Nav.item>
|
||||||
{errorExists && <Nav.item className='errorContainer' >
|
{errorExists && <Nav.item className='errorContainer' >
|
||||||
{alertOwnershipToTransfer && (
|
{alertOwnershipToTransfer && (
|
||||||
<>
|
<>
|
||||||
You must be the Owner to transfer between the Homebrewery and Google Drive!
|
You must be the Owner to transfer between the Homebrewery and Google Drive!
|
||||||
The owner of this file is {currentBrew.authors[0]}.
|
The owner of this file is {currentBrew.authors[0]}.
|
||||||
<br></br>
|
|
||||||
<div className='confirm' onClick={closeAlerts}> Okay </div>
|
<div className='confirm' onClick={closeAlerts}> Okay </div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@@ -330,7 +328,7 @@ const EditorPage = (props)=>{
|
|||||||
<a target='_blank' rel='noopener noreferrer' href={`https://www.naturalcrit.com/login?redirect=${window.location.href}`}>
|
<a target='_blank' rel='noopener noreferrer' href={`https://www.naturalcrit.com/login?redirect=${window.location.href}`}>
|
||||||
<div className='confirm' onClick={closeAlerts}> Sign In </div>
|
<div className='confirm' onClick={closeAlerts}> Sign In </div>
|
||||||
</a>
|
</a>
|
||||||
<div className='deny' onClick={closeAlerts}> Not Now </div>
|
<div className='deny' onClick={closeAlerts}> Not Now </div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -347,9 +345,8 @@ const EditorPage = (props)=>{
|
|||||||
{saveGoogle
|
{saveGoogle
|
||||||
? 'Would you like to transfer this brew from your Google Drive storage back to the Homebrewery?'
|
? 'Would you like to transfer this brew from your Google Drive storage back to the Homebrewery?'
|
||||||
: 'Would you like to transfer this brew from the Homebrewery to your personal Google Drive storage?'}
|
: 'Would you like to transfer this brew from the Homebrewery to your personal Google Drive storage?'}
|
||||||
<br />
|
|
||||||
<div className='confirm' onClick={toggleGoogleStorage}> Yes </div>
|
<div className='confirm' onClick={toggleGoogleStorage}> Yes </div>
|
||||||
<div className='deny' onClick={closeAlerts}> No </div>
|
<div className='deny' onClick={closeAlerts}> No </div>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</Nav.item>}
|
</Nav.item>}
|
||||||
|
|||||||
Reference in New Issue
Block a user