signup dialog changes
- send empty or invalid emails to the standard fxa signup page - show the signup dialog when file too big and not logged in
This commit is contained in:
parent
c585c34c01
commit
a79400f99f
2 changed files with 24 additions and 14 deletions
|
@ -6,6 +6,7 @@ import * as metrics from './metrics';
|
|||
import { bytes } from './utils';
|
||||
import okDialog from './ui/okDialog';
|
||||
import copyDialog from './ui/copyDialog';
|
||||
import signupDialog from './ui/signupDialog';
|
||||
|
||||
export default function(state, emitter) {
|
||||
let lastRender = 0;
|
||||
|
@ -98,12 +99,16 @@ export default function(state, emitter) {
|
|||
try {
|
||||
state.archive.addFiles(files, maxSize);
|
||||
} catch (e) {
|
||||
state.modal = okDialog(
|
||||
state.translate(e.message, {
|
||||
size: bytes(maxSize),
|
||||
count: LIMITS.MAX_FILES_PER_ARCHIVE
|
||||
})
|
||||
);
|
||||
if (e.message === 'fileTooBig' && maxSize < LIMITS.MAX_FILE_SIZE) {
|
||||
state.modal = signupDialog();
|
||||
} else {
|
||||
state.modal = okDialog(
|
||||
state.translate(e.message, {
|
||||
size: bytes(maxSize),
|
||||
count: LIMITS.MAX_FILES_PER_ARCHIVE
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
render();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue