Open source personal finance application
refactor: update theme handling and improve UI consistency
Ilya Komichev7abc8eb08cd8
diff --git a/app/app.config.ts b/app/app.config.tsindex 5c053ab5..5eec1715 100644--- a/app/app.config.ts+++ b/app/app.config.ts@@ -7,7 +7,7 @@ export default defineAppConfig({},ui: {popover: {- background: 'bg-foreground-1 min-w-64',+ background: 'bg-item-5 min-w-64',popper: {placement: 'bottom-start',},diff --git a/app/assets/css/others.css b/app/assets/css/others.cssindex ea45ddb8..84f01740 100644--- a/app/assets/css/others.css+++ b/app/assets/css/others.css@@ -3,7 +3,7 @@}.Toastify__toast {- @apply cursor-default bg-foreground-1 !ring-2 !ring-item-3 text-1 p-0 min-h-6 rounded-lg hover:bg-item-3;+ @apply cursor-default bg-item-5 !ring-2 !ring-item-3 text-1 p-0 min-h-6 rounded-lg hover:bg-item-3;}.Toastify__toast-body {diff --git a/app/assets/css/tailwind.css b/app/assets/css/tailwind.cssindex b5587e14..3ed02f03 100644--- a/app/assets/css/tailwind.css+++ b/app/assets/css/tailwind.css@@ -20,7 +20,7 @@@layer base {html,body {- @apply bg-foreground-1 font-primary text-1 leading-none antialiased select-none;+ @apply bg-item-5 font-primary text-1 leading-none antialiased select-none;overscroll-behavior-y: none;}}@@ -35,7 +35,7 @@}.bottomSheetDrugClassesCustom {- @apply bg-foreground-1 max-w-md rounded-xl;+ @apply bg-item-5 max-w-md rounded-xl;}.bottomSheetContent {@@ -44,7 +44,7 @@}.bottomSheetContentInside {- @apply grid h-full bg-foreground-1 gap-1 overflow-hidden overflow-y-auto px-2 py-px;+ @apply grid h-full bg-item-5 gap-1 overflow-hidden overflow-y-auto px-2 py-px;}.bottomSheetContentBottom {diff --git a/app/assets/css/theme.css b/app/assets/css/theme.cssindex dc6dc8a1..8530e761 100644--- a/app/assets/css/theme.css+++ b/app/assets/css/theme.css@@ -1,7 +1,7 @@@import 'others.css';html {- --hue: 220deg;+ --hue: 220;--c-blue-1: hsl(220, 100%, 61%);--alert-1: #b81414;@@ -18,28 +18,26 @@ html {html {color-scheme: light;- --text-1: 64 64 64;- --text-2: 0 0 0;+ --text-1: 0 0 0;+ --text-2: 64 64 64;--text-3: 64 64 64;--text-4: 100 100 100;--text-5: 200 200 200;- --text-icon-primary: theme('colors.neutral.50');-- --foreground-1: 255 255 255;+ --text-icon-primary: theme('colors.neutral.50');--accent-1: 0 122 255;+ --item-5: 255 255 255;/* Item */- --item-hover: theme('colors.gray.200');---c-item-2: theme('colors.neutral.500');--c-item-3: #edeef0;--c-item-4: theme('colors.neutral.100');--c-item-base: theme('colors.neutral.600');--item-6: 237 239 240;- --item-9: 245 245 245;- --item-11: rgba(190, 190, 190, 1);+ --item-7: rgba(190, 190, 190, 1);+ --item-9: 250 250 250;--item-active: 216 216 220;+ --item-hover: #ebecef;/* Colors */--c-red-1: #b81414;@@ -71,8 +69,8 @@ html {/** Dark Theme*/-html.pink,-html.dark {+html.dark-pink,+html.dark-blue {color-scheme: dark;/* Text */@@ -83,21 +81,18 @@ html.dark {--text-5: 90 90 90;--text-icon-primary: theme('colors.neutral.50');-- --foreground-1: 19 19 19;---accent-1: 56 148 2451;/* Item */- --item-hover: theme('colors.neutral.800');-- --c-item-2: theme('colors.neutral.400');+ --c-item-2: #a3a3a3;--c-item-3: #232323;--c-item-4: #1c1c1c;- --c-item-base: theme('colors.neutral.200');+ --c-item-base: #e5e5e5;+ --item-5: 19 19 19;--item-6: 44 44 44;+ --item-7: #878787;--item-9: 23 23 23;- --item-11: #878787;+ --item-hover: #262626;/* Colors */--c-red-1: #b81414;@@ -126,10 +121,14 @@ html.dark {/** Pink Theme*/-html.pink {- color-scheme: dark;+html.light-pink {+ --item-hover: #f3eff2;+ --item-3: #f0edef;+ --item-6: 240 237 240;+}- --accent-1: 255, 105, 180;- --c-blue-1: #ff1493;+html.light-pink,+html.dark-pink {--accent-1: 219 39 119;+ --c-blue-1: #ff1493;}diff --git a/app/components/app/theme/Switcher.vue b/app/components/app/theme/Switcher.vueindex 796a1641..66843cbb 100644--- a/app/components/app/theme/Switcher.vue+++ b/app/components/app/theme/Switcher.vue@@ -1,33 +1,14 @@<script setup lang="ts">+import type { Theme } from '~/components/app/theme/types'++import { useTheme } from '~/components/app/theme/useTheme'+const props = defineProps<{isShowTitle?: boolean}>()-const colorMode = useColorMode()const { t } = useI18n()--type Theme = 'system' | 'light' | 'dark' | 'pink'--const options: {- label: string- value: Theme-}[] = [{- label: t('theme.system'),- value: 'system',-}, {- label: t('theme.light'),- value: 'light',-}, {- label: t('theme.dark'),- value: 'dark',-}, {- label: t('theme.pink'),- value: 'pink',-}] as const--function setTheme(theme: Theme) {- colorMode.preference = theme-}+const { options, preference, setTheme } = useTheme()</script><template>@@ -41,26 +22,10 @@ function setTheme(theme: Theme) {<FormSelect:options- :value="colorMode.preference"+ :value="preference"@change="(theme: Theme) => setTheme(theme)"/></div></template>-<i18n lang="yaml">-en:- theme:- dark: 'Dark'- light: 'Light'- pink: 'Pink'- title: 'Theme'- system: 'System'--ru:- theme:- dark: 'Темная'- light: 'Светлая'- pink: 'Розовая'- title: 'Тема'- system: 'Авто'-</i18n>+<i18n lang="yaml" src="./locale.yaml" />diff --git a/app/components/app/theme/SwitcherTabs.vue b/app/components/app/theme/SwitcherTabs.vueindex 13903873..d5b0b7a4 100644--- a/app/components/app/theme/SwitcherTabs.vue+++ b/app/components/app/theme/SwitcherTabs.vue@@ -1,77 +1,20 @@<script setup lang="ts">-const props = defineProps<{- isShowPink?: boolean- isShowSystem?: boolean-}>()+import { useTheme } from '~/components/app/theme/useTheme'-const colorMode = useColorMode()-const { t } = useI18n()--type Theme = 'system' | 'light' | 'dark'--const locales: {- localeKey: string- slug: Theme-}[] = [{- localeKey: 'theme.light',- slug: 'light',-}, {- localeKey: 'theme.dark',- slug: 'dark',-}] as const--if (props.isShowPink) {- locales.push({- localeKey: 'theme.pink',- slug: 'pink',- })-}--if (props.isShowSystem) {- locales.unshift({- localeKey: 'theme.system',- slug: 'system',- })-}--function setTheme(theme: Theme) {- colorMode.preference = theme-}--function isItActive(theme: Theme) {- return colorMode.preference === theme-}+const { options, preference, setTheme } = useTheme()</script><template><UiTabs2><UiTabsItem4- v-for="locale in locales"- :key="locale.slug"- :isActive="isItActive(locale.slug)"- @click="setTheme(locale.slug)"+ v-for="theme in options"+ :key="theme.value"+ :isActive="preference === theme.value"+ @click="setTheme(theme.value)">- {{ t(locale.localeKey) }}+ {{ theme.label }}</UiTabsItem4></UiTabs2></template>-<i18n lang="yaml">-en:- theme:- change: 'Change theme'- dark: 'Dark'- light: 'Light'- pink: 'Pink'- select: 'Select theme'- system: 'System'--ru:- theme:- change: 'Сменить тему'- dark: 'Темная'- light: 'Светлая'- pink: 'Розовая'- select: 'Выберите тему'- system: 'Авто'-</i18n>+<i18n lang="yaml" src="./locale.yaml" />diff --git a/app/components/app/theme/locale.yaml b/app/components/app/theme/locale.yamlnew file mode 100644index 00000000..1f3c7a3d--- /dev/null+++ b/app/components/app/theme/locale.yaml@@ -0,0 +1,19 @@+en:+ theme:+ change: Change theme+ dark-blue: Dark blue+ dark-pink: Dark pink+ light-blue: Light blue+ light-pink: Light pink+ select: Select theme+ system: System++ru:+ theme:+ change: Сменить тему+ dark-blue: Темная синяя+ dark-pink: Темная розовая+ light-blue: Светлая синяя+ light-pink: Светлая розовая+ select: Выберите тему+ system: Автоdiff --git a/app/components/app/theme/types.ts b/app/components/app/theme/types.tsnew file mode 100644index 00000000..0dc2b4a7--- /dev/null+++ b/app/components/app/theme/types.ts@@ -0,0 +1 @@+export type Theme = 'system' | 'light-blue' | 'dark-blue' | 'dark-pink' | 'light-pink'diff --git a/app/components/app/theme/useTheme.ts b/app/components/app/theme/useTheme.tsnew file mode 100644index 00000000..a508688f--- /dev/null+++ b/app/components/app/theme/useTheme.ts@@ -0,0 +1,36 @@+import type { Theme } from '~/components/app/theme/types'++export function useTheme() {+ const { t } = useI18n()+ const colorMode = useColorMode()++ const options: {+ label: string+ value: Theme+ }[] = [{+ label: t('theme.system'),+ value: 'system',+ }, {+ label: t('theme.dark-pink'),+ value: 'dark-pink',+ }, {+ label: t('theme.light-pink'),+ value: 'light-pink',+ }, {+ label: t('theme.light-blue'),+ value: 'light-blue',+ }, {+ label: t('theme.dark-blue'),+ value: 'dark-blue',+ }] as const++ function setTheme(theme: Theme) {+ colorMode.preference = theme+ }++ return {+ options,+ preference: computed(() => colorMode.preference),+ setTheme,+ }+}diff --git a/app/components/bottomSheet/BottomSheetHandler.vue b/app/components/bottomSheet/BottomSheetHandler.vueindex e87fd573..643541ce 100644--- a/app/components/bottomSheet/BottomSheetHandler.vue+++ b/app/components/bottomSheet/BottomSheetHandler.vue@@ -3,7 +3,7 @@class="handler flex-center absolute left-0 top-0 z-30 h-[16px]w-full transition after:block- after:h-[4px] after:w-[32px] after:rounded after:bg-item-11 after:content-[''] hover:bg-item-hover+ after:h-[4px] after:w-[32px] after:rounded after:bg-item-7 after:content-[''] hover:bg-item-hover"/></template>diff --git a/app/components/date/Picker.vue b/app/components/date/Picker.vueindex 9ce72ab3..c37461f5 100644--- a/app/components/date/Picker.vue+++ b/app/components/date/Picker.vue@@ -31,19 +31,23 @@ const attrs = {}const matchTheme = {- dark: {+ 'dark-blue': {color: 'blue',isDark: true,},- light: {+ 'dark-pink': {+ color: 'pink',+ isDark: true,+ },+ 'light-blue': {color: 'blue',isDark: false,},- pink: {+ 'light-pink': {color: 'pink',- isDark: true,+ isDark: false,},- system: {+ 'system': {color: 'blue',isDark: colorMode.value === 'dark',},@@ -71,7 +75,7 @@ const matchTheme = {<style>html .vc-dark,html .vc-light {- --vc-popover-content-bg: theme('colors.foreground.1');+ --vc-popover-content-bg: theme('colors.item.5');--vc-accent-500: theme('colors.accent.1');--vc-focus-ring: theme('colors.accent.1');--vc-nav-item-active-bg: theme('colors.accent.1');diff --git a/app/components/date/Ranges2.vue b/app/components/date/Ranges2.vueindex 53d82d54..aff97bcf 100644--- a/app/components/date/Ranges2.vue+++ b/app/components/date/Ranges2.vue@@ -8,57 +8,43 @@ const emit = defineEmits<{const statDate = inject('statDate') as StatDateProviderconst { t } = useI18n()-const intervalGroups = computed<IntervalGroupedLabel[]>(() => [- {- intervalsBy: 'day',- intervalsDuration: 1,- label: `7${t('dates.day.short')}`,- rangeBy: 'day',- rangeDuration: 7,- },- {- intervalsBy: 'day',- intervalsDuration: 1,- label: `14${t('dates.day.short')}`,- rangeBy: 'day',- rangeDuration: 14,- },- {- intervalsBy: 'day',- intervalsDuration: 1,- label: `30${t('dates.day.short')}`,- rangeBy: 'day',- rangeDuration: 30,- },- {- intervalsBy: 'week',- intervalsDuration: 1,- label: `3${t('dates.month.short')}`,- rangeBy: 'month',- rangeDuration: 3,- },- {- intervalsBy: 'month',- intervalsDuration: 1,- label: `6${t('dates.month.short')}`,- rangeBy: 'month',- rangeDuration: 6,- },- {- intervalsBy: 'month',- intervalsDuration: 1,- label: `12${t('dates.month.short')}`,- rangeBy: 'month',- rangeDuration: 12,- },- {- intervalsBy: 'year',- intervalsDuration: 1,- label: `6${t('dates.year.short')}`,- rangeBy: 'year',- rangeDuration: 6,- },-])+const intervalGroups = computed<IntervalGroupedLabel[]>(() => [{+ intervalsBy: 'day',+ intervalsDuration: 1,+ label: `7${t('dates.day.short')}`,+ rangeBy: 'day',+ rangeDuration: 7,+}, {+ intervalsBy: 'day',+ intervalsDuration: 1,+ label: `14${t('dates.day.short')}`,+ rangeBy: 'day',+ rangeDuration: 14,+}, {+ intervalsBy: 'day',+ intervalsDuration: 1,+ label: `30${t('dates.day.short')}`,+ rangeBy: 'day',+ rangeDuration: 30,+}, {+ intervalsBy: 'week',+ intervalsDuration: 1,+ label: `3${t('dates.month.short')}`,+ rangeBy: 'month',+ rangeDuration: 3,+}, {+ intervalsBy: 'month',+ intervalsDuration: 1,+ label: `6${t('dates.month.short')}`,+ rangeBy: 'month',+ rangeDuration: 6,+}, {+ intervalsBy: 'month',+ intervalsDuration: 1,+ label: `12${t('dates.month.short')}`,+ rangeBy: 'month',+ rangeDuration: 12,+}])function isRangeSelected(rd: IntervalGroupedLabel) {return rd.rangeDuration === statDate.params.value.rangeDuration && rd.rangeBy === statDate.params.value.rangeBydiff --git a/app/components/form/Switch.vue b/app/components/form/Switch.vueindex dbd0bfca..6e65c50f 100644--- a/app/components/form/Switch.vue+++ b/app/components/form/Switch.vue@@ -16,7 +16,7 @@ const emit = defineEmits<{</div><div- :class="{ 'bg-accent-1': value, 'bg-item-11': !value }"+ :class="{ 'bg-accent-1': value, 'bg-item-7': !value }"class="relative h-6 w-11 rounded-xl transition-colors ease-in-out"><divdiff --git a/app/components/layout/MenuBottomModal.vue b/app/components/layout/MenuBottomModal.vueindex 404ed776..ab190cc0 100644--- a/app/components/layout/MenuBottomModal.vue+++ b/app/components/layout/MenuBottomModal.vue@@ -21,7 +21,7 @@ const { isDemo } = useDemo()<BottomSheetClose @onClick="close" /></template>- <div class="grid gap-3 bg-foreground-1 px-1 py-3">+ <div class="grid gap-3 bg-item-5 px-1 py-3"><LayoutSidebarMenu /><div class="pl-2 pt-2">diff --git a/app/components/layout/useMenuData.ts b/app/components/layout/useMenuData.tsindex 4f014047..7a616d39 100644--- a/app/components/layout/useMenuData.ts+++ b/app/components/layout/useMenuData.ts@@ -17,32 +17,43 @@ export default function useMenuData() {const route = useRoute()const { closeAllModals, openModal } = useAppNav()- const items = computed<Record<string, MenuItem>>(() => ({- trnForm: {- icon: 'hugeicons:plus-sign-square',- name: t('trnForm.createTrn'),- },- dashboard: {- icon: 'lucide:chart-no-axes-combined',- name: t('stat.title'),- },- wallets: {- icon: 'hugeicons:wallet-01',- name: t('wallets.name'),- },- categories: {- icon: 'hugeicons:folder-library',- name: t('categories.name'),- },- history: {- icon: 'hugeicons:archive-01',- name: t('trns.history'),- },- settings: {- icon: 'hugeicons:settings-01',- name: t('settings.title'),- },- }))+ const items = computed<Record<string, MenuItem>>(() => {+ const list = {+ trnForm: {+ icon: 'hugeicons:plus-sign-square',+ name: t('trnForm.createTrn'),+ },+ dashboard: {+ icon: 'lucide:chart-no-axes-combined',+ name: t('stat.title'),+ },+ wallets: {+ icon: 'hugeicons:wallet-01',+ name: t('wallets.name'),+ },+ categories: {+ icon: 'hugeicons:folder-library',+ name: t('categories.name'),+ },+ history: {+ icon: 'hugeicons:archive-01',+ name: t('trns.history'),+ },+ settings: {+ icon: 'hugeicons:settings-01',+ name: t('settings.title'),+ },+ }++ if (process.env.NODE_ENV === 'development') {+ list.dev = {+ icon: 'hugeicons:laptop-programming',+ name: t('dev.menu.title'),+ }+ }++ return list+ })const itemsBottom = computed<Record<string, MenuItem>>(() => ({wallets: items.value.wallets!,diff --git a/app/components/stat/CategoriesButtons.vue b/app/components/stat/CategoriesButtons.vueindex 64289619..ffab88df 100644--- a/app/components/stat/CategoriesButtons.vue+++ b/app/components/stat/CategoriesButtons.vue@@ -194,7 +194,7 @@ const isShow = ref(false)<template #content="{ close }"><div class="grid min-w-80 gap-4 px-1 pt-3 md:px-3"><BottomSheetClose @click="close" />- <div class="border-item-3 grid gap-4 border-b pb-3">+ <div class="grid gap-4 border-b border-item-3 pb-3"><!-- Grouping --><div class="grid gap-3"><UiTitleOption>@@ -264,7 +264,7 @@ const isShow = ref(false)<!-- List --><divv-if="statConfig.config.value.catsView === 'list'"- class="border-item-3 grid gap-3 border-b pb-2 last:border-0"+ class="grid gap-3 border-b border-item-3 pb-2 last:border-0"><UiTitleOption>{{ t('listItemsOptions') }}</UiTitleOption><div class="flex gap-1">@@ -346,7 +346,7 @@ const isShow = ref(false)<!-- Vertical --><divv-if="props.catsLength > 1"- class="border-item-3 grid border-b pb-2 last:border-0 md:pb-0"+ class="grid border-b border-item-3 pb-2 last:border-0 md:pb-0"><UiTitleOption class="pb-2">{{ t('stat.config.categories.vertical.label') }}@@ -402,7 +402,7 @@ const isShow = ref(false)<!-- TODO: use StatConfig --><divv-if="false"- class="border-item-3 border-b pb-2 last:border-0 last:pb-0"+ class="border-b border-item-3 pb-2 last:border-0 last:pb-0"><!-- Favorite --><UiElementdiff --git a/app/components/stat/Config.vue b/app/components/stat/Config.vueindex 064f9d83..30d314fa 100644--- a/app/components/stat/Config.vue+++ b/app/components/stat/Config.vue@@ -40,7 +40,7 @@ function updateWalletsLimit(value: number) {<BottomSheetClose @click="close" /><!-- Chart -->- <div class="border-item-3 border-b pb-3">+ <div class="border-b border-item-3 pb-3"><UiTitleOption class="pb-2">{{ t('stat.config.chartShow.title') }}</UiTitleOption>@@ -109,7 +109,7 @@ function updateWalletsLimit(value: number) {<!-- Showed wallets --><divv-if="props.isShowWallets"- class="border-item-3 border-b pb-3"+ class="border-b border-item-3 pb-3"><UiTitleOption class="pb-2">{{ t('stat.config.wallets.title') }}diff --git a/app/components/stat/date/Quick.vue b/app/components/stat/date/Quick.vueindex 3a8d5c2c..d6d40148 100644--- a/app/components/stat/date/Quick.vue+++ b/app/components/stat/date/Quick.vue@@ -33,7 +33,7 @@ onMounted(() => {observeParents: true,observer: true,shortSwipes: false,- slidesPerView: '1',+ slidesPerView: 1,touchStartPreventDefault: false,})})diff --git a/app/components/trnForm/Bottom.vue b/app/components/trnForm/Bottom.vueindex bda4b148..47ed2c8a 100644--- a/app/components/trnForm/Bottom.vue+++ b/app/components/trnForm/Bottom.vue@@ -78,12 +78,12 @@ onMounted(init)<BottomSheetClose @onClick="close" /></template>- <div class="trnForm @container/trnForm bg-foreground-1">+ <div class="trnForm @container/trnForm bg-item-5"><div ref="sliderRef" class="swiper-container"><div class="swiper-wrapper"><!-- History --><div- class="swiper-slide h-full overflow-y-auto bg-foreground-1"+ class="swiper-slide h-full overflow-y-auto bg-item-5":style="{ height: maxHeight }"><TrnFormTrnsSlide@@ -94,7 +94,7 @@ onMounted(init)</div><!-- Main -->- <div class="swiper-slide getHeight bg-foreground-1">+ <div class="swiper-slide getHeight bg-item-5"><div class="scrollerBlock h-full overflow-y-auto"><div class="max-h-[98dvh]"><TrnFormMain :maxHeight />@@ -104,7 +104,7 @@ onMounted(init)<!-- Quick selector --><div- class="swiper-slide bg-foreground-1"+ class="swiper-slide bg-item-5":style="{ height: maxHeight }"><div class="scrollerBlock h-full overflow-y-auto">diff --git a/app/components/trnForm/Categories.vue b/app/components/trnForm/Categories.vueindex d06c7ff2..c8c7c8b5 100644--- a/app/components/trnForm/Categories.vue+++ b/app/components/trnForm/Categories.vue@@ -46,7 +46,7 @@ onMounted(() => {<!-- Recent --><div class="swiper-slide h-full"><div- class="scrollerBlock rounded-t-2xl bg-foreground-1 px-3 py-4 text-center font-primary text-xl font-semibold"+ class="scrollerBlock rounded-t-2xl bg-item-5 px-3 py-4 text-center font-primary text-xl font-semibold">{{ $t("categories.lastUsedTitle") }}</div>@@ -63,7 +63,7 @@ onMounted(() => {<!-- Main --><div class="swiper-slide h-full"><div- class="scrollerBlock rounded-t-2xl bg-foreground-1 px-3 py-4 text-center font-primary text-xl font-semibold"+ class="scrollerBlock rounded-t-2xl bg-item-5 px-3 py-4 text-center font-primary text-xl font-semibold">{{ $t("categories.title") }}</div>@@ -79,7 +79,7 @@ onMounted(() => {<!-- Favorite --><div class="swiper-slide h-full">- <div class="scrollerBlock rounded-t-2xl bg-foreground-1 px-3 py-4 text-center font-primary text-xl font-semibold">+ <div class="scrollerBlock rounded-t-2xl bg-item-5 px-3 py-4 text-center font-primary text-xl font-semibold">{{ $t("categories.favoriteTitle") }}</div><div class="px-3 pb-1">diff --git a/app/components/trnForm/Main.vue b/app/components/trnForm/Main.vueindex 9ddb0c04..f5aa7e2d 100644--- a/app/components/trnForm/Main.vue+++ b/app/components/trnForm/Main.vue@@ -96,7 +96,7 @@ const actions = computed(() => ({/><UiTitle3- class="sticky top-0 z-10 bg-foreground-1 px-3 pb-3 pt-4 md:text-xl"+ class="sticky top-0 z-10 bg-item-5 px-3 pb-3 pt-4 md:text-xl"@click="trnsFormStore.values.trnId = null">{{ trnsFormStore.values.trnId ? t("trnForm.titleEditTrn") : t("trnForm.createTrn") }}@@ -116,7 +116,7 @@ const actions = computed(() => ({v-if="showModalConfirm"class="absolute -bottom-4 left-0 z-10 w-full px-4">- <div class="z-10 grid h-full content-center gap-4 rounded-lg border border-accent-1 bg-foreground-1 p-3 text-1">+ <div class="z-10 grid h-full content-center gap-4 rounded-lg border border-accent-1 bg-item-5 p-3 text-1">{{ t('base.sure') }}<div class="flex gap-2">@@ -221,7 +221,7 @@ const actions = computed(() => ({padding-bottom: calc(env(safe-area-inset-bottom) - 16px);.trnForm__pagination {- @apply absolute left-1/2 z-[2] flex items-center justify-center w-auto p-1.5 rounded-md bg-foreground-1;+ @apply absolute left-1/2 z-[2] flex items-center justify-center w-auto p-1.5 rounded-md bg-item-5;transform: translateX(-50%);bottom: 1px;}diff --git a/app/components/trnForm/Selection.vue b/app/components/trnForm/Selection.vueindex 05c1f41e..7e95b40e 100644--- a/app/components/trnForm/Selection.vue+++ b/app/components/trnForm/Selection.vue@@ -73,7 +73,7 @@ async function onSelectParentCategory(id: CategoryId) {<Teleport to="body"><BottomSheet:isShow="isShow"- drugClassesCustom="bg-foreground-1 max-w-md"+ drugClassesCustom="bg-item-5 max-w-md"@closed="isShow = false"><template #handler="{ close }">@@ -117,7 +117,7 @@ async function onSelectParentCategory(id: CategoryId) {><div class="scrollerBlock h-full overflow-y-auto pb-3"><UiTitle3- class="sticky top-0 z-10 bg-foreground-1 px-3 pb-3 pt-4"+ class="sticky top-0 z-10 bg-item-5 px-3 pb-3 pt-4"@click="trnsFormStore.ui.catsRootModal = true">{{ $t("categories.title") }}@@ -147,6 +147,6 @@ async function onSelectParentCategory(id: CategoryId) {}.trnFormSelectionPagination.swiper-pagination-horizontal .swiper-pagination-bullet {- @apply m-1 size-1.5 rounded-full bg-item-11 opacity-100;+ @apply m-1 size-1.5 rounded-full bg-item-7 opacity-100;}</style>diff --git a/app/components/trnForm/SelectionCategoriesFast.vue b/app/components/trnForm/SelectionCategoriesFast.vueindex 10e8d050..1942a890 100644--- a/app/components/trnForm/SelectionCategoriesFast.vue+++ b/app/components/trnForm/SelectionCategoriesFast.vue@@ -22,7 +22,7 @@ const trnsFormStore = useTrnsFormStore()class="pb-6"><UiTitle3- class="sticky top-0 z-20 bg-foreground-1 px-3 pb-3 pt-4"+ class="sticky top-0 z-20 bg-item-5 px-3 pb-3 pt-4"@click="trnsFormStore.ui.catsRootModal = true">{{ t("categories.favoriteTitle") }}@@ -40,7 +40,7 @@ const trnsFormStore = useTrnsFormStore()<!-- Recent categories --><div v-if="categoriesStore.recentCategoriesIds.length > 0"><UiTitle3- class="sticky top-0 z-20 bg-foreground-1 px-3 pb-3 pt-4"+ class="sticky top-0 z-20 bg-item-5 px-3 pb-3 pt-4"@click="trnsFormStore.ui.catsRootModal = true">{{ t("categories.lastUsedTitle") }}diff --git a/app/components/trnForm/Sidebar.vue b/app/components/trnForm/Sidebar.vueindex 155e7d00..894d404c 100644--- a/app/components/trnForm/Sidebar.vue+++ b/app/components/trnForm/Sidebar.vue@@ -58,7 +58,7 @@ watch(isShow, (v) => {<div ref="sliderRef2" class="swiper-container h-full"><div class="swiper-wrapper"><!-- Main -->- <div class="swiper-slide h-full bg-foreground-1">+ <div class="swiper-slide h-full bg-item-5"><div class="scrollerBlock grid h-full grid-rows-[auto,1fr] gap-4 overflow-y-auto"><TrnFormMain maxHeight="100vh" class="!pb-0" />@@ -73,7 +73,7 @@ watch(isShow, (v) => {<!-- Quick selector --><div- class="swiper-slide bg-foreground-1"+ class="swiper-slide bg-item-5":style="{ height: '100%' }"><div class="scrollerBlock h-full overflow-y-auto">diff --git a/app/components/trnForm/main/ActionSide.vue b/app/components/trnForm/main/ActionSide.vueindex 60e748ab..086d8726 100644--- a/app/components/trnForm/main/ActionSide.vue+++ b/app/components/trnForm/main/ActionSide.vue@@ -30,7 +30,7 @@ async function onClickSubmit() {<template><div:class="{- '!border-transparent !bg-accent-1/80 hocus:!bg-accent-1': !isMath && isSubmittable,+ '!border-transparent !bg-accent-1/80 !text-icon-primary hocus:!bg-accent-1': !isMath && isSubmittable,'!border-item-4 !text-2': !isSubmittable,'!text-2': isMath,}"diff --git a/app/components/trns/pages/History.vue b/app/components/trns/pages/History.vueindex 90a6d353..73c18038 100644--- a/app/components/trns/pages/History.vue+++ b/app/components/trns/pages/History.vue@@ -40,7 +40,7 @@ const trnsIds = computed(() => trnsStore.getStoreTrnsIds({</template></UiHeader>- <div class="pageWrapper mb-4 rounded-xl bg-foreground-1 pb-4 pt-3">+ <div class="pageWrapper mb-4 rounded-xl bg-item-5 pb-4 pt-3"><div class="grid gap-3"><TrnsList:trnsIdsdiff --git a/app/components/ui/ButtonAccent.vue b/app/components/ui/ButtonAccent.vueindex fea8a899..a7fe9625 100644--- a/app/components/ui/ButtonAccent.vue+++ b/app/components/ui/ButtonAccent.vue@@ -12,7 +12,7 @@ const colorMode = useColorMode()<template><UButton- v-if="colorMode.preference === 'pink'"+ v-if="colorMode.preference === 'dark-pink' || colorMode.preference === 'light-pink'":loading="props.loading":size="props.size || 'lg'":ui="{ rounded: props.rounded ? 'rounded-full' : 'rounded-lg' }"diff --git a/app/components/ui/Page.vue b/app/components/ui/Page.vueindex 21f364af..8335653c 100644--- a/app/components/ui/Page.vue+++ b/app/components/ui/Page.vue@@ -2,7 +2,7 @@<divclass="@container/page- relative rounded-xl bg-foreground-1+ relative rounded-xl bg-item-5sm:border sm:border-item-3 sm:p-2 md:p-3 lg:p-4"style="padding-bottom: calc(50px + env(safe-area-inset-bottom))"diff --git a/app/components/ui/TitleModal.vue b/app/components/ui/TitleModal.vueindex 58d4a06c..82210ba3 100644--- a/app/components/ui/TitleModal.vue+++ b/app/components/ui/TitleModal.vue@@ -6,7 +6,7 @@ const emit = defineEmits<{<template><div- class="sticky top-0 z-20 bg-foreground-1 px-3 pb-3 pt-4 font-tertiary text-lg font-semibold leading-none text-3"+ class="sticky top-0 z-20 bg-item-5 px-3 pb-3 pt-4 font-tertiary text-lg font-semibold leading-none text-3"@click="(e: Event) => emit('click', e)"><slot />diff --git a/app/pages/dev.vue b/app/pages/dev.vueindex b3c57e0a..7706fa98 100644--- a/app/pages/dev.vue+++ b/app/pages/dev.vue@@ -1,10 +1,12 @@<script lang="ts" setup>+import { useCategoriesStore } from '~/components/categories/useCategoriesStore'+const categoriesStore = useCategoriesStore()</script><template><UiPage>- <AppThemeSwitcherTabs isShowPink isShowSystem />+ <AppThemeSwitcherTabs /><div class="grid grid-cols-[1fr,auto] items-start gap-8 p-3"><div class="grid gap-12">@@ -21,13 +23,13 @@</div><div class="flex flex-wrap gap-0"><div class="size-20 bg-item-2" />- <div class="size-20 bg-item-11" />+ <div class="size-20 bg-item-7" /><div class="size-20 bg-item-6" /><div class="size-20 bg-item-hover" /><div class="size-20 bg-item-3" /><div class="size-20 bg-item-4" /><div class="size-20 bg-item-9" />- <div class="size-20 bg-foreground-1" />+ <div class="size-20 bg-item-5" /></div></div>@@ -248,6 +250,25 @@/></div></div>++ <div>+ <h1 class="mb-2 border-b border-item-6 pb-1">+ StatCategoriesLine+ </h1>++ <!-- <StatCategoriesLine+ isShowParent+ :item="{+ id: categoriesStore.items[Object.keys(categoriesStore.items)[0]].id,+ name: 'test',+ trnsIds: [],+ value: 1,+ }"+ :biggestCatNumber="{ income: 1, expense: 1 }"+ :lineWidth="1"+ class="grow"+ /> -->+ </div></div></div></UiPage>diff --git a/app/pages/settings.vue b/app/pages/settings.vueindex d5cc945e..59979341 100644--- a/app/pages/settings.vue+++ b/app/pages/settings.vue@@ -39,7 +39,7 @@ function onGenerateDemoData() {<UiHeaderTitle>{{ t('settings.title') }}</UiHeaderTitle></UiHeader>- <div class="pageWrapper rounded-xl bg-foreground-1 pt-4">+ <div class="pageWrapper rounded-xl bg-item-5 pt-4"><div class="grid gap-8"><AppLocaleSwitcher isShowTitle /><AppThemeSwitcherdiff --git a/i18n/locales/en-US.js b/i18n/locales/en-US.jsindex fec14ca8..d9ffa0d1 100644--- a/i18n/locales/en-US.js+++ b/i18n/locales/en-US.js@@ -165,6 +165,12 @@ export default {updated: 'Data updated',},+ dev: {+ menu: {+ title: 'Development',+ },+ },+locale: {toggle: 'Toggle locale',},diff --git a/i18n/locales/ru-RU.js b/i18n/locales/ru-RU.jsindex 570473db..f2188679 100644--- a/i18n/locales/ru-RU.js+++ b/i18n/locales/ru-RU.js@@ -105,10 +105,10 @@ export default {in: 'в',open: 'Открыть',},+create: {title: 'Создать',},-currencies: {base: 'Основная валюта',},@@ -165,6 +165,12 @@ export default {updated: 'Данные обновлены',},+ dev: {+ menu: {+ title: 'Разработка',+ },+ },+locale: {toggle: 'Сменить язык',},diff --git a/tailwind.config.ts b/tailwind.config.tsindex 342796c2..e8760c6b 100644--- a/tailwind.config.ts+++ b/tailwind.config.ts@@ -40,9 +40,6 @@ export default <Partial<Config>>{'expense': {1: 'var(--expense-1)',},- 'foreground': {- 1: 'rgb(var(--foreground-1))',- },'icon-primary': 'var(--text-icon-primary)','income': {1: 'var(--income-1)',@@ -51,9 +48,10 @@ export default <Partial<Config>>{2: 'var(--c-item-2)',3: 'var(--c-item-3)',4: 'var(--c-item-4)',+ 5: 'rgb(var(--item-5))',6: 'rgba(var(--item-6))',+ 7: 'var(--item-7)',9: 'rgba(var(--item-9))',- 11: 'var(--item-11)',hover: 'var(--item-hover)',},},