M: Multiple minor UI fixes
This commit is contained in:
parent
c361047caf
commit
1260f159c9
|
@ -48,7 +48,7 @@ export function HelpLibrary() {
|
|||
<IconUserSearch size='1rem' className='inline-icon' /> фильтр по пользователю
|
||||
</li>
|
||||
<li>
|
||||
<IconSearch size='1rem' className='inline-icon' /> фильтр по названию и шифру
|
||||
<IconSearch size='1rem' className='inline-icon' /> фильтр по названию и сокращению
|
||||
</li>
|
||||
<li>
|
||||
<IconFilterReset size='1rem' className='inline-icon' /> сбросить фильтры
|
||||
|
|
|
@ -59,7 +59,7 @@ export function PickSchema({
|
|||
const columns = [
|
||||
columnHelper.accessor('alias', {
|
||||
id: 'alias',
|
||||
header: 'Шифр',
|
||||
header: 'Сокращение',
|
||||
size: 150,
|
||||
minSize: 80,
|
||||
maxSize: 150
|
||||
|
|
|
@ -88,7 +88,7 @@ export function ToolbarSearch({ className, total, filtered }: ToolbarSearchProps
|
|||
/>
|
||||
<SelectUser
|
||||
aria-label='Выбор пользователя для фильтра по владельцу'
|
||||
placeholder='Выберите владельца'
|
||||
placeholder='Выбрать владельца'
|
||||
noBorder
|
||||
className='min-w-60 mx-1 mb-1 cc-hover-bg select-none'
|
||||
filter={filterNonEmptyUsers}
|
||||
|
|
|
@ -36,7 +36,7 @@ export function useLibraryColumns() {
|
|||
]),
|
||||
columnHelper.accessor('alias', {
|
||||
id: 'alias',
|
||||
header: 'Шифр',
|
||||
header: 'Сокращение',
|
||||
size: 150,
|
||||
minSize: 80,
|
||||
maxSize: 150,
|
||||
|
|
|
@ -18,7 +18,7 @@ interface OssStatsProps {
|
|||
|
||||
export function OssStats({ className, stats }: OssStatsProps) {
|
||||
return (
|
||||
<aside className={cn('grid grid-cols-4 gap-1 justify-items-end h-min', className)}>
|
||||
<aside className={cn('grid grid-cols-4 gap-1 justify-items-end h-min select-none', className)}>
|
||||
<div id='count_operations' className='w-fit flex gap-3 hover:cursor-default '>
|
||||
<span>Всего</span>
|
||||
<span>{stats.count_all}</span>
|
||||
|
|
|
@ -62,7 +62,7 @@ export function PickMultiOperation({ rows, items, value, onChange, className, ..
|
|||
const columns = [
|
||||
columnHelper.accessor('alias', {
|
||||
id: 'alias',
|
||||
header: 'Шифр',
|
||||
header: 'Сокращение',
|
||||
size: 300,
|
||||
minSize: 150,
|
||||
maxSize: 300
|
||||
|
@ -79,7 +79,7 @@ export function PickMultiOperation({ rows, items, value, onChange, className, ..
|
|||
id: 'actions',
|
||||
size: 0,
|
||||
cell: props => (
|
||||
<div className='flex w-fit'>
|
||||
<div className='flex gap-1 w-fit'>
|
||||
<MiniButton
|
||||
title='Удалить'
|
||||
className='px-0'
|
||||
|
|
|
@ -14,7 +14,7 @@ interface SelectBlockProps extends Styling {
|
|||
popoverClassname?: string;
|
||||
}
|
||||
|
||||
export function SelectBlock({ items, placeholder = 'Выберите блок', ...restProps }: SelectBlockProps) {
|
||||
export function SelectBlock({ items, placeholder = 'Выбор блока', ...restProps }: SelectBlockProps) {
|
||||
return (
|
||||
<ComboBox
|
||||
items={items}
|
||||
|
|
|
@ -14,7 +14,7 @@ interface SelectOperationProps extends Styling {
|
|||
popoverClassname?: string;
|
||||
}
|
||||
|
||||
export function SelectOperation({ items, placeholder = 'Выберите операцию', ...restProps }: SelectOperationProps) {
|
||||
export function SelectOperation({ items, placeholder = 'Выбор операции', ...restProps }: SelectOperationProps) {
|
||||
return (
|
||||
<ComboBox
|
||||
items={items}
|
||||
|
|
|
@ -77,7 +77,7 @@ export function DlgCreateBlock() {
|
|||
|
||||
return (
|
||||
<ModalForm
|
||||
header='Создание операции'
|
||||
header='Создание блока'
|
||||
submitText='Создать'
|
||||
canSubmit={isValid}
|
||||
onSubmit={event => void methods.handleSubmit(onSubmit)(event)}
|
||||
|
|
|
@ -77,7 +77,7 @@ export function TabInputOperation() {
|
|||
<SelectParent
|
||||
items={manager.oss.blocks}
|
||||
value={field.value ? manager.oss.blockByID.get(field.value) ?? null : null}
|
||||
placeholder='Блок содержания'
|
||||
placeholder='Родительский блок'
|
||||
onChange={value => field.onChange(value ? value.id : null)}
|
||||
/>
|
||||
)}
|
||||
|
|
|
@ -42,7 +42,7 @@ export function TabSynthesisOperation() {
|
|||
<SelectParent
|
||||
items={manager.oss.blocks}
|
||||
value={field.value ? manager.oss.blockByID.get(field.value) ?? null : null}
|
||||
placeholder='Блок содержания'
|
||||
placeholder='Родительский блок'
|
||||
onChange={value => field.onChange(value ? value.id : null)}
|
||||
/>
|
||||
)}
|
||||
|
|
|
@ -39,7 +39,7 @@ export function TabOperation() {
|
|||
<SelectParent
|
||||
items={manager.oss.blocks}
|
||||
value={field.value ? manager.oss.blockByID.get(field.value) ?? null : null}
|
||||
placeholder='Блок содержания'
|
||||
placeholder='Родительский блок'
|
||||
onChange={value => field.onChange(value ? value.id : null)}
|
||||
/>
|
||||
)}
|
||||
|
|
|
@ -122,8 +122,8 @@ export function DlgRelocateConstituents() {
|
|||
<div className='flex gap-1 items-center bg-input border-b rounded-t-md'>
|
||||
<SelectLibraryItem
|
||||
noBorder
|
||||
className='w-1/2'
|
||||
placeholder='Выберите исходную схему'
|
||||
className='w-1/2 shrink-1'
|
||||
placeholder='Исходная схема'
|
||||
items={sourceSchemas}
|
||||
value={source}
|
||||
onChange={handleSelectSource}
|
||||
|
@ -135,8 +135,8 @@ export function DlgRelocateConstituents() {
|
|||
/>
|
||||
<SelectLibraryItem
|
||||
noBorder
|
||||
className='w-1/2'
|
||||
placeholder='Выберите целевую схему'
|
||||
className='w-1/2 shrink-1'
|
||||
placeholder='Целевая схема'
|
||||
items={destinationSchemas}
|
||||
value={destinationItem}
|
||||
onChange={handleSelectDestination}
|
||||
|
|
|
@ -30,7 +30,7 @@ export function SidePanel({ selectedItems, isMounted, className }: SidePanelProp
|
|||
const sidePanelHeight = useMainHeight();
|
||||
|
||||
return (
|
||||
<div
|
||||
<aside
|
||||
className={cn(
|
||||
'relative flex flex-col py-2 h-full overflow-hidden',
|
||||
'border-l rounded-none rounded-l-sm bg-background',
|
||||
|
@ -67,6 +67,6 @@ export function SidePanel({ selectedItems, isMounted, className }: SidePanelProp
|
|||
<ViewSchema schemaID={selectedSchema} />
|
||||
</Suspense>
|
||||
) : null}
|
||||
</div>
|
||||
</aside>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -231,7 +231,7 @@ export function PickSubstitutions({
|
|||
<SelectLibraryItem
|
||||
id='substitute-left-schema'
|
||||
noBorder
|
||||
placeholder='Выберите аргумент'
|
||||
placeholder='Аргумент'
|
||||
items={allowSelfSubstitution ? schemas : schemas.filter(item => item.id !== rightArgument?.id)}
|
||||
value={leftArgument}
|
||||
onChange={setLeftArgument}
|
||||
|
@ -263,7 +263,7 @@ export function PickSubstitutions({
|
|||
<SelectLibraryItem
|
||||
id='substitute-right-schema'
|
||||
noBorder
|
||||
placeholder='Выберите аргумент'
|
||||
placeholder='Аргумент'
|
||||
items={allowSelfSubstitution ? schemas : schemas.filter(item => item.id !== leftArgument?.id)}
|
||||
value={rightArgument}
|
||||
onChange={setRightArgument}
|
||||
|
|
|
@ -29,7 +29,7 @@ interface RSFormStatsProps {
|
|||
|
||||
export function RSFormStats({ className, stats }: RSFormStatsProps) {
|
||||
return (
|
||||
<aside className={cn('h-min', 'grid grid-cols-4 gap-1 justify-items-end ', className)}>
|
||||
<div className={cn('h-min', 'grid grid-cols-4 gap-1 justify-items-end select-none', className)}>
|
||||
<div id='count_all' className='col-span-2 w-fit flex gap-3 hover:cursor-default'>
|
||||
<span>Всего</span>
|
||||
<span>{stats.count_all}</span>
|
||||
|
@ -138,6 +138,6 @@ export function RSFormStats({ className, stats }: RSFormStatsProps) {
|
|||
}
|
||||
value={stats.count_convention}
|
||||
/>
|
||||
</aside>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ interface SelectConstituentaProps {
|
|||
|
||||
export function SelectConstituenta({
|
||||
items,
|
||||
placeholder = 'Выберите конституенту',
|
||||
placeholder = 'Выбор конституенты',
|
||||
...restProps
|
||||
}: SelectConstituentaProps) {
|
||||
return (
|
||||
|
|
|
@ -67,7 +67,7 @@ export function TabTemplate() {
|
|||
noBorder
|
||||
noSearch
|
||||
clearable
|
||||
placeholder='Выберите категорию'
|
||||
placeholder='Категория'
|
||||
className='grow'
|
||||
idFunc={cst => String(cst.id)}
|
||||
labelValueFunc={cst => cst.term_raw}
|
||||
|
|
|
@ -63,14 +63,15 @@ export function EditorRSFormCard() {
|
|||
<EditorLibraryItem schema={schema} isAttachedToOSS={isAttachedToOSS} />
|
||||
</div>
|
||||
|
||||
<RSFormStats
|
||||
<aside
|
||||
className={clsx(
|
||||
'w-80 md:w-56 mt-3 md:mt-8 mx-auto md:ml-5 md:mr-0',
|
||||
'cc-animate-sidebar',
|
||||
showRSFormStats ? 'max-w-full' : 'opacity-0 max-w-0'
|
||||
)}
|
||||
stats={schema.stats}
|
||||
/>
|
||||
>
|
||||
<RSFormStats stats={schema.stats} />
|
||||
</aside>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -31,12 +31,7 @@ function compareUsers(a: IUserInfo, b: IUserInfo) {
|
|||
return a.id - b.id;
|
||||
}
|
||||
|
||||
export function SelectUser({
|
||||
filter,
|
||||
noAnonymous,
|
||||
placeholder = 'Выберите пользователя',
|
||||
...restProps
|
||||
}: SelectUserProps) {
|
||||
export function SelectUser({ filter, noAnonymous, placeholder = 'Выбор пользователя', ...restProps }: SelectUserProps) {
|
||||
const { users } = useUsers();
|
||||
const getUserLabel = useLabelUser();
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
@utility cc-animate-panel {
|
||||
transition-property: translate, opacity;
|
||||
transition-timing-function: var(--ease-bezier);
|
||||
transition-duration: var(--duration-transform);
|
||||
transition-duration: var(--duration-move);
|
||||
}
|
||||
|
||||
@utility cc-animate-position {
|
||||
|
|
Loading…
Reference in New Issue
Block a user