diff --git a/html5/verto/verto_communicator/.gitignore b/html5/verto/verto_communicator/.gitignore index 7274d6169c..b45b61e6c1 100644 --- a/html5/verto/verto_communicator/.gitignore +++ b/html5/verto/verto_communicator/.gitignore @@ -2,3 +2,4 @@ dist/ .tmp/ bower_components/ node_modules/ +src/vertoControllers/controllers/AboutController.js diff --git a/html5/verto/verto_communicator/Gruntfile.js b/html5/verto/verto_communicator/Gruntfile.js index 4fc5966ee0..4d2174ac9d 100644 --- a/html5/verto/verto_communicator/Gruntfile.js +++ b/html5/verto/verto_communicator/Gruntfile.js @@ -63,6 +63,26 @@ module.exports = function (grunt) { } }, + revision: { + options: { + property: 'meta.revision', + ref: 'HEAD', + short: true + } + }, + + preprocess: { + options: { + context: { + revision: '<%= meta.revision %>' + } + }, + js: { + src: 'src/vertoControllers/controllers/AboutController.source.js', + dest: 'src/vertoControllers/controllers/AboutController.js' + }, + }, + postcss: { options: { map: true, @@ -286,6 +306,7 @@ module.exports = function (grunt) { '*.html', '*.json', 'partials/**/*.html', + 'img/*.png', 'images/{,*/}*.{webp}', 'css/fonts/{,*/}*.*', 'sounds/*.*' @@ -327,6 +348,9 @@ module.exports = function (grunt) { }, }); + grunt.loadNpmTasks('grunt-git-revision'); + grunt.loadNpmTasks('grunt-preprocess'); + grunt.registerTask('serve', function (target) { var tasks = [ 'wiredep', @@ -339,9 +363,13 @@ module.exports = function (grunt) { grunt.task.run(tasks); }); + + grunt.registerTask('default', ['build']); grunt.registerTask('build', [ 'clean:dist', + 'revision', + 'preprocess', 'wiredep', 'useminPrepare', 'concurrent:dist', diff --git a/html5/verto/verto_communicator/package.json b/html5/verto/verto_communicator/package.json index 34b861bf47..b2b0502a55 100644 --- a/html5/verto/verto_communicator/package.json +++ b/html5/verto/verto_communicator/package.json @@ -19,6 +19,8 @@ "grunt-contrib-jshint": "^0.11.0", "grunt-contrib-uglify": "^0.7.0", "grunt-contrib-watch": "latest", + "grunt-preprocess": "latest", + "grunt-git-revision": "latest", "grunt-filerev": "^2.1.2", "grunt-newer": "^1.1.0", "grunt-ng-annotate": "^0.9.2", diff --git a/html5/verto/verto_communicator/src/contributors.txt b/html5/verto/verto_communicator/src/contributors.txt index bc309438b2..7665f76cb0 100644 --- a/html5/verto/verto_communicator/src/contributors.txt +++ b/html5/verto/verto_communicator/src/contributors.txt @@ -3,5 +3,6 @@ "Ítalo Rossi ", "Stefan Yohansson ", "João Mesquita ", - "Ken Rice " + "Ken Rice ", + "Brian West " ] diff --git a/html5/verto/verto_communicator/src/img/fs_logo_small.png b/html5/verto/verto_communicator/src/img/fs_logo_small.png new file mode 100644 index 0000000000..a875564480 Binary files /dev/null and b/html5/verto/verto_communicator/src/img/fs_logo_small.png differ diff --git a/html5/verto/verto_communicator/src/img/vc_logo.png b/html5/verto/verto_communicator/src/img/vc_logo.png new file mode 100644 index 0000000000..27972c5a9b Binary files /dev/null and b/html5/verto/verto_communicator/src/img/vc_logo.png differ diff --git a/html5/verto/verto_communicator/src/index.html b/html5/verto/verto_communicator/src/index.html index ba8b790c2e..3727a866c2 100644 --- a/html5/verto/verto_communicator/src/index.html +++ b/html5/verto/verto_communicator/src/index.html @@ -102,6 +102,7 @@ + diff --git a/html5/verto/verto_communicator/src/partials/about.html b/html5/verto/verto_communicator/src/partials/about.html new file mode 100644 index 0000000000..97ff126660 --- /dev/null +++ b/html5/verto/verto_communicator/src/partials/about.html @@ -0,0 +1,22 @@ + + + + diff --git a/html5/verto/verto_communicator/src/partials/menu.html b/html5/verto/verto_communicator/src/partials/menu.html index f0adc3f24d..b14aad0061 100644 --- a/html5/verto/verto_communicator/src/partials/menu.html +++ b/html5/verto/verto_communicator/src/partials/menu.html @@ -58,9 +58,15 @@ diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/AboutController.source.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/AboutController.source.js new file mode 100644 index 0000000000..83b8a489cb --- /dev/null +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/AboutController.source.js @@ -0,0 +1,23 @@ +(function() { + 'use strict'; + + angular + .module('vertoControllers') + .controller('AboutController', ['$scope', '$http', + 'toastr', + function($scope, $http, toastr) { + var githash = '/* @echo revision */' || 'something is not right'; + $scope.githash = githash; + + /* leave this here for later, but its not needed right now + $http.get(window.location.pathname + '/contributors.txt') + .success(function(data) { + + }) + .error(function() { + toastr.error('contributors not found.'); + }); + */ + } + ]); +})(); diff --git a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js index ded1689e24..1b8e58391e 100644 --- a/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js +++ b/html5/verto/verto_communicator/src/vertoControllers/controllers/MainController.js @@ -152,6 +152,10 @@ }; + $scope.showAbout = function() { + $scope.openModal('partials/about.html', 'AboutController'); + }; + $scope.showContributors = function() { $scope.openModal('partials/contributors.html', 'ContributorsController'); };