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.

189 lines
8.9 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. <!DOCTYPE html>
  2. <html ng-app="workApp">
  3. <head>
  4. <!--Import Google Icon Font-->
  5. <link href="fonts/icons.css" rel="stylesheet">
  6. <!--Import materialize.css-->
  7. <link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
  8. <link type="text/css" rel="stylesheet" href="own.css"/>
  9. <!--Let browser know website is optimized for mobile-->
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  11. <title>Open Work Time - online version</title>
  12. </head>
  13. <body ng-controller="workController as work" class="grey lighten-2">
  14. <nav>
  15. <div class="nav-wrapper blue-grey darken-4">
  16. <a href="#" class="brand-logo">Open Work Time <small>- v0.1</small></a>
  17. <ul id="nav-mobile" class="right">
  18. <li>
  19. <a ng-click="openCode()" target="_blank">
  20. <i class="large material-icons" title="Visit code">code</i>
  21. </a>
  22. </li>
  23. <li>
  24. <a ng-click="deleteStorage()">
  25. <i class="large material-icons" title="Delete storage">info_outline</i>
  26. </a>
  27. </li>
  28. <li>
  29. <a ng-click="saveStorage()" title="Save all to storage">
  30. <i class="large material-icons">perm_identity</i>
  31. </a>
  32. </li>
  33. </ul>
  34. </div>
  35. </nav>
  36. <div class="row">
  37. <div class="col s12 m4 l2 blue-grey darken-3 white-text">
  38. <!-- Grey navigation panel -->
  39. <br>
  40. <div class="row">
  41. <div class="col s4">
  42. <img ng-src="img/avatars/{{user.avatar}}.png" alt="" class="circle responsive-img blue-grey lighten-5">
  43. </div>
  44. <div class="col s8">
  45. <h5>{{user.username}}</h5>
  46. </div>
  47. </div>
  48. <p>
  49. <a ng-href="{{user.github[1]}}" target="_blank">{{user.github[0]}}</a>
  50. </p>
  51. <p>
  52. <a ng-href="{{user.taiga[1]}}" target="_blank">{{user.taiga[0]}}</a>
  53. </p>
  54. <p>
  55. Total worked time: {{user.totalWorkedTime | secondsToDateTime | date:'HH:mm'}}h
  56. </p>
  57. <br/><br/><br/><br/><br/><br/><br/><br/>
  58. <br/><br/><br/><br/><br/><br/><br/><br/>
  59. <br/><br/><br/><br/><br/><br/><br/><br/>
  60. <br/><br/><br/><br/><br/><br/><br/><br/>
  61. </div>
  62. <div class="col s12 m8 l10">
  63. <div class="row">
  64. <div class="card white col s12 m12 l5">
  65. <div class="card-content">
  66. <span class="card-title">Projects</span>
  67. <div class="collection">
  68. <a href="#!" ng-click="projectSelect($index)" ng-repeat="project in projects" class="collection-item avatar white">
  69. <div class="right">
  70. <div class="waves-effect waves-light btn-floating indigo lighten-2" ng-click="editProject($index)">
  71. <i class="material-icons"><img src="img/edit.png" class="o_trash_icon" /></i>
  72. </div>
  73. <div class="waves-effect waves-light btn-floating deep-orange lighten-2" ng-click="removeProject($index)">
  74. <i class="material-icons"><img src="img/trash.png" class="o_trash_icon" /></i>
  75. </div>
  76. </div>
  77. <img ng-src="img/{{project.icon}}.png" class="circle"/>
  78. <span class="title">{{project.title}}</span>
  79. <p class="grey-text">{{project.totaltime | secondsToDateTime | date:'HH:mm:ss'}}</p>
  80. </a>
  81. </div>
  82. </div>
  83. <div class="card-action" ng-show="!editingProject">
  84. <div class="input-field col s6">
  85. <input ng-model="newproject.title" id="newprojectname" type="text" class="validate">
  86. <label for="newprojectname">New project name</label>
  87. </div>
  88. <div class="input-field col s6">
  89. <input ng-model="newproject.icon" id="icon" type="text" class="validate">
  90. <label for="icon">icon</label>
  91. </div>
  92. <a ng-click="addNewProject()" class="waves-effect waves-light btn blue-grey lighten-1 right">Add new project</a>
  93. </div>
  94. <div class="card-action" ng-show="editingProject">
  95. <div class="input-field col s6">
  96. <input ng-model="editingProject.title" id="newprojectname" value=" " type="text" class="validate">
  97. <label for="newprojectname">New project name</label>
  98. </div>
  99. <div class="input-field col s6">
  100. <input ng-model="editingProject.icon" id="icon" value=" " type="text" class="validate">
  101. <label for="icon">icon</label>
  102. </div>
  103. <a ng-click="cancelEditProject()" class="waves-effect waves-light btn red lighten-2">Cancel</a>
  104. <a ng-click="updateProject()" class="waves-effect waves-light btn blue lighten-2 right">Update project</a>
  105. </div>
  106. </div>
  107. <div ng-show="currentproject.title" class="card white col s12 m12 l7">
  108. <div class="card-content">
  109. <span class="card-title">
  110. <img ng-src="img/{{currentproject.icon}}.png" class="o_project_title_img"/>
  111. {{currentproject.title}}
  112. </span>
  113. <p>
  114. Total time: {{currentproject.totaltime | secondsToDateTime | date:'HH:mm:ss'}}
  115. </p>
  116. <p>
  117. Current strike time: <b>{{currentStrike | secondsToDateTime | date:'HH:mm:ss'}}</b>
  118. </p>
  119. </div>
  120. <div class="card-action">
  121. <a ng-click="btnWork()" ng-show="!working" class="waves-effect waves-light btn green lighten-2">Work!</a>
  122. <a ng-click="btnStop()" ng-show="working" class="waves-effect waves-light btn red lighten-2">Stop!</a>
  123. <!--<a class="waves-effect waves-light btn deep-orange lighten-2">Stop working!</a>-->
  124. </div>
  125. <div class="divider"></div>
  126. <div class="card-content">
  127. <!-- here the charts -->
  128. <canvas id="bar" class="chart chart-bar"
  129. chart-data="currentproject.chart.data" chart-labels="currentproject.chart.labels" chart-series="currentproject.chart.series">
  130. </canvas>
  131. </div>
  132. </div>
  133. <div ng-show="!currentproject.title" class="card white col s12 m12 l7" style="height: 200px;">
  134. <span class="card-title">
  135. Select a project
  136. </span>
  137. </div>
  138. </div><!-- </row -->
  139. </div>
  140. </div>
  141. <!-- ELECTRON
  142. Insert this line above script imports
  143. Works for both browser and electron with the same code -->
  144. <script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
  145. <!-- ANGULAR -->
  146. <script src="libraries/angular.min.js"></script>
  147. <!-- ANGULAR CHART JS -->
  148. <script src="node_modules/chart.js/dist/Chart.min.js"></script>
  149. <script src="node_modules/angular-chart.js/dist/angular-chart.min.js"></script>
  150. <!--Import jQuery before materialize.js-->
  151. <script type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
  152. <script type="text/javascript" src="js/materialize.min.js"></script>
  153. <script src="controllers.js"></script>
  154. <script src="libraries/toastr.js"></script>
  155. <link type="text/css" rel="stylesheet" href="libraries/toastr.css"/>
  156. <!-- ELECTRON
  157. Insert this line after script imports -->
  158. <script>if (window.module) module = window.module;</script>
  159. </body>
  160. </html>