Skip to content

Commit

Permalink
no-op startAuthFlow on android
Browse files Browse the repository at this point in the history
  • Loading branch information
dannycoates committed Mar 9, 2019
1 parent 07eefca commit da5f503
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
5 changes: 2 additions & 3 deletions android/android.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* global window, navigator */
import 'fluent-intl-polyfill';
import choo from 'choo';
import html from 'choo/html';
import Raven from 'raven-js';
Expand Down Expand Up @@ -78,9 +79,7 @@ function body(main) {
}; //TODO
state.archive = new Archive([], DEFAULTS.EXPIRE_SECONDS);
state.storage = storage;
state.user = new User(storage, LIMITS, {
issuer: 'https://accounts.firefox.com'
});
state.user = new User(storage, LIMITS);
state.raven = Raven;
});
app.use(metrics);
Expand Down
21 changes: 10 additions & 11 deletions android/pages/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,32 +33,31 @@ module.exports = function(state, emit) {
</div>
`;
if (state.uploading) {
content = html`
<div class="p-6 w-full">${archiveTile.uploading(state, emit)}</div>
`;
content = archiveTile.uploading(state, emit);
button = '';
} else if (state.archive.numFiles > 0) {
content = html`
<section class="p-4 h-full w-full">
${archiveTile.wip(state, emit)}
</section>
`;
content = archiveTile.wip(state, emit);
button = '';
} else {
content =
archives.length < 1
? intro(state)
: list(
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'
);
}

return html`
<main class="main">
${state.modal && modal(state, emit)} ${content}
<div class="fixed pin-r pin-b">
${state.modal && modal(state, emit)}
<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}
<input
id="file-upload"
Expand Down
4 changes: 4 additions & 0 deletions android/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ export default class AndroidUser extends User {
Android.beginOAuthFlow();
}

startAuthFlow() {
return Promise.resolve();
}

async finishLogin(accountInfo) {
const jwks = JSON.parse(accountInfo.keys);
const ikm = jwks['https://identity.mozilla.com/apps/send'].k;
Expand Down
2 changes: 1 addition & 1 deletion app/ui/intro.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = function intro(state) {
<h1 class="font-bold">
${state.translate('introTitle')}
</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')}
</p>
<img class="intro" src="${assets.get('intro.svg')}" />
Expand Down

0 comments on commit da5f503

Please sign in to comment.