small changes

This commit is contained in:
Víctor Losada Hernández
2026-10-10 20:39:56 +02:00
parent 428b018835
commit e3b9cbb780
4 changed files with 21 additions and 19 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ const Nav = {
{icon && <i className={icon}></i>}
</a>;
} 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}
{icon && <i className={icon}></i>}
{kbd && <kbd>{kbd}</kbd>}
+1 -1
View File
@@ -146,7 +146,7 @@ const Navbar = ({ children, brew, pageName, editor, title, currentPage, props })
</Dropdown>
);
};
console.log(navSlots);
return (
<nav>
<ul>
+15 -10
View File
@@ -24,8 +24,8 @@
height: 100%;
padding: 5px;
cursor: pointer;
max-width:140px;
text-wrap:wrap;
max-width:150px;
text-wrap:pretty;
&:has(> button, > a) {
padding: 0;
@@ -157,8 +157,7 @@
justify-content: center;
}
&.save {
width: 90px;
width:90px;
&.neverSaved {
background-color: @orange;
color: white;
@@ -277,13 +276,10 @@
position: relative;
img {
height: 18px;
height: 15px;
padding: 0px;
margin: -5px;
translate:-5px;
&.inactive {
filter: grayscale(1);
}
}
}
}
@@ -297,14 +293,19 @@
height: 100%;
text-wrap: nowrap;
&:first-child :is(button, a) {
&:first-child >:is(button, a) {
padding-left: 15px;
}
&:last-child :is(button, a) {
&:last-child >:is(button, a) {
padding-right: 15px;
}
}
&:last-child ul {
padding-right:10px;
translate:-10px 0;
}
ul {
background: #333;
font-size: 12px;
@@ -313,6 +314,10 @@
.navItem {
min-height: 2.2em;
&.save {
width:100%;
}
}
.nav-section:not(:last-child, :has(+ .header)) {
@@ -277,7 +277,6 @@ const EditorPage = (props)=>{
//======----- Google Toggle Button -----======
const closeAlerts = (e)=>{
e.stopPropagation(); //Only handle click once so alert doesn't reopen
setAlertTrashedGoogleBrew(false);
setAlertNoGoogleToTransfer(false);
setConfirmGoogleTransfer(false);
@@ -310,16 +309,15 @@ const EditorPage = (props)=>{
const errorExists = alertNoGoogleToTransfer || alertOwnershipToTransfer || alertTrashedGoogleBrew || confirmGoogleTransfer;
return (<>
<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? '' : <img src={googleDriveIcon} className={saveGoogle ? '' : 'inactive'} alt='Google Drive icon' /> }
{saveGoogle? '' : <img src={googleDriveIcon} alt='Google Drive icon' /> }
</Nav.item>
{errorExists && <Nav.item className='errorContainer' >
{alertOwnershipToTransfer && (
<>
You must be the Owner to transfer between the Homebrewery and Google Drive!
The owner of this file is {currentBrew.authors[0]}.
<br></br>
<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}`}>
<div className='confirm' onClick={closeAlerts}> Sign In </div>
</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
? '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?'}
<br />
<div className='confirm' onClick={toggleGoogleStorage}> Yes </div>
<div className='deny' onClick={closeAlerts}> No </div>
<div className='deny' onClick={closeAlerts}> No </div>
</>
)}
</Nav.item>}