Repository navigation
No email to buy, coupons in the app, 2 free exports - #97
Merged
Merged
Conversation
Upgrading no longer asks for an email. The app keeps a one-time secret and sends only its hash with the checkout; once paid, stripe-webhook records the claim and the new license-claim function activates that computer, no code. An address that already had a license still confirms with the emailed code, so paying with someone else's email cannot take over their account. The upgrade card also takes a coupon, checked against Stripe promotion codes before checkout opens.
Pro and Creator open checkout straight away and the dialog checks silently for the payment, as the agent panel does. The email and code form moves behind "Already bought? Sign in". When both watch the same checkout, the second to ask finds it claimed and takes the key already saved.
Email: sends the code. Code: signs in. Coupon: opens Pro's checkout with it. In the agent panel and in Export.
Without a license the export dialog asks export-allowance how many of the 2 free exports this computer has left and enables Export while some remain. A finished free export is counted (kept on disk until the server can be told); a cancelled or failed one is not. Offline there is no free export, so turning the network off does not unlock export; a license keeps working offline. A new endpoint, so builds up to 0.1.39 (which ask free-export) do not get their old three back.
No Remove the limit step: while free exports remain the dialog shows the same upgrade buttons, coupon and sign-in as when they are used up.
The license section (upgrade buttons, coupon, sign-in) made the dialog taller than a short window, pushing Export to file off screen. The settings now scroll within the window's height and the Export row stays below them.
The free exports were forgotten on close and asked again on open, so the dialog appeared short (Checking…) and grew a moment later. They are now asked when the editor opens, refreshed on each open while the last answer stays on screen, and the checking state has the same layout as the answer.
A finished free export is recorded and the server's answer replaces the dialog's count; a cancelled or failed one asks again, giving back the export taken off when it started. Checks and records run one at a time, so an unsent export reopening the dialog sends is never counted twice.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrading to Pro no longer asks for an email.
stripe-webhookrecords the claim incheckout_claims. The app quietly polls the newlicense-claimfunction, which activates this computer with no code to type.Backend is already live: the migration is pushed, and
license-claim,stripe-webhookandcreate-checkoutare deployed.create-checkoutstill accepts requests from released app builds.Not tested yet: a full paid checkout end to end.
2 free exports
export-allowancefunction how many of the 2 free exports this computer has left (counted by device ID, so reinstalling doesn't reset them). Export is enabled while some remain.free-export, don't get their old 3 back.export-allowance. At release: update the site copy that says export needs a license (download, comparison, index; en + es).