0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-25 22:42:41 +00:00

Merge branch 'master' into SwappableThemes-ReorganizeFolderStructure

This commit is contained in:
Trevor Buckner
2022-08-31 23:57:46 -04:00
7 changed files with 22831 additions and 22776 deletions

View File

@@ -39,6 +39,61 @@ pre {
## changelog
For a full record of development, visit our [Github Page](https://github.com/naturalcrit/homebrewery).
### Wednesday 31/08/2022 - v3.2.1
{{taskList
##### Calculuschild
* [x] Reference Links should now work inside tables
Fixes issues: [#2307](https://github.com/naturalcrit/homebrewery/issues/2307)
##### Jeddai:
* [x] Fix printing from `/new` not working
Fixes issues: [#1789](https://github.com/naturalcrit/homebrewery/issues/1789), [#1806](https://github.com/naturalcrit/homebrewery/issues/1806)
* [x] Fix broken snippet buttons on `/new`
Fixes issues: [#2311](https://github.com/naturalcrit/homebrewery/issues/2311)
##### G-Ambatte:
* [x] Several small tweaks to the User page
Fixes issues: [#2301](https://github.com/naturalcrit/homebrewery/issues/2301), [#2303](https://github.com/naturalcrit/homebrewery/issues/2303), [#2121](https://github.com/naturalcrit/homebrewery/issues/2121)
}}
\page
### Saturday 27/08/2022 - v3.2.0
{{taskList
##### Calculuschild
* [x] The V3 renderer is now the default for new brews.
* [x] Small tweaks to the spacing around the `classTable` style
##### Jeddai:
* [x] Brew transfers between Homebrewery and Google Drive now keep the same share and edit links! Metadata is now also kept across transfers.
Fixes issues: [#1838](https://github.com/naturalcrit/homebrewery/issues/1838)
* [x] Brews can now be labeled with tags; these will be searchable on the My Brews page in a future update.
Fixes issues: [#758](https://github.com/naturalcrit/homebrewery/issues/758)
##### Jlgraves:
* [x] Small tweaks to the `ClassFeature` snippet
Fixes issues: [#2215](https://github.com/naturalcrit/homebrewery/issues/2215)
}}
### Thursday 09/06/2022 - v3.1.1
{{taskList

View File

@@ -14,13 +14,17 @@ const PrintPage = require('./pages/printPage/printPage.jsx');
const WithRoute = (props)=>{
const params = useParams();
const searchParams = useSearchParams();
const [searchParams] = useSearchParams();
const queryParams = {};
for (const [key, value] of searchParams?.entries() || []) {
queryParams[key] = value;
}
const Element = props.el;
const allProps = {
...props,
...params,
...searchParams,
el : undefined
query : queryParams,
el : undefined
};
return <Element {...allProps} />;
};

View File

@@ -100,7 +100,6 @@ const ListPage = createClass({
<i className='fas fa-search'></i>
<input
type='search'
autoFocus={true}
placeholder='filter title/description'
onChange={this.handleFilterTextChange}
value={this.state.filterString}
@@ -161,11 +160,11 @@ const ListPage = createClass({
render : function(){
return <div className='listPage sitePage'>
<link href='/themes/Legacy/5ePHB/style.css' rel='stylesheet'/>
<link href='/themes/V3/5ePHB/style.css' rel='stylesheet'/>
{this.props.navItems}
<div className='content V3'>
<div className='phb'>
<div className='phb page'>
{this.renderSortOptions()}
{this.renderBrewCollection(this.props.brewCollection)}
</div>

View File

@@ -13,7 +13,7 @@
}
.listPage{
.content{
overflow-y : scroll;
overflow-y : overlay;
.phb{
.noColumns();
height : auto;
@@ -34,7 +34,7 @@
font-family : 'Open Sans', sans-serif;
position : fixed;
top : 35px;
left : calc(50vw - 408px);
left : calc(50vw - 400px);
border : 2px solid #58180D;
width : 800px;
background-color : #EEE5CE;

View File

@@ -50,21 +50,6 @@ const NewPage = createClass({
getInitialState : function() {
const brew = this.props.brew;
if(typeof window !== 'undefined') { //Load from localStorage if in client browser
const brewStorage = localStorage.getItem(BREWKEY);
const styleStorage = localStorage.getItem(STYLEKEY);
const metaStorage = JSON.parse(localStorage.getItem(METAKEY));
if(!brew.text || !brew.style){
brew.text = brew.text || (brewStorage ?? '');
brew.style = brew.style || (styleStorage ?? undefined);
// brew.title = metaStorage?.title || this.state.brew.title;
// brew.description = metaStorage?.description || this.state.brew.description;
brew.renderer = metaStorage?.renderer || brew.renderer;
brew.theme = metaStorage?.theme || brew.theme;
}
}
return {
brew : {
text : brew.text || '',
@@ -89,6 +74,32 @@ const NewPage = createClass({
componentDidMount : function() {
document.addEventListener('keydown', this.handleControlKeys);
const brew = this.props.brew;
if(typeof window !== 'undefined') { //Load from localStorage if in client browser
const brewStorage = localStorage.getItem(BREWKEY);
const styleStorage = localStorage.getItem(STYLEKEY);
const metaStorage = JSON.parse(localStorage.getItem(METAKEY));
if(!brew.text || !brew.style){
brew.text = brew.text || (brewStorage ?? '');
brew.style = brew.style || (styleStorage ?? undefined);
// brew.title = metaStorage?.title || this.state.brew.title;
// brew.description = metaStorage?.description || this.state.brew.description;
brew.renderer = brew.renderer || metaStorage?.renderer;
brew.theme = brew.theme || metaStorage?.theme;
this.setState({
brew : brew
});
}
}
localStorage.setItem(BREWKEY, brew.text);
localStorage.setItem(STYLEKEY, brew.style);
localStorage.setItem(METAKEY, JSON.stringify({'renderer' : brew.renderer}));
},
componentWillUnmount : function() {
document.removeEventListener('keydown', this.handleControlKeys);

45478
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,7 +1,7 @@
{
"name": "homebrewery",
"description": "Create authentic looking D&D homebrews using only markdown",
"version": "3.1.1",
"version": "3.2.1",
"engines": {
"node": "16.11.x"
},
@@ -70,11 +70,11 @@
"jwt-simple": "^0.5.6",
"less": "^3.13.1",
"lodash": "^4.17.21",
"marked": "4.0.19",
"marked-extended-tables": "^1.0.3",
"marked": "4.1.0",
"marked-extended-tables": "^1.0.5",
"markedLegacy": "npm:marked@^0.3.19",
"moment": "^2.29.4",
"mongoose": "^6.5.3",
"mongoose": "^6.5.4",
"nanoid": "3.3.4",
"nconf": "^0.12.0",
"react": "^16.14.0",
@@ -86,9 +86,9 @@
"vitreum": "git+https://git@github.com/calculuschild/vitreum.git"
},
"devDependencies": {
"eslint": "^8.22.0",
"eslint-plugin-react": "^7.31.0",
"jest": "^28.1.3",
"eslint": "^8.23.0",
"eslint-plugin-react": "^7.31.1",
"jest": "^29.0.1",
"supertest": "^6.2.4"
}
}