提交 f2c7bf60 authored 作者: Ken Rice's avatar Ken Rice

Merge pull request #536 in FS/freeswitch from feature/vc-help-about to master

* commit 'c1736915':
  FS-8288 About Screen and Help link
...@@ -2,3 +2,4 @@ dist/ ...@@ -2,3 +2,4 @@ dist/
.tmp/ .tmp/
bower_components/ bower_components/
node_modules/ node_modules/
src/vertoControllers/controllers/AboutController.js
...@@ -63,6 +63,26 @@ module.exports = function (grunt) { ...@@ -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: { postcss: {
options: { options: {
map: true, map: true,
...@@ -286,6 +306,7 @@ module.exports = function (grunt) { ...@@ -286,6 +306,7 @@ module.exports = function (grunt) {
'*.html', '*.html',
'*.json', '*.json',
'partials/**/*.html', 'partials/**/*.html',
'img/*.png',
'images/{,*/}*.{webp}', 'images/{,*/}*.{webp}',
'css/fonts/{,*/}*.*', 'css/fonts/{,*/}*.*',
'sounds/*.*' 'sounds/*.*'
...@@ -327,6 +348,9 @@ module.exports = function (grunt) { ...@@ -327,6 +348,9 @@ module.exports = function (grunt) {
}, },
}); });
grunt.loadNpmTasks('grunt-git-revision');
grunt.loadNpmTasks('grunt-preprocess');
grunt.registerTask('serve', function (target) { grunt.registerTask('serve', function (target) {
var tasks = [ var tasks = [
'wiredep', 'wiredep',
...@@ -340,8 +364,12 @@ module.exports = function (grunt) { ...@@ -340,8 +364,12 @@ module.exports = function (grunt) {
grunt.task.run(tasks); grunt.task.run(tasks);
}); });
grunt.registerTask('default', ['build']);
grunt.registerTask('build', [ grunt.registerTask('build', [
'clean:dist', 'clean:dist',
'revision',
'preprocess',
'wiredep', 'wiredep',
'useminPrepare', 'useminPrepare',
'concurrent:dist', 'concurrent:dist',
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
"grunt-contrib-jshint": "^0.11.0", "grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-uglify": "^0.7.0", "grunt-contrib-uglify": "^0.7.0",
"grunt-contrib-watch": "latest", "grunt-contrib-watch": "latest",
"grunt-preprocess": "latest",
"grunt-git-revision": "latest",
"grunt-filerev": "^2.1.2", "grunt-filerev": "^2.1.2",
"grunt-newer": "^1.1.0", "grunt-newer": "^1.1.0",
"grunt-ng-annotate": "^0.9.2", "grunt-ng-annotate": "^0.9.2",
......
...@@ -3,5 +3,6 @@ ...@@ -3,5 +3,6 @@
"Ítalo Rossi <italo@evolux.net.br>", "Ítalo Rossi <italo@evolux.net.br>",
"Stefan Yohansson <stefan@evolux.net.br>", "Stefan Yohansson <stefan@evolux.net.br>",
"João Mesquita <jmesquita@indicium.com.ar>", "João Mesquita <jmesquita@indicium.com.ar>",
"Ken Rice <krice@freeswitch.org>" "Ken Rice <krice@freeswitch.org>",
"Brian West <brian@freeswitch.org>"
] ]
...@@ -102,6 +102,7 @@ ...@@ -102,6 +102,7 @@
<script type="text/javascript" src="src/vertoControllers/controllers/BrowserUpgradeController.js"></script> <script type="text/javascript" src="src/vertoControllers/controllers/BrowserUpgradeController.js"></script>
<script type="text/javascript" src="src/vertoControllers/controllers/ChatController.js"></script> <script type="text/javascript" src="src/vertoControllers/controllers/ChatController.js"></script>
<script type="text/javascript" src="src/vertoControllers/controllers/ContributorsController.js"></script> <script type="text/javascript" src="src/vertoControllers/controllers/ContributorsController.js"></script>
<script type="text/javascript" src="src/vertoControllers/controllers/AboutController.js"></script>
<script type="text/javascript" src="src/vertoControllers/controllers/DialPadController.js"></script> <script type="text/javascript" src="src/vertoControllers/controllers/DialPadController.js"></script>
<script type="text/javascript" src="src/vertoControllers/controllers/InCallController.js"></script> <script type="text/javascript" src="src/vertoControllers/controllers/InCallController.js"></script>
<script type="text/javascript" src="src/vertoControllers/controllers/LoginController.js"></script> <script type="text/javascript" src="src/vertoControllers/controllers/LoginController.js"></script>
......
<div class="modal-header">
</div>
<div class="modal-body">
<ul class="contributors">
<li>
<div class="clearfix"><img src="img/vc_logo.png"></div>
</li>
<li>
<div class="clearfix">Version: 0.1.0</div>
</li>
<li>
<div class="clearfix">Git Rev: {{ githash }}</div>
</li>
<li>
<div class="clearfix">Powered By: <a href="https://freeswitch.org/" target="_blank"><img src="img/fs_logo_small.png" height="30"></a></div>
</li>
</ul>
</div>
<div class="modal-footer">
</div>
...@@ -58,9 +58,15 @@ ...@@ -58,9 +58,15 @@
</ul> </ul>
</li> </li>
<li class="navbar-item-icon"> <li class="navbar-item-icon">
<a href="" ng-click="showContributors()"> <a href="" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<i class="mdi-action-loyalty"></i> <i class="mdi-action-loyalty"></i>
<span class="caret"></span>
</a> </a>
<ul class="dropdown-menu" role="menu">
<li><a href="" ng-click="showAbout()">About</a></li>
<li><a href="" ng-click="showContributors()">Contributors</a></li>
<li><a href="https://freeswitch.org/confluence/x/MQCT" target="_blank">Help</a></li>
</ul>
</li> </li>
</ul> </ul>
......
(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.');
});
*/
}
]);
})();
...@@ -152,6 +152,10 @@ ...@@ -152,6 +152,10 @@
}; };
$scope.showAbout = function() {
$scope.openModal('partials/about.html', 'AboutController');
};
$scope.showContributors = function() { $scope.showContributors = function() {
$scope.openModal('partials/contributors.html', 'ContributorsController'); $scope.openModal('partials/contributors.html', 'ContributorsController');
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论