Open source personal finance application
refactor: enhance styling consistency and improve component structure
Ilya Komichev0b687b1ccc90
diff --git a/app/assets/css/tailwind.css b/app/assets/css/tailwind.cssindex 9fa6f5de..b5587e14 100644--- a/app/assets/css/tailwind.css+++ b/app/assets/css/tailwind.css@@ -27,7 +27,7 @@@layer components {.layoutBase {- @apply overflow-hidden relative h-dvh bg-foreground-2;+ @apply overflow-hidden relative h-dvh bg-item-9;}.pageWrapper {diff --git a/app/assets/css/theme.css b/app/assets/css/theme.cssindex e5ad1003..dc6dc8a1 100644--- a/app/assets/css/theme.css+++ b/app/assets/css/theme.css@@ -3,7 +3,7 @@html {--hue: 220deg;--c-blue-1: hsl(220, 100%, 61%);- --alert-primary: #b81414;+ --alert-1: #b81414;--expense-1: #f92134;--expense-line: oklch(0.37 0.09 20.05);@@ -16,31 +16,28 @@ html {* Light Theme*/html {+ color-scheme: light;+--text-1: 64 64 64;--text-2: 0 0 0;- --text-2: 0 0 0;--text-3: 64 64 64;- --text-4: 0 0 0;+ --text-4: 100 100 100;+ --text-5: 200 200 200;--text-icon-primary: theme('colors.neutral.50');--foreground-1: 255 255 255;- --foreground-2: 245 245 245;--accent-1: 0 122 255;- --accent-2: var(--hue) 100% 61%;/* Item */--item-hover: theme('colors.gray.200');- --c-item-1: theme('colors.neutral.700');--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-8: 25 25 25;--item-9: 245 245 245;- --item-10: 28 28 28;--item-11: rgba(190, 190, 190, 1);--item-active: 216 216 220;@@ -76,34 +73,31 @@ html {*/html.pink,html.dark {+ color-scheme: dark;+/* Text */--text-1: 220 220 220;--text-2: 160 160 160;--text-3: 200 200 200;--text-4: 130 130 130;- --text-5: 120 120 120;+ --text-5: 90 90 90;--text-icon-primary: theme('colors.neutral.50');--foreground-1: 19 19 19;- --foreground-2: 22 22 22;--accent-1: 56 148 2451;- --accent-2: var(--hue) 100% 61%;/* Item */--item-hover: theme('colors.neutral.800');- --c-item-1: theme('colors.neutral.100');--c-item-2: theme('colors.neutral.400');--c-item-3: #232323;--c-item-4: #1c1c1c;--c-item-base: theme('colors.neutral.200');--item-6: 44 44 44;- --item-8: 25 25 25;--item-9: 23 23 23;--item-11: #878787;- --item-10: 28 28 28;/* Colors */--c-red-1: #b81414;@@ -133,13 +127,9 @@ html.dark {* Pink Theme*/html.pink {- /* --foreground-1: 23 23 23; */- --foreground-2: 24 24 24;+ color-scheme: dark;- --c-blue-1: #ff69b4;+ --accent-1: 255, 105, 180;+ --c-blue-1: #ff1493;--accent-1: 219 39 119;- --accent-2: #ff1493;-- /* --item-hover: #2a161e; */- /* --c-item-4: #29161d; */}diff --git a/app/components/app/Copyright.vue b/app/components/app/Copyright.vueindex f5c65e3b..38019be9 100644--- a/app/components/app/Copyright.vue+++ b/app/components/app/Copyright.vue@@ -6,13 +6,13 @@ const { t } = useI18n()<template><a- :class="getStyles('item', ['link', 'rounded'])"- class="flex-center px-5 py-2"+ :class="getStyles('item', ['center3', 'link', 'rounded'])"+ class="px-5 py-2"href="https://ilko.me">{{ t('madeBy.text') }}<Icon- class="mx-2 animate-[heartbeat_3s_ease-in-out_infinite] text-2xl text-[rgb(210,0,20)]"+ class="mx-2 animate-[heartbeat_3s_ease-in-out_infinite] text-2xl text-alert-1"name="mdi:heart"/>{{ t('madeBy.name') }}diff --git a/app/components/app/locale/Switcher.vue b/app/components/app/locale/Switcher.vueindex c2e0076b..8c8e343e 100644--- a/app/components/app/locale/Switcher.vue+++ b/app/components/app/locale/Switcher.vue@@ -5,15 +5,19 @@ import type { LocaleSlug } from '~/components/app/locale/types'import { useUserStore } from '~/components/user/useUserStore'+const props = defineProps<{+ isShowTitle?: boolean+}>()+const { locale, setLocale, t } = useI18n()const userStore = useUserStore()-const locales: { localeKey: string, slug: LocaleSlug }[] = [{- localeKey: 'app.locale.ru',- slug: 'ru',+const options = [{+ label: t('locale.ru'),+ value: 'ru',}, {- localeKey: 'app.locale.en',- slug: 'en',+ label: t('locale.en'),+ value: 'en',}]function changeLocale(locale: LocaleSlug) {@@ -27,14 +31,31 @@ function changeLocale(locale: LocaleSlug) {</script><template>- <UiTabs2>- <UiTabsItem4- v-for="item in locales"- :key="item.slug"- :isActive="item.slug === locale"- @click="changeLocale(item.slug)"+ <div>+ <UiTitle3+ v-if="props.isShowTitle"+ class="pb-2">- {{ t(item.localeKey) }}- </UiTabsItem4>- </UiTabs2>+ {{ t('locale.title') }}+ </UiTitle3>++ <FormSelect+ :options+ :value="locale"+ @change="(locale: LocaleSlug) => changeLocale(locale)"+ />+ </div></template>++<i18n lang="yaml">+en:+ locale:+ en: 'English'+ ru: 'Русский'+ title: 'Language'+ru:+ locale:+ en: 'English'+ ru: 'Русский'+ title: 'Язык'+</i18n>diff --git a/app/components/app/theme/Switcher.vue b/app/components/app/theme/Switcher.vueindex 84ab1ff6..796a1641 100644--- a/app/components/app/theme/Switcher.vue+++ b/app/components/app/theme/Switcher.vue@@ -1,80 +1,66 @@<script setup lang="ts">-const props = withDefaults(defineProps<{- component?: 'UiTabs3' | 'UiTabs2'- isShowPink?: boolean- isShowSystem?: boolean-}>(), {- component: 'UiTabs2',-})+const props = defineProps<{+ isShowTitle?: boolean+}>()const colorMode = useColorMode()const { t } = useI18n()-type Theme = 'system' | 'light' | 'dark'+type Theme = 'system' | 'light' | 'dark' | 'pink'-const locales: {- localeKey: string- slug: Theme+const options: {+ label: string+ value: Theme}[] = [{- localeKey: 'theme.light',- slug: 'light',+ label: t('theme.system'),+ value: 'system',}, {- localeKey: 'theme.dark',- slug: 'dark',+ label: t('theme.light'),+ value: 'light',+}, {+ label: t('theme.dark'),+ value: 'dark',+}, {+ label: t('theme.pink'),+ value: 'pink',}] 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-}</script><template>- <Component :is="props.component">- <UiTabsItem4- v-for="locale in locales"- :key="locale.slug"- :isActive="isItActive(locale.slug)"- @click="setTheme(locale.slug)"+ <div>+ <UiTitle3+ v-if="props.isShowTitle"+ class="pb-2">- {{ t(locale.localeKey) }}- </UiTabsItem4>- </Component>+ {{ t('theme.title') }}+ </UiTitle3>++ <FormSelect+ :options+ :value="colorMode.preference"+ @change="(theme: Theme) => setTheme(theme)"+ />+ </div></template><i18n lang="yaml">en:theme:- change: 'Change theme'dark: 'Dark'light: 'Light'pink: 'Pink'- select: 'Select theme'+ title: 'Theme'system: 'System'ru:theme:- change: 'Сменить тему'dark: 'Темная'light: 'Светлая'pink: 'Розовая'- select: 'Выберите тему'+ title: 'Тема'system: 'Авто'</i18n>diff --git a/app/components/app/theme/SwitcherSelect.vue b/app/components/app/theme/SwitcherSelect.vuedeleted file mode 100644index 8d868e53..00000000--- a/app/components/app/theme/SwitcherSelect.vue+++ /dev/null@@ -1,68 +0,0 @@-<script setup lang="ts">-const props = defineProps<{- isShowTitle?: boolean-}>()--const colorMode = useColorMode()-const { t } = useI18n()--type Theme = 'system' | 'light' | 'dark' | 'pink'--const locales: {- 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-}-</script>--<template>- <div>- <UiTitle3- v-if="props.isShowTitle"- class="pb-2"- >- {{ t('theme.select') }}- </UiTitle3>-- <FormSelect- :options="locales"- :value="colorMode.preference"- @change="(theme: Theme) => setTheme(theme)"- />- </div>-</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>diff --git a/app/components/app/theme/SwitcherTabs.vue b/app/components/app/theme/SwitcherTabs.vuenew file mode 100644index 00000000..13903873--- /dev/null+++ b/app/components/app/theme/SwitcherTabs.vue@@ -0,0 +1,77 @@+<script setup lang="ts">+const props = defineProps<{+ isShowPink?: boolean+ isShowSystem?: boolean+}>()++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+}+</script>++<template>+ <UiTabs2>+ <UiTabsItem4+ v-for="locale in locales"+ :key="locale.slug"+ :isActive="isItActive(locale.slug)"+ @click="setTheme(locale.slug)"+ >+ {{ t(locale.localeKey) }}+ </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>diff --git a/app/components/categories/Form.vue b/app/components/categories/Form.vueindex faf95bcc..c6681294 100644--- a/app/components/categories/Form.vue+++ b/app/components/categories/Form.vue@@ -21,7 +21,9 @@ const categoriesStore = useCategoriesStore()const editCategoryId = props.categoryId ?? generateId()const isUpdateChildCategoriesColor = ref(true)-const isAllowChangeParent = computed(() => categoriesStore.getChildsIds(props.categoryId).length === 0)+const isAllowChangeParent = computed(() =>+ categoriesStore.getChildsIds(props.categoryId).length === 0 && categoriesStore.categoriesForBeParent.length > 0,+)const modals = ref({colors: false,@@ -123,17 +125,17 @@ async function onSave() {><div class="grid content-start gap-6 overflow-y-auto py-4"><!-- Name -->- <UiFormElement>+ <FormElement><template #label>{{ t('categories.form.name.label') }}</template>- <UiFormInput+ <FormInput:placeholder="t('categories.form.name.placeholder')":value="categoryForm.name"@updateValue="(value: string) => emit('updateValue', 'name', value)"/>- </UiFormElement>+ </FormElement><!-- Parent --><UiButtonWithRight@@ -181,10 +183,6 @@ async function onSave() {<!-- Options --><div>- <UiTitle3 class="pb-2">- {{ t('settings.options') }}- </UiTitle3>-<UiCheckboxv-if="categoriesStore.getChildsIds(props.categoryId).length > 0":checkboxValue="isUpdateChildCategoriesColor"@@ -284,7 +282,7 @@ async function onSave() {</div><div class="scrollerBlock bottomSheetContentInside">- <UiFormElement class="pb-4 pt-2">+ <FormElement class="pb-4 pt-2"><template #label>{{ t('categories.form.icon.desc') }}<a@@ -294,12 +292,12 @@ async function onSave() {>Material Design Icons</a></template>- <UiFormInput+ <FormInput:placeholder="t('categories.form.icon.placeholder')":value="categoryForm.icon"@updateValue="(value: string) => emit('updateValue', 'icon', value)"/>- </UiFormElement>+ </FormElement><divv-for="iconGroup in icons"@@ -311,7 +309,7 @@ async function onSave() {:key="icon":class="[{ '!border-accent-1': icon === props.categoryForm.icon }]":style="{ background: props.categoryForm.color }"- class="flex-center text-icon-primary size-10 cursor-pointer rounded-full border-2 border-transparent"+ class="flex-center size-10 cursor-pointer rounded-full border-2 border-transparent text-icon-primary"@click="emit('updateValue', 'icon', icon)"><Icon :name="icon" size="20" />@@ -348,12 +346,12 @@ async function onSave() {<UiTitleModal>{{ t('selectParent') }}</UiTitleModal><div class="scrollerBlock bottomSheetContentInside">- <UiBox3+ <UiItem2:isActive="props.categoryForm.parentId === 0"@click="onParentSelect(false, close)">{{ t('categories.form.parent.no') }}- </UiBox3>+ </UiItem2><CategoriesList:activeItemId="props.categoryForm.parentId"diff --git a/app/components/color/Palette.vue b/app/components/color/Palette.vueindex b2b68fe4..7dde48c4 100644--- a/app/components/color/Palette.vue+++ b/app/components/color/Palette.vue@@ -61,16 +61,15 @@ function findWalletWithColor(color: string) {</div></div>- <UiFormElement>+ <FormElement><template #label>{{ t('color.custom') }}</template>- <input+ <FormInput:value="activeColor"- class="h-12 w-full rounded-lg border border-solid border-item-3 p-0 transition ease-in-out focus:border-accent-2 focus:bg-item-hover focus:text-1 focus:outline-none"type="color"- @input="(event: HTMLInputEvent) => emit('click', event.target.value)"- >- </UiFormElement>+ @updateValue="(event: HTMLInputEvent) => emit('click', event.target.value)"+ />+ </FormElement></div></template>diff --git a/app/components/currencies/List.vue b/app/components/currencies/List.vueindex d0d7e78d..bbb52e36 100644--- a/app/components/currencies/List.vue+++ b/app/components/currencies/List.vue@@ -32,7 +32,7 @@ const list = computed(() => {<template><div class="grid h-full grid-rows-[auto,1fr] overflow-hidden px-2"><div>- <UiFormInput+ <FormInput:value="searchInput":placeholder="`${t('search')}...`"@updateValue="(value: string) => searchInput = value"diff --git a/app/components/date/Picker.vue b/app/components/date/Picker.vueindex 23196c3a..9ce72ab3 100644--- a/app/components/date/Picker.vue+++ b/app/components/date/Picker.vue@@ -1,17 +1,20 @@<script setup lang="ts">-import type { DatePickerDate, DatePickerRangeObject } from 'v-calendar/dist/types/src/use/datePicker'-import { DatePicker as VCalendarDatePicker } from 'v-calendar'-import 'v-calendar/dist/style.css'+import 'v-calendar/style.css'-const props = defineProps({- value: {- default: null,- type: [Date, Object] as PropType<DatePickerDate | DatePickerRangeObject | null>,- },-})+type DatePickerDate = number | string | Date | null | {+ end?: number | string | Date | null+ start?: number | string | Date | null+}++const props = defineProps<{+ mode?: 'date' | 'range'+ rows?: number+ value: DatePickerDate+}>()const emit = defineEmits(['update:model-value', 'close'])+const colorMode = useColorMode()const date = computed({get: () => props.value,@@ -23,41 +26,67 @@ const date = computed({const attrs = {'borderless': true,- 'color': 'primary','first-day-of-week': 2,- 'is-dark': { darkClass: 'dark', selector: 'html' },'transparent': true,}++const matchTheme = {+ dark: {+ color: 'blue',+ isDark: true,+ },+ light: {+ color: 'blue',+ isDark: false,+ },+ pink: {+ color: 'pink',+ isDark: true,+ },+ system: {+ color: 'blue',+ isDark: colorMode.value === 'dark',+ },+}</script><template>- <VCalendarDatePicker v-model.range="date" :rows="2" v-bind="{ ...attrs, ...$attrs }" />+ <VCalendarDatePicker+ v-if="props.mode === 'range'"+ v-model.range="date"+ class="datePicker"+ :rows="props.rows ?? 1"+ v-bind="{ ...attrs, ...$attrs, ...matchTheme[colorMode.preference] }"+ />+ <VCalendarDatePicker+ v-else+ v-model="date"+ :rows="1"+ class="datePicker"+ mode="date"+ v-bind="{ ...attrs, ...$attrs, ...matchTheme[colorMode.preference] }"+ /></template><style>-:root {- --vc-gray-50: rgb(var(--color-gray-50));- --vc-gray-100: rgb(var(--color-gray-100));- --vc-gray-200: rgb(var(--color-gray-200));- --vc-gray-300: rgb(var(--color-gray-300));- --vc-gray-400: rgb(var(--color-gray-400));- --vc-gray-500: rgb(var(--color-gray-500));- --vc-gray-600: rgb(var(--color-gray-600));- --vc-gray-700: rgb(var(--color-gray-700));- --vc-gray-800: rgb(var(--color-gray-800));- --vc-gray-900: rgb(var(--color-gray-900));+html .vc-dark,+html .vc-light {+ --vc-popover-content-bg: theme('colors.foreground.1');+ --vc-accent-500: theme('colors.accent.1');+ --vc-focus-ring: theme('colors.accent.1');+ --vc-nav-item-active-bg: theme('colors.accent.1');+ --vc-nav-hover-bg: theme('colors.item.hover');+ --vc-color: theme('colors.1');+ --vc-day-content-disabled-color: theme('colors.5');+ --vc-weekday-color: theme('colors.2');+ --vc-header-title-color: theme('colors.3');+ --vc-popover-content-color: theme('colors.2');+ --vc-nav-title-color: theme('colors.3');+ --vc-nav-item-current-color: theme('colors.accent.1');+ --vc-highlight-solid-bg: theme('colors.accent.1');}-.vc-primary {- --vc-accent-50: rgb(var(--color-primary-50));- --vc-accent-100: rgb(var(--color-primary-100));- --vc-accent-200: rgb(var(--color-primary-200));- --vc-accent-300: rgb(var(--color-primary-300));- --vc-accent-400: rgb(var(--color-primary-400));- --vc-accent-500: rgb(var(--color-primary-500));- --vc-accent-600: rgb(var(--color-primary-600));- --vc-accent-700: rgb(var(--color-primary-700));- --vc-accent-800: rgb(var(--color-primary-800));- --vc-accent-900: rgb(var(--color-primary-900));+.vc-popover-content {+ @apply border-2 border-item-3;}</style>diff --git a/app/components/date/useStatDate.ts b/app/components/date/useStatDate.tsindex d801c252..996cbbd8 100644--- a/app/components/date/useStatDate.ts+++ b/app/components/date/useStatDate.ts@@ -119,7 +119,10 @@ export function useStatDate({function setRangeByCalendar(r: Range) {resetCustomAndMaxRangeParams()- params.value.customDate = r+ params.value.customDate = {+ end: new Date(r.end).getTime(),+ start: new Date(r.start).getTime(),+ }params.value.rangeOffset = 0params.value.intervalsBy = 'day'diff --git a/app/components/ui/FormElement.vue b/app/components/form/Element.vuesimilarity index 100%rename from app/components/ui/FormElement.vuerename to app/components/form/Element.vuediff --git a/app/components/form/Input.vue b/app/components/form/Input.vuenew file mode 100644index 00000000..e1ff2967--- /dev/null+++ b/app/components/form/Input.vue@@ -0,0 +1,24 @@+<script setup lang="ts">+import { getStyles } from '~/components/ui/getStyles'++const props = defineProps<{+ placeholder?: string+ type?: 'text' | 'number' | 'color'+ value: string | number+}>()++const emit = defineEmits<{+ updateValue: [value: string]+}>()+</script>++<template>+ <input+ :placeholder="props.placeholder"+ :value="props.value"+ :class="getStyles('item', ['link', 'rounded'])"+ :type="props.type ?? 'text'"+ class="m-0 w-full border border-solid border-item-6 bg-item-4 px-3 py-2 text-base font-normal placeholder:text-item-2 focus:border-accent-1 focus:bg-item-hover focus:text-1 focus:outline-none"+ @input="(event: HTMLInputEvent) => emit('updateValue', event.target.value)"+ >+</template>diff --git a/app/components/ui/FormInput.vue b/app/components/form/Textarea.vuesimilarity index 65%rename from app/components/ui/FormInput.vuerename to app/components/form/Textarea.vueindex f603012f..b0b2d038 100644--- a/app/components/ui/FormInput.vue+++ b/app/components/form/Textarea.vue@@ -13,12 +13,11 @@ const emit = defineEmits<{</script><template>- <input+ <textarea:placeholder="props.placeholder":value="props.value":class="getStyles('item', ['link', 'rounded'])"- :type="props.type ?? 'text'"- class="border-item-6 bg-item-4 placeholder:text-item-2 focus:border-accent-2 focus:bg-item-hover focus:text-item-1 m-0 w-full border border-solid px-3 py-2 text-base font-normal focus:outline-none"+ class="m-0 w-full border border-solid border-item-6 bg-item-4 px-3 py-2 text-base font-normal placeholder:text-item-2 focus:border-accent-1 focus:bg-item-hover focus:text-1 focus:outline-none"@input="(event: HTMLInputEvent) => emit('updateValue', event.target.value)"- >+ /></template>diff --git a/app/components/layout/ConfirmModal.vue b/app/components/layout/ConfirmModal.vueindex cde4bf5a..19675acf 100644--- a/app/components/layout/ConfirmModal.vue+++ b/app/components/layout/ConfirmModal.vue@@ -52,7 +52,7 @@ const items = computed(() => ({<div class="scrollerBlock bottomSheetContentInside !px-3"><divv-if="description"- class="text-alert-primary"+ class="text-alert-1">{{ description }}</div>diff --git a/app/components/layout/MenuBottom.vue b/app/components/layout/MenuBottom.vueindex ba7a92b6..dd4f09a9 100644--- a/app/components/layout/MenuBottom.vue+++ b/app/components/layout/MenuBottom.vue@@ -6,7 +6,7 @@ const { itemsBottom } = useMenuData()<template><div- class="sm:bottom-inherit sticky bottom-0 left-0 z-20 mx-auto flex w-full items-stretch bg-foreground-2/80 backdrop-blur sm:hidden lg:hidden"+ class="sm:bottom-inherit sticky bottom-0 left-0 z-20 mx-auto flex w-full items-stretch bg-item-9/80 backdrop-blur sm:hidden lg:hidden"style="padding-bottom: calc(env(safe-area-inset-bottom) - 16px)"><LayoutSidebarMenuItemdiff --git a/app/components/layout/MenuBottomModal.vue b/app/components/layout/MenuBottomModal.vueindex 89abbdfb..404ed776 100644--- a/app/components/layout/MenuBottomModal.vue+++ b/app/components/layout/MenuBottomModal.vue@@ -21,17 +21,17 @@ const { isDemo } = useDemo()<BottomSheetClose @onClick="close" /></template>- <div class="bg-foreground-1 grid gap-3 px-1 py-3">+ <div class="grid gap-3 bg-foreground-1 px-1 py-3"><LayoutSidebarMenu /><div class="pl-2 pt-2">- <AppThemeSwitcherSelect isShowTitle />+ <AppThemeSwitcher isShowTitle /></div><!-- User --><divv-if="!isDemo"- class="border-item-6 border-t px-2 pt-3"+ class="border-t border-item-6 px-2 pt-3"><UserViewLogout /></div>diff --git a/app/components/layout/Sidebar.vue b/app/components/layout/Sidebar.vueindex 6a0cd8df..f137bfe9 100644--- a/app/components/layout/Sidebar.vue+++ b/app/components/layout/Sidebar.vue@@ -67,10 +67,9 @@ const isShowLogoMenu = ref(false)<AppThemeSwitcherisShowSystem- component="UiTabs2"/>- <UserViewLogout class="mt-6" />+ <UserViewLogout class="mt-3" /></div></template></BottomSheetOrDropdown>@@ -125,7 +124,7 @@ const isShowLogoMenu = ref(false)<div class="absolute bottom-1 left-1 hidden w-full items-center md:flex"><UiItem1- class="z-10 bg-foreground-2 text-4"+ class="z-10 text-4"@click="emit('toggleSidebar')"><Icon :name="props.isShowSidebar ? 'lucide:panel-left-close' : 'lucide:panel-left'" size="18" />diff --git a/app/components/stat/Config.vue b/app/components/stat/Config.vueindex 5330950f..10c71c2a 100644--- a/app/components/stat/Config.vue+++ b/app/components/stat/Config.vue@@ -69,14 +69,15 @@ function updateWalletsLimit(value: number) {</UiTitleOption><UiTabs1>- <UiTabsItem1+ <UiTabsItem4v-for="view in chartViewOptions":key="view":isActive="statConfig.config.value.chartView === view"+ class="grow"@click="statConfig.updateConfig('chartView', view)">{{ t(`stat.config.chartView.${view}`) }}- </UiTabsItem1>+ </UiTabsItem4></UiTabs1></div>@@ -87,11 +88,11 @@ function updateWalletsLimit(value: number) {</UiTitleOption><UiTabs1>- <UiTabsItem1+ <UiTabsItem4v-for="item in chartTypes":key="item.value":isActive="statConfig.config.value.chartType === item.value"- class="flex gap-1"+ class="flex grow gap-1"@click="statConfig.updateConfig('chartType', item.value)"><Icon@@ -99,7 +100,7 @@ function updateWalletsLimit(value: number) {:size="16"/>{{ item.label }}- </UiTabsItem1>+ </UiTabsItem4></UiTabs1></div></div>@@ -132,7 +133,7 @@ function updateWalletsLimit(value: number) {><Icon name="lucide:minus" /></UiItem4>- <UiFormInput+ <FormInput:placeholder="t('stat.config.showedWallets.placeholder')":value="statConfig.config.value.wallets.count":max="walletsStore.sortedIds.length"diff --git a/app/components/stat/date/Selector.vue b/app/components/stat/date/Selector.vueindex cd318dc4..3b27d167 100644--- a/app/components/stat/date/Selector.vue+++ b/app/components/stat/date/Selector.vue@@ -156,15 +156,14 @@ function selectInterval(grouped: Grouped) {<DatePickerv-if="tabs.selected.value === 'calendar'"- expanded- color="blue"+ mode="range"+ :rows="2":value="statDate.range.value"- @update:modelValue="- (v: Range) => {- statDate.setRangeByCalendar(v);- close();- }- "+ @update:modelValue="(v: Range) => {+ console.log('v', v)+ statDate.setRangeByCalendar(v);+ close();+ }"/></div></template>diff --git a/app/components/stat/sum/ItemWallet.vue b/app/components/stat/sum/ItemWallet.vueindex 87ce6cf7..429a58c1 100644--- a/app/components/stat/sum/ItemWallet.vue+++ b/app/components/stat/sum/ItemWallet.vue@@ -1,5 +1,6 @@<script setup lang="ts">import { useCurrenciesStore } from '~/components/currencies/useCurrenciesStore'+import { getStyles } from '~/components/ui/getStyles'const props = defineProps<{amount: number@@ -16,8 +17,9 @@ const currenciesStore = useCurrenciesStore()</script><template>- <UiBox2- class="grow-0 py-1"+ <div+ :class="[getStyles('item', ['center', 'minh1', 'minw1'])]"+ class="grid grow-0 gap-1 py-1"@click="(e: Event) => emit('click', e)"><UiTitle6>{{ props.title }}</UiTitle6>@@ -28,5 +30,5 @@ const currenciesStore = useCurrenciesStore()align="left"variant="3xl"/>- </UiBox2>+ </div></template>diff --git a/app/components/trnForm/Calendar.vue b/app/components/trnForm/Calendar.vueindex ebdff170..c02a7d9c 100644--- a/app/components/trnForm/Calendar.vue+++ b/app/components/trnForm/Calendar.vue@@ -1,17 +1,11 @@<script setup lang="ts">-import 'v-calendar/style.css'-import { DatePicker } from 'v-calendar'-import { useTrnsFormStore } from '~/components/trnForm/useTrnsFormStore'const props = defineProps<{hide: () => void}>()-const colorMode = useColorMode()const trnsFormStore = useTrnsFormStore()--const isDark = computed(() => colorMode.preference === 'dark' || colorMode.preference === 'system')const date = ref(new Date(trnsFormStore.values.date).toISOString())const maxDate = new Date()@@ -25,12 +19,10 @@ watch(date, (value) => {<template><DatePicker- v-model="date"- :isDark="isDark"+ :value="date":maxDate="maxDate"- borderlessexpandedmode="date"- transparent+ @update:modelValue="value => date = value"/></template>diff --git a/app/components/trnForm/Sidebar.vue b/app/components/trnForm/Sidebar.vueindex 82984605..155e7d00 100644--- a/app/components/trnForm/Sidebar.vue+++ b/app/components/trnForm/Sidebar.vue@@ -50,7 +50,7 @@ watch(isShow, (v) => {v-if="isShow"class="@container/trnForm trnForm absolute inset-y-0 z-50 h-full w-[360px] py-2">- <div class="relative h-full overflow-hidden rounded-r-xl border border-item-6 border-l-foreground-2 bg-foreground-2 shadow-2xl">+ <div class="border-left relative h-full overflow-hidden rounded-r-xl border-item-6 bg-item-9 shadow-2xl"><div class="absolute right-2 top-2"><BottomSheetClose @onClick="trnsFormStore.onClose()" /></div>diff --git a/app/components/trnForm/main/ActionSide.vue b/app/components/trnForm/main/ActionSide.vueindex 2b1cd025..60e748ab 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/50 hocus:!bg-accent-1/70': !isMath && isSubmittable,+ '!border-transparent !bg-accent-1/80 hocus:!bg-accent-1': !isMath && isSubmittable,'!border-item-4 !text-2': !isSubmittable,'!text-2': isMath,}"diff --git a/app/components/trnForm/main/Input.vue b/app/components/trnForm/main/Input.vueindex 5e8e42de..47099390 100644--- a/app/components/trnForm/main/Input.vue+++ b/app/components/trnForm/main/Input.vue@@ -33,7 +33,7 @@ const { t } = useI18n(){{ amount }}</div>- <UiFormInput+ <FormInput:class="{'!text-[#f92134] placeholder:!text-red-700/80': highlight === 'income','!text-[#2cad22] placeholder:!text-green-700/80': highlight === 'expense',@@ -41,7 +41,7 @@ const { t } = useI18n()}":placeholder="t('enterAmount')":value="amountRaw"- class="swiper-no-swiping border-transparent bg-item-9 pb-2 pt-6 text-center font-secondary !text-3xl placeholder:text-3xl focus:!border-accent-2"+ class="swiper-no-swiping border-transparent bg-item-9 pb-2 pt-6 text-center font-secondary !text-3xl placeholder:text-3xl"inputmode="tel"@updateValue="(value: string) => emit('onChange', value || '')"/>diff --git a/app/components/trnForm/main/Types.vue b/app/components/trnForm/main/Types.vueindex e1041f29..ebe7c2dd 100644--- a/app/components/trnForm/main/Types.vue+++ b/app/components/trnForm/main/Types.vue@@ -18,11 +18,17 @@ function isItActive(amountType: TrnType) {<template><UiTabs1 class="!gap-0">- <UiTabsItem3 :isActive="isItActive(0)" @click="setAmountType(0)">+ <UiTabsItem3+ :isActive="isItActive(0)"+ @click="setAmountType(0)"+ >{{ $t('money.expense') }}</UiTabsItem3>- <UiTabsItem3 :isActive="isItActive(1)" @click="setAmountType(1)">+ <UiTabsItem3+ :isActive="isItActive(1)"+ @click="setAmountType(1)"+ >{{ $t('money.income') }}</UiTabsItem3>diff --git a/app/components/trnForm/modal/Description.vue b/app/components/trnForm/modal/Description.vueindex 7f13b59a..19a059c0 100644--- a/app/components/trnForm/modal/Description.vue+++ b/app/components/trnForm/modal/Description.vue@@ -1,6 +1,7 @@<script setup lang="ts">import { useTrnsFormStore } from '~/components/trnForm/useTrnsFormStore'+const { t } = useI18n()const trnsFormStore = useTrnsFormStore()const desc = ref('')@@ -26,19 +27,19 @@ function onSave(close: () => void) {<template #default="{ close }"><div class="bottomSheetContent">- <UiTitleModal>{{ $t('trnForm.description.title') }}</UiTitleModal>+ <UiTitleModal>{{ t('trnForm.description.title') }}</UiTitleModal><div class="px-2">- <textarea- v-model="desc"- class="m-0 h-28 w-full rounded-lg border border-solid border-item-3 bg-item-4 px-4 py-3 text-base font-normal transition ease-in-out placeholder:text-item-2 focus:border-accent-2 focus:bg-item-hover focus:text-item-1 focus:outline-none"- :placeholder="$t('trnForm.description.placeholder')"+ <FormTextarea+ :value="desc"+ :placeholder="t('trnForm.description.placeholder')"+ @updateValue="(value: string) => desc = value"/></div><div class="flex-center p-2"><UiButtonAccent @click="onSave(close)">- {{ $t('base.save') }}+ {{ t('base.save') }}</UiButtonAccent></div></div>diff --git a/app/components/trns/pages/History.vue b/app/components/trns/pages/History.vueindex 9c983863..90a6d353 100644--- a/app/components/trns/pages/History.vue+++ b/app/components/trns/pages/History.vue@@ -33,7 +33,7 @@ const trnsIds = computed(() => trnsStore.getStoreTrnsIds({<template v-if="filter.isShow.value" #selected><FilterSelected- class="sticky top-[40px] z-20 bg-foreground-2"+ class="sticky top-[40px] z-20 bg-item-9"isShowCategoriesisShowWallets/>diff --git a/app/components/ui/ButtonWithRight.vue b/app/components/ui/ButtonWithRight.vueindex 2cfcc3fe..ed6d820d 100644--- a/app/components/ui/ButtonWithRight.vue+++ b/app/components/ui/ButtonWithRight.vue@@ -1,25 +1,50 @@<script setup lang="ts">+const props = defineProps<{+ isShowTitle?: boolean+}>()+const emit = defineEmits<{click: [e: Event]}>()</script><template>- <UiElement- class="@container/element"- insideClasses="max-w-lg w-full !min-h-[44px] bg-item-4 px-2 @xs/element:pl-4 @xs/element:pr-3 block @xs/element:flex @xs/element:flex-wrap gap-0 gap-x-2"- @click="(e: Event) => emit('click', e)"- >- <div class="text-sm text-2">+ <div>+ <UiTitle3+ v-if="props.isShowTitle"+ class="pb-2"+ ><slot name="label" />- </div>+ </UiTitle3>++ <UiElement+ class="@container/element"+ insideClasses="max-w-lg w-full !min-h-[42px] bg-item-4 px-2 @xs/element:pl-4 @xs/element:pr-3 block @xs/element:flex @xs/element:flex-wrap gap-0 gap-x-2"+ @click="(e: Event) => emit('click', e)"+ >+ <div+ v-if="!props.isShowTitle"+ class="text-sm text-2"+ >+ <slot name="label" />+ </div>- <div class="@xs/element:ml-auto flex items-center gap-1 text-base">- <slot name="value" />- <Icon- name="lucide:chevron-down"- class="text-item-2"- />- </div>- </UiElement>+ <div+ :class="{+ '@xs/element:ml-auto': !props.isShowTitle,+ 'grow': props.isShowTitle,+ }"+ class="flex items-center gap-1 text-base"+ >+ <slot name="value" />+ <Icon+ name="lucide:chevron-down"+ class="text-4"+ :class="{+ 'ml-auto': props.isShowTitle,+ }"+ />+ </div>+ </UiElement>+ </div></template>diff --git a/app/components/ui/Item4.vue b/app/components/ui/Item2.vuesimilarity index 100%rename from app/components/ui/Item4.vuerename to app/components/ui/Item2.vuediff --git a/app/components/ui/TabsItem2.vue b/app/components/ui/TabsItem2.vuedeleted file mode 100644index c55cb476..00000000--- a/app/components/ui/TabsItem2.vue+++ /dev/null@@ -1,21 +0,0 @@-<script setup lang="ts">-import { getStyles } from '~/components/ui/getStyles'--defineProps<{- isActive?: boolean-}>()--const emit = defineEmits(['click'])-</script>--<template>- <div- :class="[getStyles('item', ['link', 'rounded', 'minh2', '_minw2']), {- '!bg-item-3 !text-1': isActive,- }]"- class="flex items-center justify-center gap-1 rounded-md border-1 px-2 text-sm leading-none text-2"- @click="emit('click')"- >- <slot />- </div>-</template>diff --git a/app/components/ui/TabsItem3.vue b/app/components/ui/TabsItem3.vueindex 5f817784..76cde982 100644--- a/app/components/ui/TabsItem3.vue+++ b/app/components/ui/TabsItem3.vue@@ -13,7 +13,7 @@ const emit = defineEmits(['click']):class="[getStyles('item', ['minh2']), {'!bg-item-3 !text-accent-1': isActive,}]"- class="flex grow select-none items-center justify-center gap-1 px-2 text-sm text-3 hocus:bg-item-hover"+ class="flex grow select-none items-center justify-center gap-1 px-2 text-sm leading-none text-2 hocus:bg-item-hover"@click="emit('click')"><slot />diff --git a/app/components/ui/box1.vue b/app/components/ui/box1.vuedeleted file mode 100644index ef7cf81d..00000000--- a/app/components/ui/box1.vue+++ /dev/null@@ -1,17 +0,0 @@-<script setup lang="ts">-import { getStyles } from '~/components/ui/getStyles'--const emit = defineEmits<{- click: [e: Event]-}>()-</script>--<template>- <div- :class="getStyles('item', ['link', 'alt', 'center', 'minh4', 'minw1', 'rounded'])"- class="flex items-center border border-item-3 px-5 py-2.5"- @click="(e: Event) => emit('click', e)"- >- <slot />- </div>-</template>diff --git a/app/components/ui/box2.vue b/app/components/ui/box2.vuedeleted file mode 100644index f9821aab..00000000--- a/app/components/ui/box2.vue+++ /dev/null@@ -1,17 +0,0 @@-<script setup lang="ts">-import { getStyles } from '~/components/ui/getStyles'--const emit = defineEmits<{- click: [e: Event]-}>()-</script>--<template>- <div- :class="[getStyles('item', ['center', 'minh1', 'minw1'])]"- class="grid grow gap-1"- @click="(e: Event) => emit('click', e)"- >- <slot />- </div>-</template>diff --git a/app/components/ui/box3.vue b/app/components/ui/box3.vuedeleted file mode 100644index a38fedda..00000000--- a/app/components/ui/box3.vue+++ /dev/null@@ -1,17 +0,0 @@-<script setup lang="ts">-import { getStyles } from '~/components/ui/getStyles'--const emit = defineEmits<{- click: [e: Event]-}>()-</script>--<template>- <div- :class="[getStyles('item', ['link', 'alt', 'padding3', 'center', 'minh1', 'minw1', 'rounded'])]"- class="grid grow gap-1 px-3 py-2 text-1"- @click="(e: Event) => emit('click', e)"- >- <slot />- </div>-</template>diff --git a/app/components/wallets/Form.vue b/app/components/wallets/Form.vueindex dc702aa8..0ab4770b 100644--- a/app/components/wallets/Form.vue+++ b/app/components/wallets/Form.vue@@ -106,17 +106,17 @@ async function onSave() {><div class="grid content-start gap-6 overflow-y-auto py-4"><!-- Name -->- <UiFormElement>+ <FormElement><template #label>{{ t('wallets.form.name.label') }}</template>- <UiFormInput+ <FormInput:placeholder="t('wallets.form.name.placeholder')":value="props.walletForm.name ?? ''"@updateValue="(value: string) => emit('updateValue', 'name', value)"/>- </UiFormElement>+ </FormElement><!-- Currencies --><UiButtonWithRight @click="modals.currencies = true">@@ -145,16 +145,16 @@ async function onSave() {</UiButtonWithRight><!-- Description -->- <UiFormElement>+ <FormElement><template #label>{{ t('wallets.form.description.label') }}</template>- <UiFormInput+ <FormTextarea:placeholder="t('wallets.form.description.placeholder')":value="props.walletForm.desc ?? ''"@updateValue="(value: string) => emit('updateValue', 'desc', value)"/>- </UiFormElement>+ </FormElement><!-- Type --><div>@@ -170,22 +170,23 @@ async function onSave() {</div><!-- Credit Limit -->- <UiFormElement v-if="props.walletForm.type === 'credit'">+ <FormElement v-if="props.walletForm.type === 'credit'"><template #label>{{ t('wallets.form.credit.limit') }}</template>- <UiFormInput+ <FormInput:placeholder="t('wallets.form.credit.limit')":value="props.walletForm.creditLimit ?? 0"@updateValue="(value: string) => emit('updateValue', 'creditLimit', value)"/>- </UiFormElement>+ </FormElement><!-- Options --><div class="grid gap-1">- <UiTitle3>+ <!-- <UiTitle3>{{ t('settings.options') }}</UiTitle3>+ --><div><UiCheckbox:checkboxValue="props.walletForm.isWithdrawal ?? false"diff --git a/app/pages/components.vue b/app/pages/components.vuedeleted file mode 100644index 20d71ce6..00000000--- a/app/pages/components.vue+++ /dev/null@@ -1,46 +0,0 @@-<script lang="ts" setup>--</script>--<template>- <UiPage>- <div class="grid gap-8 p-3">- <!-- UiTitle -->- <div>- <h1 class="border-item-6 mb-4 border-b pb-2">- UiTitle- </h1>-- <div class="grid gap-4">- <UiTitle6>- UiTitle6- </UiTitle6>-- <UiTitle8>- UiTitle8- </UiTitle8>-- <UiTitle3>- UiTitle3- </UiTitle3>- </div>- </div>-- <div>- <h1 class="border-item-6 mb-4 border-b pb-2">- UiText- </h1>-- <div class="grid gap-4">- <UiTextSm1>- UiTextSm1- </UiTextSm1>-- <UiTextSm2>- UiTextSm2- </UiTextSm2>- </div>- </div>- </div>- </UiPage>-</template>diff --git a/app/pages/dev.vue b/app/pages/dev.vuenew file mode 100644index 00000000..b3c57e0a--- /dev/null+++ b/app/pages/dev.vue@@ -0,0 +1,254 @@+<script lang="ts" setup>++</script>++<template>+ <UiPage>+ <AppThemeSwitcherTabs isShowPink isShowSystem />++ <div class="grid grid-cols-[1fr,auto] items-start gap-8 p-3">+ <div class="grid gap-12">+ <div>+ <!-- Colors -->+ <h1 class="mb-2 border-b border-item-6 pb-1">+ Colors+ </h1>++ <div class="grid gap-4">+ <div class="grid gap-2">+ <div class="text-sm text-2">+ Backgrounds+ </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-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>+ </div>++ <div class="grid gap-2">+ <div class="text-sm text-2">+ Texts+ </div>+ <div class="flex flex-wrap gap-0">+ <div class="size-20 bg-1" />+ <div class="size-20 bg-3" />+ <div class="size-20 bg-2" />+ <div class="size-20 bg-4" />+ <div class="size-20 bg-5" />+ </div>+ </div>++ <div class="flex flex-wrap gap-4">+ <div class="grid gap-2">+ <div class="text-sm text-2">+ Accent+ </div>+ <div class="flex flex-wrap gap-0">+ <div class="size-20 bg-accent-1" />+ </div>+ </div>++ <div class="grid gap-2">+ <div class="text-sm text-2">+ Alert+ </div>+ <div class="flex flex-wrap gap-0">+ <div class="size-20 bg-alert-1" />+ </div>+ </div>++ <div class="grid gap-2">+ <div class="text-sm text-2">+ Money+ </div>+ <div class="flex flex-wrap gap-0">+ <div class="size-20 bg-income-1" />+ <div class="size-20 bg-expense-1" />+ </div>+ </div>+ </div>+ </div>+ </div>++ <!-- UiTitle -->+ <div>+ <h1 class="mb-2 border-b border-item-6 pb-1">+ UiTitle+ </h1>++ <div class="grid gap-4">+ <UiTitle3>+ UiTitle3+ </UiTitle3>++ <UiTitle6>+ UiTitle6+ </UiTitle6>++ <UiTitle8>+ UiTitle8+ </UiTitle8>++ <UiTitleDropRight>+ UiTitleDropRight+ </UiTitleDropRight>++ <UiTitleModal>+ UiTitleModal+ </UiTitleModal>++ <UiTitleOption>+ UiTitleOption+ </UiTitleOption>+ </div>+ </div>++ <div>+ <h1 class="mb-2 border-b border-item-6 pb-1">+ UiText+ </h1>++ <div class="grid gap-4">+ <UiTextSm1>+ UiTextSm1+ </UiTextSm1>++ <UiTextSm2>+ UiTextSm2+ </UiTextSm2>+ </div>+ </div>++ <div>+ <h1 class="mb-2 border-b border-item-6 pb-1">+ UiToggle+ </h1>++ <div class="grid gap-4">+ <UiToggle>+ UiToggle+ </UiToggle>++ <UiToggle2>+ UiToggle2+ </UiToggle2>++ <UiToggle3 isShown>+ UiToggle3+ </UiToggle3>++ <UiToggleAction isShown>+ UiToggleAction+ </UiToggleAction>+ </div>+ </div>++ <div>+ <h1 class="mb-2 border-b border-item-6 pb-1">+ UiItem+ </h1>++ <div class="grid gap-4">+ <UiItem1>+ UiItem1+ </UiItem1>++ <UiItem2>+ UiItem2+ </UiItem2>++ <UiItem3>+ UiItem3+ </UiItem3>+ </div>+ </div>++ <div>+ <h1 class="mb-2 border-b border-item-6 pb-1">+ UiTabs+ </h1>++ <div class="grid gap-4">+ <UiTabs1>+ UiTabs1+ </UiTabs1>++ <UiTabs2>+ UiTabs2+ </UiTabs2>++ <UiTabs3>+ UiTabs3+ </UiTabs3>+ </div>+ </div>++ <div>+ <h1 class="mb-2 border-b border-item-6 pb-1">+ UiTabsItem+ </h1>++ <div class="grid grid-cols-2 gap-2">+ <div class="grid gap-4">+ <UiTabsItem1>+ UiTabsItem1+ </UiTabsItem1>++ <UiTabsItem3>+ UiTabsItem3+ </UiTabsItem3>++ <UiTabsItem4>+ UiTabsItem4+ </UiTabsItem4>+ </div>++ <div class="grid gap-4">+ <UiTabsItem1 isActive>+ UiTabsItem1+ </UiTabsItem1>++ <UiTabsItem3 isActive>+ UiTabsItem3+ </UiTabsItem3>++ <UiTabsItem4 isActive>+ UiTabsItem4+ </UiTabsItem4>+ </div>+ </div>+ </div>+ </div>++ <div>+ <!-- Calendar -->+ <div>+ <h1 class="mb-2 border-b border-item-6 pb-1">+ Calendar+ </h1>++ <div class="grid gap-4">+ <DatePicker+ :value="new Date().getTime()"+ mode="date"+ />+ <DatePicker+ :value="{+ end: new Date().getTime(),+ start: new Date().getTime() - 1000 * 60 * 60 * 24 * 14,+ }"+ mode="range"+ :rows="2"+ />+ </div>+ </div>+ </div>+ </div>+ </UiPage>+</template>diff --git a/app/pages/login.vue b/app/pages/login.vueindex af443dc6..c05e28f7 100644--- a/app/pages/login.vue+++ b/app/pages/login.vue@@ -67,9 +67,9 @@ async function openDemo() {<template><div class="mx-auto grid size-full max-w-xl grid-rows-[auto,1fr,auto] px-2 py-3 md:p-6">- <div class="flex flex-wrap items-center justify-between gap-2">+ <div class="flex items-center justify-between gap-2"><AppLocaleSwitcher />- <AppThemeSwitcherSelect class="justify-end" />+ <AppThemeSwitcher /></div><divdiff --git a/app/pages/settings.vue b/app/pages/settings.vueindex bceb9b51..d5cc945e 100644--- a/app/pages/settings.vue+++ b/app/pages/settings.vue@@ -40,44 +40,28 @@ function onGenerateDemoData() {</UiHeader><div class="pageWrapper rounded-xl bg-foreground-1 pt-4">- <div>- <!-- Locale -->- <div class="pb-12">- <div class="grid gap-3">- <UiTitle3 class="pb-2">- {{ t('settings.lang') }}- </UiTitle3>- <AppLocaleSwitcher />- </div>- </div>-- <!-- Theme -->- <div class="pb-12">- <UiTitle3 class="pb-2">- {{ t('theme.title') }}- </UiTitle3>- <AppThemeSwitcher- component="UiTabs2"- isShowPink- isShowSystem- />- </div>+ <div class="grid gap-8">+ <AppLocaleSwitcher isShowTitle />+ <AppThemeSwitcher+ isShowTitle+ /><!-- Currency -->- <div class="pb-12">- <UiButtonWithRight @click="isShowBaseCurrencyModal = true">- <template #label>- {{ t('currencies.base') }}- </template>-- <template #value>- {{ currenciesStore.base }}- </template>- </UiButtonWithRight>- </div>+ <UiButtonWithRight+ isShowTitle+ @click="isShowBaseCurrencyModal = true"+ >+ <template #label>+ {{ t('currencies.base') }}+ </template>++ <template #value>+ {{ currenciesStore.base }}+ </template>+ </UiButtonWithRight><!-- User -->- <div class="pb-12">+ <div class="pb-8"><UiTitle3 class="pb-2">{{ t('user') }}</UiTitle3>@@ -86,7 +70,7 @@ function onGenerateDemoData() {</div><!-- Delete -->- <div class="pb-12">+ <div class="pb-8"><UiTitle3 class="pb-2">{{ t('settings.caution') }}</UiTitle3>diff --git a/i18n/locales/en-US.js b/i18n/locales/en-US.jsindex 4a8e88bd..fec14ca8 100644--- a/i18n/locales/en-US.js+++ b/i18n/locales/en-US.js@@ -10,10 +10,6 @@ export default {app: {desc: 'Finapp helps you to control personal finances easily and efficiently.',- locale: {- en: 'English',- ru: 'Русский',- },},appName: 'Finapp',diff --git a/i18n/locales/ru-RU.js b/i18n/locales/ru-RU.jsindex 4110961b..570473db 100644--- a/i18n/locales/ru-RU.js+++ b/i18n/locales/ru-RU.js@@ -10,10 +10,6 @@ export default {app: {desc: 'Приложение для учета личных финансов',- locale: {- en: 'English',- ru: 'Русский',- },},appName: 'Финапка',diff --git a/tailwind.config.ts b/tailwind.config.tsindex 51ea3c5f..342796c2 100644--- a/tailwind.config.ts+++ b/tailwind.config.ts@@ -33,29 +33,26 @@ export default <Partial<Config>>{'5': 'rgb(var(--text-5))','accent': {1: 'rgb(var(--accent-1))',- 2: 'var(--accent-2)',},- 'alert-primary': 'var(--alert-primary)',+ 'alert': {+ 1: 'var(--alert-1)',+ },'expense': {1: 'var(--expense-1)',},'foreground': {1: 'rgb(var(--foreground-1))',- 2: 'rgb(var(--foreground-2))',},'icon-primary': 'var(--text-icon-primary)','income': {1: 'var(--income-1)',},'item': {- 1: 'var(--c-item-1)',2: 'var(--c-item-2)',3: 'var(--c-item-3)',4: 'var(--c-item-4)',6: 'rgba(var(--item-6))',- 8: 'rgba(var(--item-8))',9: 'rgba(var(--item-9))',- 10: 'rgba(var(--item-10))',11: 'var(--item-11)',hover: 'var(--item-hover)',},