Skip to content

Commit 4d8e5ee

Browse files
authored
Merge pull request #291 from ActivityWatch/style-updates
2 parents 2003b52 + 651762a commit 4d8e5ee

10 files changed

Lines changed: 102 additions & 69 deletions

File tree

src/App.vue

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,57 @@
22
div#wrapper
33
aw-header
44

5-
div(:class="{'container': !fullContainer, 'container-fluid': fullContainer}").px-0.px-md-3
5+
div(:class="{'container': !fullContainer, 'container-fluid': fullContainer}").px-0.px-md-2
66
div.aw-container.my-3.p-3
77
error-boundary
88
user-satisfaction-poll
99
new-release-notification(v-if="isNewReleaseCheckEnabled")
1010
router-view
1111

12-
div.container(style="color: #555")
13-
div(style="float: left")
14-
div.mb-1
15-
| Made with by the #[a(href="http://activitywatch.net/contributors/") ActivityWatch developers]
12+
div.container(style="color: #555; font-size: 0.9em")
13+
div.mb-2
14+
// The heart emoji is red by default on most platforms, but not on all
15+
| Made with #[span(style="color: red")] by the #[a(href="http://activitywatch.net/contributors/") ActivityWatch developers]
1616
div
17-
a.mr-2(href="https://github.com/ActivityWatch/activitywatch", target="_blank")
18-
icon(name="brands/github")
19-
| GitHub
17+
span.mt-2(v-show="info", style="color: #888; font-size: 0.8em")
18+
span.mr-2
19+
b Host:
20+
|   {{info.hostname}}
21+
span
22+
b Version:
23+
|   {{info.version}}
24+
25+
div(style="font-size: 0.9em; opacity: 0.8")
26+
div.float-none.float-md-right.my-2
27+
a(href="https://github.com/ActivityWatch/activitywatch/issues/new/choose", target="_blank").mr-3
28+
icon(name="bug")
29+
| Report a bug
30+
a(href="https://forum.activitywatch.net/c/support", target="_blank").mr-3
31+
icon(name="question-circle")
32+
| Ask for help
33+
a(href="https://forum.activitywatch.net/c/features", target="_blank")
34+
icon(name="vote-yea")
35+
| Vote on features
36+
div.float-none.float-md-left.my-2
2037
a(href="https://twitter.com/ActivityWatchIt", target="_blank")
2138
icon(name="brands/twitter")
2239
| Twitter
23-
24-
div(style="float: right; text-align: right;")
25-
| Found a bug? #[a(href="https://github.com/ActivityWatch/activitywatch/issues/new/choose") File an issue]
26-
br
27-
| Need help? #[a(href="https://forum.activitywatch.net/c/support") Ask on the forum]
28-
br
29-
| Missing a feature? #[a(href="https://forum.activitywatch.net/c/features") Vote on the forum]
30-
br
31-
| Built something cool? #[a(href="https://forum.activitywatch.net/c/projects") Share it on the forum]
32-
br
33-
span.mt-2(v-show="info", style="color: #888; font-size: 0.8em")
34-
| Host: {{info.hostname}}
35-
br
36-
| Version: {{info.version}}
40+
a(href="https://github.com/ActivityWatch", target="_blank").ml-3
41+
icon(name="brands/github")
42+
| GitHub
43+
a(href="https://activitywatch.net/donate/", target="_blank").ml-3
44+
icon(name="hand-holding-heart")
45+
| Donate
3746
</template>
3847

