This commit is contained in:
Víctor Losada Hernández
2026-09-28 17:34:12 +02:00
parent 5b7efa9f1f
commit 8a372c1454
21 changed files with 191 additions and 193 deletions
@@ -109,7 +109,7 @@ const BrewCleanup = ({})=>{
<td style={{ width: '200px' }}>{Moment(brew.updatedAt).fromNow()}</td> <td style={{ width: '200px' }}>{Moment(brew.updatedAt).fromNow()}</td>
<td>{brew.lastViewed ? Moment(brew.lastViewed).fromNow() : 'No last viewed date'}</td> <td>{brew.lastViewed ? Moment(brew.lastViewed).fromNow() : 'No last viewed date'}</td>
<td>{brew.googleId ? 'Google' : 'Homebrewery'}</td> <td>{brew.googleId ? 'Google' : 'Homebrewery'}</td>
</tr> </tr>;
})} })}
</tbody> </tbody>
</table> </table>
@@ -120,7 +120,7 @@ const BrewCleanup = ({})=>{
return <div className='result'> return <div className='result'>
{deleteButton && <button onClick={()=>cleanup(type)} className='remove'> {deleteButton && <button onClick={()=>cleanup(type)} className='remove'>
{pendingLost && type === "lost" || pendingJunk && type === "junk" {pendingLost && type === 'lost' || pendingJunk && type === 'junk'
? <i className='fas fa-spin fa-spinner' /> ? <i className='fas fa-spin fa-spinner' />
: <span><i className='fas fa-times' /> Remove</span> : <span><i className='fas fa-times' /> Remove</span>
} }
@@ -31,8 +31,7 @@ export async function formatCSS(view) {
//Prettier can't do it by default, this is crude but it works //Prettier can't do it by default, this is crude but it works
formatted = formatted.replace( formatted = formatted.replace(
/([^{]+)\{\s*\n\s*([^;\n]+:[^;\n]+;)\s*\n\s*\}(\s*)/g, /([^{]+)\{\s*\n\s*([^;\n]+:[^;\n]+;)\s*\n\s*\}(\s*)/g,
(_, selector, decl, whitespace) => (_, selector, decl, whitespace)=>`${selector} { ${decl.trim()} }${whitespace}`
`${selector} { ${decl.trim()} }${whitespace}`
); );
if(formatted === code) return true; if(formatted === code) return true;
@@ -158,8 +158,7 @@ const BrewRenderer = (props)=>{
return false; return false;
}; };
const renderDummyPage = (index)=> const renderDummyPage = (index)=><div className='phb page' id={`p${index + 1}`} key={index}>
<div className='phb page' id={`p${index + 1}`} key={index}>
<i className='fas fa-spinner fa-spin' /> <i className='fas fa-spinner fa-spin' />
</div>; </div>;
+1 -1
View File
@@ -12,7 +12,7 @@ export default function(){
return ()=>{ return ()=>{
document.removeEventListener('print:startprep', handlePrintStartPrep); document.removeEventListener('print:startprep', handlePrintStartPrep);
document.removeEventListener('print:finishedprep', handlePrintPrepFinished); document.removeEventListener('print:finishedprep', handlePrintPrepFinished);
} };
}, []); }, []);
const handlePrintStartPrep = ()=>{ setPrinting(true); }; const handlePrintStartPrep = ()=>{ setPrinting(true); };
+1 -1
View File
@@ -9,7 +9,7 @@ import _ from 'lodash';
import { DEFAULT_BREW_LOAD } from '../../../../server/brewDefaults.js'; import { DEFAULT_BREW_LOAD } from '../../../../server/brewDefaults.js';
import useCommonEditPageFunctions from '../../utils/commonEditPageFunctions.jsx' import useCommonEditPageFunctions from '../../utils/commonEditPageFunctions.jsx';
import SplitPane from '@components/splitPane/splitPane.jsx'; import SplitPane from '@components/splitPane/splitPane.jsx';
import Editor from '../../editor/editor.jsx'; import Editor from '../../editor/editor.jsx';
+1 -1
View File
@@ -9,7 +9,7 @@ import _ from 'lodash';
import { DEFAULT_BREW } from '../../../../server/brewDefaults.js'; import { DEFAULT_BREW } from '../../../../server/brewDefaults.js';
import useCommonEditPageFunctions from '../../utils/commonEditPageFunctions.jsx' import useCommonEditPageFunctions from '../../utils/commonEditPageFunctions.jsx';
import SplitPane from '@components/splitPane/splitPane.jsx'; import SplitPane from '@components/splitPane/splitPane.jsx';
import Editor from '../../editor/editor.jsx'; import Editor from '../../editor/editor.jsx';
+2 -2
View File
@@ -1,4 +1,4 @@
/* eslint-disable max-lines */
import './newPage.less'; import './newPage.less';
// Common imports // Common imports
@@ -10,7 +10,7 @@ import _ from 'lodash';
import { DEFAULT_BREW } from '../../../../server/brewDefaults.js'; import { DEFAULT_BREW } from '../../../../server/brewDefaults.js';
import { printCurrentBrew, fetchThemeBundle, splitTextStyleAndMetadata } from '@shared/helpers.js'; import { printCurrentBrew, fetchThemeBundle, splitTextStyleAndMetadata } from '@shared/helpers.js';
import useCommonEditPageFunctions from '../../utils/commonEditPageFunctions.jsx' import useCommonEditPageFunctions from '../../utils/commonEditPageFunctions.jsx';
import SplitPane from '@components/splitPane/splitPane.jsx'; import SplitPane from '@components/splitPane/splitPane.jsx';
import Editor from '../../editor/editor.jsx'; import Editor from '../../editor/editor.jsx';
@@ -180,5 +180,5 @@ export default function useCommonEditPageFunctions(dependencies) {
renderSaveButton, renderSaveButton,
autoSaveEnabled, autoSaveEnabled,
unsavedChanges, unsavedChanges,
} };
} }
+3 -3
View File
@@ -285,9 +285,9 @@ export default async function createApp(vite) {
'<head>', '<head>',
`<head>\n` `<head>\n`
+ `<script id="props">` + `<script id="props">`
+ `window.__INITIAL_PROPS__ = ` + safeProps + `window.__INITIAL_PROPS__ = ${safeProps
+ `</script>\n` }</script>\n${
+ ogMetaTags ogMetaTags}`
); );
return html; return html;