Skip to content

Commit

Permalink
- made dashboard control buttons hide on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
cioraneanu committed Dec 26, 2024
1 parent 16d41ee commit c2ac6b3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion front/assets/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -1070,5 +1070,5 @@ img, svg {
align-items: center;
justify-content: center;
gap: 3px;
padding: 5px 5px;
padding: 3px 5px;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<div class="text-size-14 flex-center-vertical gap-1">
<span class="text-muted text-size-12">Controls:</span>
<div class="app-button-small" v-if="hasMultipleCurrencies" @click="onToggleTotalCurrency">
<app-icon :icon="TablerIconConstants.transaction" :size="14" />
{{ dataStore.dashboardCurrency }}
Expand Down
25 changes: 14 additions & 11 deletions front/components/dashboard/dashboard-controls/dashboard-control.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
<template>
<van-cell-group inset class="dashboard-control-date" :style="style" @click="onChooseMonth">
<div class="flex-center-vertical gap-2">
<app-icon :icon="TablerIconConstants.leftArrow" @click.stop="onPreviousMonth" :size="24" class="m-10" />
<div class="flex-1 flex-center flex-column my-2">
<div class="text-size-14 font-weight-600">{{ rangeTitle }}</div>
<dashboard-control-buttons />
</div>

<app-icon :icon="TablerIconConstants.rightArrow" @click.stop="onNextMonth" :size="24" class="m-10" />
<van-cell-group inset class="dashboard-control-date" :style="style" @click="onChooseMonth">
<div class="flex-center-vertical gap-2">
<app-icon :icon="TablerIconConstants.leftArrow" @click.stop="onPreviousMonth" :size="24" class="m-10" />

<div class="flex-1 flex-center flex-column my-2">
<div class="text-size-14 font-weight-600">{{ rangeTitle }}</div>
<transition name="fade">
<dashboard-control-buttons v-if="y < 20" />
</transition>
</div>
</van-cell-group>

<app-month-year v-model="dataStore.dashboard.month" v-model:showDropdown="showDropdown" />
<app-icon :icon="TablerIconConstants.rightArrow" @click.stop="onNextMonth" :size="24" class="m-10" />
</div>
</van-cell-group>

<app-month-year v-model="dataStore.dashboard.month" v-model:showDropdown="showDropdown" />
</template>

<script setup>
Expand Down

0 comments on commit c2ac6b3

Please sign in to comment.