🎨 (Tag List) Add sticky icons
This commit is contained in:
@@ -3,12 +3,19 @@
|
|||||||
<div class="column is-half">
|
<div class="column is-half">
|
||||||
<h3 class="subtitle is-3">Légende</h3>
|
<h3 class="subtitle is-3">Légende</h3>
|
||||||
<table class="table">
|
<table class="table">
|
||||||
<tr v-for="(slice, k) in slices" :key="k" :style="legendStyle(slice)" class="legend-item">
|
<tr
|
||||||
|
v-for="(slice, k) in slices"
|
||||||
|
:key="k"
|
||||||
|
:style="legendStyle(slice)"
|
||||||
|
class="legend-item"
|
||||||
|
>
|
||||||
<td>
|
<td>
|
||||||
<awe-icon :icon="categories[slice.key].tag.icon" />
|
<awe-icon :icon="categories[slice.key].tag.icon" />
|
||||||
</td>
|
</td>
|
||||||
<td class="legend-label">{{ slice.label }}</td>
|
<td class="legend-label">{{ slice.label }}</td>
|
||||||
<td class="percent-label numeric">{{ Math.round(slice.percent * 100) }}%</td>
|
<td class="percent-label numeric">
|
||||||
|
{{ Math.round(slice.percent * 100) }}%
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@@ -30,23 +37,39 @@
|
|||||||
<div class="select is-fullwidth">
|
<div class="select is-fullwidth">
|
||||||
<select v-model="filterCategory">
|
<select v-model="filterCategory">
|
||||||
<option value>Toutes</option>
|
<option value>Toutes</option>
|
||||||
<option
|
<option v-for="(category, k) in categories" :key="k" :value="k">{{
|
||||||
v-for="(category, k) in categories"
|
category.tag.label
|
||||||
:key="k"
|
}}</option>
|
||||||
:value="k"
|
|
||||||
>{{ category.tag.label }}</option>
|
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="columns is-multiline" :class="{ 'is-centered': !!filterCategory }">
|
<div
|
||||||
<div v-for="(category, k) in filteredCategories" :key="k" class="column is-half">
|
class="columns is-multiline"
|
||||||
|
:class="{ 'is-centered': !!filterCategory }"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
v-for="(category, k) in filteredCategories"
|
||||||
|
:key="k"
|
||||||
|
class="column is-half"
|
||||||
|
>
|
||||||
<div class="columns category-list">
|
<div class="columns category-list">
|
||||||
<div class="column is-2 tag-element account-color">
|
<div class="column is-2 tag-element account-color">
|
||||||
|
<div class="icon-container">
|
||||||
<awe-icon :icon="category.tag.icon" />
|
<awe-icon :icon="category.tag.icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="column transaction-list" v-if="category.transactions.length">
|
</div>
|
||||||
<p>{{ $tc('account.total', category.transactions.length, { count: category.transactions.length }) }}</p>
|
<div
|
||||||
|
class="column transaction-list"
|
||||||
|
v-if="category.transactions.length"
|
||||||
|
>
|
||||||
|
<p>
|
||||||
|
{{
|
||||||
|
$tc('account.total', category.transactions.length, {
|
||||||
|
count: category.transactions.length
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
</p>
|
||||||
<account-transaction-list
|
<account-transaction-list
|
||||||
:filter="false"
|
:filter="false"
|
||||||
:head="false"
|
:head="false"
|
||||||
@@ -161,10 +184,13 @@ export default class TagList extends Vue {
|
|||||||
display: flex;
|
display: flex;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
|
||||||
flex-flow: column;
|
flex-flow: column;
|
||||||
font-size: 30pt;
|
font-size: 30pt;
|
||||||
}
|
}
|
||||||
|
.icon-container {
|
||||||
|
position: sticky;
|
||||||
|
top: calc(3.25rem + 15px);
|
||||||
|
}
|
||||||
.chart-container {
|
.chart-container {
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user