File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<template lang="pug">
22div( style ="font-size: 0.9em" )
3- div.px-1 ( v-for ="cat in category_hierarchy" @click ="toggle(cat)" v-if ="parents_expanded(cat)" , :class ="{'clickable': cat.children.length > 0}" )
4- span ( :style ="'padding-left: ' + (1.4 * cat.depth) + 'em'" )
3+ div.px-1.category-row ( v-for ="cat in category_hierarchy" @click ="toggle(cat)" v-if ="parents_expanded(cat)" , :class ="{'clickable': cat.children.length > 0}" )
4+ div .category-label ( :style ="'padding-left: ' + (1.4 * cat.depth) + 'em'" )
55
66 // icon
77 span( v-if ="cat.children.length > 0" , style ="opacity: 0.8" )
@@ -12,11 +12,10 @@ div(style="font-size: 0.9em")
1212 span( v-else , style ="opacity: 0.6" )
1313 icon( name ="circle" , scale ="0.4" , style ="margin-left: 1em; margin-right: 1.22em;" )
1414
15- // title
16- | {{cat.subname}}
15+ span.category-title {{cat.subname}}
1716
1817 // time
19- span( style = "float: right" )
18+ span.category-value
2019 span( v-if ="show_perc" )
2120 | {{Math.round(100 * cat.duration / total_duration, 1)}}%
2221 span( v-else )
@@ -27,6 +26,31 @@ div(style="font-size: 0.9em")
2726</template >
2827
2928<style lang="scss" scoped>
29+ .category-row {
30+ display : flex ;
31+ align-items : flex-start ;
32+ justify-content : space-between ;
33+ gap : 0.75rem ;
34+ }
35+
36+ .category-label {
37+ display : flex ;
38+ flex : 1 1 auto ;
39+ min-width : 0 ;
40+ align-items : flex-start ;
41+ }
42+
43+ .category-title {
44+ min-width : 0 ;
45+ overflow-wrap : anywhere;
46+ }
47+
48+ .category-value {
49+ flex : 0 0 auto ;
50+ white-space : nowrap ;
51+ text-align : right ;
52+ }
53+
3054.clickable {
3155 cursor : pointer ;
3256}
You can’t perform that action at this time.
0 commit comments