mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-27 16:03:07 +00:00
Compare commits
8 Commits
v3.15.2
...
memoizeBre
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fd3448826 | ||
|
|
3bd73417e6 | ||
|
|
72b69ebb6a | ||
|
|
f1af87ee7e | ||
|
|
7dcceb983e | ||
|
|
6d4b1843ae | ||
|
|
76d6679002 | ||
|
|
4efa1b10f3 |
76
changelog.md
76
changelog.md
@@ -81,9 +81,85 @@ pre {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## changelog
|
## changelog
|
||||||
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
|
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
|
||||||
|
|
||||||
|
### Saturday 10/12/2024 - v3.16.0
|
||||||
|
|
||||||
|
{{taskList
|
||||||
|
##### 5e-Cleric
|
||||||
|
|
||||||
|
* [x] Added a new API endpoint `/metadata/:shareId` to fetch metadata about individual brews
|
||||||
|
|
||||||
|
Fixes issue [#2638](https://github.com/naturalcrit/homebrewery/issues/2638)
|
||||||
|
|
||||||
|
* [x] Added A3, A5, and Card page size snippets under {{openSans **:fas_paintbrush: STYLE TAB :fas_arrow_right: :fas_print: PRINT**}}
|
||||||
|
|
||||||
|
* [x] Adjust navbar styling for very long titles
|
||||||
|
|
||||||
|
Fixes issue [#2071](https://github.com/naturalcrit/homebrewery/issues/2071)
|
||||||
|
|
||||||
|
* [x] Added some sorting options to the {{openSans **VAULT** {{fas,fa-dungeon}}}} page
|
||||||
|
|
||||||
|
* [x] Fix `language` property not working in share page
|
||||||
|
|
||||||
|
Fixes issue [#3776](https://github.com/naturalcrit/homebrewery/issues/3776)
|
||||||
|
|
||||||
|
##### abquintic
|
||||||
|
|
||||||
|
* [x] New {{openSans **:fas_pencil: TEXT EDITOR :fas_arrow_right: :fas_bookmark: PAGE NUMBER :fas_arrow_right:**}}
|
||||||
|
{{openSans **:fas_xmark: SKIP PAGE NUMBER**}} and {{openSans **:fas_arrow_rotate_left: RESTART PAGE NUMBER**}} snippets for more control over automatic page numbering.
|
||||||
|
|
||||||
|
Fixes issue [#513](https://github.com/naturalcrit/homebrewery/issues/513)
|
||||||
|
|
||||||
|
* [x] New Table of Contents control options via {{openSans **:fas_pencil: TEXT EDITOR :fas_arrow_right: :fas_book: TABLE OF CONTENTS**}} submenus. By default, H1-H3 is included in the ToC generation, but the new options allow marking `{{blocks}}` to include or exclude specific or ranges of contained headers. Also, a global option to increase the default range of H1-H3 to H1-H4/5/6. After applying these markers, you must regenerate the Table of Contents to see the changes.
|
||||||
|
|
||||||
|
* [x] Added a ":fas_lock: SYNC VIEWS" button onto the divider bar. When locked, scrolling on either panel will sync the other panel to the same page.
|
||||||
|
|
||||||
|
Fixes issue [#241](https://github.com/naturalcrit/homebrewery/issues/241)
|
||||||
|
|
||||||
|
##### Gazook89
|
||||||
|
|
||||||
|
* [x] Added a :fas_glasses: HIDE button to the page navigation bar
|
||||||
|
|
||||||
|
##### G-Ambatte
|
||||||
|
|
||||||
|
* [x] Automatic local backups of your files, in case of accidental data loss. Stores up to 5 snapshots of each brew edited in your browser, incrementing from a few minutes old to a maximum of several days. Restore a backup by clicking an entry in the new {{openSans **:fas_clock_rotate_left: HISTORY**}} button in the snippet bar.
|
||||||
|
|
||||||
|
Fixes issue [#3070](https://github.com/naturalcrit/homebrewery/issues/3070)
|
||||||
|
|
||||||
|
* [x] Fix issue with legacy brews breaking on Share page
|
||||||
|
|
||||||
|
Fixes issue [#3764](https://github.com/naturalcrit/homebrewery/issues/3764)
|
||||||
|
|
||||||
|
* [x] Fix print size when printing a zoomed document
|
||||||
|
|
||||||
|
Fixes issue [#3744](https://github.com/naturalcrit/homebrewery/issues/3744)
|
||||||
|
|
||||||
|
##### All
|
||||||
|
|
||||||
|
* [x] Background code cleanup, security fixes, dev tool improvements, dependency updates, prep for upcoming features, etc.
|
||||||
|
}}
|
||||||
|
|
||||||
|
### Wednesday 9/25/2024 - v3.15.1
|
||||||
|
|
||||||
|
{{taskList
|
||||||
|
##### calculuschild
|
||||||
|
|
||||||
|
* [x] Background fixes to handle Google Drive issues
|
||||||
|
|
||||||
|
* [x] Remove duplicate error logging
|
||||||
|
|
||||||
|
##### calculuschild, 5e-Cleric
|
||||||
|
|
||||||
|
* [x] Fix links in {{openSans **RECENT BREWS :fas_clock_rotate_left:**}} and user {{openSans **BREWS :fas_beer_mug_empty:**}} pointing to trashed Google Drive files after transferring from Google to Homebrewery storage
|
||||||
|
|
||||||
|
Fixes issue [#3776](https://github.com/naturalcrit/homebrewery/issues/3776)
|
||||||
|
}}
|
||||||
|
|
||||||
|
\page
|
||||||
|
|
||||||
### Wednesday 9/04/2024 - v3.15.0
|
### Wednesday 9/04/2024 - v3.15.0
|
||||||
|
|
||||||
{{taskList
|
{{taskList
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
|
/*eslint max-lines: ["warn", {"max": 300, "skipBlankLines": true, "skipComments": true}]*/
|
||||||
require('./brewRenderer.less');
|
require('./brewRenderer.less');
|
||||||
const React = require('react');
|
const React = require('react');
|
||||||
const { useState, useRef, useCallback } = React;
|
const { useState, useRef, useCallback, memo } = React;
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
|
|
||||||
const MarkdownLegacy = require('naturalcrit/markdownLegacy.js');
|
const MarkdownLegacy = require('naturalcrit/markdownLegacy.js');
|
||||||
@@ -47,7 +47,7 @@ const BrewPage = (props)=>{
|
|||||||
const renderedPages = [];
|
const renderedPages = [];
|
||||||
let rawPages = [];
|
let rawPages = [];
|
||||||
|
|
||||||
const BrewRenderer = (props)=>{
|
const BrewRenderer = memo((props)=>{
|
||||||
props = {
|
props = {
|
||||||
text : '',
|
text : '',
|
||||||
style : '',
|
style : '',
|
||||||
@@ -224,6 +224,19 @@ const BrewRenderer = (props)=>{
|
|||||||
</Frame>
|
</Frame>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
}, arePropsEqual);
|
||||||
|
|
||||||
|
//Only re-render brewRenderer if arePropsEqual == true
|
||||||
|
function arePropsEqual(oldProps, newProps) {
|
||||||
|
return (
|
||||||
|
oldProps?.text?.length === newProps?.text?.length &&
|
||||||
|
oldProps?.style?.length === newProps?.style?.length &&
|
||||||
|
oldProps?.renderer === newProps?.renderer &&
|
||||||
|
oldProps?.theme === newProps?.theme &&
|
||||||
|
oldProps?.errors === newProps?.errors &&
|
||||||
|
oldProps?.themeBundle === newProps?.themeBundle &&
|
||||||
|
oldProps?.lang === newProps?.lang
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = BrewRenderer;
|
module.exports = BrewRenderer;
|
||||||
|
|||||||
@@ -355,7 +355,7 @@ const Editor = createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
sourceJump : function(targetPage=this.props.currentBrewRendererPageNum, smooth=true){
|
sourceJump : function(targetPage=this.props.currentBrewRendererPageNum, smooth=true){
|
||||||
if(!this.isText || isJumping)
|
if(!this.isText() || isJumping)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const textSplit = this.props.renderer == 'V3' ? /^\\page$/gm : /\\page/;
|
const textSplit = this.props.renderer == 'V3' ? /^\\page$/gm : /\\page/;
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "homebrewery",
|
"name": "homebrewery",
|
||||||
"version": "3.15.0",
|
"version": "3.16.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "homebrewery",
|
"name": "homebrewery",
|
||||||
"version": "3.15.0",
|
"version": "3.16.0",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "homebrewery",
|
"name": "homebrewery",
|
||||||
"description": "Create authentic looking D&D homebrews using only markdown",
|
"description": "Create authentic looking D&D homebrews using only markdown",
|
||||||
"version": "3.15.0",
|
"version": "3.16.0",
|
||||||
"engines": {
|
"engines": {
|
||||||
"npm": "^10.2.x",
|
"npm": "^10.2.x",
|
||||||
"node": "^20.17.x"
|
"node": "^20.17.x"
|
||||||
|
|||||||
@@ -154,9 +154,8 @@ const GoogleActions = {
|
|||||||
return brews;
|
return brews;
|
||||||
},
|
},
|
||||||
|
|
||||||
updateGoogleBrew : async (brew, auth = defaultAuth, userIp)=>{
|
updateGoogleBrew : async (brew, userIp)=>{
|
||||||
const drive = googleDrive.drive({ version: 'v3', auth: auth });
|
const drive = googleDrive.drive({ version: 'v3', auth: defaultAuth });
|
||||||
console.log(auth == defaultAuth ? 'UPDATE w SERVICEACC' : 'UPDATE w USERACC')
|
|
||||||
|
|
||||||
await drive.files.update({
|
await drive.files.update({
|
||||||
fileId : brew.googleId,
|
fileId : brew.googleId,
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ const api = {
|
|||||||
if(!brew.googleId) return;
|
if(!brew.googleId) return;
|
||||||
} else if(brew.googleId) {
|
} else if(brew.googleId) {
|
||||||
// If the google id exists and no other actions are being performed, update the google brew
|
// If the google id exists and no other actions are being performed, update the google brew
|
||||||
const updated = await GoogleActions.updateGoogleBrew(api.excludeGoogleProps(brew));
|
const updated = await GoogleActions.updateGoogleBrew(api.excludeGoogleProps(brew), req.ip);
|
||||||
|
|
||||||
if(!updated) return;
|
if(!updated) return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user