Open source personal finance application
refactor: simplify CommandPalette layout, fix CSS class order in Header
Ilya Komichevd0afd8134502
diff --git a/app/components/categories/CommandPalette.vue b/app/components/categories/CommandPalette.vueindex 9f3d3542..4f51d8a9 100644--- a/app/components/categories/CommandPalette.vue+++ b/app/components/categories/CommandPalette.vue@@ -75,26 +75,19 @@ function onSelect(item: CategoryCommandPaletteItem) {@update:modelValue="onSelect"><template #category="{ item: rawItem }">- <UiElement- :isActive="(rawItem as CategoryCommandPaletteItem).id === props.activeItemId"- :lineWidth="1"- class="w-full grow"- insideClasses="min-h-[46px]"+ <div+ class="flex w-full items-center gap-3"+ :class="{ 'text-primary': (rawItem as CategoryCommandPaletteItem).id === props.activeItemId }">- <template #leftIcon>- <UiIconBase- :color="(rawItem as CategoryCommandPaletteItem).color"- :name="(rawItem as CategoryCommandPaletteItem).icon"- invert- />- </template>-- <div class="grid grow">- <CategoriesName- :category="(rawItem as CategoryCommandPaletteItem)"- />- </div>- </UiElement>+ <UiIconBase+ :color="(rawItem as CategoryCommandPaletteItem).color"+ :name="(rawItem as CategoryCommandPaletteItem).icon"+ invert+ />+ <CategoriesName+ :category="(rawItem as CategoryCommandPaletteItem)"+ />+ </div></template></UCommandPalette></template>diff --git a/app/components/categories/Header.vue b/app/components/categories/Header.vueindex d6379980..e8a2fdac 100644--- a/app/components/categories/Header.vue+++ b/app/components/categories/Header.vue@@ -34,7 +34,7 @@ const props = defineProps<{<NuxtLink:to="`/categories/${props.category.parentId}`"- class="flex items-center gap-2 rounded-lg px-3 py-1 no-underline text-inherit hover:bg-(--item-5)"+ class="flex items-center gap-2 rounded-lg px-3 py-1 text-inherit no-underline hover:bg-(--item-5)">{{ props.parentCategory.name }}</NuxtLink>