Skip to content

Commit

Permalink
improvement(design): more small design improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed May 4, 2020
1 parent 3dc3615 commit 7a2693d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
17 changes: 7 additions & 10 deletions src/views/activity/Activity.vue
@@ -1,11 +1,13 @@
<template lang="pug">
div
h3 Activity for {{ periodReadable }}
h3.mb-0 Activity for {{ periodReadable }}

div.mb-2
| Host: {{ host }}
br
| Active time: {{ $store.state.activity.active.duration | friendlyduration }}
ul.list-group.list-group-horizontal-md.mb-3(style="font-size: 0.9em; opacity: 0.7")
li.list-group-item.pl-0.pr-3.py-0(style="border: 0")
| #[b Host:] {{ host }}
li.list-group-item.pl-0.pr-3.py-0(style="border: 0")
| #[b Time active:] {{ $store.state.activity.active.duration | friendlyduration }}

div.mb-2.d-flex
div
Expand All @@ -14,18 +16,14 @@ div
b-button.px-2(:to="link_prefix + '/' + previousPeriod() + '/' + subview",
variant="outline-dark")
icon(name="arrow-left")
//span.d-none.d-md-inline
// | Previous
b-select.px-2(:value="periodLength", :options="['day', 'week', 'month']",
@change="(periodLength) => setDate(date, periodLength)")
b-input-group-append
b-button.px-2(:to="link_prefix + '/' + nextPeriod() + '/' + subview",
:disabled="nextPeriod() > today", variant="outline-dark")
//span.d-none.d-md-inline
// | Next
icon(name="arrow-right")

div.mx-1(v-if="periodLength === 'day'")
div.mx-2(v-if="periodLength === 'day'")
input.form-control.px-2(id="date" type="date" :value="date" :max="today"
@change="setDate($event.target.value, periodLength)")

Expand All @@ -39,7 +37,6 @@ div
aw-periodusage(:periodusage_arr="periodusage", :link_prefix="link_prefix")

ul.row.nav.nav-tabs.mt-3.pl-3
//.flex-column.flex-sm-row
li.nav-item
router-link.nav-link(:to="{ name: 'activity-summary', params: $route.params }")
h6 Summary
Expand Down
9 changes: 1 addition & 8 deletions src/views/activity/ActivitySummary.vue
@@ -1,22 +1,15 @@
<template lang="pug">
div
div.row.mb-4
div.col-md-4.padding(v-for="view, index in views")
div.col-md-6.col-lg-4.p-3(v-for="view, index in views")
aw-selectable-vis(:id="index" :type="view" @onTypeChange="onTypeChange")

aw-devonly(v-if="periodLength === 'day'" reason="Not ready for production, still experimenting")
div.row.mb-4
div.col-md-12
aw-timeline-barchart(:height="100", :datasets="datasets")

</template>

<style scoped lang="scss">
.padding {
padding-top: 1em;
}
</style>

<script>
import _ from 'lodash';
import moment from 'moment';
Expand Down

0 comments on commit 7a2693d

Please sign in to comment.