Commit Graph

920 Commits

Author SHA1 Message Date
lilia fd52575cd8 Remove obsolete build file 2015-05-15 15:47:16 -07:00
lilia 88f0aa471f Correct production server url 2015-05-15 14:03:12 -07:00
lilia 242f1e80a7 Fix image corruption in /dist 2015-05-15 14:02:29 -07:00
lilia 16e9f03d8f Check for registration when launched 2015-05-15 14:02:26 -07:00
lilia f6a326577d Crash fixes for chromium
My current version of chromium inexplicably exposes a crippled version
of chrome.browserAction even though we are now a packaged app and should
not have that functionality exposed to us anymore. This results in some
errors to the tune of "property 'foo' of undefined".

It also doesn't support the innerBounds property for window creation,
only the older (deprecated) bounds property.
2015-05-15 12:54:31 -07:00
lilia 7ec377950c Remove manifest attributes
These properties are not supported in packaged apps.
2015-05-15 12:54:27 -07:00
lilia 029c9754f0 Fix tests 2015-05-15 11:39:23 -07:00
lilia 5a7ab54ee6 Fix registration page
Also make it accessible by providing a mode argument to the install
function. Previously developers could just edit the url but we no longer
have the address bar as an app window, so now they must close the
default installer and run the following from the background page
console: `extension.install('standalone')`.

In the production build, this should result in an error since it is not
supported / the register page is not included there.
2015-05-15 11:39:23 -07:00
lilia 7afd0a02e8 Convert beforeunload listeners 2015-05-15 11:39:23 -07:00
lilia 002ff45312 Adapt window management to chrome app window api
Appify tabs, windows, browserAction

Port the extension.windows.focus function to new window api and
generalize its error handling in the case where the requested window
does not exist. An error will be passed to the callback.

Port extension.browserAction and rename it to the more generic
extension.onLaunched.

Use of the id option when opening a window ensures that attempting to
open a duplicate window merely focuses the existing window.

Finally, after registration, close the options window and open the
inbox.

Port extension.remove
2015-05-15 11:39:22 -07:00
lilia ddbaf87741 Load notifications script from background page 2015-05-15 11:39:22 -07:00
lilia f90f6328dd Don't resolve the background page til storage is ready 2015-05-15 11:39:22 -07:00
lilia 704c6ce779 Signaling key is now an array buffer 2015-05-15 11:39:22 -07:00
lilia 3f37cd21a9 Remove remaining traces of localStorage
Add window.storage to the background page, which loads all data from the
'items' store in indexeddb, caching them in memory for synchronous
access, then override textsecure storage to use that in memory store.
2015-05-15 11:39:19 -07:00
lilia a3c5b0959f Port textsecure.storage.impl to indexeddb 2015-05-15 11:38:15 -07:00
lilia d230df5622 Move local identitykey and registrationid to indexeddb 2015-05-15 11:38:14 -07:00
lilia fe1d78b5fa Load protobufs asynchronously. Fixes #223 2015-05-15 11:38:14 -07:00
lilia b8c5bc293c App windows cannot be refreshed 2015-05-15 11:38:10 -07:00
lilia 76e170686a Make getBackground async 2015-05-12 15:39:15 -07:00
lilia a57363f1c0 Update manifest to be a chrome packaged app 2015-05-12 15:39:14 -07:00
lilia 22796099d8 Fix manifest 2015-05-09 14:35:57 -07:00
lilia 7799bef86c Tweak key conflict error messages
Be generic, because sometimes it's not TextSecure, but Signal.
2015-05-07 17:43:30 -07:00
lilia 6572c0836f Get notification permission on install
Notifications are still configured off by default, but now we don't need
to trigger the pop-down permission dialogue if the user enables them.
2015-05-07 17:30:29 -07:00
lilia 8da062f75c Resize icon to various resolutions
You want icon sizes? I got all the size you need.
2015-05-07 17:30:29 -07:00
lilia f8db7c606a Include bootstrap via sass
One less file to load on the options/register page.
2015-05-07 16:22:57 -07:00
lilia 7da9a1d5a7 Use production server in /dist 2015-05-07 15:01:46 -07:00
lilia 65c069b3d3 Update extension name and description 2015-05-07 14:46:03 -07:00
lilia 915612114b Remove general get/put/remove methods from AxolotlStore 2015-05-06 18:14:32 -07:00
lilia d0e262d7cb AxolotlStore stores groups in indexeddb 2015-05-06 17:49:31 -07:00
lilia 359b4a15a2 Move group storage to axolotl store
Add async get/put/removeGroup to axolotl store and let libtextsecure
use it for group state storage.
2015-05-06 17:49:23 -07:00
lilia 748f32022a Fix up refreshGroup 2015-05-06 13:49:20 -07:00
lilia f774047935 Make libtextsecure group storage asynchronous 2015-05-06 13:11:12 -07:00
lilia c26c6fc317 Store sessions by encodedNumber
Storing multiple sessions in a single indexeddb record is prone to
clobbering data due to races between requests to update multiple device
sessions for the same number, since you have to read the current state
of the device->session map and update it. Splitting the records up makes
it so that those updates can be made in parallel. Selecting all the
sessions for a given number can still be done efficiently thanks to
indexeddb range queries.
2015-05-05 17:44:59 -07:00
lilia 37c496f4f0 Close the provisioning socket 2015-05-05 17:44:59 -07:00
lilia 43d6efcd9e Don't save device objects to disk
Generate them from session and identity data. Save/delete pending prekey
data in an in-memory store and attach it to outgoing device objects.
2015-05-05 17:44:59 -07:00
lilia f18795a253 Add removeSession 2015-05-05 17:44:58 -07:00
lilia f413f03a6b Add getDeviceIds to axolotlstore
And add tests for getDeviceIds and removeAllSessions
2015-05-05 17:44:58 -07:00
lilia 121671c99f Store identity keys in indexeddb
Let device storage request them from axolotl store rather than storing a
copy.
2015-05-05 17:44:58 -07:00
lilia 7eda48f755 Move Session Storage to indexedDB 2015-05-05 17:44:58 -07:00
lilia 20ebc3f890 Move identity key storage functions to axolotl store 2015-05-05 17:44:58 -07:00
lilia f38b18ef63 Move Session storage to axolotlstore 2015-05-05 17:44:57 -07:00
lilia 9de1572ba6 Convert all storage.devices methods to be asynchronous 2015-05-05 17:44:57 -07:00
lilia 71715c95bc Async remove identity 2015-05-05 17:44:57 -07:00
lilia 26f1aa4db5 Async putSessionsForDevice 2015-05-05 17:44:57 -07:00
lilia 666f6baaca Async getSessionsForNumber 2015-05-05 17:44:56 -07:00
lilia 9e7d8c0a08 Rename textsecure.api and make it internal-only 2015-05-05 17:44:56 -07:00
lilia 45a61780af Fixup refreshPreKeys and call it whenever a prekey is deleted 2015-05-05 17:44:56 -07:00
lilia 7d0aeac8cb Use a worker to facilitate key generation 2015-05-05 17:44:55 -07:00
lilia f465bdddbf Add textsecure.AccountManager
This class should be used for account registration and for refreshing
prekeys for your account.
2015-05-05 17:44:55 -07:00
lilia a960acacc6 Add textsecure.refreshKeys
This helper checks the server for the number of remaining prekeys, then
generates more if there are fewer than 10 remaining.

// FREEBIE
2015-05-05 17:44:55 -07:00