3948
<script>
4049
// only import the icons you use to reduce bundle size
4150
import 'vue-awesome/icons/brands/twitter';
4251
import 'vue-awesome/icons/brands/github';
52+
import 'vue-awesome/icons/hand-holding-heart';
53+
import 'vue-awesome/icons/vote-yea';
54+
import 'vue-awesome/icons/question-circle';
55+
import 'vue-awesome/icons/bug';
4356
4457
export default {
4558
data: function () {

src/components/Header.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,11 @@ export default {
141141
</script>
142142

143143
<style lang="scss" scoped>
144+
@import '../style/globals';
145+
144146
.aw-navbar {
145-
background-color: #fff;
146-
border: solid #ccc;
147+
background-color: white;
148+
border: solid $lightBorderColor;
147149
border-width: 0 0 1px 0;
148150
}
149151

src/style/_container.scss

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

src/style/_globals.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
$textColor: rgb(60, 66, 87);
2+
$backgroundColor: rgb(247, 250, 252);
3+
4+
$lightBorderColor: darken(white, 12%);
5+
$activeHighlightColor: rgb(10, 120, 255);

src/style/_globalvars.scss

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

src/style/style.scss

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,21 @@
1-
@import 'globalvars';
2-
@import 'container';
3-
4-
$textcolor: #000;
1+
@import "globals";
52

3+
body,
64
html,
75
body,
86
button {
9-
color: $textcolor;
10-
font-family: 'Varela Round', sans-serif !important;
7+
color: $textColor;
8+
font-family: -apple-system , BlinkMacSystemFont , "Segoe UI" , "Roboto" , "Helvetica Neue" , "Ubuntu" , sans-serif;
9+
-webkit-font-smoothing: antialiased;
10+
text-rendering: optimizeLegibility;
11+
}
12+
13+
h1, h2, h3, h4, h5, h6, nav {
14+
font-family: 'Varela Round', sans-serif;
1115
}
1216

1317
body {
14-
background-color: #eee;
18+
background-color: $backgroundColor;
1519
}
1620

1721
// To make icons a little less crowded
@@ -21,3 +25,9 @@ body {
2125
margin-right: 4px;
2226
vertical-align: middle;
2327
}
28+
29+
.aw-container {
30+
background-color: #fff;
31+
border: 1px solid $lightBorderColor;
32+
border-radius: 5px;
33+
}

src/views/Search.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ div
3535
label Use regex
3636
input(type="checkbox" v-model="use_regex")
3737
div
38-
label Filter AFK
38+
label Exclude time away from computer
3939
input(type="checkbox" v-model="filter_afk")
4040
//div.form-row
4141
div.form-group.col-md-6

src/views/activity/Activity.vue

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ div
1616
b-button.px-2(:to="link_prefix + '/' + previousPeriod() + '/' + subview",
1717
variant="outline-dark")
1818
icon(name="arrow-left")
19-
b-select.px-2(:value="periodLength", :options="['day', 'week', 'month']",
19+
b-select.pl-2.pr-3(:value="periodLength", :options="['day', 'week', 'month']",
2020
@change="(periodLength) => setDate(_date, periodLength)")
2121
b-input-group-append
2222
b-button.px-2(:to="link_prefix + '/' + nextPeriod() + '/' + subview",
@@ -34,9 +34,9 @@ div
3434
span.d-none.d-md-inline
3535
| Refresh
3636

37-
aw-periodusage(:periodusage_arr="periodusage", @update="setDate")
37+
aw-periodusage.mt-2(:periodusage_arr="periodusage", @update="setDate")
3838

39-
ul.row.nav.nav-tabs.mt-3.px-3
39+
ul.row.nav.nav-tabs.mt-4
4040
li.nav-item(v-for="view in views")
4141
router-link.nav-link(:to="{ name: 'activity-view', params: {...$route.params, view_id: view.id}}" :class="{'router-link-exact-active': currentView.id == view.id}")
4242
h6 {{view.name}}
@@ -63,48 +63,59 @@ div
6363
h5 Options
6464

6565
div.row
66-
div.col-lg-6
67-
b-form-checkbox(v-model="filterAFK")
68-
| Filter AFK
69-
b-form-checkbox(v-model="includeAudible")
66+
div.col-md-6
67+
b-form-checkbox(v-model="filterAFK" size="sm")
68+
| Exclude AFK time
69+
icon#filterAFKHelp(name="question-circle" style="opacity: 0.4")
70+
b-tooltip(target="filterAFKHelp" v-b-tooltip.hover title="Filter away time where the AFK watcher didn't detect any input.")
71+
b-form-checkbox(v-model="includeAudible" :disabled="!filterAFK" size="sm")
7072
| Count audible browser tab as active
73+
icon#includeAudibleHelp(name="question-circle" style="opacity: 0.4")
74+
b-tooltip(target="includeAudibleHelp" v-b-tooltip.hover title="If the active window is an audible browser tab, count as active. Requires a browser watcher.")
7175

72-
div.col-lg-6
73-
b-form-group(label="Show/filter category" label-cols="5" label-cols-lg="4")
74-
b-form-select(v-model="filterCategory", :options="categories")
76+
div.col-md-6.mt-2.mt-md-0
77+
b-form-group(label="Show category" label-cols="5" label-cols-lg="4" style="font-size: 0.88em")
78+
b-form-select(v-model="filterCategory", :options="categories" size="sm")
7579

7680
aw-devonly
7781
b-btn(id="load-demo", @click="load_demo")
7882
| Load demo data
7983
</template>
8084

8185
<style lang="scss" scoped>
82-
$buttoncolor: #ddd;
83-
$bordercolor: #ddd;
86+
@import '../../style/globals';
8487
8588
.nav {
86-
border-bottom: 2px solid $bordercolor;
89+
border-bottom: 1px solid $lightBorderColor;
8790
8891
.nav-item {
89-
margin-bottom: -2px;
92+
margin-bottom: 0px;
93+
94+
&:first-child {
95+
margin-left: 0;
96+
}
9097
9198
.nav-link {
92-
background-color: $buttoncolor;
93-
margin: 0 0.2em 0 0.2em;
94-
padding: 0.4em 0.5em 0.1em 0.5em;
95-
border: 2px solid $bordercolor;
96-
border-bottom: none;
97-
border-radius: 0.5rem 0.5rem 0 0;
98-
color: #111 !important;
99+
// default bootstrap vertical padding was too high
100+
padding: 0.25rem 1rem;
101+
102+
color: lighten(black, 40%);
99103
cursor: pointer;
104+
border: none;
100105
101106
&:hover {
102-
background-color: #f8f8f8;
107+
color: black !important;
108+
border-bottom: 3px solid lighten(black, 70%);
109+
border-radius: 0;
103110
}
104111
105112
&.router-link-exact-active {
106-
background-color: #fff;
107-
color: #333 !important;
113+
color: $activeHighlightColor !important;
114+
border-bottom: 3px solid lighten($activeHighlightColor, 15%);
115+
border-radius: 0;
116+
117+
// Does nothing for Verala Round
118+
font-weight: bold;
108119
109120
&:hover {
110121
background-color: #fff;
@@ -127,6 +138,7 @@ import 'vue-awesome/icons/plus';
127138
import 'vue-awesome/icons/edit';
128139
import 'vue-awesome/icons/times';
129140
import 'vue-awesome/icons/save';
141+
import 'vue-awesome/icons/question-circle';
130142
131143
export default {
132144
name: 'Activity',

src/visualizations/PeriodUsage.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ svg
33
</template>
44

55
<style scoped lang="scss">
6+
@import '../style/globals';
7+
68
svg {
79
width: 100%;
810
height: 40pt;
9-
border: 1px solid #999;
10-
margin-top: 0.2em;
11-
margin-bottom: 0.2em;
11+
border: 1px solid $lightBorderColor;
1212
border-radius: 0.5em;
1313
}
1414
</style>

src/visualizations/SunburstCategories.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// We want to use another colorscheme than the default 'schemeAccent',
33
// unfortunately it seems like the color-scheme prop is broken.
44
// See this issue: https://github.com/David-Desmaisons/Vue.D3.sunburst/issues/11
5-
sunburst(:data="data", :colorScale="colorfunc", :getCategoryForColor="categoryForColor", :colorScheme="null" showLabels="true")
5+
sunburst(:data="data", :colorScale="colorfunc", :getCategoryForColor="categoryForColor", :colorScheme="null" :showLabels="true")
66
// Add behaviors
77
template(slot-scope="{ on, actions }")
88
highlightOnHover(v-bind="{ on, actions }")

0 commit comments

Comments
 (0)