diff --git a/Gruntfile.js b/Gruntfile.js index 308eda8..2380240 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -75,11 +75,24 @@ module.exports = function (grunt) { } }, + preprocess: { + dev: { + src : 'app/index.html', + dest : '.tmp/index.html', + options: { context: { dist: false } } + }, + dist: { + src : 'app/index.html', + dest : '.tmp/index.html', + options: { context: { dist: true } } + } + }, + // Reads HTML for usemin blocks to enable smart builds that automatically // concat, minify and revision files. Creates configurations in memory so // additional tasks can operate on them useminPrepare: { - html: 'app/index.html', + html: '.tmp/index.html', options: { dest: 'dist' } @@ -101,10 +114,16 @@ module.exports = function (grunt) { cwd: 'app', dest: 'dist', src: [ - 'index.html', 'server.js', 'fonts/**/*.{eot,svg,ttf,woff}' ] + }, { + expand: true, + cwd: '.tmp', + dest: 'dist', + src: [ + 'index.html' + ] }] } }, @@ -158,6 +177,7 @@ module.exports = function (grunt) { grunt.task.run([ 'clean:dev', 'env:dev', + 'preprocess:dev', 'concurrent:dev', 'server:dev', 'watch' @@ -166,6 +186,7 @@ module.exports = function (grunt) { grunt.registerTask('build', [ 'clean:dist', + 'preprocess:dist', 'useminPrepare', 'concurrent:dist', 'concat', diff --git a/app/index.html b/app/index.html index 51af293..3c45f6e 100644 --- a/app/index.html +++ b/app/index.html @@ -28,20 +28,26 @@
- - - - + - - - + + + + + + + + + + + + diff --git a/app/scripts/app/lib/webrtc.js b/app/scripts/app/lib/webrtc.js index 5965ab2..dc9d384 100644 --- a/app/scripts/app/lib/webrtc.js +++ b/app/scripts/app/lib/webrtc.js @@ -1,5 +1,8 @@ -// TODO: provide TURN server config +window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; +window.URL = window.URL || window.webkitURL; +// TODO: provide TURN server config +// once it's possible to create rooms with custom names. FileDrop.WebRTC = function (options) { this.conn = new Peer({ // PeerJS client library host: 'file-drop-peer-server.herokuapp.com', diff --git a/app/scripts/app/templates/components/confirm-popover.hbs b/app/scripts/app/templates/components/confirm-popover.hbs index 0e6955e..2b880e1 100644 --- a/app/scripts/app/templates/components/confirm-popover.hbs +++ b/app/scripts/app/templates/components/confirm-popover.hbs @@ -4,7 +4,13 @@{{yield}}
- - + + {{#if cancel-button-label}} + + {{/if}} + + {{#if confirm-button-label}} + + {{/if}}