u
This commit is contained in:
@@ -17,10 +17,21 @@ import { tileBaseSx } from 'dashgui/tiles';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Top row (1/3): sort handle | settings toggle | move handle.
|
* Top row (1/3): sort handle | settings toggle | move handle.
|
||||||
|
* Icons are pinned to exact thirds (left / center / right) so they stay
|
||||||
|
* evenly spread regardless of icon size or button padding.
|
||||||
*/
|
*/
|
||||||
function TopBand({ onSettingsClick, settingsTab, terminalCount }) {
|
function TopBand({ onSettingsClick, settingsTab, terminalCount }) {
|
||||||
const isTerminalMode = settingsTab >= 0 && settingsTab < terminalCount;
|
const isTerminalMode = settingsTab >= 0 && settingsTab < terminalCount;
|
||||||
const isPhotoMode = settingsTab === -2;
|
const isPhotoMode = settingsTab === -2;
|
||||||
|
|
||||||
|
const handleSx = {
|
||||||
|
position: 'absolute',
|
||||||
|
top: '50%',
|
||||||
|
transform: 'translateY(-50%)',
|
||||||
|
color: 'common.white',
|
||||||
|
'&:hover': { bgcolor: 'rgba(255, 255, 255, 0.15)' },
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
@@ -29,17 +40,19 @@ function TopBand({ onSettingsClick, settingsTab, terminalCount }) {
|
|||||||
left: 0,
|
left: 0,
|
||||||
right: 0,
|
right: 0,
|
||||||
height: '33.33%',
|
height: '33.33%',
|
||||||
display: 'flex',
|
bgcolor: 'rgba(0, 0, 0, 0.45)',
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'space-between',
|
|
||||||
px: 0.5,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconButton
|
<IconButton
|
||||||
className="sortable-handle"
|
className="sortable-handle"
|
||||||
aria-label="Verschieben"
|
aria-label="Verschieben"
|
||||||
disableRipple
|
disableRipple
|
||||||
sx={{ cursor: 'grab', '&:active': { cursor: 'grabbing' } }}
|
sx={{
|
||||||
|
...handleSx,
|
||||||
|
left: 0,
|
||||||
|
cursor: 'grab',
|
||||||
|
'&:active': { cursor: 'grabbing' },
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<DragHandleIcon sx={{ fontSize: 36 }} />
|
<DragHandleIcon sx={{ fontSize: 36 }} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
@@ -48,7 +61,10 @@ function TopBand({ onSettingsClick, settingsTab, terminalCount }) {
|
|||||||
disableRipple
|
disableRipple
|
||||||
onClick={onSettingsClick}
|
onClick={onSettingsClick}
|
||||||
sx={{
|
sx={{
|
||||||
color: isTerminalMode || isPhotoMode ? 'primary.main' : 'action.active',
|
...handleSx,
|
||||||
|
left: '50%',
|
||||||
|
transform: 'translate(-50%, -50%)',
|
||||||
|
color: isTerminalMode || isPhotoMode ? 'primary.main' : 'common.white',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isTerminalMode ? (
|
{isTerminalMode ? (
|
||||||
@@ -63,7 +79,12 @@ function TopBand({ onSettingsClick, settingsTab, terminalCount }) {
|
|||||||
className="droppable-handle"
|
className="droppable-handle"
|
||||||
aria-label="In Unterkategorie ablegen"
|
aria-label="In Unterkategorie ablegen"
|
||||||
disableRipple
|
disableRipple
|
||||||
sx={{ cursor: 'grab', '&:active': { cursor: 'grabbing' } }}
|
sx={{
|
||||||
|
...handleSx,
|
||||||
|
right: 0,
|
||||||
|
cursor: 'grab',
|
||||||
|
'&:active': { cursor: 'grabbing' },
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<AccountTreeIcon sx={{ fontSize: 36 }} />
|
<AccountTreeIcon sx={{ fontSize: 36 }} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|||||||
Reference in New Issue
Block a user