-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
181 lines (176 loc) · 8.38 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE html>
<html ng-app="pomodoroApp">
<head>
<title>番茄时间</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link type="image/x-icon" rel="icon" href="favicon.ico">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet">
<link href="css/customized.css" rel="stylesheet">
<script src="js/lib/angular.min.js"></script>
<script src="js/lib/angular-round-progress-directive.js"></script>
<script src="js/lib/modal.js"></script>
<script src="js/lib/piecon.min.js"></script>
<script>
(function(){
Piecon.setOptions({
fallback: 'force',
color: '#12eeb9',
background: '#505769'
});
Piecon.reset();
})();
</script>
<script src="js/application.js"></script>
<script src="js/controllers.js"></script>
</head>
<body ng-controller="pomodoroController">
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#">番茄时间</a>
</div>
<form class="navbar-form navbar-right">
<span>桌面提醒</span>
<div class="form-group">
<div class="onoffswitch">
<input type="checkbox" name="onoffswitch" class="onoffswitch-checkbox" id="myonoffswitch" ng-click="requestNotificationPermission()">
<label class="onoffswitch-label" for="myonoffswitch">
<div class="onoffswitch-inner"></div>
<div class="onoffswitch-switch"></div>
</label>
</div>
</div>
</form>
</div>
</nav>
<div class="container">
<div class="row">
<div class="stage col-md-6 col-xs-12">
<div class="timer-container">
<div ang:round:progress data-round-progress-model="timerStatus"
data-round-progress-width="450"
data-round-progress-height="450"
data-round-progress-outer-circle-width="30"
data-round-progress-inner-circle-width="5"
data-round-progress-outer-circle-radius="180"
data-round-progress-inner-circle-radius="140"
data-round-progress-label-font="60pt Arial"
data-round-progress-outer-circle-background-color="#505769"
data-round-progress-outer-circle-foreground-color="#12eeb9"
data-round-progress-inner-circle-color="#505769"
data-round-progress-label-color="#fff">
</div>
</div>
<div class="active-task">
<div class="bs-callout bs-callout-info" ng-show="activeTask">
<h4>{{ activeTask.title }}</h4>
<p>{{ activeTask.description }}</p>
</div>
<button class="btn btn-danger" ng-show="activeTask" ng-click="breakActiveTask()">中断当前番茄钟</button>
</div>
</div>
<div class="col-md-3 col-xs-12" ng-controller="pomodoroTasksController">
<div class="well well-sm">今日任务列表</div>
<ul class="list-unstyled task-list today-task-list">
<li class="task panel panel-success" ng-repeat="task in allTasks.unfinished | filter:{today:true}">
<div class="task-heading panel-heading">
<div class="task-title panel-title">
{{ task.title }}
</div>
<div class="task-operation-container">
<button type="button" class="btn btn-success btn-xs" ng-click="startTask(task)"><i class="fa fa-play"></i></button>
<button type="button" class="btn btn-warning btn-xs" ng-click="task.today=false"><i class="fa fa-share"></i></button>
<button type="button" class="btn btn-danger btn-xs" ng-click="removeTask(task)"><i class="fa fa-trash-o"></i></button>
</div>
</div>
<div class="task-details panel-body">
<div class="task-description">
{{ task.description }}
</div>
</div>
<div class="task-pomodoros panel-footer">
<img src="./image/tomato.png" ng-repeat="t in getTimes(task.used_pomodoro) track by $index">
</div>
</li>
</ul>
<div ng-show="openNewTaskForm" class="new-task-form">
<div class="form-group">
<input type="text" class="form-control" ng-model="newTask.title" placeholder="任务名称">
</div>
<div class="form-group">
<textarea class="form-control" rows="3" ng-model="newTask.description" placeholder="描述/备注"></textarea>
</div>
<div class="form-group">
<button class="btn btn-sm btn-success" ng-click="addTask(true)">添加</button>
<button class="btn btn-sm btn-danger" ng-click="openNewTaskForm=false;newTask.title=''">取消</button>
</div>
</div>
<h4 ng-hide="openNewTaskForm">
<small class="open-new-task-form" ng-click="openNewTaskForm=true">添加新任务...</small>
</h4>
</div>
<div class="col-md-3 col-xs-12" ng-controller="pomodoroTasksController">
<div class="well well-sm">候选任务列表</div>
<ul class="list-unstyled task-list">
<li class="task panel panel-primary" ng-repeat="task in allTasks.unfinished | filter:{today:false}">
<div class="task-heading panel-heading">
<div class="task-title panel-title">
{{ task.title }}
</div>
<div class="task-operation-container">
<button type="button" class="btn btn-warning btn-xs" ng-click="task.today=true"><i class="fa fa-reply"></i></button>
<button type="button" class="btn btn-danger btn-xs" ng-click="removeTask(task)"><i class="fa fa-trash-o"></i></button>
</div>
</div>
<div class="task-details panel-body">
<div class="task-description">
{{ task.description }}
</div>
</div>
<div class="task-pomodoros panel-footer">
<img src="./image/tomato.png" ng-repeat="t in getTimes(task.used_pomodoro) track by $index">
</div>
</li>
</ul>
<div ng-show="openNewTaskForm" class="new-task-form">
<div class="form-group">
<input type="text" class="form-control" ng-model="newTask.title" placeholder="任务名称">
</div>
<div class="form-group">
<textarea class="form-control" rows="3" ng-model="newTask.description" placeholder="描述/备注"></textarea>
</div>
<div class="form-group">
<button class="btn btn-sm btn-success" ng-click="addTask(false)">添加</button>
<button class="btn btn-sm btn-danger" ng-click="openNewTaskForm=false;newTask.title=''">取消</button>
</div>
</div>
<h4 ng-hide="openNewTaskForm" class="new-task-link">
<small class="open-new-task-form" ng-click="openNewTaskForm=true">添加新任务...</small>
</h4>
</div>
</div>
</div>
<script type="text/ng-template" id="askForFinishStatus.html">
<div class="modal-header">
<h4>恭喜你,成功完成了一个番茄钟!</h4>
</div>
<div class="modal-body">
休息一下吧 ^_^
<h3 class="pull-right">已经完成该任务?</h3>
</div>
<div class="modal-footer">
<button class="btn btn-success" ng-click="close(true)">是的,我已完成</button>
<button class="btn btn-warning" ng-click="close(false)">没有,我还需要更多番茄钟</button>
</div>
</script>
<footer>
<p>
<a href="https://github.com/loveky/pomodoro-time">Project</a> ·
<a href="https://github.com/loveky/pomodoro-time/issues">Feedback</a>
</p>
<p>built by <a href="https://github.com/loveky">@loveky</a></p>
</footer>
</body>
</html>