Skip to content

Open source personal finance application

ui: update

ilkome25119fc392ab
diff --git a/assets/stylus/base.styl b/assets/stylus/base.styl
new file mode 100644
index 00000000..33102260
--- /dev/null
+++ b/assets/stylus/base.styl
@@ -0,0 +1,39 @@
+@import './variables'
+
+*
+ box-sizing border-box
+ -webkit-tap-highlight-color transparent
+
+ &:focus
+ outline 0
+
+html
+body
+#__nuxt
+#__layout
+ height 100%
+
+html
+ font-size 16px
+ overscroll-behavior-y none
+
+body
+ overflow hidden
+ overscroll-behavior-y none
+ margin 0
+ color var(--c-font-2)
+ font-primary()
+ font-size 14px
+ line-height 1
+ letter-spacing 0
+ background var(--color-bg-canvas)
+ user-select none
+
+.layout
+ display flex
+ height 100%
+ min-width 320px
+
+ &__wrap
+ flex-grow 1
+ position relative
diff --git a/assets/stylus/variables.styl b/assets/stylus/variables.styl
index d6fdd424..d1d71434 100644
--- a/assets/stylus/variables.styl
+++ b/assets/stylus/variables.styl
@@ -15,18 +15,29 @@ button-base-1()
max-width 280px
margin 0 auto
padding 0 $m9
- color var(--color-text-link)
+ color var(--c-text-4)
font-size 12px
text-decoration none
- background var(--c-bg-4)
+ background var(--c-item-bg-main)
border 1px solid var(--c-bg-4)
border-radius $m9
anim()
+media-hover()
color var(--c-text-1)
- background var(--c-bg-6)
+ background var(--c-item-bg-hover)
+ border 1px solid var(--c-item-bd-hover)
+media(700px)
height 48px
max-width 280px
+
+header-title()
+ padding 60px 0
+ font-h1()
+ font-size 22px
+ font-weight 600
+ text-align center
+
+ +media-laptop()
+ font-size 28px
diff --git a/assets/stylus/variables/colors-dark.styl b/assets/stylus/variables/colors-dark.styl
index 0e435f67..cd4ceca9 100644
--- a/assets/stylus/variables/colors-dark.styl
+++ b/assets/stylus/variables/colors-dark.styl
@@ -44,8 +44,9 @@ html.dark-mode
--color-text-link #58a6ff
--color-link-bg #1c1f24
- --color-item-bg #1e1e1e
- --color-item-in #1c1f24
+ --c-item-bg-main #1e1e1e
+ --c-item-bg-hover #232323
+ --c-item-bd-hover #3f3f3f
// background #111111
// background #171717
diff --git a/assets/stylus/variables/colors-light.styl b/assets/stylus/variables/colors-light.styl
index f96d7069..82d12ed2 100644
--- a/assets/stylus/variables/colors-light.styl
+++ b/assets/stylus/variables/colors-light.styl
@@ -48,4 +48,6 @@ html
--color-text-link #0366d6
--color-link-bg #eaeaea
- --color-item-bg #eaeaea
+ --c-item-bg-main #f2f2f2
+ --c-item-bg-hover #ebebeb
+ --c-item-bd-hover #bebebe
diff --git a/components/about/About.vue b/components/about/About.vue
index 6c52e4be..b8aecd34 100644
--- a/components/about/About.vue
+++ b/components/about/About.vue
@@ -8,13 +8,14 @@ export default {
.about
.about__title {{ $t('about.creators.title') }}
- .aboutPerson
- .aboutPerson__title {{ $t('about.creators.author') }}
- .aboutPerson__name @ilkome
-
- .aboutPerson
- .aboutPerson__title {{ $t('about.creators.ideas') }}
- .aboutPerson__name @TheCarolissy <br/>@TihomirovPro
+ .about__wrap
+ .aboutPerson
+ .aboutPerson__title {{ $t('about.creators.author') }}
+ .aboutPerson__name ilkome
+
+ .aboutPerson
+ .aboutPerson__title {{ $t('about.creators.ideas') }}
+ .aboutPerson__name TheCarolissy <br/>TihomirovPro
</template>
<style lang="stylus" scoped>
@@ -22,22 +23,23 @@ export default {
.about
&__title
- padding-bottom $m9
+ padding-bottom $m7
font-h1()
+ font-size 18px
- +media-laptop()
- font-size 28px
+ &__wrap
+ display flex
+ gap $m10
+ padding-bottom $m7
.aboutPerson
- padding-bottom $m10
-
&__title
padding-bottom $m5
color var(--c-font-3)
- font-size 16px
+ font-size 12px
&__name
- font-size 20px
- line-height 32px
+ font-size 14px
+ line-height 18px
fontFamilyNunito()
</style>
diff --git a/components/base/BottomSheet.vue b/components/base/BottomSheet.vue
index 6118ca17..9aeacae7 100644
--- a/components/base/BottomSheet.vue
+++ b/components/base/BottomSheet.vue
@@ -11,7 +11,7 @@ export default defineComponent({
setup (props, { emit }) {
// settings
const settings = {
- moveToCloseOffset: 100,
+ moveToCloseOffset: 60,
debounceOffset: 20
}
diff --git a/components/categories/Modal.vue b/components/categories/Modal.vue
index 2f49ce4e..d72c7992 100644
--- a/components/categories/Modal.vue
+++ b/components/categories/Modal.vue
@@ -1,10 +1,12 @@
<script>
import { useContext } from '@nuxtjs/composition-api'
import { db } from '~/services/firebaseConfig'
+import useFilter from '~/modules/filter/useFilter'
export default {
setup () {
const { store } = useContext()
+ const { setCategoryFilter } = useFilter()
const closed = () => {
store.commit('categories/hideCategoryModal')
@@ -12,6 +14,7 @@ export default {
}
return {
+ setCategoryFilter,
closed
}
},
@@ -53,17 +56,15 @@ export default {
methods: {
handleSetFilterCategory () {
- this.$store.commit('categories/hideCategoryModal')
- this.$store.dispatch('ui/setActiveTab', 'stat')
+ this.setCategoryFilter(this.categoryId)
this.$store.commit('filter/setFilterDateNow')
- this.$store.dispatch('filter/setFilterCategoryId', this.categoryId)
+
this.$store.commit('categories/hideCategoryModal')
this.$store.commit('categories/setCategoryModalId', null)
- if (this.$store.state.ui.mobile) {
- this.$store.dispatch('ui/setActiveTabViewName', 'stat')
- this.$store.dispatch('ui/setActiveTabStat', 'details')
- }
+ this.$store.dispatch('ui/setActiveTab', 'stat')
+ this.$store.dispatch('ui/setActiveTabViewName', 'stat')
+ this.$store.dispatch('ui/setActiveTabStat', 'details')
},
handleEditClick () {
@@ -150,7 +151,7 @@ Portal(
.header__title {{ category.name }}
.header__subCategory(v-if="category.parentId") {{ $store.state.categories.items[category.parentId].name }}
- template
+ template(#default="{ close }")
.content
.tools
.modalLinks
@@ -181,16 +182,16 @@ Portal(
@onClick="id => $store.dispatch('categories/showCategoryModal', id)"
)
- //- TODO: translate
.wrap
- .header__back(
+ .buttonBack(
v-if="category.parentId"
@click="$store.dispatch('categories/showCategoryModal', category.parentId)"
- )
- svg(width="24" height="24" fill="currentColor")
- path(d="M17.171 2.937a1.5 1.5 0 0 0-2.343-1.874l2.343 1.874zM8 12l-1.171-.937a1.5 1.5 0 0 0 0 1.874L8 12zm6.829 10.937a1.5 1.5 0 0 0 2.343-1.874l-2.343 1.874zm0-21.874l-8 10 2.343 1.874 8-10-2.343-1.874zm-8 11.874l8 10 2.343-1.874-8-10-2.343 1.874z")
+ ) {{ $t('backTo') }} {{ $store.state.categories.items[category.parentId].name }}
- | Back to {{ $store.state.categories.items[category.parentId].name }}
+ .buttonBack(
+ v-if="category.parentId === 0"
+ @click="close()"
+ ) {{ $t('close') }}
ModalBottomConfirm(
:description="deleteInfo"
@@ -223,6 +224,7 @@ Portal(
.categories
padding $m6
+ padding-bottom $m4
.wrap
padding 0 $m8
@@ -241,13 +243,6 @@ Portal(
&__subCategory
padding-top $m3
- &__back
- button-base-1()
- margin $m8 auto $m5 auto
-
- svg
- display none
-
&__title
font-size 28px
font-weight 700
@@ -269,4 +264,8 @@ Portal(
justify-content center
margin-top -38px
padding-bottom 12px
+
+.buttonBack
+ button-base-1()
+ margin $m8 auto $m5 auto
</style>
diff --git a/components/categories/item/CategoryItem.vue b/components/categories/item/CategoryItem.vue
index bb3d823f..58f4d8ac 100644
--- a/components/categories/item/CategoryItem.vue
+++ b/components/categories/item/CategoryItem.vue
@@ -81,14 +81,15 @@ export default {
min-height 48px
padding $m6
color var(--c-font-1)
- background var(--color-item-bg)
+ background var(--c-item-bg-main)
border 1px solid transparent
border-radius $m5
anim()
+media-hover()
color var(--c-text-1)
- border 1px solid var(--c-blue-1)
+ background var(--c-item-bg-hover)
+ border 1px solid var(--c-item-bd-hover)
+media(700px)
padding $m7 $m8
diff --git a/components/chart/Periods.vue b/components/chart/Periods.vue
index 74a86ad3..3c55d6bc 100644
--- a/components/chart/Periods.vue
+++ b/components/chart/Periods.vue
@@ -86,7 +86,6 @@ export default {
template(slot="content")
template(v-if="!isEmptyStat")
CustomizeMenu
- .context-menu-sep
SharedContextMenuItem(
:title="$t('theme.change')"
diff --git a/components/currencies/CurrencyModal.vue b/components/currencies/CurrencyModal.vue
index b3030d69..5617debf 100644
--- a/components/currencies/CurrencyModal.vue
+++ b/components/currencies/CurrencyModal.vue
@@ -33,7 +33,7 @@ Portal(
.currencies
display grid
- grid-template-columns repeat(auto-fill, minmax(120px, 1fr))
+ grid-template-columns repeat(auto-fill, minmax(100px, 1fr))
grid-column-gap $m7
grid-row-gap $m7
diff --git a/components/lang/LangDropdown.vue b/components/lang/LangDropdown.vue
index 001d905f..e384395b 100644
--- a/components/lang/LangDropdown.vue
+++ b/components/lang/LangDropdown.vue
@@ -47,7 +47,7 @@ div
SharedContextMenuItem(
title="🇷🇺 Russian - Русский (Не полный)"
@onClick="changeLang('ru')")
- .context-menu-sep
+
SharedContextMenuItem(
title="🇺🇸 English - Английский"
@onClick="changeLang('en')")
diff --git a/components/layout/Base.vue b/components/layout/Base.vue
index 36e733d5..46a9d231 100644
--- a/components/layout/Base.vue
+++ b/components/layout/Base.vue
@@ -1,7 +1,5 @@
<script>
import { computed, useContext } from '@nuxtjs/composition-api'
-import useBaseLayout from '~/components/layout/useBaseLayout'
-import useUIView from '~/components/layout/useUIView'
export default {
name: 'LayoutWrap',
@@ -9,289 +7,68 @@ export default {
setup () {
const { store } = useContext()
- // Layout
- const { isShowPeriodsNamesModal } = useBaseLayout()
-
- // UI
- const { ui } = useUIView()
-
// Computed
const activeTabViewName = computed(() => store.state.ui.activeTabViewName)
- const activeTab = computed(() => store.state.ui.activeTab)
- const activeTabStat = computed(() => store.state.ui.activeTabStat)
- const isStatPage = computed(() => activeTabViewName.value === 'stat')
- const statCurrentPeriod = computed(() => store.getters['stat/statCurrentPeriod'])
- const statAverage = computed(() => store.getters['stat/statAverage'])
-
- const className = computed(() => ({
- _stat: !!isStatPage.value,
- [`_${activeTabViewName.value}`]: true
- }))
return {
- isShowPeriodsNamesModal,
-
- ui,
-
- activeTabViewName,
- activeTab,
- activeTabStat,
- isStatPage,
- statCurrentPeriod,
- statAverage,
-
- className
+ activeTabViewName
}
}
}
</script>
<template lang="pug">
-.layout(:class="className")
- .layout__sidebar
- LayoutPcSidebar
-
- .layout__content
- //- Stat
- .page(
- v-if="isStatPage && $store.getters['trns/hasTrns']"
- ): StatDashboard
-
- //- No trns
- .page(
- v-if="isStatPage && !$store.getters['trns/hasTrns']"
- ): StatNoStatActions
-
- //- Categories
- .page(
- v-show="activeTabViewName === 'categories'"
- :style="{ zIndex: activeTabViewName === 'categories' ? 10 : 0 }"
- ): CategoriesPage
-
- //- Wallets
- .page(
- v-show="activeTabViewName === 'wallets'"
- :style="{ zIndex: activeTabViewName === 'wallets' ? 10 : 0 }"
- ): WalletsPage
-
- //- Analytics
- //-----------------------------
- template(v-if="activeTabViewName === 'analytics'")
- .pageAnalytics
- Analytics
- template(#incomes)
- .boxTitle {{ $t('money.incomes') }}
-
- .boxSummary2
- .boxSummary2__item
- Amount(
- :currency="$store.state.currencies.base"
- :type="1"
- :value="statCurrentPeriod.incomes.total"
- size="xl"
- vertical="left"
- )
- StatSummaryRowItemView(
- :type="1"
- :amount="statAverage.incomes"
- :title="$t('money.average.incomes')"
- )
-
- template(#expenses)
- .boxTitle {{ $t('money.expenses') }}
-
- .boxSummary2
- .boxSummary2__item
- Amount(
- :currency="$store.state.currencies.base"
- :type="0"
- :value="statCurrentPeriod.expenses.total"
- size="xl"
- vertical="left"
- )
- StatSummaryRowItemView(
- :type="0"
- :amount="statAverage.expenses"
- :title="$t('money.average.expenses')"
- )
-
- //- Menu
- //-----------------------------------
- .layout__menu
- LayoutMobileBottomMenu
-
- //- Modals
- //-----------------------------------
- CategoriesModal
- CurrenciesCurrencyModal
-
- BaseBottomSheet(
- keepAlive
- :show="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories'] && $store.state.trnForm.show"
- @closed="$store.dispatch('trnForm/closeTrnForm')"
- )
- template(#handler="{ close }")
- .handler
-
- .handler__close(@click="close")
- svg(
- viewBox='0 0 24 24'
- fill='none'
- stroke='#000'
- stroke-linecap='round'
- stroke-linejoin='round'
- stroke-width='3'
- )
- path(d='M.75 23.249l22.5-22.5')
- path(d='M23.25 23.249L.75.749')
-
- TrnForm(:show="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories'] && $store.state.trnForm.show")
-
- TrnsModal
- WalletsModal
-
- //- Base Menu
- LazyLayoutMobileMenuModal(v-if="activeTab === 'menu'")
-
- //- Caegory Form: create or edit
- Portal(
- v-if="activeTab === 'createCategory'"
- to="modal"
- )
- ModalBottom(
- key="createCategory"
- @onClose="$store.dispatch('ui/setActiveTab', 'stat')"
- )
- CategoriesForm
-
- //- Settings
- Portal(
- v-if="activeTab === 'settings'"
- to="modal"
- )
- ModalBottom(@onClose="$store.dispatch('ui/setActiveTab', 'stat')")
- Settings(v-if="activeTab === 'settings'")
-
- //- Wallet Form: create or edit
- Portal(
- v-if="activeTab === 'createWallet'"
- to="modal"
- )
- ModalBottom(
- :key="$store.state.wallets.editId"
- @onClose="$store.dispatch('ui/setActiveTab', 'stat')"
- )
- WalletsFormWalletForm
-
- //- Wallet Sort
- Portal(
- v-if="activeTab === 'walletsSort'"
- to="modal"
- key="walletsSort"
- )
- ModalBottom(
- isShow
- key="walletsSort"
- @onClose="$store.dispatch('ui/setActiveTab', 'stat')"
- )
- template(#default="{ closeModal }")
- WalletsSort(
- v-if="activeTab === 'walletsSort'"
- @closeModal="closeModal"
- )
+.h100
+ LazyStatDashboard(v-if="$store.getters['trns/hasTrns']")
+ LazyStatNoStatActions(v-if="!$store.getters['trns/hasTrns']")
+
+ //- Analytics
+ //-----------------------------
+ //- template(v-if="activeTabViewName === 'analytics'")
+ //- .pageAnalytics
+ //- Analytics
+ //- template(#incomes)
+ //- .boxTitle {{ $t('money.incomes') }}
+
+ //- .boxSummary2
+ //- .boxSummary2__item
+ //- Amount(
+ //- :currency="$store.state.currencies.base"
+ //- :type="1"
+ //- :value="statCurrentPeriod.incomes.total"
+ //- size="xl"
+ //- vertical="left"
+ //- )
+ //- StatSummaryRowItemView(
+ //- :type="1"
+ //- :amount="statAverage.incomes"
+ //- :title="$t('money.average.incomes')"
+ //- )
+
+ //- template(#expenses)
+ //- .boxTitle {{ $t('money.expenses') }}
+
+ //- .boxSummary2
+ //- .boxSummary2__item
+ //- Amount(
+ //- :currency="$store.state.currencies.base"
+ //- :type="0"
+ //- :value="statCurrentPeriod.expenses.total"
+ //- size="xl"
+ //- vertical="left"
+ //- )
+ //- StatSummaryRowItemView(
+ //- :type="0"
+ //- :amount="statAverage.expenses"
+ //- :title="$t('money.average.expenses')"
+ //- )
</template>
<style lang="stylus" scoped>
@import '~assets/stylus/variables'
-.layout
- flex-grow 1
- display grid
- grid-template-columns 1fr
- grid-template-rows 1fr minmax(auto, auto)
- height 100%
- background var(--c-bg-2)
-
- +media(1200px)
- grid-template-rows 1fr auto
- grid-template-columns minmax(auto, auto) 1fr
-
- &__sidebar
- display none
-
- +media(1200px)
- display block
-
- &__content
- overflow hidden
- position relative
-
- &__menu
- background var(--c-bg-3)
-
- +media(600px)
- background var(--c-bg-2)
-
-.handler
- z-index 2
- position absolute
- top 0
- left 0
- display flex
- align-items center
- justify-content center
- width 100%
- height 16px
-
- &:after
- content ''
- display block
- width 32px
- height 4px
- background var(--c-bg-8)
- border-radius 4px
-
- &__close
- z-index 3
- cursor pointer
- position absolute
- top 4px
- right 4px
- display flex
- align-items center
- justify-content center
- width 40px
- height 40px
- border-radius 50%
- anim()
-
- +media-hover()
- background var(--c-blue-1)
-
- svg
- anim()
- width 12px
- height 12px
- stroke var(--c-font-4)
-
- +media-hover()
- svg
- width 12px
- height 12px
- stroke var(--c-font-1)
-
-.page
+.h100
overflow hidden
- overflowScrollY()
display grid
height 100%
- max-width 1100px
- padding 0
- background var(--color-bg-canvas)
-
- +media(800px)
- padding 0 32px
-
- +media(1000px)
- padding 0 64px
</style>
diff --git a/components/layout/component/ComponentWrap.vue b/components/layout/component/ComponentWrap.vue
index 084d3d79..51f836bb 100644
--- a/components/layout/component/ComponentWrap.vue
+++ b/components/layout/component/ComponentWrap.vue
@@ -25,6 +25,7 @@ export default {
slot(name="headerRight")
.component__header(v-else)
+
//------------------------------------------------
//- content
//------------------------------------------------
@@ -106,6 +107,9 @@ export default {
height 100%
scrollbar()
+ +media(1100px)
+ justify-content start
+
&-left
margin-bottom 16px
@@ -113,6 +117,9 @@ export default {
margin-bottom 16px
&-bottom
+ +media(600px)
+ padding-bottom $m7
+
&-in
padding 16px
diff --git a/components/layout/mobile/BottomMenu.vue b/components/layout/mobile/BottomMenu.vue
index 72d669c1..669956a2 100644
--- a/components/layout/mobile/BottomMenu.vue
+++ b/components/layout/mobile/BottomMenu.vue
@@ -1,5 +1,5 @@
<script>
-import { computed, useContext } from '@nuxtjs/composition-api'
+import { computed, useContext, useRoute, useRouter } from '@nuxtjs/composition-api'
export default {
name: 'LayoutMobileBottomMenu',
@@ -17,6 +17,8 @@ export default {
setup () {
const { store, app: { i18n } } = useContext()
+ const route = useRoute()
+ const router = useRouter()
const activeTabViewName = computed(() => store.state.ui.activeTabViewName)
const menu = computed(() => ({
@@ -43,16 +45,33 @@ export default {
}))
function handleSetActiveTab (tabName) {
- if (tabName === 'menu') {
- store.dispatch('ui/setActiveTab', 'menu')
+ if (tabName === 'wallets') {
+ router.push('/wallets')
return
}
- store.dispatch('ui/setActiveTab', tabName)
- store.dispatch('ui/setActiveTabViewName', tabName)
+
+ if (tabName === 'categories') {
+ router.push('/categories')
+ store.dispatch('ui/setActiveTab', 'categories')
+ store.dispatch('ui/setActiveTabViewName', 'categories')
+ return
+ }
+ if (tabName === 'stat') {
+ store.dispatch('ui/setActiveTab', 'stat')
+ store.dispatch('ui/setActiveTabViewName', 'stat')
+ router.push('/')
+ return
+ }
+
+ store.dispatch('ui/setActiveTab', 'menu')
}
function getClassName (tabName) {
- return activeTabViewName.value === tabName
+ if (route.value.name === tabName)
+ return true
+
+ if (route.value.name === 'index')
+ return activeTabViewName.value === tabName
}
return {
diff --git a/components/layout/mobile/MenuModal.vue b/components/layout/mobile/MenuModal.vue
index 871867e1..c62036b8 100644
--- a/components/layout/mobile/MenuModal.vue
+++ b/components/layout/mobile/MenuModal.vue
@@ -7,11 +7,9 @@ export default {
setup () {
const { store } = useContext()
const activeTab = computed(() => store.state.ui.activeTab)
- const activeTabStat = computed(() => store.state.ui.activeTabStat)
return {
- activeTab,
- activeTabStat
+ activeTab
}
}
}
@@ -19,19 +17,100 @@ export default {
<template lang="pug">
Portal(
- v-if="activeTab === 'menu'"
to="modal"
)
- ModalBottom(
- key="menu"
- @onClose="$store.dispatch('ui/setActiveTab', 'stat')"
+ LazyBaseBottomSheet(
+ v-if="activeTab === 'menu'"
+ @closed="$store.dispatch('ui/setActiveTab', 'stat')"
)
- LayoutSidebarBaseMenu
- .context-menu-sep
-
- SharedContextMenuItem(
- :title="$t('theme.change')"
- icon="mdi mdi-palette"
- @onClick="$store.dispatch('ui/changeTheme')"
- )
+ template(#handler="{ close }")
+ .handler
+
+ .handler__close(@click="close")
+ svg(
+ viewBox='0 0 24 24'
+ fill='none'
+ stroke='#000'
+ stroke-linecap='round'
+ stroke-linejoin='round'
+ stroke-width='3'
+ )
+ path(d='M.75 23.249l22.5-22.5')
+ path(d='M23.25 23.249L.75.749')
+
+ template(#header)
+ template(v-if="walletId")
+ .walletWrap
+ WalletsItemWalletItem2(
+ :id="walletId"
+ vertical="center"
+ size="xl"
+ )
+
+ template
+ .content
+ div(style="height: 16px")
+ LayoutSidebarBaseMenu
+
+ div(style="padding: 0 16px 16px 16px")
+ SharedContextMenuItem(
+ :title="$t('theme.change')"
+ icon="mdi mdi-palette"
+ @onClick="$store.dispatch('ui/changeTheme')"
+ )
</template>
+
+<style lang="stylus" scoped>
+@import '~assets/stylus/variables'
+
+.handler
+ z-index 2
+ position absolute
+ top 0
+ left 0
+ display flex
+ align-items center
+ justify-content center
+ width 100%
+ height 16px
+
+ &:after
+ content ''
+ display block
+ width 32px
+ height 4px
+ background var(--c-bg-8)
+ border-radius 4px
+
+ &__close
+ z-index 3
+ cursor pointer
+ position absolute
+ top 4px
+ right 4px
+ display flex
+ align-items center
+ justify-content center
+ width 40px
+ height 40px
+ border-radius 50%
+ anim()
+
+ +media-hover()
+ background var(--c-blue-1)
+
+ svg
+ anim()
+ width 12px
+ height 12px
+ stroke var(--c-font-4)
+
+ +media-hover()
+ svg
+ width 12px
+ height 12px
+ stroke var(--c-font-1)
+
+.content
+ border-radius $m7 $m7 0 0
+</style>
diff --git a/components/layout/sidebar/BaseMenu.vue b/components/layout/sidebar/BaseMenu.vue
index 360c7a0f..bc31b7fa 100644
--- a/components/layout/sidebar/BaseMenu.vue
+++ b/components/layout/sidebar/BaseMenu.vue
@@ -51,18 +51,34 @@ export default {
},
handleClickMenu (menuId) {
- if (menuId === 'stat')
+ if (menuId === 'settings') {
+ this.$store.dispatch('ui/setActiveTab', 'stat')
this.$store.dispatch('ui/setActiveTabViewName', 'stat')
+ this.$router.push(menuId)
+ return
+ }
- if (menuId === 'wallets')
+ if (menuId === 'wallets') {
+ this.$store.dispatch('ui/setActiveTab', 'wallets')
this.$store.dispatch('ui/setActiveTabViewName', 'wallets')
+ this.$router.push(menuId)
+ return
+ }
- if (menuId === 'categories')
+ if (menuId === 'stat')
+ this.$store.dispatch('ui/setActiveTabViewName', 'stat')
+
+ if (menuId === 'categories') {
+ this.$router.push(menuId)
+ this.$store.dispatch('ui/setActiveTab', 'categories')
this.$store.dispatch('ui/setActiveTabViewName', 'categories')
+ return
+ }
if (menuId === 'users') {
- this.$router.push('/users')
- this.$store.dispatch('ui/setActiveTab', 'stat')
+ this.$router.push(menuId)
+ this.$store.dispatch('ui/setActiveTab', 'users')
+ this.$store.dispatch('ui/setActiveTabViewName', 'users')
return
}
else if (menuId === 'trnForm') {
@@ -87,7 +103,7 @@ export default {
template(v-for="(menuItem, menuId) in menu")
.menuItem(
v-if="$store.getters['user/isTester'] || !menuItem.private"
- :class="{ _active: activeTab === menuId, [`_${menuId}`]: true }"
+ :class="{ _active: $route.name === menuId || ($route.name === 'index' && menuId === 'stat') || (activeTab !== 'categories' && activeTab === menuId), [`_${menuId}`]: true }"
@click="handleClickMenu(menuId)"
)
.menuItem__icon: div(:class="menuItem.icon")
@@ -101,8 +117,7 @@ item-bg-active()
background var(--c-bg-6)
.menu
- &__wallets
- padding-top $m8
+ padding-bottom $m10
.menuItem
cursor pointer
@@ -111,7 +126,7 @@ item-bg-active()
grid-column-gap 20px
align-items center
height 50px
- padding 16px 16px
+ padding $m7 $m9
+media-laptop()
height auto
diff --git a/components/layout/sidebar/LayoutPcSidebar.vue b/components/layout/sidebar/LayoutPcSidebar.vue
index 51e206dd..c2244e02 100644
--- a/components/layout/sidebar/LayoutPcSidebar.vue
+++ b/components/layout/sidebar/LayoutPcSidebar.vue
@@ -78,6 +78,7 @@ export default {
justify-content center
width 48px
height 48px
+ color var(--c-font-1)
font-size 32px
background var(--c-blue-1)
border-radius 50%
diff --git a/components/modal/ModalButton.vue b/components/modal/ModalButton.vue
index 708f1cc2..343ff83f 100644
--- a/components/modal/ModalButton.vue
+++ b/components/modal/ModalButton.vue
@@ -41,9 +41,20 @@ export default {
max-width 100%
padding $m6 $m6
text-align center
+ border 1px solid transparent
border-radius $m6
anim()
+ &._active
+ background var(--c-bg-3)
+ border 1px solid var(--c-bg-6)
+
+ +media-hover()
+ &:not(._active)
+ color var(--c-font-3)
+ background var(--c-item-bg-hover)
+ border 1px solid var(--c-item-bd-hover)
+
&__icon
opacity .8
display flex
@@ -53,14 +64,6 @@ export default {
color var(--c-font-2)
font-size 32px
- +media-hover()
- &:not(._active)
- color var(--c-font-3)
- background var(--c-bg-5)
-
- &._active
- background var(--c-bg-3)
- border 1px solid var(--c-bg-6)
&__name
color var(--c-font-3)
diff --git a/components/modal/styles/modalLinks.styl b/components/modal/styles/modalLinks.styl
index cea3e612..98a7f638 100644
--- a/components/modal/styles/modalLinks.styl
+++ b/components/modal/styles/modalLinks.styl
@@ -1,6 +1,6 @@
.modalLinks
display grid
- grid-template-columns repeat(3, 30%)
+ grid-template-columns repeat(3, 1fr)
grid-column-gap $m7
grid-row-gap $m9
padding 0 $m7
diff --git a/components/settings/Settings.vue b/components/settings/Settings.vue
deleted file mode 100644
index 86db0339..00000000
--- a/components/settings/Settings.vue
+++ /dev/null
@@ -1,149 +0,0 @@
-<script>
-import pkg from '~/package'
-
-export default {
- data () {
- return {
- confirmCreateDemo: false,
- confirmRemoveUserData: false,
- version: pkg.version
- }
- },
-
- methods: {
- generateDemo () {
- this.confirmCreateDemo = false
- this.$store.dispatch('demo/createDemo')
- },
-
- removeUserData () {
- this.confirmRemoveUserData = false
- this.$store.dispatch('user/removeUserData')
- }
- }
-}
-</script>
-
-<template lang="pug">
-LayoutComponentWrap(:contentPadding="false")
- template(slot="headerLeft") {{ $t('settings.title') }}
-
- template(slot="content")
- .settings
- .settings__group
- .settings__subHeader {{ $t('currency.title') }}
- .settings__item
- SharedButton._bdb(
- :title="$t('currency.selectBaseTitle')"
- icon="mdi mdi-currency-usd"
- @onClick="$store.commit('currencies/showBaseCurrenciesModal')"
- )
-
- .settings__group
- .settings__subHeader {{ $t('settings.lang') }}
- .settings__item
- LangDropdown
-
- .settings__group
- .settings__subHeader {{ $t('settings.app') }}
- .settings__item
- SharedButton._bdb(
- icon="mdi mdi-palette"
- :title="$t('theme.change')"
- @onClick="$store.dispatch('ui/changeTheme')"
- )
-
- .settings__item
- SharedButton._bdb(
- :title="$t('userLogout')"
- icon="mdi mdi-logout"
- @onClick="$store.dispatch('user/signOut')"
- )
-
- .settings__group._paddingTop
- .settings__subHeader {{ $t('settings.delete') }}
- .settings__desc {{ $t('alerts.willDeleteEverything') }}
- .settings__item
- SharedButton._bdb(
- :title="$t('settings.deleteButton')"
- icon="mdi mdi-delete-empty-outline"
- @onClick="confirmRemoveUserData = true"
- )
-
- .settings__group(v-if="$store.state.demo.hasDemo")
- .settings__subHeader {{ $t('settings.demo') }}
- .settings__desc {{ $t('alerts.willDeleteEverything') }}
- .settings__item
- SharedButton._bdb(
- :title="$t('settings.loadDemoButton')"
- icon="mdi mdi-gamepad-variant-outline"
- @onClick="confirmCreateDemo = true"
- )
-
- .settings__group
- About
- .appVersion {{ $t('app.version') }} {{ version }}
-
- ModalBottomConfirm(
- :description="$t('alerts.willDeleteEverything')"
- :show="confirmCreateDemo"
- @onClose="confirmCreateDemo = false"
- @onConfirm="generateDemo"
- )
-
- ModalBottomConfirm(
- :description="$t('alerts.willDeleteEverything')"
- :show="confirmRemoveUserData"
- @onClose="confirmRemoveUserData = false"
- @onConfirm="removeUserData"
- )
-</template>
-
-<style lang="stylus" scoped>
-@import "~assets/stylus/variables/fonts"
-@import "~assets/stylus/variables/margins"
-@import "~assets/stylus/variables/media"
-
-.settings
- padding 16px
-
- +media-laptop()
- max-width 480px
- padding 32px 60px
-
- &__group
- padding-bottom 48px
- &._paddingTop
- padding-top 48px
-
- &__item
- padding-bottom $m7
- &:last-child
- padding-bottom 0
-
- &__desc
- padding-bottom 8px
- font-size 14px
- color var(--c-red-1)
-
- &__header
- font-header-4()
- font-weight 500
- font-size 24px
- padding-bottom $mn2
-
- &__subHeader
- font-header-1()
- font-size 16px
- font-weight 500
- padding-bottom 16px
-
-.thanksTo
- color var(--c-font-2)
- font-size 14px
-
-.appVersion
- padding-top $m10
- color var(--c-font-3)
- font-size 10px
-</style>
diff --git a/components/shared/button/Button.vue b/components/shared/button/Button.vue
index 03784c79..fbf897b6 100644
--- a/components/shared/button/Button.vue
+++ b/components/shared/button/Button.vue
@@ -93,10 +93,7 @@ export default {
</style>
<style lang="stylus" scoped>
-@import '~assets/stylus/variables/animations'
-@import '~assets/stylus/variables/margins'
-@import '~assets/stylus/variables/media'
-@import '~assets/stylus/variables/fonts'
+@import '~assets/stylus/variables'
.d-button
cursor pointer
@@ -115,8 +112,8 @@ export default {
font-size 14px
+media-hover()
- color var(--c-font-3)
- background var(--c-bg-5)
+ color var(--c-font-1)
+ background var(--c-bg-6)
&._ttu
text-transform uppercase
@@ -152,15 +149,19 @@ export default {
height 40px
&._bdb
- height 44px
- padding $m6 $m7
+ min-height 48px
+ padding $m6 $m8
+ color var(--c-text-4)
+ font-size 14px
+ text-decoration none
background var(--c-bg-4)
border 1px solid var(--c-bg-5)
border-radius $m5
+media-hover()
- color var(--c-font-3)
- background var(--c-bg-5)
+ color var(--c-text-1)
+ background var(--c-item-bg-hover)
+ border 1px solid var(--c-item-bd-hover)
&._inline
display flex
@@ -187,12 +188,6 @@ export default {
color var(--c-font-1)
background var(--c-bg-12)
- &:hover
- @media $media-laptop
- background var(--c-bg-6)
- /.light-mode &
- background var(--c-bg-13)
-
&._small
height 44px
padding 0 $m9
diff --git a/components/shared/dropdown/Dropdown.vue b/components/shared/dropdown/Dropdown.vue
index ba701e2e..a0c0de78 100644
--- a/components/shared/dropdown/Dropdown.vue
+++ b/components/shared/dropdown/Dropdown.vue
@@ -36,21 +36,22 @@ export default {
display flex
align-items stretch
width auto
- height 44px
+ min-height 48px
margin-left auto
padding $m6 $m7
- color var(--c-font-4)
+ color var(--c-font-2)
font-size 13px
background var(--c-bg-4)
border 1px solid var(--c-bg-5)
- border-radius $m5
+ border-radius $m6
&:active:not(._disable)
color var(--c-font-3)
+media-hover()
- color var(--c-font-3)
- background var(--c-bg-5)
+ color var(--c-font-1)
+ background var(--c-item-bg-hover)
+ border 1px solid var(--c-item-bd-hover)
&._noBd
margin 0 -12px
@@ -78,7 +79,7 @@ export default {
display flex
align-items center
justify-content center
- margin-right 6px
+ margin-right $m7
font-size 22px
&__title
diff --git a/components/stat/Dashboard.vue b/components/stat/Dashboard.vue
index 3ea0c185..ca83487f 100644
--- a/components/stat/Dashboard.vue
+++ b/components/stat/Dashboard.vue
@@ -350,15 +350,15 @@ export default {
:type="item.type"
)
- template(v-if="(statAverage && (statAverage.incomes === 0 || statAverage.expenses === 0)) || (activeTabStat === 'incomes' && statAverage.incomes !== 0 || activeTabStat === 'expenses' && statAverage.expenses !== 0)")
- .baseBox._mw(v-if="$store.getters['trns/selectedTrnsIdsWithDate'].length > 0")
- .baseBox__title {{ $t('trns.history') }}
- .baseBox__content
- TrnsList3(
- :incomes="activeTabStat === 'incomes'"
- :expenses="activeTabStat === 'expenses'"
- :size="12"
- )
+ template(v-if="(activeTabStat !== 'history' && statAverage && (statAverage.incomes === 0 || statAverage.expenses === 0)) || (activeTabStat === 'incomes' && statAverage.incomes !== 0 || activeTabStat === 'expenses' && statAverage.expenses !== 0)")
+ .baseBox._mw(v-if="$store.getters['trns/selectedTrnsIdsWithDate'].length > 0")
+ .baseBox__title {{ $t('trns.history') }}
+ .baseBox__content
+ TrnsList3(
+ :incomes="activeTabStat === 'incomes'"
+ :expenses="activeTabStat === 'expenses'"
+ :size="12"
+ )
//- history
.history(v-if="activeTabStat === 'history' || statAverage && (statAverage.incomes !== 0 && statAverage.expenses !== 0) && ui.showHistory && $store.getters['trns/selectedTrnsIdsWithDate'].length > 0 && (activeTabStat !== 'incomes' && activeTabStat !== 'expenses')")
diff --git a/components/stat/StatItem.vue b/components/stat/StatItem.vue
index a125d5eb..9cb4d106 100644
--- a/components/stat/StatItem.vue
+++ b/components/stat/StatItem.vue
@@ -137,10 +137,13 @@ export default {
border 1px solid var(--c-bg-5)
&._active
- margin $m6 (- $m6)
+ margin 0 (- $m5)
+ margin-bottom $m7
+ margin-left (- $m6)
padding 0
- background var(--c-bg-4)
- border 1px solid var(--c-bg-5)
+ padding-left $m4
+ border-radius 0
+ border-left 1px solid var(--c-bg-8)
&__content
display grid
@@ -149,9 +152,7 @@ export default {
grid-column-gap 20px
^[0]._active &
- margin 0 $m6
- padding $m6 0
- border-bottom 1px solid var(--c-bg-5)
+ padding $m5 $m5
&__inside
padding 0
diff --git a/components/stat/StatItemChildCats.vue b/components/stat/StatItemChildCats.vue
index 84dbeb89..e41363e7 100644
--- a/components/stat/StatItemChildCats.vue
+++ b/components/stat/StatItemChildCats.vue
@@ -72,7 +72,3 @@ export default {
:total="category[typeName]"
)
</template>
-
-<style lang="stylus" scoped>
-
-</style>
diff --git a/components/stat/StatItemChildCatsItem.vue b/components/stat/StatItemChildCatsItem.vue
index 87118abe..2a267895 100644
--- a/components/stat/StatItemChildCatsItem.vue
+++ b/components/stat/StatItemChildCatsItem.vue
@@ -61,7 +61,7 @@ export default {
Icon(
:color="category.color"
:icon="category.icon"
- background="var(--c-bg-6)"
+ :background="isShowInside ? 'var(--c-bg-5)' : 'transparent'"
round
)
@@ -93,7 +93,7 @@ export default {
.statItemChild
.trnItem._stat
- padding-right $m6
+ padding-right $m5
padding-left $m6
</style>
@@ -110,13 +110,7 @@ export default {
grid-template-rows repeat(2, minmax(10px, max-content))
grid-column-gap 20px
margin 0 0px
- padding $m6 $m6
-
- &__trns
- padding 0
-
- @media $media-laptop
- padding 0 $m6 0 $m7
+ padding $m6 $m5
&__graph
overflow hidden
@@ -154,8 +148,7 @@ export default {
align-self center
&__trns
- padding-right $m6
- padding-left $m6
+ padding 0
^[0]._active &
padding-bottom $m6
diff --git a/components/stat/StatItemRound.vue b/components/stat/StatItemRound.vue
index af0bd833..63897141 100644
--- a/components/stat/StatItemRound.vue
+++ b/components/stat/StatItemRound.vue
@@ -89,7 +89,8 @@ export default {
.statItemRound__icon
Icon(
:icon="category.icon"
- :background="category.color"
+ :color="category.color"
+ background="var(--c-bg-5)"
round
)
@@ -105,6 +106,18 @@ export default {
)
</template>
+<style lang="stylus">
+.statItemRound
+ &__icon
+ .icon
+ width 42px !important
+ height 42px !important
+ background var(--c-bg-4) !important
+ // border 1px solid var(--c-bg-5)
+
+ .icon__image
+ font-size 24px
+</style>
<style lang="stylus" scoped>
@import '~assets/stylus/variables'
@@ -117,10 +130,12 @@ export default {
justify-content center
flex-flow column
padding $m6
+ border 1px solid transparent
border-radius $m5
+media-hover()
background var(--c-bg-4)
+ border 1px solid var(--c-item-bd-hover)
&._prevStat
opacity .5
diff --git a/components/trnForm/TrnForm.vue b/components/trnForm/TrnForm.vue
index 7fd2666d..7d2433a6 100644
--- a/components/trnForm/TrnForm.vue
+++ b/components/trnForm/TrnForm.vue
@@ -231,7 +231,7 @@ export default {
.swiper-slide(:style="{ height: maxHeight }")
.scroll.scrollerBlock
div(style="paddingBottom: 16px")
- div(style="padding: 20px 0 20px 0")
+ div(style="padding: 20px 0 26px 0")
WalletsList3(
:activeItemId="$store.state.trnForm.values.walletId"
:limit="4"
@@ -240,7 +240,8 @@ export default {
@onClick="onClickWallet"
)
- div(style="padding: 0 0 20px 0")
+ div(style="padding: 0 0 26px 0")
+ .subTitle {{ $t('categories.favoriteTitle') }} {{ $t('categories.title') }}
CategoriesView(
:ids="$store.getters['categories/quickSelectorCategoriesIds']"
:activeItemId="$store.state.trnForm.values.categoryId"
@@ -250,6 +251,7 @@ export default {
)
div(style="padding: 0 0 10px 0")
+ .subTitle {{ $t('categories.lastUsedTitle') }} {{ $t('categories.title') }}
CategoriesView(
:ids="$store.getters['categories/lastUsedCategoriesIdsByDate']"
:activeItemId="$store.state.trnForm.values.categoryId"
@@ -258,6 +260,10 @@ export default {
@onClick="onCategoryClick"
)
+ .buttons
+ .button(@click="$store.commit('trnForm/showTrnFormModal', 'categories')") {{ $t('categories.title') }}
+ .button(@click="$store.commit('trnForm/showTrnFormModal', 'wallets')") {{ $t('wallets.title') }}
+
.trnForm__pagination
//- Modals
@@ -391,6 +397,28 @@ export default {
<style lang="stylus" scoped>
@import '~assets/stylus/variables'
+.buttons
+ display flex
+ align-items center
+ justify-content center
+ gap $m8
+ padding 0 $m8
+ padding-top $m4
+ padding-bottom $m9
+
+.button
+ button-base-1()
+
+.subTitle
+ padding 0 $m8
+ padding-bottom $m6
+ color var(--c-font-4)
+ font-size 10px
+ letter-spacing 0px
+ font-weight 600
+ text-align center
+ text-transform uppercase
+
.scroll
overflow hidden
overflow-y auto
diff --git a/components/trnForm/TrnFormAmount.vue b/components/trnForm/TrnFormAmount.vue
index 76f5b9a7..40249e7b 100644
--- a/components/trnForm/TrnFormAmount.vue
+++ b/components/trnForm/TrnFormAmount.vue
@@ -29,9 +29,8 @@ export default {
nextAmountType = 1
break
case 1:
- if (this.$store.getters['wallets/walletsSortedIds'].length > 1) {
+ if (this.$store.getters['wallets/walletsSortedIds'].length > 1)
nextAmountType = 0
- }
break
}
diff --git a/components/trnForm/TrnFormAmountPc.vue b/components/trnForm/TrnFormAmountPc.vue
deleted file mode 100644
index 8659ad26..00000000
--- a/components/trnForm/TrnFormAmountPc.vue
+++ /dev/null
@@ -1,96 +0,0 @@
-<script>
-import { computed, useContext } from '@nuxtjs/composition-api'
-import useCalculator from '~/components/trnForm/calculator/useCalculator'
-
-export default {
- name: 'TrnFormAmountPc',
-
- setup () {
- const { store } = useContext()
- const { isSum, getResult, expression } = useCalculator()
- const amountType = computed(() => store.state.trnForm.values.amountType)
-
- return {
- amountType,
- isSum,
- getResult,
- expression,
- className: computed(() => ({
- _expenses: amountType.value === 0,
- _incomes: amountType.value === 1
- }))
- }
- }
-}
-</script>
-
-<template lang="pug">
-.amountInputLaptop(:class="className")
- .trnFormAmountPc
- TrnFormTypes
-
- .trnFormAmount(:class="className")
- .trnFormAmount__value {{ expression }}
- .trnFormAmount__evaluation {{ isSum ? null : getResult }}
-</template>
-
-<style lang="stylus" scoped>
-@import '~assets/stylus/variables'
-
-.amountInputLaptop
- &__evaluation
- opacity .8
- height 12px
- margin-top (- $m7)
- margin-bottom $m7
- padding-right $m9
- font-size 14px
- text-align right
-
- ^[0]._expenses &
- color var(--c-expenses-1)
-
- ^[0]._incomes &
- color var(--c-incomes-1)
-
-.trnFormAmountPc
- background var(--c-bg-3)
-
-.trnFormAmount._incomes .trnFormAmountPc__input__value
- color var(--c-incomes-1)
-
-.trnFormAmount._expenses .trnFormAmountPc__input__value
- color var(--c-expenses-1)
-
-.trnFormAmount
- padding $m8 $m9
- text-align right
-
- &._expenses
- color var(--c-expenses-1)
-
- &._incomes
- color var(--c-incomes-1)
-
- &__value
- typo-money()
- font-size 42px !important
- font-weight 500
- line-height 32px
- word-break break-word
- white-space normal
- text-align right
- background none
- border none
-
- ^[0]._expenses &
- color var(--c-expenses-1)
-
- ^[0]._incomes &
- color var(--c-incomes-1)
-
- &__evaluation
- opacity .8
- height 12px
- font-size 14px
-</style>
diff --git a/components/trnForm/TrnFormTrns.vue b/components/trnForm/TrnFormTrns.vue
index ec106a55..5cc2344b 100644
--- a/components/trnForm/TrnFormTrns.vue
+++ b/components/trnForm/TrnFormTrns.vue
@@ -167,16 +167,15 @@ export default {
)
.trnsList__pages(v-if="!isShowedAllTrns")
- SharedButton(
- :class="['_text-center _border _inline']"
- :title="$t('trns.more')"
- @onClick="showMoreTrns"
- )
+ .button(@click="showMoreTrns") {{ $t('trns.more') }}
</template>
<style lang="stylus" scoped>
@import '~assets/stylus/variables'
+.button
+ button-base-1()
+
.container
display flex
align-items center
@@ -253,15 +252,15 @@ export default {
font-roboto()
text-align center
border 1px solid transparent
- border-radius 50px
-
- &:active
- color var(--c-font-2)
- background var(--c-blue-1)
+ anim()
&._active
cursor default
- color var(--c-font-3)
- background var(--c-bg-5)
- border 1px solid var(--c-bg-5)
+ color var(--c-blue-1)
+
+ +media-hover()
+ &:not(._active)
+ color var(--c-font-2)
+ background var(--c-bg-5)
+ border-radius 50px
</style>
diff --git a/components/trnForm/TrnFormTypes.vue b/components/trnForm/TrnFormTypes.vue
index 5a499a52..4376d794 100644
--- a/components/trnForm/TrnFormTypes.vue
+++ b/components/trnForm/TrnFormTypes.vue
@@ -62,12 +62,13 @@ export default {
border 1px solid transparent
anim()
- +media-hover()
- color var(--c-font-2)
- background var(--c-bg-5)
- border-radius 50px
-
&._active
cursor default
color var(--c-blue-1)
+
+ +media-hover()
+ &:not(._active)
+ color var(--c-font-2)
+ background var(--c-bg-5)
+ border-radius 50px
</style>
diff --git a/components/trns/list/TrnsList.vue b/components/trns/list/TrnsList.vue
index c973a789..12b2c378 100644
--- a/components/trns/list/TrnsList.vue
+++ b/components/trns/list/TrnsList.vue
@@ -123,16 +123,16 @@ export default {
)
.trnsList__pages(v-if="!isShowedAllTrns")
- SharedButton(
- :class="['_text-center _border _inline']"
- :title="$t('trns.more')"
- @onClick="showMoreTrns"
- )
+ .button(@click="showMoreTrns") {{ $t('trns.more') }}
</template>
<style lang="stylus" scoped>
@import '~assets/stylus/variables'
+.button
+ button-base-1()
+ margin-top $m7
+
.trnsList
max-width 400px
padding-bottom 8px
@@ -161,7 +161,6 @@ export default {
&__day
overflow hidden
- border-bottom 1px solid var(--c-bg-3)
margin-bottom 16px
padding-bottom 16px
diff --git a/components/trns/list/TrnsList3.vue b/components/trns/list/TrnsList3.vue
index e815f322..7004214f 100644
--- a/components/trns/list/TrnsList3.vue
+++ b/components/trns/list/TrnsList3.vue
@@ -145,16 +145,16 @@ export default {
)
.trnsList__pages(v-if="!isShowedAllTrns")
- SharedButton(
- :class="['_text-center _border _inline']"
- :title="$t('trns.more')"
- @onClick="showMoreTrns"
- )
+ .button(@click="showMoreTrns") {{ $t('trns.more') }}
</template>
<style lang="stylus" scoped>
@import '~assets/stylus/variables'
+.button
+ button-base-1()
+ margin-top $m7
+
.trnsList
padding 0 $m6
diff --git a/components/wallets/Modal.vue b/components/wallets/Modal.vue
index 4132ebea..9e77b11d 100644
--- a/components/wallets/Modal.vue
+++ b/components/wallets/Modal.vue
@@ -1,10 +1,12 @@
<script>
import { useContext } from '@nuxtjs/composition-api'
import { db } from '~/services/firebaseConfig'
+import useFilter from '~/modules/filter/useFilter'
export default {
setup () {
const { store } = useContext()
+ const { setWalletFilter } = useFilter()
const closed = () => {
store.commit('wallets/hideWalletsModalWalletModal')
@@ -12,6 +14,7 @@ export default {
}
return {
+ setWalletFilter,
closed
}
},
@@ -48,16 +51,15 @@ export default {
methods: {
handleSetFilterWallet () {
- this.$store.commit('wallets/hideWalletsModalWalletModal')
- this.$store.dispatch('ui/setActiveTab', 'stat')
+ this.setWalletFilter(this.walletId)
this.$store.commit('filter/setFilterDateNow')
- this.$store.dispatch('filter/setFilterWalletId', this.walletId)
+
+ this.$store.commit('wallets/hideWalletsModalWalletModal')
this.$store.commit('wallets/setWalletsModalWalletModalId', null)
- if (this.$store.state.ui.mobile) {
- this.$store.dispatch('ui/setActiveTabViewName', 'stat')
- this.$store.dispatch('ui/setActiveTabStat', 'details')
- }
+ this.$store.dispatch('ui/setActiveTab', 'stat')
+ this.$store.dispatch('ui/setActiveTabViewName', 'stat')
+ this.$store.dispatch('ui/setActiveTabStat', 'details')
},
handleEditClick () {
@@ -124,7 +126,7 @@ Portal(
size="xl"
)
- template
+ template(#default="{ close }")
.content
template(v-if="$store.state.wallets.items[walletId].desc")
.info(style="padding-bottom:20px") {{ $store.state.wallets.items[walletId].desc }}
@@ -146,6 +148,12 @@ Portal(
@onClick="handleSetFilterWallet"
)
+ .buttonBack(
+ @click="close()"
+ ) {{ $t('close') }}
+
+ button-base-1()
+
ModalBottomConfirm(
:show="showModalConfirm"
:description="deleteInfo"
@@ -163,12 +171,14 @@ Portal(
background var(--c-bg-3)
.walletItemGrid
+ cursor default
width 100%
padding $m8
padding-top 0
padding-bottom $m6
border-bottom 0
- background var(--c-bg-3)
+ background var(--c-bg-3) !important
+ border 1px solid transparent !important
border-radius $m6 $m6 0 0
&__name
@@ -234,4 +244,8 @@ Portal(
width 12px
height 12px
stroke var(--c-font-1)
+
+.buttonBack
+ button-base-1()
+ margin $m8 auto $m5 auto
</style>
diff --git a/components/wallets/item/WalletItem2.vue b/components/wallets/item/WalletItem2.vue
index 115a79b4..3c9bee2a 100644
--- a/components/wallets/item/WalletItem2.vue
+++ b/components/wallets/item/WalletItem2.vue
@@ -81,9 +81,15 @@ export default {
position relative
padding 14px $m7
padding-top 0
- background var(--color-item-bg)
+ background var(--c-item-bg-main)
+ border 1px solid transparent
border-top 0
- border-radius $m5
+ border-radius $m6
+ anim()
+
+ +media-hover()
+ background var(--c-item-bg-hover)
+ border-color var(--c-item-bd-hover)
&__line
opacity 1
diff --git a/components/wallets/item/walletItem.styl b/components/wallets/item/walletItem.styl
index 9c7a4208..ff81e162 100644
--- a/components/wallets/item/walletItem.styl
+++ b/components/wallets/item/walletItem.styl
@@ -11,7 +11,7 @@
+media-hover()
color var(--c-text-1)
- border 1px solid var(--c-blue-1)
+ background var(--c-bg-6)
&__grid
display grid
diff --git a/layouts/default.vue b/layouts/default.vue
index 49918d18..ffd2feca 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -1,11 +1,12 @@
<script>
import { ref, computed, useContext, useFetch, onMounted } from '@nuxtjs/composition-api'
+import useBaseLayout from '~/components/layout/useBaseLayout'
import debounce from '~/utils/debounce'
import detectTouch from '~/assets/js/isTouchDevice'
import useUIView from '~/components/layout/useUIView'
export default {
- name: 'DefaultLayout',
+ name: 'AppLayout',
setup () {
const { store } = useContext()
@@ -15,6 +16,22 @@ export default {
await initUI()
})
+ const keepAliveInclude = ['IndexPage2']
+
+ // Layout
+ const { isShowPeriodsNamesModal } = useBaseLayout()
+
+ // UI
+ const { ui } = useUIView()
+
+ // Computed
+ const activeTabViewName = computed(() => store.state.ui.activeTabViewName)
+ const activeTab = computed(() => store.state.ui.activeTab)
+ const activeTabStat = computed(() => store.state.ui.activeTabStat)
+ const isStatPage = computed(() => activeTabViewName.value === 'stat')
+ const statCurrentPeriod = computed(() => store.getters['stat/statCurrentPeriod'])
+ const statAverage = computed(() => store.getters['stat/statAverage'])
+
/**
* Update modal
*/
@@ -34,11 +51,6 @@ export default {
const isTouchDevice = ref(false)
onMounted(() => { isTouchDevice.value = detectTouch() })
- const className = computed(() => ({
- isNotTouchDevice: !isTouchDevice.value,
- isTouchDevice: isTouchDevice.value
- }))
-
/**
* Page dimensions
*/
@@ -49,12 +61,34 @@ export default {
store.dispatch('ui/setAppDimensions', { width, height })
}
+ const className = computed(() => ({
+ _stat: !!isStatPage.value,
+ [`_${activeTabViewName.value}`]: true,
+ isNotTouchDevice: !isTouchDevice.value,
+ isTouchDevice: isTouchDevice.value
+ }))
+
onMounted(() => {
getPageDimensions()
window.addEventListener('resize', debounce(getPageDimensions, 300))
})
return {
+ keepAliveInclude,
+
+ isShowPeriodsNamesModal,
+
+ ui,
+
+ activeTabViewName,
+ activeTab,
+ activeTabStat,
+ isStatPage,
+ statCurrentPeriod,
+ statAverage,
+
+ className,
+
isShowUpdateApp,
className
}
@@ -63,16 +97,86 @@ export default {
</script>
<template lang="pug">
-.layout(:class="className")
+.layoutNew(:class="className")
+ //- Modals
+ //-----------------------------------
+ CategoriesModal
+ CurrenciesCurrencyModal
+
+ BaseBottomSheet(
+ keepAlive
+ :show="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories'] && $store.state.trnForm.show"
+ @closed="$store.dispatch('trnForm/closeTrnForm')"
+ )
+ template(#handler="{ close }")
+ .handler
+
+ .handler__close(@click="close")
+ svg(
+ viewBox='0 0 24 24'
+ fill='none'
+ stroke='#000'
+ stroke-linecap='round'
+ stroke-linejoin='round'
+ stroke-width='3'
+ )
+ path(d='M.75 23.249l22.5-22.5')
+ path(d='M23.25 23.249L.75.749')
+
+ TrnForm(:show="$store.getters['wallets/hasWallets'] && $store.getters['categories/hasCategories'] && $store.state.trnForm.show")
+
+ TrnsModal
+ WalletsModal
+
+ //- Base Menu
+ LazyLayoutMobileMenuModal(v-if="activeTab === 'menu'")
+
+ ModalBottom(
+ v-if="activeTab === 'createCategory'"
+ key="createCategory"
+ @onClose="$store.dispatch('ui/setActiveTab', 'stat')"
+ ): CategoriesForm
+
+ //- Settings
+ Portal(
+ v-if="activeTab === 'settings'"
+ to="modal"
+ )
+ ModalBottom(@onClose="$store.dispatch('ui/setActiveTab', 'stat')")
+ Settings(v-if="activeTab === 'settings'")
+
+ //- Wallet Form: create or edit
+ Portal(
+ v-if="activeTab === 'createWallet'"
+ to="modal"
+ )
+ ModalBottom(
+ :key="$store.state.wallets.editId"
+ @onClose="$store.dispatch('ui/setActiveTab', 'stat')"
+ )
+ WalletsFormWalletForm
+
+ //- Wallet Sort
+ Portal(
+ v-if="activeTab === 'walletsSort'"
+ to="modal"
+ key="walletsSort"
+ )
+ ModalBottom(
+ isShow
+ key="walletsSort"
+ @onClose="$store.dispatch('ui/setActiveTab', 'stat')"
+ )
+ template(#default="{ closeModal }")
+ WalletsSort(
+ v-if="activeTab === 'walletsSort'"
+ @closeModal="closeModal"
+ )
+
//- Loading
template(v-if="!$store.state.app.status.ready")
LoaderSharedLoader
- //- Continue to app
- transition(name="fadeInSlow" appear)
- template(v-show="$store.state.app.status.ready && !$fetchState.pending")
- Nuxt
-
//- Notifications
Notifications(
:position="$store.state.ui.mobile ? 'top center' : 'top left'"
@@ -93,59 +197,110 @@ export default {
)
</template>
-<style lang="css">
-:root {
- --height: 100vh
-}
+<style lang="stylus">
+@import '~assets/stylus/base'
</style>
-<style lang="stylus">
+<style lang="stylus" scoped>
@import '~assets/stylus/variables'
-*
- box-sizing border-box
- -webkit-tap-highlight-color transparent
+.layoutNew
+ overflow hidden
+ position relative
+ display grid
+ height 100%
+ background var(--c-bg-3)
- &:focus
- outline 0
+ &__wrap
+ overflow hidden
+ display grid
+ grid-template-columns 1fr
+ grid-template-rows 1fr minmax(auto, auto)
+ height 100%
-html
-body
-#__nuxt
-#__layout
- height 100%
+ +media(1200px)
+ grid-template-rows 1fr auto
+ grid-template-columns minmax(auto, auto) 1fr
-html
- font-size 16px
- overscroll-behavior-y none
+ &__sidebar
+ display none
-body
- overflow hidden
- overscroll-behavior-y none
- margin 0
- color var(--c-font-2)
- font-primary()
- font-size 14px
- line-height 1
- letter-spacing 0
- background var(--color-bg-canvas)
- user-select none
+ +media(1200px)
+ display block
+
+ &__content
+ overflow hidden
+ position relative
+ display grid
+ height 100%
+
+ &__menu
+ background var(--c-bg-3)
-.layout
+ +media(600px)
+ display none
+ background var(--c-bg-2)
+
+.handler
+ z-index 2
+ position absolute
+ top 0
+ left 0
display flex
- height 100%
- min-width 320px
+ align-items center
+ justify-content center
+ width 100%
+ height 16px
- &__wrap
- flex-grow 1
- position relative
+ &:after
+ content ''
+ display block
+ width 32px
+ height 4px
+ background var(--c-bg-8)
+ border-radius 4px
-// Base
-// ------------------------------------
-.context-menu-sep
- height 1px
- background var(--c-bg-3)
+ &__close
+ z-index 3
+ cursor pointer
+ position absolute
+ top 4px
+ right 4px
+ display flex
+ align-items center
+ justify-content center
+ width 40px
+ height 40px
+ border-radius 50%
+ anim()
+
+ +media-hover()
+ background var(--c-blue-1)
+
+ svg
+ anim()
+ width 12px
+ height 12px
+ stroke var(--c-font-4)
+
+ +media-hover()
+ svg
+ width 12px
+ height 12px
+ stroke var(--c-font-1)
+
+.page2
+ overflow hidden
+ overflowScrollY()
+ display grid
+ height 100%
+ max-width 1100px
+ padding 0
+ background var(--color-bg-canvas)
+
+ +media(800px)
+ padding 0 32px
- /.light-mode &
- background var(--c-bg-5)
+ +media(1000px)
+ padding 0 64px
</style>
diff --git a/layouts/login.vue b/layouts/login.vue
new file mode 100644
index 00000000..f64d1e02
--- /dev/null
+++ b/layouts/login.vue
@@ -0,0 +1,113 @@
+<script>
+import { ref, computed, useContext, useFetch, onMounted } from '@nuxtjs/composition-api'
+import debounce from '~/utils/debounce'
+import detectTouch from '~/assets/js/isTouchDevice'
+import useUIView from '~/components/layout/useUIView'
+
+export default {
+ name: 'DefaultLayout',
+
+ setup () {
+ const { store } = useContext()
+
+ useFetch(async () => {
+ const { initUI } = useUIView()
+ await initUI()
+ })
+
+ /**
+ * Update modal
+ */
+ const isShowUpdateApp = ref(false)
+ onMounted(async () => {
+ const workbox = await window.$workbox
+ if (workbox) {
+ workbox.addEventListener('installed', (event) => {
+ isShowUpdateApp.value = event.isUpdate
+ })
+ }
+ })
+
+ /**
+ * Detect touch device
+ */
+ const isTouchDevice = ref(false)
+ onMounted(() => { isTouchDevice.value = detectTouch() })
+
+ const className = computed(() => ({
+ isNotTouchDevice: !isTouchDevice.value,
+ isTouchDevice: isTouchDevice.value
+ }))
+
+ /**
+ * Is production
+ */
+ const isProduction = process.env.NODE_ENV === 'production'
+
+ /**
+ * Page dimensions
+ */
+ function getPageDimensions () {
+ const width = document.documentElement.clientWidth
+ const height = document.documentElement.clientHeight
+ document.documentElement.style.setProperty('--height', height + 'px')
+ store.dispatch('ui/setAppDimensions', { width, height })
+ }
+
+ onMounted(() => {
+ getPageDimensions()
+ window.addEventListener('resize', debounce(getPageDimensions, 300))
+ })
+
+ return {
+ isShowUpdateApp,
+ className,
+ isProduction
+ }
+ }
+}
+</script>
+
+<template lang="pug">
+.layout(:class="className")
+ //- Loading
+ template(v-if="!$store.state.app.status.ready")
+ LoaderSharedLoader
+
+ //- Continue to app
+ transition(name="fadeInSlow" appear)
+ template(v-show="$store.state.app.status.ready && !$fetchState.pending")
+ Nuxt
+
+ //- Notifications
+ Notifications(
+ :position="$store.state.ui.mobile ? 'top center' : 'top left'"
+ :width="$store.state.ui.mobile ? '94%' : '380px'"
+ classes="notifications"
+ )
+
+ //- Modals
+ PortalTarget(
+ multiple
+ name="modal"
+ )
+
+ //- Update modal
+ LazyAppUpdateAppModal(
+ v-if="isShowUpdateApp"
+ @onClose="isShowUpdateApp = false"
+ )
+
+ //- Metrica
+ LazyMetrica(v-if="isProduction")
+</template>
+
+<style lang="css">
+:root {
+ --height: 100vh
+}
+</style>
+
+<style lang="stylus">
+@import '~assets/stylus/variables'
+</style>
diff --git a/locales/en-US.js b/locales/en-US.js
index 94277f7d..001e84b7 100644
--- a/locales/en-US.js
+++ b/locales/en-US.js
@@ -20,6 +20,9 @@ export default {
change: 'Change theme'
},
+ backTo: 'Back to ',
+ close: 'Close',
+
trnForm: {
transferTitle: 'Transfer',
saveTrnButton: 'Save transaction',
@@ -133,7 +136,7 @@ export default {
open: 'Open settings',
customize: 'Сustomize',
app: 'Application',
- delete: 'Delete',
+ caution: 'With caution',
demo: 'Demo',
deleteButton: 'Delete my data',
loadDemoButton: 'Load demo data'
diff --git a/locales/ru-RU.js b/locales/ru-RU.js
index de62b182..4072a3d0 100644
--- a/locales/ru-RU.js
+++ b/locales/ru-RU.js
@@ -21,6 +21,9 @@ export default {
change: 'Сменить цвет оформления'
},
+ backTo: 'Назад к ',
+ close: 'Закрыть',
+
trnForm: {
transferTitle: 'Перевод',
saveTrnButton: 'Сохранить',
@@ -135,7 +138,7 @@ export default {
open: 'Открыть настройки',
customize: 'Внешний вид',
app: 'Приложение',
- delete: 'Удаление данных',
+ caution: 'C осторожностью',
demo: 'Демо режим',
deleteButton: 'Удалить все мои данные',
loadDemoButton: 'Загрузить демо данные'
diff --git a/modules/filter/useFilter.ts b/modules/filter/useFilter.ts
index 71e24026..8d555c41 100644
--- a/modules/filter/useFilter.ts
+++ b/modules/filter/useFilter.ts
@@ -1,7 +1,9 @@
-import { computed, useContext } from '@nuxtjs/composition-api'
+import { computed, useContext, useRoute, useRouter } from '@nuxtjs/composition-api'
export default function useFilter () {
const { store } = useContext()
+ const route = useRoute()
+ const router = useRouter()
const filterPeriodNameAllReplacedToYear = computed(() => store.state.filter.period === 'all' ? 'year' : store.state.filter.period)
function scrollTop () {
@@ -10,11 +12,17 @@ export default function useFilter () {
}
function setCategoryFilter (id) {
+ if (route.value.name !== 'index')
+ router.push('/')
+
store.dispatch('filter/handleSetFilterCategory', id)
scrollTop()
}
function setWalletFilter (id) {
+ if (route.value.name !== 'index')
+ router.push('/')
+
store.dispatch('filter/setFilterWalletId', id)
scrollTop()
}
diff --git a/nuxt.config.js b/nuxt.config.js
index 2e5f46e1..2910b160 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -27,7 +27,7 @@ export default {
// Global page headers (https://go.nuxtjs.dev/config-head)
head: {
- title: 'Finapp',
+ titleTemplate: '%s - Finapp',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
diff --git a/package.json b/package.json
index f8de1889..06101c0b 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "finapp",
- "version": "3.14.2",
+ "version": "3.15.1",
"scripts": {
"dev": "cross-env NUXT_HOST=0.0.0.0 nuxt",
"build": "nuxt build",
diff --git a/components/categories/Page.vue b/pages/categories.vue
similarity index 80%
rename from components/categories/Page.vue
rename to pages/categories.vue
index 245f366f..6fbe963e 100644
--- a/components/categories/Page.vue
+++ b/pages/categories.vue
@@ -1,6 +1,13 @@
<script>
export default {
- name: 'LayoutIndexCategories'
+ name: 'CategoriesPage',
+ layout: 'app',
+
+ head () {
+ return {
+ title: this.$t('categories.title')
+ }
+ },
}
</script>
@@ -22,14 +29,7 @@ LayoutComponentWrap(:contentPadding="false")
@import '~assets/stylus/variables'
.header
- padding 60px 0
- font-h1()
- font-size 22px
- font-weight 600
- text-align center
-
- +media-laptop()
- font-size 28px
+ header-title()
.buttons
display flex
diff --git a/pages/index.vue b/pages/index.vue
index 97fd9a90..6bab9ef7 100644
--- a/pages/index.vue
+++ b/pages/index.vue
@@ -2,15 +2,14 @@
export default {
name: 'IndexPage',
- fetch () {
- if (!this.$store.getters['wallets/hasWallets'] ||
- !this.$store.getters['categories/hasCategories'])
- this.$router.replace('/welcome')
+ head () {
+ return {
+ title: this.$t('stat.title')
+ }
}
}
</script>
<template lang="pug">
-.layout__wrap(v-if="$store.getters['user/userUid']")
- LayoutBase
+LayoutBase
</template>
diff --git a/pages/login.vue b/pages/login.vue
index 8614d399..fc052bd0 100644
--- a/pages/login.vue
+++ b/pages/login.vue
@@ -4,6 +4,7 @@ import { ref, useContext } from '@nuxtjs/composition-api'
export default {
name: 'LoginPage',
+ layout: 'login',
setup () {
const { query } = useContext()
diff --git a/pages/settings.vue b/pages/settings.vue
new file mode 100644
index 00000000..51f51784
--- /dev/null
+++ b/pages/settings.vue
@@ -0,0 +1,154 @@
+<script>
+import pkg from '~/package'
+
+export default {
+ name: 'SettingsPage',
+ layout: 'app',
+
+ data () {
+ return {
+ confirmCreateDemo: false,
+ confirmRemoveUserData: false,
+ version: pkg.version
+ }
+ },
+
+ head () {
+ return {
+ title: this.$t('settings.title')
+ }
+ },
+
+ methods: {
+ generateDemo () {
+ this.confirmCreateDemo = false
+ this.$store.dispatch('demo/createDemo')
+ },
+
+ removeUserData () {
+ this.confirmRemoveUserData = false
+ this.$store.dispatch('user/removeUserData')
+ }
+ }
+}
+</script>
+
+<template lang="pug">
+LayoutComponentWrap(:contentPadding="false")
+ template(slot="content")
+ .header {{ $t('settings.title') }}
+
+ .settings
+ .settings__column
+ .settings__group
+ .settings__subHeader {{ $t('currency.title') }}
+ .settings__item
+ SharedButton._bdb(
+ :title="$t('currency.selectBaseTitle')"
+ icon="mdi mdi-currency-usd"
+ @onClick="$store.commit('currencies/showBaseCurrenciesModal')"
+ )
+
+ .settings__group
+ .settings__subHeader {{ $t('settings.app') }}
+ .settings__item
+ LangDropdown
+ .settings__item
+ SharedButton._bdb(
+ icon="mdi mdi-palette"
+ :title="$t('theme.change')"
+ @onClick="$store.dispatch('ui/changeTheme')"
+ )
+
+ .settings__item
+ SharedButton._bdb(
+ :title="$t('userLogout')"
+ icon="mdi mdi-logout"
+ @onClick="$store.dispatch('user/signOut')"
+ )
+
+ .settings__group
+ .settings__subHeader {{ $t('settings.caution') }}
+ .settings__desc {{ $t('alerts.willDeleteEverything') }}
+ .settings__item
+ SharedButton._bdb(
+ :title="$t('settings.deleteButton')"
+ icon="mdi mdi-delete-empty-outline"
+ @onClick="confirmRemoveUserData = true"
+ )
+ .settings__item
+ SharedButton._bdb(
+ :title="$t('settings.loadDemoButton')"
+ icon="mdi mdi-gamepad-variant-outline"
+ @onClick="confirmCreateDemo = true"
+ )
+ .settings__column
+ .settings__group
+ About
+ .appVersion {{ $t('app.version') }} {{ version }}
+
+ ModalBottomConfirm(
+ :description="$t('alerts.willDeleteEverything')"
+ :show="confirmCreateDemo"
+ @onClose="confirmCreateDemo = false"
+ @onConfirm="generateDemo"
+ )
+
+ ModalBottomConfirm(
+ :description="$t('alerts.willDeleteEverything')"
+ :show="confirmRemoveUserData"
+ @onClose="confirmRemoveUserData = false"
+ @onConfirm="removeUserData"
+ )
+</template>
+
+<style lang="stylus" scoped>
+@import '~assets/stylus/variables'
+
+.button
+ button-base-1()
+
+.header
+ header-title()
+
+.settings
+ width 100%
+ flex-grow 1
+ max-width 660px
+ margin 0 auto
+ padding 0 $m7
+ padding-top 0
+
+ +media-laptop()
+ display grid
+ grid-template-columns repeat(auto-fill, minmax(280px, 1fr))
+ grid-column-gap $mb2
+ grid-row-gap $m10
+
+ &__group
+ padding-bottom 56px
+
+ &__item
+ padding-bottom $m7
+ &:last-child
+ padding-bottom 0
+
+ &__desc
+ padding-bottom $m7
+ color var(--c-red-1)
+ font-size 14px
+
+ &__subHeader
+ padding-bottom $m7
+ font-h1()
+ font-size 18px
+
+.thanksTo
+ color var(--c-font-2)
+ font-size 14px
+
+.appVersion
+ padding-top $m10
+ color var(--c-font-3)
+ font-size 10px
+</style>
diff --git a/pages/users.vue b/pages/users.vue
index 1bca8d25..c51493a4 100644
--- a/pages/users.vue
+++ b/pages/users.vue
@@ -172,9 +172,7 @@ LayoutComponentWrap(:contentPadding="false")
</template>
<style lang="stylus" scoped>
-@import '~assets/stylus/variables/fonts'
-@import '~assets/stylus/variables/media'
-@import '~assets/stylus/variables/scroll'
+@import '~assets/stylus/variables'
.wrapper
padding 0 $m7
@@ -244,10 +242,17 @@ LayoutComponentWrap(:contentPadding="false")
.item
position relative
width 100%
- padding 16px
- background var(--c-bg-1)
- border-radius 8px
+ padding $m8
+ background var(--c-bg-4)
+ border 1px solid transparent
+ border-radius $m7
flex-grow 1
+ anim()
+
+ +media-hover()
+ color var(--c-text-1)
+ background var(--c-bg-2)
+ border 1px solid var(--c-blue-1)
h2
padding-right 40px
diff --git a/components/wallets/Page.vue b/pages/wallets.vue
similarity index 86%
rename from components/wallets/Page.vue
rename to pages/wallets.vue
index ab344d17..f902fa12 100644
--- a/components/wallets/Page.vue
+++ b/pages/wallets.vue
@@ -1,6 +1,13 @@
<script>
export default {
- name: 'WalletsPageMobile',
+ name: 'WalletsPage',
+ layout: 'app',
+
+ head () {
+ return {
+ title: this.$t('wallets.title')
+ }
+ },
methods: {
handleShowWalletsModalWalletModal (id) {
@@ -32,14 +39,7 @@ LayoutComponentWrap(:contentPadding="false")
@import '~assets/stylus/variables'
.header
- padding 60px 0
- font-h1()
- font-size 22px
- font-weight 600
- text-align center
-
- +media-laptop()
- font-size 28px
+ header-title()
.buttons
display flex
diff --git a/pages/welcome.vue b/pages/welcome.vue
index b22f1d11..1cc9ee03 100644
--- a/pages/welcome.vue
+++ b/pages/welcome.vue
@@ -1,6 +1,7 @@
<script>
export default {
name: 'WelcomePage',
+ layout: 'login',
data () {
return {
diff --git a/store/ui/actions.js b/store/ui/actions.js
index d266d8dd..4a6d24b1 100644
--- a/store/ui/actions.js
+++ b/store/ui/actions.js
@@ -10,10 +10,10 @@ export default {
// ui
if (uiLocalStore) {
- uiLocalStore.activeTabStat &&
- dispatch('setActiveTabStat', uiLocalStore.activeTabStat)
+ if (uiLocalStore.activeTab)
+ dispatch('setActiveTab', uiLocalStore.activeTab)
- uiLocalStore.activeTabViewName &&
+ if (uiLocalStore.activeTabViewName)
dispatch('setActiveTabViewName', uiLocalStore.activeTabViewName)
}
},