no-op startAuthFlow on android
This commit is contained in:
parent
07eefcafdb
commit
da5f503dbc
4 changed files with 17 additions and 15 deletions
|
@ -1,4 +1,5 @@
|
||||||
/* global window, navigator */
|
/* global window, navigator */
|
||||||
|
import 'fluent-intl-polyfill';
|
||||||
import choo from 'choo';
|
import choo from 'choo';
|
||||||
import html from 'choo/html';
|
import html from 'choo/html';
|
||||||
import Raven from 'raven-js';
|
import Raven from 'raven-js';
|
||||||
|
@ -78,9 +79,7 @@ function body(main) {
|
||||||
}; //TODO
|
}; //TODO
|
||||||
state.archive = new Archive([], DEFAULTS.EXPIRE_SECONDS);
|
state.archive = new Archive([], DEFAULTS.EXPIRE_SECONDS);
|
||||||
state.storage = storage;
|
state.storage = storage;
|
||||||
state.user = new User(storage, LIMITS, {
|
state.user = new User(storage, LIMITS);
|
||||||
issuer: 'https://accounts.firefox.com'
|
|
||||||
});
|
|
||||||
state.raven = Raven;
|
state.raven = Raven;
|
||||||
});
|
});
|
||||||
app.use(metrics);
|
app.use(metrics);
|
||||||
|
|
|
@ -33,16 +33,10 @@ module.exports = function(state, emit) {
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
if (state.uploading) {
|
if (state.uploading) {
|
||||||
content = html`
|
content = archiveTile.uploading(state, emit);
|
||||||
<div class="p-6 w-full">${archiveTile.uploading(state, emit)}</div>
|
|
||||||
`;
|
|
||||||
button = '';
|
button = '';
|
||||||
} else if (state.archive.numFiles > 0) {
|
} else if (state.archive.numFiles > 0) {
|
||||||
content = html`
|
content = archiveTile.wip(state, emit);
|
||||||
<section class="p-4 h-full w-full">
|
|
||||||
${archiveTile.wip(state, emit)}
|
|
||||||
</section>
|
|
||||||
`;
|
|
||||||
button = '';
|
button = '';
|
||||||
} else {
|
} else {
|
||||||
content =
|
content =
|
||||||
|
@ -50,15 +44,20 @@ module.exports = function(state, emit) {
|
||||||
? intro(state)
|
? intro(state)
|
||||||
: list(
|
: list(
|
||||||
archives,
|
archives,
|
||||||
'list-reset h-full overflow-y-auto w-full p-6',
|
'list-reset h-full overflow-y-auto w-full',
|
||||||
'mb-3 w-full'
|
'mb-3 w-full'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<main class="main">
|
<main class="main">
|
||||||
${state.modal && modal(state, emit)} ${content}
|
${state.modal && modal(state, emit)}
|
||||||
<div class="fixed pin-r pin-b">
|
<section
|
||||||
|
class="h-full w-full p-6 z-10 overflow-hidden md:flex md:flex-row md:rounded-lg md:shadow-big"
|
||||||
|
>
|
||||||
|
${content}
|
||||||
|
</section>
|
||||||
|
<div class="fixed pin-r pin-b z-20">
|
||||||
${button}
|
${button}
|
||||||
<input
|
<input
|
||||||
id="file-upload"
|
id="file-upload"
|
||||||
|
|
|
@ -11,6 +11,10 @@ export default class AndroidUser extends User {
|
||||||
Android.beginOAuthFlow();
|
Android.beginOAuthFlow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
startAuthFlow() {
|
||||||
|
return Promise.resolve();
|
||||||
|
}
|
||||||
|
|
||||||
async finishLogin(accountInfo) {
|
async finishLogin(accountInfo) {
|
||||||
const jwks = JSON.parse(accountInfo.keys);
|
const jwks = JSON.parse(accountInfo.keys);
|
||||||
const ikm = jwks['https://identity.mozilla.com/apps/send'].k;
|
const ikm = jwks['https://identity.mozilla.com/apps/send'].k;
|
||||||
|
|
|
@ -10,7 +10,7 @@ module.exports = function intro(state) {
|
||||||
<h1 class="font-bold">
|
<h1 class="font-bold">
|
||||||
${state.translate('introTitle')}
|
${state.translate('introTitle')}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="max-w-sm mt-2 pr-16 leading-normal">
|
<p class="max-w-sm leading-normal mt-6 md:mt-2 md:pr-16">
|
||||||
${state.translate('introDescription')}
|
${state.translate('introDescription')}
|
||||||
</p>
|
</p>
|
||||||
<img class="intro" src="${assets.get('intro.svg')}" />
|
<img class="intro" src="${assets.get('intro.svg')}" />
|
||||||
|
|
Loading…
Reference in a new issue