diff --git a/changelog.md b/changelog.md
index 7b2d7e33b..4ecc8e099 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,8 @@
# changelog
+### Monday, 19/10/2020 - v2.10.2
+- Fixed issue with "recent" item links not updating when transferring between Google Drive.
+
### Monday, 12/10/2020 - v2.10.1
- Fixed issue with users unable to create new brews
- Fixing brews being lost when loaded via back button
@@ -33,6 +36,9 @@
- "Report Issue" navbar button now links to the subreddit
- Refactored background code
+```
+```
+
### Sunday, 04/06/2017 - v2.7.5
- Fixed the class feature snippet duplicating the entire brew
- Fixed headers in tables being duplicated
@@ -44,19 +50,12 @@
### Saturday, 22/04/2017 - v2.7.4
- Give ability to hide the render warning notification
-```
-```
-
### Friday, 03/03/2017 - v2.7.3
- Increasing the range on the Partial Page Rendering for a quick-fix for it getting out of sync on long brews.
-
-
### Saturday, 18/02/2017 - v2.7.2
- Adding ability to delete a brew from the user page, incase the user creates a brew that makes the edit page unrender-able. (re:309)
-
-
### Thursday, 19/01/2017 - v2.7.0
- Fixed saving multiple authors and multiple systems on brew metadata (thanks u/PalaNolho re:282)
- Adding in line highlight for new pages
@@ -65,6 +64,8 @@
### Saturday, 14/01/2017 - v2.7.0
- Added a new Render Warning overlay. It detects situations where the brew may not be rendering correctly (wrong browser, browser is zoomed in...) and let's the user know
+\page
+
### Sunday, 25/12/2016 - v2.7.0
- Switching over to using Vitreum v4
- Removed gulp, all tasks are run through npm scripts
@@ -88,7 +89,6 @@
- Added a table of contents snippet (thanks u/tullisar)
- Added a multicolumn snippet
-\page
### Thursday, 01/12/2016
- Added in a snippet for a split table
- Added an account nav item to new page
@@ -108,6 +108,9 @@
- Added a new user page to see others published brews, as well as all of your own brews.
- Added a new nav item for accessing your profile and logging in
+```
+```
+
### Monday, 14/11/2016
- Updated snippet bar style
- You can now print from a new page without saving
@@ -132,9 +135,6 @@
- Fixed the noteblock overlapping into titles (thanks u/dsompura!)
- Fixed a bad search route in the admin panel (thanks u/SnappyTom!)
-```
-```
-
### Friday, 29/07/2016 - v2.2.7
- Adding in descriptive note blocks. (Thanks calculuschild!)
@@ -149,6 +149,8 @@
### Tuesday, 07/06/2016 - v2.2.2
- Fixed bug with new markdown lexer and aprser not working on print page
+\page
+
### Sunday, 05/06/2016 - v2.2.1
- Adding in a new Class table div block. The old Class table block used weird stacking of HTML elements, resulting is difficult to control behaviour and poor interactiosn with the rest of the page. This new block is much easier to style and work with.
- Added in a new wide table snippet
@@ -162,9 +164,6 @@
- Finally added a syntax for doing spell lists. A bit in-depth about why this took so long. Essentially I'm running out of syntax to use in stardard Markdown. There are too many unique elements in the PHB-style to be mapped. I solved this earlier by stacking certain elements together (eg. an `
` before a `blockquote` turns it into moster state block), but those are getting unweildly. I would like to simply wrap these in `div`s with classes, but unfortunately Markdown stops processing when within HTML blocks. To get around this I wrote my own override to the Markdown parser and lexer to process Markdown within a simple div class wrapper. This should open the door for more unique syntaxes in the future. Big step!
- Override Ctrl+P (and cmd+P) to launch to the print page. Many people try to just print either the editing or share page to get a PDF. While this dones;t make much sense, I do get a ton of issues about it. So now if you try to do this, it'll just bring you imediately to the print page. Everybody wins!
- The onboarding flow has also been confusing a few users (Homepage -> new -> save -> edit page). If you edit the Homepage text now, a Call to Action to save your work will pop-up.
-
-\page
-
- Added a 'Recently Edited' and 'Recently Viewed' nav item to the edit and share page respectively. Each will remember the last 8 items you edited or viewed and when you viewed it. Makes use of the new title attribute of brews to easy navigatation.
- Paragraphs now indent properly after lists (thanks u/slitjen!)
@@ -175,6 +174,9 @@
### Wednesday, 25/05/2016 -v2.0.5
- The class table generators have the proper ability score improvement progression.
+```
+```
+
### Tuesday, 24/05/2016 - v2.0.4
- Fixed extra wide monster stat blocks sometimes only being one column
- The class table generators now follow the proper progression from the PHB (thakns u/IrishBandit)
@@ -185,6 +187,8 @@
- Bumped up the allowed entity size for extra-large brew (Thanks for reporting it dickboner93)
- Added a little error box when a save fails with a custom link to reporting the issue on github.
+\page
+
### Saturday, 14/05/2016 - v2.0.0 (finally!)
I've been working on v2 for a *very* long time. I want to thank you guys for being paitent.
@@ -283,7 +287,6 @@ Massive changelog incoming:
* Increased padding on table cells
* Raw html now shows in view source
-
## v1.0.0 - Release
### Wednesday, 3/01/2016
diff --git a/client/homebrew/navbar/recent.navitem.jsx b/client/homebrew/navbar/recent.navitem.jsx
index 4174cb6e1..5b2895ad7 100644
--- a/client/homebrew/navbar/recent.navitem.jsx
+++ b/client/homebrew/navbar/recent.navitem.jsx
@@ -35,24 +35,32 @@ const RecentItems = createClass({
//== Add current brew to appropriate recent items list (depending on storageKey) ==//
if(this.props.storageKey == 'edit'){
+ let editId = this.props.brew.editId;
+ if(this.props.brew.googleId){
+ editId = `${this.props.brew.googleId}${this.props.brew.editId}`;
+ }
edited = _.filter(edited, (brew)=>{
- return brew.id !== this.props.brew.editId;
+ return brew.id !== editId;
});
edited.unshift({
- id : this.props.brew.editId,
+ id : editId,
title : this.props.brew.title,
- url : `/edit/${this.props.brew.editId}`,
+ url : `/edit/${editId}`,
ts : Date.now()
});
}
if(this.props.storageKey == 'view'){
+ let shareId = this.props.brew.shareId;
+ if(this.props.brew.googleId){
+ shareId = `${this.props.brew.googleId}${this.props.brew.shareId}`;
+ }
viewed = _.filter(viewed, (brew)=>{
- return brew.id !== this.props.brew.shareId;
+ return brew.id !== shareId;
});
viewed.unshift({
- id : this.props.brew.shareId,
+ id : shareId,
title : this.props.brew.title,
- url : `/share/${this.props.brew.shareId}`,
+ url : `/share/${shareId}`,
ts : Date.now()
});
}
@@ -70,6 +78,40 @@ const RecentItems = createClass({
});
},
+ componentDidUpdate : function(prevProps) {
+ if(prevProps.brew && this.props.brew.editId !== prevProps.brew.editId) {
+ if(this.props.storageKey == 'edit') {
+ let prevEditId = prevProps.brew.editId;
+ if(prevProps.brew.googleId){
+ prevEditId = `${prevProps.brew.googleId}${prevProps.brew.editId}`;
+ }
+
+ edited = _.filter(this.state.edit, (brew)=>{
+ return brew.id !== prevEditId;
+ });
+ let editId = this.props.brew.editId;
+ if(this.props.brew.googleId){
+ editId = `${this.props.brew.googleId}${this.props.brew.editId}`;
+ }
+ edited.unshift({
+ id : editId,
+ title : this.props.brew.title,
+ url : `/edit/${editId}`,
+ ts : Date.now()
+ });
+ }
+
+ //== Store the updated lists (up to 8 items each) ==//
+ edited = _.slice(edited, 0, 8);
+
+ localStorage.setItem(EDIT_KEY, JSON.stringify(edited));
+
+ this.setState({
+ edit : edited
+ });
+ }
+ },
+
handleDropdown : function(show){
this.setState({
showDropdown : show
@@ -140,4 +182,4 @@ module.exports = {
showView={true}
/>;
}
-};
\ No newline at end of file
+};
diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx
index e1ca95a32..530987ad5 100644
--- a/client/homebrew/pages/editPage/editPage.jsx
+++ b/client/homebrew/pages/editPage/editPage.jsx
@@ -311,7 +311,7 @@ const EditPage = createClass({
Share
-
+
;
diff --git a/package-lock.json b/package-lock.json
index 1465972ac..fbcbdc466 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "homebrewery",
- "version": "2.10.1",
+ "version": "2.10.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/package.json b/package.json
index a1c3c6bfa..bed7f2c9e 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "homebrewery",
"description": "Create authentic looking D&D homebrews using only markdown",
- "version": "2.10.1",
+ "version": "2.10.2",
"engines": {
"node": "12.16.x"
},
diff --git a/server/googleActions.js b/server/googleActions.js
index e976c0537..eb0284fe9 100644
--- a/server/googleActions.js
+++ b/server/googleActions.js
@@ -224,7 +224,6 @@ GoogleActions = {
readFileMetadata : async (auth, id, accessId, accessType)=>{
const drive = google.drive({ version: 'v3', auth: auth });
- console.log(auth);
const obj = await drive.files.get({
fileId : id,
@@ -236,8 +235,6 @@ GoogleActions = {
return;
});
- console.log(`ACCESS TYPE: ${accessType}`);
-
if(obj) {
if(accessType == 'edit' && obj.data.properties.editId != accessId){
throw ('Edit ID does not match');