Implement wss preference url in html; Update to work with the tip of vnext branch; allow viewing the android ui from the webpack server (#918)

* Merge branch 'vnext' of https://github.com/mozilla/send into android-preferences

Fix conflicts

* Implement wss preference url in html; Update to work with the tip of vnext branch; allow viewing the android ui from the webpack server

* Use a try/catch in case localStorage isn't available, which it isn't in a ServiceWorker
This commit is contained in:
Donovan Preston 2018-09-06 18:56:04 -04:00 committed by GitHub
parent 690a705be9
commit 71ea4e74f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 97 additions and 6 deletions

View file

@ -1,11 +1,16 @@
/* eslint-disable no-console */
import User from '../../app/user';
import storage from '../../app/storage';
export default function initialState(state, emitter) {
const files = [];
Object.assign(state, {
prefix: '/android_asset',
user: new User(undefined, storage),
getAsset(name) {
return `/android_asset/${name}`;
return `${state.prefix}/${name}`;
},
translate: (...toTranslate) => {
return toTranslate.map(o => JSON.stringify(o)).toString();