Skip to content
This repository was archived by the owner on May 22, 2021. It is now read-only.

don't show the download button until the filename is loaded #736

Closed

Conversation

himanish-star
Copy link
Contributor

fixes: #733
@dannycoates, I have implemented the part you have requested for. Please review 😃

@@ -38,6 +38,10 @@ module.exports = function(state, emit) {
</button>
</div>
</div>`;
if (!state.transfer) {
const ele = action.querySelector('#download-btn');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks on the server side. The server also runs this code from here, but there action is not a DOMElement it's just a string. So we end up in the catch case which falls through to the notfound code.

A good way to make it work on both the server and browser is to conditionally add the button in the action template string instead of removing it after.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure I will look into this in a while

@dannycoates
Copy link
Contributor

Thanks @himanish-star, I got a chance to fix this myself yesterday. I've integrated a fix for this in #737

@himanish-star
Copy link
Contributor Author

😞, sorry for the delay.Fine I'll fix another issue

@himanish-star
Copy link
Contributor Author

@dannycoates, could you assign me some other issue which you think I can solve? In the meanwhile even I am looking out for some issues which I can solve.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download encrypted file displayed on downloading the file, and changes to Download "Filename" within seconds.
2 participants