M: Minor UI improvements

This commit is contained in:
Ivan 2025-03-14 21:06:31 +03:00
parent eb48014e2f
commit c341360e90
5 changed files with 23 additions and 6 deletions

View File

@ -31,7 +31,7 @@ export function Navigation() {
<ToggleNavigation />
<div
className={clsx(
'pl-2 pr-6 sm:pr-4 h-12 flex cc-shadow-border',
'pl-2 sm:pr-4 h-12 flex cc-shadow-border',
'transition-[max-height,translate] ease-bezier duration-(--duration-move)',
noNavigationAnimation ? '-translate-y-6 max-h-0' : 'max-h-12'
)}

View File

@ -1,5 +1,7 @@
'use client';
import clsx from 'clsx';
import { IconDarkTheme, IconLightTheme, IconPin, IconUnpin } from '@/components/icons';
import { useAppLayoutStore } from '@/stores/app-layout';
import { usePreferencesStore } from '@/stores/preferences';
@ -11,7 +13,9 @@ export function ToggleNavigation() {
const noNavigationAnimation = useAppLayoutStore(state => state.noNavigationAnimation);
const toggleNoNavigation = useAppLayoutStore(state => state.toggleNoNavigation);
return (
<div className='absolute top-0 right-0 z-navigation h-12 grid'>
<div
className={clsx('absolute top-0 right-0 z-navigation h-12', noNavigationAnimation ? 'grid' : 'hidden sm:grid')}
>
<button
tabIndex={-1}
type='button'

View File

@ -108,7 +108,13 @@ export function DlgCloneLibraryItem() {
control={control}
name='location'
render={({ field }) => (
<PickLocation value={field.value} rows={2} onChange={field.onChange} error={errors.location} />
<PickLocation
value={field.value} //
rows={2}
onChange={field.onChange}
className={!!errors.location ? '-mb-6' : undefined}
error={errors.location}
/>
)}
/>

View File

@ -48,7 +48,8 @@ export function FormCreateItem() {
visible: true,
read_only: false,
location: !!searchLocation ? searchLocation : LocationHead.USER
}
},
mode: 'onChange'
});
const itemType = useWatch({ control, name: 'item_type' });
const file = useWatch({ control, name: 'file' });
@ -197,7 +198,13 @@ export function FormCreateItem() {
control={control}
name='location'
render={({ field }) => (
<PickLocation value={field.value} rows={2} onChange={field.onChange} error={errors.location} />
<PickLocation
value={field.value} //
rows={2}
onChange={field.onChange}
className={!!errors.location ? '-mb-6' : undefined}
error={errors.location}
/>
)}
/>

View File

@ -76,7 +76,7 @@ export function EditorConstituenta() {
className={clsx(
'relative ',
'cc-fade-in',
'min-h-80 max-w-[calc(min(100vw,95rem))] mx-auto',
'min-h-80 max-w-[calc(min(100vw,80rem))] mx-auto',
'flex pt-8',
'overflow-y-auto overflow-x-clip',
isNarrow && 'flex-col md:items-center'