TagSpaces is an offline, open source, document manager with tagging support
chore: optimizing tabs in the entry properties
Ilian Sapundshiev20970ea12654
diff --git a/src/renderer/components/EntryContainer.tsx b/src/renderer/components/EntryContainer.tsxindex 5011c71e1..d0c2d61a9 100644--- a/src/renderer/components/EntryContainer.tsx+++ b/src/renderer/components/EntryContainer.tsx@@ -601,12 +601,11 @@ function EntryContainer() {}const tabsComponent = useCallback(- (marginRight: string | undefined = undefined) => (+ () => (<EntryContainerTabsisPanelOpened={isPanelOpened}openPanel={openPanel}toggleProperties={toggleProperties}- marginRight={marginRight}/>),[isPanelOpened],@@ -624,7 +623,7 @@ function EntryContainer() {height: '100%',}}>- {tabsComponent('160px')}+ {tabsComponent()}<divstyle={{zIndex: 1,diff --git a/src/renderer/components/EntryContainerTabs.tsx b/src/renderer/components/EntryContainerTabs.tsxindex f6a13a79d..efcc95e64 100644--- a/src/renderer/components/EntryContainerTabs.tsx+++ b/src/renderer/components/EntryContainerTabs.tsx@@ -29,7 +29,7 @@ import {getMapTileServer,} from '-/reducers/settings';import { Box, Tab, Tabs, useMediaQuery } from '@mui/material';-import { styled, useTheme } from '@mui/material/styles';+import { useTheme } from '@mui/material/styles';import React, { useEffect, useReducer, useRef } from 'react';import { useTranslation } from 'react-i18next';import { useDispatch, useSelector } from 'react-redux';@@ -39,28 +39,6 @@ interface StyledTabsProps {value: number;onChange: (event: React.SyntheticEvent, newValue: number) => void;}--const StyledTabs = styled((props: StyledTabsProps) => (- <Tabs- {...props}- variant="scrollable"- // scrollButtons={}- // allowScrollButtonsMobile- TabIndicatorProps={{ children: <span className="MuiTabs-indicatorSpan" /> }}- />-))(({ theme }) => ({- '& .MuiTabs-indicator': {- display: 'flex',- justifyContent: 'center',- backgroundColor: 'transparent',- },- '& .MuiTabs-indicatorSpan': {- maxWidth: 40,- width: '100%',- backgroundColor: theme.palette.text.primary, //theme.palette.background.default //'#635ee7',- },-}));-interface StyledTabProps {title: string;tinyMode: any;@@ -96,11 +74,10 @@ interface EntryContainerTabsProps {openPanel: () => void;toggleProperties: () => void;isPanelOpened: boolean;- marginRight: string;}function EntryContainerTabs(props: EntryContainerTabsProps) {- const { openPanel, toggleProperties, marginRight, isPanelOpened } = props;+ const { openPanel, toggleProperties, isPanelOpened } = props;const { t } = useTranslation();const { initHistory, checkOllamaModels } = useChatContext();@@ -201,8 +178,14 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {: 'none',}}>- <Box sx={{ ...(marginRight && { marginRight }) }}>- <StyledTabs+ {/* <Box sx={{ ...(marginRight && { marginRight }) }}> */}+ <Box+ style={{+ marginRight: 160,+ // borderBottom: '1px solid ' + theme.palette.divider,+ }}+ >+ <Tabsvalue={selectedTabIndex}onChange={handleChange}aria-label="Switching among description, revisions entry properties"@@ -220,13 +203,13 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {textTransform: 'none',paddingTop: '0px',paddingBottom: '0px',- minHeight: '68px',+ minHeight: '60px', // 68px}}{...a11yProps(index)}onClick={() => handleTabClick(selectedTabIndex, index)}/>))}- </StyledTabs>+ </Tabs></Box>{tabsArray.current.map((tab, index) => (<TsTabPanel key={tab.name} value={selectedTabIndex} index={index}>