Skip to content

Open source personal finance application

update: 3.30.4

ilkome2c31b1847f48
diff --git a/assets/css/tailwind.css b/assets/css/tailwind.css
index e6661a11..8232accb 100644
--- a/assets/css/tailwind.css
+++ b/assets/css/tailwind.css
@@ -18,6 +18,14 @@ body {
body {
background: #171717
}
+@media (prefers-color-scheme: light) {
+ body {
+ background: #fafafa;
+ }
+}
+.light body {
+ background: #fafafa;
+}
html,
body,
diff --git a/assets/stylus/base/inputText.styl b/assets/stylus/base/inputText.styl
index 96753706..814415dc 100644
--- a/assets/stylus/base/inputText.styl
+++ b/assets/stylus/base/inputText.styl
@@ -18,8 +18,9 @@ textarea
border 1px solid var(--c-item-bd-main)
border-radius $m5
anim()
- /.light-mode &
+ /.light &
color var(--c-font-2)
+ border 1px solid var(--c-bg-2)
&._color
width 100px
diff --git a/assets/stylus/colors-light.styl b/assets/stylus/colors-light.styl
index 13c7a3bc..d9fec68a 100644
--- a/assets/stylus/colors-light.styl
+++ b/assets/stylus/colors-light.styl
@@ -9,11 +9,11 @@ html
// backgrounds
// --------------------------------------------
- --c-bg-1 rgba(240, 240, 240, 1)
+ --c-bg-1 #f0f0f0
--c-bg-2 rgba(235, 235, 235, 1)
--c-bg-3 #f5f5f5
--c-bg-4 #fafafa
- --c-bg-5 rgba(220, 220, 220, 1)
+ --c-bg-5 #dcdcdc
--c-bg-6 rgba(235, 235, 235, 1)
--c-bg-7 rgba(215, 215, 215, 1)
--c-bg-14 rgba(250, 250, 250, 1)
diff --git a/components/amount/Amount.vue b/components/amount/Amount.vue
index fc1b14b5..0aa9eded 100644
--- a/components/amount/Amount.vue
+++ b/components/amount/Amount.vue
@@ -90,7 +90,7 @@ export default {
typo-money()
&._altColor
- /.light-mode &
+ /.light &
color var(--c-font-1)
&._incomes
diff --git a/components/app/UpdateAppModal.vue b/components/app/UpdateAppModal.vue
index d99485b7..a052661e 100644
--- a/components/app/UpdateAppModal.vue
+++ b/components/app/UpdateAppModal.vue
@@ -38,7 +38,7 @@ TrnFormModal(@closed="$emit('onClose')")
font-weight 700
fontFamilyNunito()
- /.light-mode &
+ /.light &
color var(--c-font-4)
.emo
diff --git a/components/categories/EditModal.vue b/components/categories/EditModal.vue
index 561b29b8..2b71fe90 100644
--- a/components/categories/EditModal.vue
+++ b/components/categories/EditModal.vue
@@ -483,6 +483,8 @@ div
color var(--c-text-1)
background var(--c-item-bg-hover)
border 1px solid var(--c-item-bd-hover)
+ /.light &
+ color var(--c-font-2)
.menu
overflow hidden
@@ -614,7 +616,7 @@ div
letter-spacing 1px
fontFamilyNunito()
- /.light-mode &
+ /.light &
color var(--c-font-4)
.customColor
diff --git a/components/categories/item/CategoryItem.vue b/components/categories/item/CategoryItem.vue
index 91cc0055..f561f790 100644
--- a/components/categories/item/CategoryItem.vue
+++ b/components/categories/item/CategoryItem.vue
@@ -89,7 +89,7 @@ export default defineComponent({
&__child
color var(--c-font-1)
- /.light-mode &
+ /.light &
color var(--c-font-4)
&__active
diff --git a/components/layout/BottomMenu.vue b/components/layout/BottomMenu.vue
index 44d00ccb..01397592 100644
--- a/components/layout/BottomMenu.vue
+++ b/components/layout/BottomMenu.vue
@@ -154,7 +154,7 @@ export default {
max-width 680px
margin 0 auto
- /.light-mode &
+ /.light &
background var(--c-bg-4)
&__row
@@ -189,7 +189,7 @@ export default {
&._active
color var(--c-font-2)
- /.light-mode &
+ /.light &
color var(--c-font-5)
&__icon
diff --git a/components/shared/button/Button.vue b/components/shared/button/Button.vue
index 75435344..533b4653 100644
--- a/components/shared/button/Button.vue
+++ b/components/shared/button/Button.vue
@@ -181,7 +181,7 @@ export default {
background var(--c-bg-5)
border-radius $m3
- /.light-mode &
+ /.light &
color var(--c-font-1)
background var(--c-bg-12)
diff --git a/components/shared/contextMenu/ContextMenu.vue b/components/shared/contextMenu/ContextMenu.vue
index e9c38f18..bb0edf85 100644
--- a/components/shared/contextMenu/ContextMenu.vue
+++ b/components/shared/contextMenu/ContextMenu.vue
@@ -96,7 +96,7 @@ export default {
border 1px solid var(--c-bg-1)
border-radius $m6
- /.light-mode &
+ /.light &
background var(--c-bg-1)
border 1px solid var(--c-bg-5)
diff --git a/components/shared/inputs/Checkbox.vue b/components/shared/inputs/Checkbox.vue
index bb9b6c95..18c82399 100644
--- a/components/shared/inputs/Checkbox.vue
+++ b/components/shared/inputs/Checkbox.vue
@@ -43,7 +43,7 @@ export default {
box-shadow 0px 0px 4px rgba(0, 0, 0, .25)
anim()
- /.light-mode &
+ /.light &
background var(--c-bg-1)
^[0]._active &
diff --git a/components/stat/cats/PeriodCatsChartItem.vue b/components/stat/cats/PeriodCatsChartItem.vue
index d1f8959d..58cdf974 100644
--- a/components/stat/cats/PeriodCatsChartItem.vue
+++ b/components/stat/cats/PeriodCatsChartItem.vue
@@ -84,7 +84,7 @@ export default {
margin 8px 0 -8px -8px
background var(--c-bg-7)
- /.light-mode &
+ /.light &
background var(--c-bg-1)
&__graph
diff --git a/components/stat/cats/PeriodCatsChartPopup.vue b/components/stat/cats/PeriodCatsChartPopup.vue
index 7553c89b..80c56437 100644
--- a/components/stat/cats/PeriodCatsChartPopup.vue
+++ b/components/stat/cats/PeriodCatsChartPopup.vue
@@ -59,7 +59,7 @@ export default {
transform translate(-50%, calc(100% + 40px))
white-space nowrap
- /.light-mode &
+ /.light &
background var(--c-bg-1)
border 1px solid var(--c-bg-5)
@@ -73,7 +73,7 @@ export default {
border-right 8px solid transparent
border-bottom 8px solid var(--c-bg-5)
- /.light-mode &
+ /.light &
border-bottom-color var(--c-bg-5)
&__name
diff --git a/components/trnForm/TrnForm.vue b/components/trnForm/TrnForm.vue
index 7bbe288e..39fbb226 100644
--- a/components/trnForm/TrnForm.vue
+++ b/components/trnForm/TrnForm.vue
@@ -299,7 +299,7 @@ export default {
backdrop-filter blur(12px)
transform translateX(-50%)
- /.light-mode &
+ /.light &
background var(--c-bg-3)
.swiper-pagination-bullet
@@ -316,7 +316,7 @@ export default {
background var(--c-bg-10)
border-radius 4px
- /.light-mode &
+ /.light &
background var(--c-blue-1)
</style>
diff --git a/components/trnForm/TrnFormHeader.vue b/components/trnForm/TrnFormHeader.vue
index df0528b8..fc0f37bc 100644
--- a/components/trnForm/TrnFormHeader.vue
+++ b/components/trnForm/TrnFormHeader.vue
@@ -37,6 +37,6 @@ export default {
color var(--c-font-2)
font-size 16px
- /.light-mode &
+ /.light &
color var(--c-item-stat-icon)
</style>
diff --git a/components/trnForm/TrnFormTrns.vue b/components/trnForm/TrnFormTrns.vue
index 0449f52c..5862eb18 100644
--- a/components/trnForm/TrnFormTrns.vue
+++ b/components/trnForm/TrnFormTrns.vue
@@ -153,7 +153,7 @@ export default defineComponent({
.contentWrap
position relative
display grid
- grid-template-rows auto 1fr
+ grid-template-rows 1fr auto
height 100%
&__box
diff --git a/components/trnForm/modal/TrnFormModal.vue b/components/trnForm/modal/TrnFormModal.vue
index 1c145dcf..f04c2dfd 100644
--- a/components/trnForm/modal/TrnFormModal.vue
+++ b/components/trnForm/modal/TrnFormModal.vue
@@ -80,6 +80,6 @@ Portal(to="modal")
letter-spacing 1px
fontFamilyNunito()
- /.light-mode &
+ /.light &
color var(--c-font-4)
</style>
diff --git a/layouts/default.vue b/layouts/default.vue
index c2fb501a..9fe0b245 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -11,7 +11,7 @@ useLazyAsyncData('posts', async () => {
await initUI()
})
-const keepAliveInclude = []
+const keepAliveInclude = ['PagesIndex, PagesWallets', 'PagesCategories', 'PagesHistory']
/**
* Update modal
@@ -74,8 +74,7 @@ onMounted(() => {
LayoutSidebar
.layout__content
- transition(name="fadeInSlow" appear)
- Nuxt(keep-alive :keep-alive-props="{ include: keepAliveInclude }")
+ Nuxt(keep-alive :keep-alive-props="{ include: keepAliveInclude }")
.layout__menu
LayoutBottomMenu
diff --git a/layouts/welcome.vue b/layouts/welcome.vue
new file mode 100644
index 00000000..2f2c31a0
--- /dev/null
+++ b/layouts/welcome.vue
@@ -0,0 +1,118 @@
+<script setup lang="ts">
+/* eslint-disable @typescript-eslint/no-unused-vars */
+import debounce from '~/utils/debounce'
+import detectTouch from '~/assets/js/isTouchDevice'
+import useUIView from '~/components/layout/useUIView'
+
+const { $store } = useNuxtApp()
+
+useLazyAsyncData('posts', async () => {
+ const { initUI } = useUIView()
+ await initUI()
+})
+
+const keepAliveInclude = []
+
+/**
+ * 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() })
+
+/**
+ * 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 })
+}
+
+const touchClassNames = computed(() => ({
+ isNotTouchDevice: !isTouchDevice.value,
+ isTouchDevice: isTouchDevice.value
+}))
+
+onMounted(() => {
+ getPageDimensions()
+ window.addEventListener('resize', debounce(getPageDimensions, 300))
+})
+</script>
+
+<template lang="pug">
+.font-roboto.text-gray-500.leading-none.antialiased.overflow-hidden.relative.h-full.min-w-base.flex(
+ :class="[{ ...touchClassNames }, 'dark:text-gray-400']"
+)
+ LayoutModals
+
+ PortalTarget(
+ multiple
+ name="modal"
+ )
+
+ LazyAppUpdateAppModal(
+ v-if="isShowUpdateApp"
+ @onClose="isShowUpdateApp = false"
+ )
+
+ .layout__wrap.overflow-hidden.flex-grow.h-full.flex
+ transition(name="fadeIn" appear)
+ Nuxt(keep-alive :keep-alive-props="{ include: keepAliveInclude }")
+</template>
+
+<style lang="stylus">
+@import '~assets/stylus/base/animations'
+@import '~assets/stylus/index'
+@import '~assets/stylus/colors-dark'
+@import '~assets/stylus/colors-light'
+</style>
+
+<style lang="stylus" scoped>
+.layout
+ &__wrap
+ grid-template-columns 1fr
+ grid-template-rows 1fr minmax(auto, auto)
+
+ +media(1200px)
+ grid-template-rows 1fr auto
+ grid-template-columns minmax(auto, auto) 1fr
+
+ &__sidebar
+ display none
+
+ +media(1200px)
+ display block
+
+ &__content
+ overflow hidden
+ overflowScrollY()
+ display grid
+ height 100%
+ max-width 1100px
+ padding 0
+ background var(--c-bg-3)
+ +media(800px)
+ padding 0 32px
+ +media(1000px)
+ padding 0 64px
+
+ &__menu
+ background var(--c-bg-3)
+
+ +media(1200px)
+ display none
+</style>
diff --git a/modules/menu/useMenuData.ts b/modules/menu/useMenuData.ts
index 6abb0682..2784d517 100644
--- a/modules/menu/useMenuData.ts
+++ b/modules/menu/useMenuData.ts
@@ -38,11 +38,6 @@ export default function useMenuData () {
private: true,
icon: 'mdi mdi-account-multiple',
name: i18n.t('users.title')
- },
- groups: {
- private: true,
- icon: 'mdi mdi-folder-multiple-outline',
- name: i18n.t('groups.title')
}
}
diff --git a/package.json b/package.json
index f1751c97..78b751fe 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "finapp",
- "version": "3.30.3",
+ "version": "3.30.4",
"scripts": {
"dev": "cross-env NUXT_HOST=0.0.0.0 nuxi dev",
"build": "nuxi generate",
diff --git a/pages/welcome.vue b/pages/welcome.vue
index 4b2b4d85..6073e53c 100644
--- a/pages/welcome.vue
+++ b/pages/welcome.vue
@@ -1,7 +1,7 @@
<script>
export default {
name: 'WelcomePage',
- layout: 'login',
+ layout: 'welcome',
data () {
return {
@@ -103,6 +103,7 @@ export default {
@onClick="step = 2"
)
+ //-
transition(name="fadeIn")
template(v-if="step === 2")
.tab
@@ -272,6 +273,7 @@ export default {
position relative
padding $m7
background var(--c-bg-3)
+
&__border
position absolute
top 50%
diff --git a/static/init.css b/static/init.css
deleted file mode 100755
index e215011d..00000000
--- a/static/init.css
+++ /dev/null
@@ -1,9 +0,0 @@
-html, body {
- background: #111;
-}
-
-@media (prefers-color-scheme: light) {
- html, body {
- background: #efefef;
- }
-}