Skip to content
Permalink
Browse files

Adding HTTP warning to dropbox, making terminal smaller.

  • Loading branch information
John Vilk
John Vilk committed May 25, 2016
1 parent 1ea4855 commit 36260bc97d4dfa88e28ced2da4829633f51a0a01
Showing with 16 additions and 2 deletions.
  1. +15 −1 src/js/commands/fs.ts
  2. +1 −1 src/js/shell.ts
@@ -262,7 +262,21 @@ export class MountDropboxCommand extends AbstractShellCommand {

public run(terminal: Shell, args: string[], cb: () => void): void {
var api_key: string = "j07r6fxu4dyd08r";
if (args.length < 1 || args[0] !== 'Y') {
const URL = document.URL;
// Can't connect to Dropbox over HTTP unless served locally during development.
if (URL.indexOf("http:") === 0 && URL.indexOf("http://localhost") === -1) {
terminal.stdout(
`You are currently accessing the demo from a non-secure URL:
${document.URL}
Dropbox only allows authentication over a secure connection. Please access the
demo from the following HTTPS URL and try again:
${document.URL.replace(/^http:/, 'https:')}\n`
);
cb();
} else if (args.length < 1 || args[0] !== 'Y') {
terminal.stdout(
`This command may redirect you to Dropbox's site for authentication.
If you would like to proceed with mounting Dropbox into the in-browser
@@ -86,7 +86,7 @@ export default class Shell {

const rows = 25;
const term = this._terminal = globalTerm = new Terminal({
cols: 100,
cols: 80,
rows: rows,
cancelEvents: true
});

0 comments on commit 36260bc

Please sign in to comment.
You can’t perform that action at this time.