0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-12 15:22:45 +00:00

Update Version number & cleanup

This commit is contained in:
Trevor Buckner
2020-10-07 15:02:42 -04:00
parent ed1c589e2d
commit 0afb503860
10 changed files with 38 additions and 61 deletions

View File

@@ -4,7 +4,7 @@ const createClass = require('create-react-class');
const _ = require('lodash');
const cx = require('classnames'); //Unused variable
const DISMISS_KEY = 'dismiss_notification7-24-19';
const DISMISS_KEY = 'dismiss_notification7-10-20';
const NotificationPopup = createClass({
getInitialState : function() {
@@ -22,17 +22,22 @@ const NotificationPopup = createClass({
notifications : {
psa : function(){
return <li key='psa'>
<em>Known bug: Grey Shadow Boxes </em> <br />
The shadows around certain brew elements such as notes and statblocks might appear as a solid grey box when generating a PDF. &nbsp;
<a target='_blank' href='https://old.reddit.com/r/homebrewery/comments/ch3v0d/psa_grey_boxesshadows_around_notes_stat_blocks_etc/'>
See this Reddit post
</a> for updates and possible workarounds.
<em>Google Drive Integration!</em> <br />
We have added Google Drive integration to the Homebrewery! <a target='_blank' href='https://www.naturalcrit.com/login'>Sign in</a> with
your Google account to link it with your Homebrewery profile. A new button in the Edit page will let you transfer your file to your personal
Google Drive storage, and Google will keep a backup of each version! No more lost work surprises!
<br /><br />
However, we are aware that there may be uncaught bugs. We encourage you to copy your brew into a text document before transferring to Google
Drive just in case any issues arise as this update is rolled out.
<br /><br />
<b>Note:</b> Transferring an existing brew to Google Drive will change the edit and share links of your document. If you have shared your
document online, remember to update the links there as well.
</li>;
},
faq : function(){
return <li key='faq'>
<em>Protect your work! </em> <br />
At the moment we do not save a history of your projects, so please make frequent backups of your brews! &nbsp;
If you opt not to use your Google Drive, keep in mind that we do not save a history of your projects. Please make frequent backups of your brews! &nbsp;
<a target='_blank' href='https://www.reddit.com/r/homebrewery/comments/adh6lh/faqs_psas_announcements/'>
See the FAQ
</a> to learn how to avoid losing your work!

View File

@@ -9,11 +9,11 @@
.notificationPopup{
position : relative;
float : right;
display : inline-block;
display : inline-block;
width : 350px;
padding : 20px;
padding : 15px;
padding-bottom : 10px;
padding-left : 85px;
padding-left : 55px;
background-color : @blue;
color : white;
a{
@@ -22,8 +22,8 @@
}
i.info{
position : absolute;
top : 24px;
left : 24px;
top : 12px;
left : 12px;
opacity : 0.8;
font-size : 2.5em;
}

View File

@@ -192,9 +192,7 @@ const EditPage = createClass({
this.savedBrew = res.body;
}
} else {
console.log('Saving Locally');
if(transfer) {
console.log('Moving to Local Storage');
const res = await request.post('/api')
.send(this.state.brew)
.catch((err)=>{
@@ -209,12 +207,9 @@ const EditPage = createClass({
console.log('Error Deleting Google Brew');
});
console.log('GOT THIS SAVED BREW:');
console.log(res);
this.savedBrew = res.body;
history.replaceState(null, null, `/edit/${this.savedBrew.editId}`); //update URL to match doc ID
} else {
console.log('Updating existing local copy');
const res = await request
.put(`/api/update/${this.state.brew.editId}`)
.send(this.state.brew)
@@ -228,7 +223,6 @@ const EditPage = createClass({
}
}
console.log('Finished saving. About to merge saved brew with current');
this.setState((prevState)=>({
brew : _.merge({}, prevState.brew, {
googleId : this.savedBrew.googleId ? this.savedBrew.googleId : null,