Skip to content

Commit 26b19ca

Browse files
authored
Merge pull request #4 from afbora/jsstore
v2
2 parents ab8f1b0 + 5f648bd commit 26b19ca

18 files changed

Lines changed: 9751 additions & 759 deletions

Gulpfile.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,27 @@
1-
var gulp = require("gulp"), gutil = require("gulp-util");
1+
let gulp = require("gulp"),
2+
gutil = require("gulp-util"),
3+
coffee = require("gulp-coffee"),
4+
uglify = require('gulp-uglify'),
5+
less = require("gulp-less"),
6+
concat = require("gulp-concat"),
7+
zip = require("gulp-zip"),
8+
path = require("path");
29

3-
var coffee = require("gulp-coffee"),
4-
uglify = require('gulp-uglify'),
5-
less = require("gulp-less"),
6-
concat = require("gulp-concat"),
7-
zip = require("gulp-zip");
8-
path = require('path');
910

1011
gulp.task("zip", function () {
11-
return gulp.src([
12-
'css/*',
13-
'img/*',
14-
'js/*',
15-
'manifest.json',
16-
'popup.html',
17-
'stt128x128.png',
18-
'stt32x32.png'
19-
], {base: "."})
20-
.pipe(zip('simple_time_tracker.zip'))
21-
.pipe(gulp.dest('dist'));
12+
return gulp
13+
.src(
14+
[
15+
'css/*',
16+
'img/*',
17+
'js/*',
18+
'manifest.json',
19+
'popup.html',
20+
'stt128x128.png',
21+
'stt32x32.png'
22+
],
23+
{base: "."}
24+
)
25+
.pipe(zip('simple_time_tracker.zip'))
26+
.pipe(gulp.dest('dist'));
2227
});
23-
24-
gulp.task("default", ["zip"]);

build.xml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project basedir=".">
3-
<target name="build.app">
4-
<zip destfile="simple_time_tracker.zip">
5-
<zipfileset dir="css" prefix="css"/>
6-
<zipfileset dir="img" prefix="img"/>
7-
<zipfileset dir="js" prefix="js"/>
8-
<zipfileset file="manifest.json" />
9-
<zipfileset file="popup.html" />
10-
<zipfileset file="readme.txt" />
11-
<zipfileset file="stt128x128.png" />
12-
<zipfileset file="stt32x32.png" />
13-
</zip>
14-
</target>
15-
</project>
3+
<target name="build.app">
4+
<zip destfile="simple_time_tracker.zip">
5+
<zipfileset dir="css" prefix="css"/>
6+
<zipfileset dir="img" prefix="img"/>
7+
<zipfileset dir="js" prefix="js"/>
8+
<zipfileset file="manifest.json"/>
9+
<zipfileset file="popup.html"/>
10+
<zipfileset file="readme.txt"/>
11+
<zipfileset file="stt128x128.png"/>
12+
<zipfileset file="stt32x32.png"/>
13+
</zip>
14+
</target>
15+
</project>

css/options.css

Whitespace-only changes.

css/style.css

Lines changed: 60 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ a {
1818
color: #555;
1919
}
2020

21+
*, ::after, ::before {
22+
box-sizing: border-box;
23+
}
24+
2125
/* top bar
2226
----------------------------------------------------------------------------- */
2327

@@ -29,20 +33,20 @@ a {
2933
}
3034

3135
#bar .reset-all {
32-
float: right!important;
36+
float: right !important;
3337
margin-left: 5px;
3438
}
3539

3640
#bar .remove-all {
37-
float: right!important;
41+
float: right !important;
3842
}
3943

4044
#bar .create {
41-
float: left!important;
45+
float: left !important;
4246
}
4347

4448
#bar .export-all {
45-
float: left!important;
49+
float: left !important;
4650
margin-left: 5px;
4751
}
4852

@@ -76,7 +80,6 @@ input[type=submit],
7680
padding: 0 10px;
7781
font-weight: bold;
7882
line-height: 28px;
79-
border-radius: 3px;
8083
background-color: #fff;
8184
border-radius: 2px;
8285
float: left;
@@ -96,12 +99,12 @@ input[type=submit]:hover,
9699
}
97100

98101
p.buttons {
99-
padding: 1em 2em!important;
102+
padding: 1em !important;
100103
overflow: hidden;
101104
}
102105

103106
.cancel {
104-
float: right!important;
107+
float: right !important;
105108
}
106109

