TagSpaces is an offline, open source, document manager with tagging support
fix: various ui issues
Ilian Sapundshievec9129418ecf
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsxindex d056ed513..0a252ba33 100644--- a/app/components/EntryContainer.tsx+++ b/app/components/EntryContainer.tsx@@ -43,7 +43,8 @@ import {getMetaFileLocationForDir,getMetaFileLocationForFile,extractContainingDirectoryPath,- getBackupFileLocation+ getBackupFileLocation,+ extractFileExtension} from '@tagspaces/tagspaces-common/paths';import ConfirmDialog from '-/components/dialogs/ConfirmDialog';import PlatformIO from '-/services/platform-facade';@@ -96,6 +97,7 @@ const Root = styled(Box)(({ theme }) => ({flex: '1 1 100%',display: 'flex',backgroundColor: theme.palette.background.default,+ borderBottom: '5px solid ' + theme.palette.background.default,overflow: 'hidden',// height: '100%', // filePropsHeight ||[`& .${classes.toolbar2}`]: {@@ -770,9 +772,12 @@ function EntryContainer(props: Props) {props.openPrevFile(openedFile.path);};- const isEditable = AppConfig.editableFiles.some(ext =>- openedFile.path.endsWith(ext)+ const fileExtension = extractFileExtension(+ openedFile.path,+ PlatformIO.getDirSeparator());+ const isEditable =+ openedFile.isFile && AppConfig.editableFiles.includes(fileExtension);const toggleAutoSave = (event: React.ChangeEvent<HTMLInputElement>) => {const autoSave = event.target.checked;@@ -928,6 +933,7 @@ function EntryContainer(props: Props) {}const tabsComponent = (marginRight = undefined) => (<EntryContainerTabs+ isEditable={isEditable}openedFile={openedFile}openPanel={openPanel}toggleProperties={toggleProperties}diff --git a/app/components/EntryContainerTabs.tsx b/app/components/EntryContainerTabs.tsxindex 2b396334f..511be4f06 100644--- a/app/components/EntryContainerTabs.tsx+++ b/app/components/EntryContainerTabs.tsx@@ -103,11 +103,12 @@ function a11yProps(index: number) {};}-interface Props {+interface EntryContainerTabsProps {openedFile: OpenedEntry;openPanel: () => void;toggleProperties: () => void;isDesktopMode: boolean;+ isEditable: boolean;marginRight: string;}@@ -117,11 +118,17 @@ interface TabPanelProps {value: number;}-function EntryContainerTabs(props: Props) {+function EntryContainerTabs(props: EntryContainerTabsProps) {const { t } = useTranslation();const tabIndex = useSelector(getEntryContainerTab);// const [value, setValue] = React.useState(0);- const { openedFile, openPanel, toggleProperties, marginRight } = props;+ const {+ openedFile,+ openPanel,+ toggleProperties,+ marginRight,+ isEditable+ } = props;const editDescription = useRef<string>(undefined);//const theme = useTheme();const readOnlyMode = useSelector(isReadOnlyMode);@@ -143,6 +150,7 @@ function EntryContainerTabs(props: Props) {style={{height: '100%',overflowY: 'auto',+ overflowX: 'hidden',padding: 10// ...(openedFile.isFile && { maxHeight: 400 })}}@@ -258,7 +266,7 @@ function EntryContainerTabs(props: Props) {{...a11yProps(1)}onClick={handleTabClick}/>- {openedFile.isFile && (+ {isEditable && (<StyledTabdata-tid="revisionsTabTID"icon={<RevisionIcon />}@@ -290,7 +298,7 @@ function EntryContainerTabs(props: Props) {currentFolder={directoryPath}/></TsTabPanel>- {openedFile.isFile && (+ {isEditable && (<TsTabPanel value={tabIndex} index={2}><Revisions /></TsTabPanel>diff --git a/app/components/FileView.tsx b/app/components/FileView.tsxindex 783458f21..27df93bed 100644--- a/app/components/FileView.tsx+++ b/app/components/FileView.tsx@@ -140,8 +140,7 @@ function FileView(props: Props) {height: height || '100%',display: 'flex',flex: '1 1 100%',- backgroundColor: theme.palette.background.default,- borderTop: 'outset'+ backgroundColor: theme.palette.background.default}}>{isFullscreen && (diff --git a/app/components/WelcomePanel.tsx b/app/components/WelcomePanel.tsxindex 928054f6e..bf6d32d47 100644--- a/app/components/WelcomePanel.tsx+++ b/app/components/WelcomePanel.tsx@@ -218,6 +218,7 @@ function WelcomePanel() {marginBottom: 15,// @ts-ignoreoverflowY: 'overlay',+ overflowX: 'hidden',backgroundColor: theme.palette.background.default}}>