Commit graph

20 commits

Author SHA1 Message Date
lilia
f9ce27f2c8 Refactor index.js
There is no in-window navigation in the chrome app environment, so nix
the first if-clause here. Also make it programmatically reloadable and
fix indentation.

// FREEBIE
2015-09-25 17:57:23 -07:00
lilia
4a482243d0 Simplify event arguments
// FREEBIE
2015-09-21 10:32:35 -07:00
lilia
f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
2015-09-07 14:58:42 -07:00
lilia
98aed2975c Fix conversations opening from the background
From a notification, for example, we were opening the inbox but not the
conversation.

// FREEBIE
2015-09-04 18:34:13 -07:00
lilia
95f8e3921c Keep inbox window open, but allow it to be hidden
As a chrome packaged app, we have to keep at least one window open in
order to maintain our websocket connection in the background page.

This change replaces the system window frame with custom buttons in the
inbox header, such that the 'close' button merely hides the window
rather than unloading it.

Fixes #237
FREEBIE
2015-05-21 13:08:43 -07:00
lilia
76e170686a Make getBackground async 2015-05-12 15:39:15 -07:00
Matt Corallo
454b4726bd Replace load/decode/index around our own number with helpers 2015-03-25 11:54:55 -07:00
lilia
6509561795 Make badge count accurate
Previously it would reset when refreshing the inbox. Now it tracks
changes to conversation unreadCounts.

Fixes #200
2015-03-23 12:41:52 -07:00
lilia
5ffa265559 Revert "Popout inbox"
This reverts commit 31e7d285e3.

This seemed like a nice feature, but the popup bubble isn't very
conducive to nontrivial user inputs, e.g. file inputs.

Fixes #211
2015-03-23 12:19:32 -07:00
lilia
31e7d285e3 Popout inbox
Rather than opening the inbox in its own window, let it appear as a
browser action popup by default, but allow promotion to its own window
if requested.
2015-03-18 16:29:01 -07:00
lilia
08ccdf8d97 Move most scripts to the background page
Dramatically improve load times for frontend pages.

Closes #133
2015-03-16 11:57:41 -07:00
lilia
a72ea7966d Clean up inbox/compose view rendering and swapping
Templatize the inbox view and use the same pattern for in-window view
switching as is now used with the conversation/message detail views.
This means doing more with markup and less jquery manipulation of
individual subelements of the inbox view.
2015-03-09 16:05:06 -07:00
lilia
00e9e3b757 Setup loading gif on conversation list
TODO: get actual gif asset in there.
2015-02-11 17:37:59 -08:00
lilia
d1c5b6da7a Get rid of Layout global
Instead, trigger and listen for events on the conversation collection
object.
2014-11-24 19:25:03 -08:00
lilia
c0681beca7 Consolidate message callbacks
Register the runtime callback at the top level view rather than having
each conversation view register independently.
Also refactors Layout into InboxView.
2014-11-24 19:25:03 -08:00
lilia
ced295a630 Move message and conversation storage to IndexedDB
Getting up and running with IndexedDB was pretty easy, thanks to
backbone. The tricky part was making reads and writes asynchronous.
In that process I did some refactoring on Whisper.Threads, which
has been renamed Conversations for consistency with the view names.

This change also adds the unlimitedStorage permission.
2014-11-24 19:25:03 -08:00
Sumit Bindal
d537d6a91f Fixing lint errors
Fixing JSLint Problems
2014-11-11 17:59:52 -08:00
lilia
13446e9c17 "Fix dirty hack" (runtime.reload) in chromium.js
Runtime reload is overkill and causes a jarring ux. Instead, send and
receive messages across the runtime. Also, if we need to jump between
the main ui and options pages, simply navigate within the current tab
rather than spawning a new one.
2014-11-10 16:24:01 -08:00
lilia
a1a528ccdd Finish abstracting native client
Firstly, don't initialize textsecure.nativclient unless the browser
supports it. The mimetype-check trick is hewn from nacl-common.js.

Secondly, nativeclient crypto functions will all automatically wait for
the module to load before sending messages, so we needn't register any
onload callbacks outside nativeclient.js. (Previously, if you wanted to
do crypto with native client, you would have to register a call back and
wait for the module to load.) Now that the native client crypto is
encapsulated behind a nice interface, it can handle all that
onload-callback jazz internally: if the module isn't loaded when you
call a nativeclient function, return a promise that waits for the load
callback, and eventually resolves with the result of the requested
command. This removes the need for textsecure.registerOnLoadCallback.

Finally, although native client has its quirks, it's significantly
faster than the alternative (emscripten compiled js), so this commit
also lets the crypto backend use native client opportunistically, if
it's available, falling back to js if not, which should make us
compatible with older versions of chrome and chromium.
2014-11-09 15:23:23 -08:00
lilia
2a7d3996bb Remove unused popup.html
And popup.js is now index.js, illustrating its importance as the titular
javascript file.
2014-10-28 22:47:48 -07:00
Renamed from js/popup.js (Browse further)