You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
678 B

8 years ago
  1. angular.module('workApp', [])
  2. .controller('workController', function(
  3. $scope, $http
  4. ) {
  5. $scope.username="";
  6. if(localStorage.getItem('w_username')){
  7. $scope.username=localStorage.getItem('w_username');
  8. }
  9. $scope.onNew = function(){
  10. };
  11. $scope.openCode = function(){
  12. toastr.info("Visiting code");
  13. var urlCode="https://github.com/idoctnef/openworktime";
  14. if(typeof process !== 'undefined'){
  15. console.log(process.versions['electron']);
  16. const {shell} = require('electron');
  17. shell.openExternal(urlCode);
  18. }else{
  19. window.open(urlCode);
  20. }
  21. };
  22. });