Commit 4dfe41a71add0d25e399925539e9fb1efb0e5609

Authored by Leonardo Merlin
1 parent 62aaf55a

Small improvements

src/app/components/auth/auth.service.js
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 return service; 21 return service;
22 22
23 function login (credentials) { 23 function login (credentials) {
24 - var url = api.host + 'login'; 24 + var url = api.host + '/api/v1/login';
25 var encodedData = 'login=' + credentials.username + '&password=' + credentials.password; 25 var encodedData = 'login=' + credentials.username + '&password=' + credentials.password;
26 26
27 return $http 27 return $http
src/app/components/programa/programa.directive.js
@@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
6 .directive('programaBox', programaBox); 6 .directive('programaBox', programaBox);
7 7
8 /** @ngInject */ 8 /** @ngInject */
9 - function programaBox() { 9 + function programaBox(api) {
10 10
11 /** @ngInject */ 11 /** @ngInject */
12 function ProgramaController($log) { 12 function ProgramaController($log) {
@@ -37,7 +37,7 @@ @@ -37,7 +37,7 @@
37 ProgramaController.prototype.getImageUrl = function () { 37 ProgramaController.prototype.getImageUrl = function () {
38 var vm = this; 38 var vm = this;
39 39
40 - return 'http://login.dialoga.gov.br/' + vm.program.image.url; 40 + return api.host + vm.program.image.url;
41 }; 41 };
42 42
43 ProgramaController.prototype.getImageAlt = function () { 43 ProgramaController.prototype.getImageAlt = function () {
src/app/index.constants.js
@@ -6,8 +6,8 @@ @@ -6,8 +6,8 @@
6 .module('dialoga') 6 .module('dialoga')
7 .constant('api', { 7 .constant('api', {
8 token: null, 8 token: null,
9 - // host: 'http://login.dialoga.gov.br/api/v1/',  
10 - host: 'http://www.participa.br/api/v1/', 9 + host: 'http://hom.login.dialoga.gov.br',
  10 + // host: 'http://www.participa.br',
11 articleId: { 11 articleId: {
12 home: 103358 12 home: 103358
13 } 13 }
src/app/index.route.js
@@ -20,14 +20,26 @@ @@ -20,14 +20,26 @@
20 'footer': { templateUrl: 'app/partials/footer/footer.html' } 20 'footer': { templateUrl: 'app/partials/footer/footer.html' }
21 } 21 }
22 }) 22 })
23 - .state('login', {  
24 - url: '/login', 23 + .state('entrar', {
  24 + url: '/entrar',
25 views: { 25 views: {
26 'header': { templateUrl: 'app/partials/header/header.html' }, 26 'header': { templateUrl: 'app/partials/header/header.html' },
27 'main': { 27 'main': {
28 - templateUrl: 'app/partials/login/login.html',  
29 - controller: 'LoginController',  
30 - controllerAs: 'login' 28 + templateUrl: 'app/partials/auth/signin.html',
  29 + controller: 'AuthController',
  30 + controllerAs: 'signin'
  31 + },
  32 + 'footer': { templateUrl: 'app/partials/footer/footer.html' }
  33 + }
  34 + })
  35 + .state('cadastrar', {
  36 + url: '/cadastrar',
  37 + views: {
  38 + 'header': { templateUrl: 'app/partials/header/header.html' },
  39 + 'main': {
  40 + templateUrl: 'app/partials/auth/signup.html',
  41 + controller: 'AuthController',
  42 + controllerAs: 'signup'
31 }, 43 },
32 'footer': { templateUrl: 'app/partials/footer/footer.html' } 44 'footer': { templateUrl: 'app/partials/footer/footer.html' }
33 } 45 }
src/app/index.scss
@@ -12,6 +12,14 @@ $icon-font-path: "../../bower_components/bootstrap-sass-official/assets/fonts/bo @@ -12,6 +12,14 @@ $icon-font-path: "../../bower_components/bootstrap-sass-official/assets/fonts/bo
12 // bower:scss 12 // bower:scss
13 // endbower 13 // endbower
14 14
  15 +// -------------
  16 +// Variables
  17 +// -------------
  18 +
  19 +$gray: #f1f1f1;
  20 +
  21 +// -------------
  22 +
15 .skip-links a:focus { 23 .skip-links a:focus {
16 background-color: #fff !important; 24 background-color: #fff !important;
17 opacity: 1; 25 opacity: 1;