mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-08 03:12:40 +00:00
Merge branch 'master' into experimentalGoogleServiceAccountChange
This commit is contained in:
@@ -70,7 +70,7 @@ const Account = createClass({
|
|||||||
{global.account.username}
|
{global.account.username}
|
||||||
</Nav.item>
|
</Nav.item>
|
||||||
<Nav.item
|
<Nav.item
|
||||||
href={`/user/${encodeURI(global.account.username)}`}
|
href={`/user/${encodeURIComponent(global.account.username)}`}
|
||||||
color='yellow'
|
color='yellow'
|
||||||
icon='fas fa-beer'
|
icon='fas fa-beer'
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ const MetadataNav = createClass({
|
|||||||
return <>
|
return <>
|
||||||
{this.props.brew.authors.map((author, idx, arr)=>{
|
{this.props.brew.authors.map((author, idx, arr)=>{
|
||||||
const spacer = arr.length - 1 == idx ? <></> : <span>, </span>;
|
const spacer = arr.length - 1 == idx ? <></> : <span>, </span>;
|
||||||
return <span key={idx}><a className='userPageLink' href={`/user/${author}`}>{author}</a>{spacer}</span>;
|
return <span key={idx}><a className='userPageLink' href={`/user/${encodeURIComponent(author)}`}>{author}</a>{spacer}</span>;
|
||||||
})}
|
})}
|
||||||
</>;
|
</>;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ const BrewItem = ({
|
|||||||
<span title="Username contained an email address; hidden to protect user's privacy">
|
<span title="Username contained an email address; hidden to protect user's privacy">
|
||||||
{author}
|
{author}
|
||||||
</span>
|
</span>
|
||||||
) : (<a href={`/user/${author}`}>{author}</a>)}
|
) : (<a href={`/user/${encodeURIComponent(author)}`}>{author}</a>)}
|
||||||
{index < brew.authors.length - 1 && ', '}
|
{index < brew.authors.length - 1 && ', '}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -119,6 +119,10 @@ const EditPage = (props)=>{
|
|||||||
if(autoSaveEnabled) trySave(false, hasChange);
|
if(autoSaveEnabled) trySave(false, hasChange);
|
||||||
}, [currentBrew]);
|
}, [currentBrew]);
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
trySave(true);
|
||||||
|
}, [saveGoogle]);
|
||||||
|
|
||||||
const handleSplitMove = ()=>{
|
const handleSplitMove = ()=>{
|
||||||
editorRef.current?.update();
|
editorRef.current?.update();
|
||||||
};
|
};
|
||||||
@@ -179,7 +183,6 @@ const EditPage = (props)=>{
|
|||||||
const toggleGoogleStorage = ()=>{
|
const toggleGoogleStorage = ()=>{
|
||||||
setSaveGoogle((prev)=>!prev);
|
setSaveGoogle((prev)=>!prev);
|
||||||
setError(null);
|
setError(null);
|
||||||
trySave(true);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const trySave = (immediate = false, hasChanges = true)=>{
|
const trySave = (immediate = false, hasChanges = true)=>{
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ const errorIndex = (props)=>{
|
|||||||
|
|
||||||
**Brew Title:** ${escape(props.brew.brewTitle) || 'Unable to show title'}
|
**Brew Title:** ${escape(props.brew.brewTitle) || 'Unable to show title'}
|
||||||
|
|
||||||
**Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'}
|
**Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${encodeURIComponent(author)})`;}).join(', ') || 'Unable to list authors'}
|
||||||
|
|
||||||
[Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`,
|
[Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`,
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ const errorIndex = (props)=>{
|
|||||||
|
|
||||||
**Brew Title:** ${escape(props.brew.brewTitle) || 'Unable to show title'}
|
**Brew Title:** ${escape(props.brew.brewTitle) || 'Unable to show title'}
|
||||||
|
|
||||||
**Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'}
|
**Current Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${encodeURIComponent(author)})`;}).join(', ') || 'Unable to list authors'}
|
||||||
|
|
||||||
[Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`,
|
[Click here to be redirected to the brew's share page.](/share/${props.brew.shareId})`,
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ const errorIndex = (props)=>{
|
|||||||
|
|
||||||
**Brew Title:** ${escape(props.brew.brewTitle)}
|
**Brew Title:** ${escape(props.brew.brewTitle)}
|
||||||
|
|
||||||
**Brew Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${author})`;}).join(', ') || 'Unable to list authors'}`,
|
**Brew Authors:** ${props.brew.authors?.map((author)=>{return `[${author}](/user/${encodeURIComponent(author)})`;}).join(', ') || 'Unable to list authors'}`,
|
||||||
|
|
||||||
// ####### Admin page error #######
|
// ####### Admin page error #######
|
||||||
'52' : dedent`
|
'52' : dedent`
|
||||||
|
|||||||
Reference in New Issue
Block a user