107110
#button-remove-all,
@@ -113,34 +116,45 @@ p.buttons {
113116
/* forms and inputs
114117
----------------------------------------------------------------------------- */
115118

116-
input[type=text] {
119+
input[type=text],
120+
textarea {
117121
border: solid 1px #D6D6BE;
118122
background-color: #fcfff4;
119-
padding: 3px 5px;
120-
width: 96%;
121-
font-size: 16px;
123+
padding: .25rem;
124+
width: 100%;
125+
font-size: 14px;
122126
-webkit-border-radius: 2px;
123127
margin: 0 auto;
124128
display: block;
129+
resize: none;
125130
}
126131

127-
input[type=text]:focus {
132+
input[type=text]:focus,
133+
textarea:focus {
128134
border: solid 1px #fff286;
129135
background-color: #fff;
130136
}
131137

132138
.form {
133139
overflow-y: auto;
140+
padding: .5rem;
141+
}
142+
143+
.form > div {
144+
margin-bottom: .75rem;
134145
}
135146

136147
.form label {
137-
width: calc(100% - 120px);
138-
padding-right: 120px;
139-
/* prevent timer clipping task name */
148+
width: 100%;
140149
display: block;
141150
font-weight: bold;
142151
text-align: left;
143-
font-size: 16px;
152+
font-size: 14px;
153+
margin-bottom: 0.1rem;
154+
}
155+
156+
.form label.title {
157+
margin-bottom: 0.2rem;
144158
}
145159

146160
.form label small {
@@ -152,52 +166,53 @@ input[type=text]:focus {
152166

153167
#content {
154168
overflow: hidden;
155-
text-align: center!important;
156-
}
157-
158-
#content p {
159-
margin: 0;
160-
padding: 10px;
169+
text-align: center !important;
161170
}
162171

163172
/* item
164173
----------------------------------------------------------------------------- */
165174

166-
.item {
175+
#form-list .item {
167176
text-align: left;
168-
border-bottom: solid 1px #eee;
169-
padding: 14px 12px!important;
177+
padding: .75rem .5rem;
170178
position: relative;
171179
background: #fff;
172180
display: block;
173181
overflow: hidden;
174182
}
175183

176-
.item a.power {
177-
right: 3px;
184+
#form-list .item:not(:last-child) {
185+
border-bottom: solid 1px #eee;
186+
}
187+
188+
#form-list .item:last-child {
189+
margin-bottom: 0;
190+
}
191+
192+
#form-list .item a.power {
178193
width: 72px;
179-
padding-right: 16px;
180194
display: block;
181195
position: absolute;
182196
top: 0;
183-
right: 0;
197+
right: .25rem;
184198
bottom: 0;
185199
background: url(../img/play.png) right center no-repeat;
186200
background-origin: content-box;
187201
}
188202

189-
.item a.running {
203+
#form-list .item a.running {
190204
background-image: url(../img/pause.png);
191205
}
192206

193-
.item span.timer {
207+
#form-list .item span.timer {
194208
position: absolute;
195-
right: 50px;
196-
top: 28px;
197-
font-size: 17px;
209+
right: 2rem;
210+
top: 50%;
211+
transform: translateY(-50%);
212+
font-size: 18px;
198213
}
199214

200-
p.running {
215+
#form-list .running {
201216
background-color: #eaffd6;
202217
}
203218

@@ -223,7 +238,7 @@ p.remove-confirm {
223238
font-weight: bold;
224239
line-height: 1.2em;
225240
margin: 0;
226-
padding: 1em 0!important;
241+
padding: 1em 0 !important;
227242
font-style: italic;
228243
font-size: 13px;
229244
}
@@ -256,4 +271,12 @@ p.remove-confirm strong {
256271

257272
#footer span#total-time {
258273
float: right;
259-
}
274+
}
275+
276+
/* error
277+
----------------------------------------------------------------------------- */
278+
#form-error {
279+
background-color: #f8d7da;
280+
margin: .5rem .75rem;
281+
font-size: .75rem;
282+
}

js/init.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
$(function () {
2-
taskInterface.init();
1+
$(async function () {
2+
await taskInterface.init();
33

4-
// show current version
5-
$.getJSON(chrome.extension.getURL('/manifest.json'), function (manifest) {
6-
$('#version').text(manifest.version);
7-
});
8-
});
4+
// show current version
5+
$.getJSON(chrome.runtime.getURL('/manifest.json'), function (manifest) {
6+
$('#version').text(manifest.version);
7+
});
8+
});

js/jquery-1.6.4.min.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

js/jquery.min.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jsstore.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/jsstore.worker.min.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/options.js

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)