From 7d446459d3107ae245a42a64d2f69a7206f3f536 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Sun, 13 Jul 2014 20:24:03 -0700 Subject: [PATCH] style mods to the login page --- README.md | 2 +- server/app/scripts/controllers/setup.js | 7 +++---- server/app/scripts/controllers/sync.js | 4 ++-- server/app/views/login.html | 9 +++++++++ server/main.go | 15 +++++++++++---- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 899f473db..a77b17299 100644 --- a/README.md +++ b/README.md @@ -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 6. github, bitbucket, etc authentication is used. No more drone password 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 diff --git a/server/app/scripts/controllers/setup.js b/server/app/scripts/controllers/setup.js index fd06ad0f8..b555dfe47 100644 --- a/server/app/scripts/controllers/setup.js +++ b/server/app/scripts/controllers/setup.js @@ -1,6 +1,6 @@ '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 // and persisted to the database. @@ -24,17 +24,16 @@ angular.module('app').controller("SetupController", function($scope, $http, $rou break; } + // todo(bradrydzewski) move this to the remote.js service. $scope.save = function() { // request to create a new repository $http({method: 'POST', url: '/v1/remotes', data: $scope.remote }). success(function(data, status, headers, config) { delete $scope.failure; - $scope.remote = data; - $window.location.href="/login/"+data.type; + $location.path("/login"); }). error(function(data, status, headers, config) { $scope.failure = data; - console.log('failure', $scope.failure); }); }; }); \ No newline at end of file diff --git a/server/app/scripts/controllers/sync.js b/server/app/scripts/controllers/sync.js index c6f9815dd..909f79aee 100644 --- a/server/app/scripts/controllers/sync.js +++ b/server/app/scripts/controllers/sync.js @@ -2,8 +2,8 @@ angular.module('app').controller("SyncController", function($scope, $http, $interval, $location, users) { var stop = $interval(function() { - // todo(bradrydzewski) We should poll the user to see - // if the sync process is complete. + // todo(bradrydzewski) We should poll the user to see if the + // sync process is complete, using the user.syncing variable. $interval.cancel(stop); $location.path("/"); }, 5000); diff --git a/server/app/views/login.html b/server/app/views/login.html index 8ed6996e2..8105d39cc 100644 --- a/server/app/views/login.html +++ b/server/app/views/login.html @@ -1,3 +1,12 @@ + + +
diff --git a/server/main.go b/server/main.go index ca0cd6432..f4ed6b9b7 100644 --- a/server/main.go +++ b/server/main.go @@ -55,7 +55,6 @@ func main() { log.SetPriority(log.LOG_NOTICE) - // parse command line flags flag.StringVar(&port, "port", ":8080", "") flag.StringVar(&driver, "driver", "sqlite3", "") 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() { }