style mods to the login page

This commit is contained in:
Brad Rydzewski 2014-07-13 20:24:03 -07:00
parent 67b7803a4e
commit 7d446459d3
5 changed files with 26 additions and 11 deletions

View file

@ -14,7 +14,7 @@ Some of the fundamental changes include
5. github, bitbucket, etc native permissions are used. No more teams or permissions in Drone 5. github, bitbucket, etc native permissions are used. No more teams or permissions in Drone
6. github, bitbucket, etc authentication is used. No more drone password 6. github, bitbucket, etc authentication is used. No more drone password
7. github, bitbucket, etc repository data is cached upon login (and subsequent logins) 7. github, bitbucket, etc repository data is cached upon login (and subsequent logins)
8. angularjs user interface with modified reactive design 8. angularjs user interface with modified responsive design
... probably more that I'm forgetting ... probably more that I'm forgetting

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('app').controller("SetupController", function($scope, $http, $routeParams, $window) { angular.module('app').controller("SetupController", function($scope, $http, $routeParams, $window, $location) {
// create a remote that will be populated // create a remote that will be populated
// and persisted to the database. // and persisted to the database.
@ -24,17 +24,16 @@ angular.module('app').controller("SetupController", function($scope, $http, $rou
break; break;
} }
// todo(bradrydzewski) move this to the remote.js service.
$scope.save = function() { $scope.save = function() {
// request to create a new repository // request to create a new repository
$http({method: 'POST', url: '/v1/remotes', data: $scope.remote }). $http({method: 'POST', url: '/v1/remotes', data: $scope.remote }).
success(function(data, status, headers, config) { success(function(data, status, headers, config) {
delete $scope.failure; delete $scope.failure;
$scope.remote = data; $location.path("/login");
$window.location.href="/login/"+data.type;
}). }).
error(function(data, status, headers, config) { error(function(data, status, headers, config) {
$scope.failure = data; $scope.failure = data;
console.log('failure', $scope.failure);
}); });
}; };
}); });

View file

@ -2,8 +2,8 @@
angular.module('app').controller("SyncController", function($scope, $http, $interval, $location, users) { angular.module('app').controller("SyncController", function($scope, $http, $interval, $location, users) {
var stop = $interval(function() { var stop = $interval(function() {
// todo(bradrydzewski) We should poll the user to see // todo(bradrydzewski) We should poll the user to see if the
// if the sync process is complete. // sync process is complete, using the user.syncing variable.
$interval.cancel(stop); $interval.cancel(stop);
$location.path("/"); $location.path("/");
}, 5000); }, 5000);

View file

@ -1,3 +1,12 @@
<!--
minor modifications to the style that only apply to this view
-->
<style>
#container { padding-top: 155px; }
#header { height: 150px; }
.brand { margin-top:55px ; }
</style>
<article id="loginpage"> <article id="loginpage">
<div class="pure-g"> <div class="pure-g">
<div class="pure-u-1" ng-if="state == 1 && remotes.length != 0" ng-repeat="remote in remotes"> <div class="pure-u-1" ng-if="state == 1 && remotes.length != 0" ng-repeat="remote in remotes">

View file

@ -55,7 +55,6 @@ func main() {
log.SetPriority(log.LOG_NOTICE) log.SetPriority(log.LOG_NOTICE)
// parse command line flags
flag.StringVar(&port, "port", ":8080", "") flag.StringVar(&port, "port", ":8080", "")
flag.StringVar(&driver, "driver", "sqlite3", "") flag.StringVar(&driver, "driver", "sqlite3", "")
flag.StringVar(&datasource, "datasource", "drone.sqlite", "") flag.StringVar(&datasource, "datasource", "drone.sqlite", "")
@ -143,14 +142,22 @@ func main() {
} }
} }
func setupDatabase() { func init() {
} }
func setupQueue() { func init_flags() {
} }
func setupHandlers() { func init_database() {
}
func init_workers() {
}
func init_handlers() {
} }