From 1bfdc2af456b9b22d4d7c14837c31fcc2573a5d4 Mon Sep 17 00:00:00 2001 From: nau Date: Tue, 6 Sep 2016 17:46:33 +0200 Subject: [PATCH] interface redistributed, user side panel added --- server.js | 2 +- webapp/controllers.js | 7 +- webapp/index.html | 158 +++++++++++++++++++++++------------------- webapp/own.css | 8 +++ 4 files changed, 102 insertions(+), 73 deletions(-) diff --git a/server.js b/server.js index 62099d6..bb88fa4 100755 --- a/server.js +++ b/server.js @@ -38,7 +38,7 @@ router.get('/', function(req, res) { res.send("Hello world!"); }); app.use(router);*/ -app.use(express.static(__dirname + '/web')); +app.use(express.static(__dirname + '/webapp')); //CORS diff --git a/webapp/controllers.js b/webapp/controllers.js index 74c9d32..4950445 100644 --- a/webapp/controllers.js +++ b/webapp/controllers.js @@ -4,7 +4,12 @@ angular.module('workApp', ['chart.js']) $scope, $interval ) { - $scope.username="user"; + $scope.user={ + username: "Arnau", + avatar: "toucan", + github: "https://github.com/idoctnef", + totalWorkedTime: 4520 + }; //localStorage.clear(); $scope.working=false; $scope.projects=[]; diff --git a/webapp/index.html b/webapp/index.html index 73e1327..5feb91b 100644 --- a/webapp/index.html +++ b/webapp/index.html @@ -23,7 +23,7 @@ -
-
-
-
- Projects -
- -
-
- -
-
- +
+
+ +
+ +

{{user.username}}

+
+

+ Users's github: {{user.github}} +

+

+ Total worked time: {{user.totalWorkedTime | secondsToDateTime | date:'HH:mm'}}h +

+
+ + +
+
+ -
-
- - + + {{project.title}} +

{{project.totaltime | secondsToDateTime | date:'HH:mm:ss'}}

+ +
-
- - +
+
+ + +
+
+ + +
+ Add new project +
+
+
+ + +
+
+ + +
+ Cancel + Update project
- Add new project
-
-
- - + +
+
+ + + {{currentproject.title}} + +

+ Total time: {{currentproject.totaltime | secondsToDateTime | date:'HH:mm:ss'}} +

+

+ Current strike time: {{currentStrike | secondsToDateTime | date:'HH:mm:ss'}} +

+
-
- - +
+ Work! + Stop! + +
- Cancel - Update project -
-
+
+
+ + + -
-
+
+
+
- - {{currentproject.title}} + Select a project -

- Total time: {{currentproject.totaltime | secondsToDateTime | date:'HH:mm:ss'}} -

-

- Current strike time: {{currentStrike | secondsToDateTime | date:'HH:mm:ss'}} -

-
-
- Work! - Stop! - -
-
-
- - - -
-
- - Select a project - -
- -
- diff --git a/webapp/own.css b/webapp/own.css index e379daf..d55ee0e 100644 --- a/webapp/own.css +++ b/webapp/own.css @@ -18,3 +18,11 @@ .o_float_right{ float: right; } + +.o_user_title{ + width: 70%; + max-width: 150px; + margin-top: 20px; + margin-left: auto; + margin-right: auto; +}