diff --git a/client/homebrew/navbar/navbar.jsx b/client/homebrew/navbar/navbar.jsx index 975cc4829..fee06f1c9 100644 --- a/client/homebrew/navbar/navbar.jsx +++ b/client/homebrew/navbar/navbar.jsx @@ -17,7 +17,6 @@ const Navbar = ({ children, brew, editor, title = '', props }) => { const mod = isMac ? '⌘' : 'Ctrl'; const isBrew = !!brew && brew.shareId; const account = global.account; - console.log(editor); const slots = React.Children.toArray(children).reduce((acc, child) => { if (React.isValidElement(child)) { @@ -51,7 +50,16 @@ const Navbar = ({ children, brew, editor, title = '', props }) => { ); }; - + + const renderEditLink = () => { + const editLink = brew?.googleId && !brew?.stubbed ? brew?.googleId + brew?.editId : brew?.editId; + return ( + + edit this brew + + ); + }; + const renderFile = () => { return ( File} icon={null} key={'file'}> @@ -63,7 +71,6 @@ const Navbar = ({ children, brew, editor, title = '', props }) => { {renderDownloadLink()} -
Delete File @@ -79,28 +86,28 @@ const Navbar = ({ children, brew, editor, title = '', props }) => { ); }; - + const renderEdit = () => { return ( Edit} icon={null} key={'edit'}>
- {slots.edit?.props.children} - editor?.undo()} kbd={mod + ' + z'} disabled={!isBrew}> + editor?.undo()} kbd={mod + ' + z'} disabled={!isBrew}> Undo - editor?.redo()} kbd={mod + ' + Shift + z'} disabled={!isBrew}> + editor?.redo()} kbd={mod + ' + Shift + z'} disabled={!isBrew}> Redo - editor?.find()} kbd={mod + ' + f'} disabled={!isBrew}> + editor?.find()} kbd={mod + ' + f'} disabled={!isBrew}> Find / Replace - editor?.foldCode()} disabled={!isBrew}> + editor?.foldCode()} disabled={!isBrew}> Fold all lines - editor?.unfoldCode()} disabled={!isBrew}> + editor?.unfoldCode()} disabled={!isBrew}> Unfold all lines
+ {slots.edit?.props.children} {/*
editor?.cut()} kbd={mod + ' + x'} disabled={!isBrew}> @@ -113,7 +120,7 @@ const Navbar = ({ children, brew, editor, title = '', props }) => { paste
- */} + */}
); }; @@ -121,6 +128,8 @@ const Navbar = ({ children, brew, editor, title = '', props }) => { const renderGo = () => { return ( Go} icon={null} key={'go'}> + {renderEditLink()} +
Patreon diff --git a/client/homebrew/navbar/navbar.less b/client/homebrew/navbar/navbar.less index 85fc7857a..d770ff2b9 100644 --- a/client/homebrew/navbar/navbar.less +++ b/client/homebrew/navbar/navbar.less @@ -3,21 +3,6 @@ @navbarHeight: 28px; @viewerToolsHeight: 32px; -@keyframes pinkColoring { - 0% { - color: pink; - } - 50% { - color: pink; - } - 75% { - color: red; - } - 100% { - color: pink; - } -} - @keyframes glideDropDown { 0% { background-color: #333333; @@ -195,7 +180,7 @@ .homebrew nav { color: #ccc; background: #333; - min-height: 29px; + height: @navbarHeight; font-size: 14px; font-family: Alata, diff --git a/client/homebrew/pages/sharePage/sharePage.jsx b/client/homebrew/pages/sharePage/sharePage.jsx index d81c47cf2..a7ed505b5 100644 --- a/client/homebrew/pages/sharePage/sharePage.jsx +++ b/client/homebrew/pages/sharePage/sharePage.jsx @@ -64,25 +64,11 @@ const SharePage = (props)=>{ document.removeEventListener('keydown', handleControlKeys); }; }, []); - - const renderEditLink = () => { - if (!currentBrew.editId) return null; - - const editLink = currentBrew.googleId && !currentBrew.stubbed ? currentBrew.googleId + currentBrew.editId : currentBrew.editId; - - return ( - - - edit - - - ); - }; return (
- {renderEditLink()} +