Grid buttons responsive
This commit is contained in:
parent
57dc9811a7
commit
b009b520e1
6 changed files with 100 additions and 108 deletions
|
|
@ -20,7 +20,7 @@ const AiAssistant = () => {
|
||||||
<Tooltip title={translate('::Abp.Identity.Ai')}>
|
<Tooltip title={translate('::Abp.Identity.Ai')}>
|
||||||
<div
|
<div
|
||||||
onClick={() => navigate(ROUTES_ENUM.protected.admin.ai)}
|
onClick={() => navigate(ROUTES_ENUM.protected.admin.ai)}
|
||||||
className="flex items-center justify-center w-9 h-9 m-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer transition-colors duration-200"
|
className="flex items-center justify-center text-2xl m-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 cursor-pointer transition-colors duration-200"
|
||||||
>
|
>
|
||||||
<FcHeadset size={24} />
|
<FcHeadset size={24} />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -15,14 +15,8 @@ const Header = (props: HeaderProps) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className={classNames('header', className)}>
|
<header className={classNames('header', className)}>
|
||||||
<div
|
<div className={classNames('header-wrapper', container && 'container mx-auto')}>
|
||||||
className={classNames(
|
<div className="flex">{headerStart}</div>
|
||||||
'header-wrapper',
|
|
||||||
HEADER_HEIGHT_CLASS,
|
|
||||||
container && 'container mx-auto',
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<div className='flex'>{headerStart}</div>
|
|
||||||
{headerMiddle && <div className="header-action header-action-middle">{headerMiddle}</div>}
|
{headerMiddle && <div className="header-action header-action-middle">{headerMiddle}</div>}
|
||||||
<div className="header-action header-action-end">{headerEnd}</div>
|
<div className="header-action header-action-end">{headerEnd}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,7 @@ const SecondaryHeader = (props: SecondaryHeaderProps) => {
|
||||||
|
|
||||||
const navMode = useStoreState((state) => state.theme.navMode)
|
const navMode = useStoreState((state) => state.theme.navMode)
|
||||||
const themeColor = useStoreState((state) => state.theme.themeColor)
|
const themeColor = useStoreState((state) => state.theme.themeColor)
|
||||||
const primaryColorLevel = useStoreState(
|
const primaryColorLevel = useStoreState((state) => state.theme.primaryColorLevel)
|
||||||
(state) => state.theme.primaryColorLevel
|
|
||||||
)
|
|
||||||
const userAuthority = useStoreState((state) => state.auth.user.authority)
|
const userAuthority = useStoreState((state) => state.auth.user.authority)
|
||||||
|
|
||||||
const { larger } = useResponsive()
|
const { larger } = useResponsive()
|
||||||
|
|
@ -31,23 +29,9 @@ const SecondaryHeader = (props: SecondaryHeaderProps) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{larger.md && (
|
{larger.md && (
|
||||||
<div
|
<div className={classNames('flex items-center py-1', headerColor(), className)}>
|
||||||
className={classNames(
|
<div className={classNames('flex items-center px-2', contained && 'container mx-auto')}>
|
||||||
'h-12 flex items-center',
|
<HorizontalMenuContent manuVariant={navMode} userAuthority={userAuthority} />
|
||||||
headerColor(),
|
|
||||||
className
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
className={classNames(
|
|
||||||
'flex items-center px-2',
|
|
||||||
contained && 'container mx-auto'
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<HorizontalMenuContent
|
|
||||||
manuVariant={navMode}
|
|
||||||
userAuthority={userAuthority}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
import Button from '@/components/ui/Button'
|
import Button from '@/components/ui/Button'
|
||||||
import ScrollBar from '@/components/ui/ScrollBar'
|
import ScrollBar from '@/components/ui/ScrollBar'
|
||||||
import classNames from 'classnames'
|
import classNames from 'classnames'
|
||||||
import {
|
import { HEADER_HEIGHT_CLASS, DIR_LTR, DIR_RTL } from '@/constants/theme.constant'
|
||||||
HEADER_HEIGHT_CLASS,
|
|
||||||
DIR_LTR,
|
|
||||||
DIR_RTL,
|
|
||||||
} from '@/constants/theme.constant'
|
|
||||||
import VerticalMenuContent from '@/components/template/VerticalMenuContent'
|
import VerticalMenuContent from '@/components/template/VerticalMenuContent'
|
||||||
import { FaArrowLeft, FaArrowRight } from 'react-icons/fa';
|
import { FaArrowLeft, FaArrowRight } from 'react-icons/fa'
|
||||||
import type { NavigationTree } from '@/@types/navigation'
|
import type { NavigationTree } from '@/@types/navigation'
|
||||||
import type { Direction, NavMode } from '@/@types/theme'
|
import type { Direction, NavMode } from '@/@types/theme'
|
||||||
|
|
||||||
|
|
@ -42,7 +38,8 @@ const StackedSideNavSecondary = (props: StackedSideNavSecondaryProps) => {
|
||||||
return (
|
return (
|
||||||
<div className={classNames('h-full', className)} {...rest}>
|
<div className={classNames('h-full', className)} {...rest}>
|
||||||
<div
|
<div
|
||||||
className={`${HEADER_HEIGHT_CLASS} flex items-center justify-between gap-4 pl-6 pr-4`}
|
// className={`${HEADER_HEIGHT_CLASS} flex items-center justify-between gap-4 pl-6 pr-4`}
|
||||||
|
className={'flex items-center justify-between gap-4 pl-6 pr-4'}
|
||||||
>
|
>
|
||||||
<h5 className="font-bold">{title}</h5>
|
<h5 className="font-bold">{title}</h5>
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -95,6 +95,8 @@ const useFilters = ({
|
||||||
// Add ApplyFilterButton button filterRow.visible is true and filterRow.applyFilter is set to "onClick" ise calisir
|
// Add ApplyFilterButton button filterRow.visible is true and filterRow.applyFilter is set to "onClick" ise calisir
|
||||||
if (grdOpt.filterRowDto?.visible && grdOpt.filterRowDto?.applyFilter == 'onClick') {
|
if (grdOpt.filterRowDto?.visible && grdOpt.filterRowDto?.applyFilter == 'onClick') {
|
||||||
items.push({
|
items.push({
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
name: 'applyFilterButton',
|
name: 'applyFilterButton',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -155,6 +157,8 @@ const useFilters = ({
|
||||||
|
|
||||||
if (checkPermission(gridDto?.gridOptions.permissionDto.e)) {
|
if (checkPermission(gridDto?.gridOptions.permissionDto.e)) {
|
||||||
items.push({
|
items.push({
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
name: 'exportButton',
|
name: 'exportButton',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -164,6 +168,8 @@ const useFilters = ({
|
||||||
location: 'after',
|
location: 'after',
|
||||||
widget: 'dxMenu',
|
widget: 'dxMenu',
|
||||||
name: 'filterMenuButtons',
|
name: 'filterMenuButtons',
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
options: {
|
options: {
|
||||||
// filtre menüsündeki elemanlarin tıklama islemleri burada yönetiliyor.
|
// filtre menüsündeki elemanlarin tıklama islemleri burada yönetiliyor.
|
||||||
onItemClick: function (e: any) {
|
onItemClick: function (e: any) {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,8 @@ const useToolbar = ({
|
||||||
// field chooser panel
|
// field chooser panel
|
||||||
if (grdOpt.columnOptionDto?.columnChooserEnabled) {
|
if (grdOpt.columnOptionDto?.columnChooserEnabled) {
|
||||||
items.push({
|
items.push({
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
name: 'columnChooserButton',
|
name: 'columnChooserButton',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -63,8 +65,9 @@ const useToolbar = ({
|
||||||
// Add group panel
|
// Add group panel
|
||||||
if (grdOpt.groupPanelDto?.visible) {
|
if (grdOpt.groupPanelDto?.visible) {
|
||||||
items.push({
|
items.push({
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
name: 'groupPanel',
|
name: 'groupPanel',
|
||||||
showText: 'always',
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,6 +77,8 @@ const useToolbar = ({
|
||||||
items.push({
|
items.push({
|
||||||
location: 'after',
|
location: 'after',
|
||||||
widget: 'dxButton',
|
widget: 'dxButton',
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
name: 'deleteSelectedRecords',
|
name: 'deleteSelectedRecords',
|
||||||
options: {
|
options: {
|
||||||
text: translate('::ListForms.ListForm.DeleteSelectedRecords'),
|
text: translate('::ListForms.ListForm.DeleteSelectedRecords'),
|
||||||
|
|
@ -169,8 +174,9 @@ const useToolbar = ({
|
||||||
// Add InsertNewRecord button
|
// Add InsertNewRecord button
|
||||||
if (grdOpt.editingOptionDto?.allowAdding && checkPermission(grdOpt.permissionDto?.c)) {
|
if (grdOpt.editingOptionDto?.allowAdding && checkPermission(grdOpt.permissionDto?.c)) {
|
||||||
items.push({
|
items.push({
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
name: 'addRowButton',
|
name: 'addRowButton',
|
||||||
showText: 'always',
|
|
||||||
location: 'after',
|
location: 'after',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -245,8 +251,9 @@ const useToolbar = ({
|
||||||
// Add searchPanel
|
// Add searchPanel
|
||||||
if (grdOpt.searchPanelDto?.visible) {
|
if (grdOpt.searchPanelDto?.visible) {
|
||||||
items.push({
|
items.push({
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
name: 'searchPanel',
|
name: 'searchPanel',
|
||||||
showText: 'always',
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -257,10 +264,14 @@ const useToolbar = ({
|
||||||
checkPermission(grdOpt.permissionDto?.u)
|
checkPermission(grdOpt.permissionDto?.u)
|
||||||
) {
|
) {
|
||||||
items.push({
|
items.push({
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
name: 'saveButton',
|
name: 'saveButton',
|
||||||
})
|
})
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'inMenu',
|
||||||
name: 'revertButton',
|
name: 'revertButton',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue