0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-05-07 16:38:38 +00:00

Merge branch 'master' of https://github.com/naturalcrit/homebrewery into fix-CM-bugs

This commit is contained in:
Víctor Losada Hernández
2026-05-03 17:18:34 +02:00
5 changed files with 23 additions and 4 deletions
@@ -170,7 +170,7 @@ const Snippetbar = createReactClass({
this.props.updateEditorTheme(e.target.value); this.props.updateEditorTheme(e.target.value);
this.setState({ this.setState({
showThemeSelector : false, themeSelector : false,
}); });
}, },
+7 -1
View File
@@ -17,7 +17,7 @@ const getRedditLink = (brew)=>{
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(brew.title.toWellFormed())}&text=${encodeURIComponent(text)}`; return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(brew.title.toWellFormed())}&text=${encodeURIComponent(text)}`;
}; };
export default ({ brew })=>( export default ({ brew, currentPage })=>(
<Nav.dropdown> <Nav.dropdown>
<Nav.item color='teal' icon='fas fa-share-alt'> <Nav.item color='teal' icon='fas fa-share-alt'>
share share
@@ -28,6 +28,12 @@ export default ({ brew })=>(
<Nav.item color='blue' onClick={()=>{navigator.clipboard.writeText(`${global.config.baseUrl}/share/${getShareId(brew)}`);}}> <Nav.item color='blue' onClick={()=>{navigator.clipboard.writeText(`${global.config.baseUrl}/share/${getShareId(brew)}`);}}>
copy url copy url
</Nav.item> </Nav.item>
{currentPage > 1 &&
<Nav.item
color='blue'
onClick={()=>{navigator.clipboard.writeText(`${global.config.baseUrl}/share/${getShareId(brew)}#p${currentPage}`);}}>
copy url (page {currentPage})
</Nav.item>}
<Nav.item color='blue' href={getRedditLink(brew)} newTab rel='noopener noreferrer'> <Nav.item color='blue' href={getRedditLink(brew)} newTab rel='noopener noreferrer'>
post to reddit post to reddit
</Nav.item> </Nav.item>
+1 -1
View File
@@ -365,7 +365,7 @@ const EditPage = (props)=>{
<PrintNavItem /> <PrintNavItem />
<HelpNavItem /> <HelpNavItem />
<VaultNavItem /> <VaultNavItem />
<ShareNavItem brew={currentBrew} /> <ShareNavItem brew={currentBrew} currentPage={currentBrewRendererPageNum} />
<RecentNavItem brew={currentBrew} storageKey='edit' /> <RecentNavItem brew={currentBrew} storageKey='edit' />
<AccountNavItem/> <AccountNavItem/>
</Nav.section> </Nav.section>
@@ -92,6 +92,19 @@ const SharePage = (props)=>{
<Nav.item color='blue' icon='fas fa-clone' href={`/new/${processShareId()}`}> <Nav.item color='blue' icon='fas fa-clone' href={`/new/${processShareId()}`}>
clone to new clone to new
</Nav.item> </Nav.item>
<Nav.item
color='blue'
icon='fas fa-link'
onClick={()=>{navigator.clipboard.writeText(`${global.config.baseUrl}/share/${processShareId()}`);}}>
copy url
</Nav.item>
{currentBrewRendererPageNum > 1 &&
<Nav.item
color='blue'
icon='fas fa-hashtag'
onClick={()=>{navigator.clipboard.writeText(`${global.config.baseUrl}/share/${processShareId()}#p${currentBrewRendererPageNum}`);}}>
copy url (page {currentBrewRendererPageNum})
</Nav.item>}
</Nav.dropdown> </Nav.dropdown>
</> </>
)} )}
+1 -1
View File
@@ -109,7 +109,7 @@
"@vitejs/plugin-react": "^5.1.2", "@vitejs/plugin-react": "^5.1.2",
"body-parser": "^2.2.0", "body-parser": "^2.2.0",
"classnames": "^2.5.1", "classnames": "^2.5.1",
"codemirror-5-themes": "^1.5.0", "codemirror-5-themes": "^1.5.1",
"cookie-parser": "^1.4.7", "cookie-parser": "^1.4.7",
"core-js": "^3.49.0", "core-js": "^3.49.0",
"cors": "^2.8.5", "cors": "^2.8.5",