Re: [Tails-dev] HTML prototype for new download page

Delete this message

Reply to this message
Autor: sajolida
Data:  
A: Uzair Farooq
CC: The Tails public development discussion list
Assumpte: Re: [Tails-dev] HTML prototype for new download page
Uzair Farooq:
>> For example, I supposed that it will be possible for your extension
>> to rely on some calls to some functions in the script dealing with
>> the logic between the moving parts (for example
>> 'showVerificationResult'). I thought that this would help us decouple
>> what's shipped in the extension from the content and interactions on the
>> page.
>
> Yeah, this seems good. Extensions can't call functions directly so will
> have to do message passing
> (https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage ).


Cool!

> I can build message passing layer so you can assume that extension can
> call the functions.


I'll definitely need help on this, yes :)

> Just let me know what functions extension will be
> calling. Here are the functions I think will be required:
>
> - verifyingFil()


^ What do you mean by this one?

I have a function called showVerifyingDownload to toggle from the click
on the "Verify..." button to the display of "Verifying download..."
while the verification happens.

Maybe you were referring to something like this?

> - fileVerificationComplete()


This would need a result parameter as well because we have three
different result: success, failure, and failure again.

By the way I already have a function called
showVerificationResult(result) to do that.

> You'll also need some kind of indication that extension is installed or
> not, right? We can set a global variable EXTENSION_INSTALLED and you can
> simply check if it's true.


Yes! Here I need two things:

- Be able to know if the extension is installed already.
- Be able to know if the extension is up-to-date.

So on top of EXTENSION_INSTALLED I would need something like
EXTENSION_VERSION, or combine both information in the same variable.

Also, intrigeri mentioned that this API should be versioned. I'll take
not of this and propose something later on.