TagSpaces is an offline, open source, document manager with tagging support
chore: small ui improvements
Ilian Sapundshievae1e997f362f
diff --git a/app/components/SearchPopover.tsx b/app/components/SearchPopover.tsxindex 8ccda25dc..930cc9972 100644--- a/app/components/SearchPopover.tsx+++ b/app/components/SearchPopover.tsx@@ -609,7 +609,7 @@ function SearchPopover(props: Props) {<ButtonGroup fullWidth style={{ justifyContent: 'center' }}><Buttonvariant="outlined"- color="secondary"+ color="primary"size="small"style={{ flex: 1 }}onClick={() => saveSearch()}@@ -619,7 +619,7 @@ function SearchPopover(props: Props) {{props.searchQuery.uuid && (<Buttonvariant="outlined"- color="secondary"+ color="primary"size="small"style={{ flex: 1 }}onClick={() => saveSearch(false)}@@ -709,7 +709,7 @@ function SearchPopover(props: Props) {<Buttondisabled={indexing}id="searchButtonAdvTID"- // variant="outlined"+ variant="contained"color="primary"onClick={executeSearch}style={{ flex: 1 }}@@ -721,8 +721,8 @@ function SearchPopover(props: Props) {</Button><Tooltip title={i18n.t('clearSearch')}><Button- variant="outlined"- color="secondary"+ variant="contained"+ color="primary"size="small"onClick={clearSearch}id="resetSearchButton"diff --git a/app/perspectives/grid-perspective/components/CellContent.tsx b/app/perspectives/grid-perspective/components/CellContent.tsxindex 346827fc3..4eefe7bef 100644--- a/app/perspectives/grid-perspective/components/CellContent.tsx+++ b/app/perspectives/grid-perspective/components/CellContent.tsx@@ -260,8 +260,9 @@ function CellContent(props: Props) {}function renderRowCell(selected: boolean) {+ const isSmall = entrySize === 'small';let tmbSize = 85;- if (entrySize === 'small') {+ if (isSmall) {tmbSize = 30;} else if (entrySize === 'normal') {tmbSize = 70;@@ -292,8 +293,7 @@ function CellContent(props: Props) {itemstyle={{minHeight: entryHeight,- width: 50,- maxWidth: 50,+ width: isSmall ? 80 : 60,padding: 3,marginRight: 5,textAlign: 'left',@@ -303,7 +303,24 @@ function CellContent(props: Props) {<Tooltip title={fsEntry.path}><divdata-tid="rowCellTID"- className={classes.rowFileExtension}+ style={{+ display: 'flex',+ flexDirection: isSmall ? 'row' : 'column',+ flex: 1,+ padding: 4,+ borderWidth: 1,+ color: 'white',+ textTransform: 'uppercase',+ fontSize: 12,+ fontWeight: 'bold',+ borderRadius: 4,+ textAlign: 'center',+ overflow: 'hidden',+ textOverflow: 'ellipsis',+ backgroundColor: fsEntryColor,+ // alignSelf: isSmall ? 'center' : 'auto',+ alignItems: 'center'+ }}role="presentation"onClick={e => {e.stopPropagation();@@ -313,22 +330,19 @@ function CellContent(props: Props) {selectEntry(fsEntry);}}}- style={{- backgroundColor: fsEntryColor,- alignSelf: entrySize === 'small' ? 'center' : 'auto'- }}>- {fsEntry.isFile ? fsEntry.extension : <FolderIcon />}- {entrySize !== 'small' &&- (selected ? (- <SelectedIcon style={{ paddingTop: 5 }} />- ) : (- <UnSelectedIcon style={{ paddingTop: 5 }} />- ))}+ {selected ? <SelectedIcon /> : <UnSelectedIcon />}+ {fsEntry.isFile ? (+ <span style={{ marginTop: isSmall ? 0 : 10 }}>+ {fsEntry.extension}+ </span>+ ) : (+ <FolderIcon />+ )}</div></Tooltip></Grid>- {entrySize === 'small' ? (+ {isSmall ? (<Griditemxsdiff --git a/app/perspectives/grid-perspective/components/styles.css.tsx b/app/perspectives/grid-perspective/components/styles.css.tsxindex efa813108..f731bb144 100644--- a/app/perspectives/grid-perspective/components/styles.css.tsx+++ b/app/perspectives/grid-perspective/components/styles.css.tsx@@ -96,21 +96,6 @@ export default (theme: any): any => ({borderRadius: 3,textAlign: 'center'},- rowFileExtension: {- flex: 1,- padding: 4,- // width: 35,- maxWidth: 60,- borderWidth: 1,- color: 'white',- textTransform: 'uppercase',- fontSize: 12,- fontWeight: 'bold',- borderRadius: 4,- textAlign: 'center',- overflow: 'hidden',- textOverflow: 'ellipsis'- },gridSizeDate: {overflow: AppConfig.isFirefox ? 'auto' : 'overlay',whiteSpace: 'nowrap',diff --git a/app/perspectives/grid-perspective/index.tsx b/app/perspectives/grid-perspective/index.tsxindex 4c004a0d2..d95693e37 100644--- a/app/perspectives/grid-perspective/index.tsx+++ b/app/perspectives/grid-perspective/index.tsx@@ -24,7 +24,7 @@ export const defaultSettings = {entrySize: 'small', // small, normal, bigthumbnailMode: 'contain', // cover containshowDirectories: true,- showDetails: false,+ showDetails: true,showDescription: false,showTags: true,gridPageLimit: 100diff --git a/app/perspectives/list/components/MainContainer.tsx b/app/perspectives/list/components/MainContainer.tsxindex 79d014233..34739285a 100644--- a/app/perspectives/list/components/MainContainer.tsx+++ b/app/perspectives/list/components/MainContainer.tsx@@ -892,6 +892,7 @@ function GridPerspective(props: Props) {style={{marginTop: 5,paddingRight: 4,+ paddingLeft: 4,gridTemplateColumns: 'none'}}theme={theme}diff --git a/app/perspectives/list/index.tsx b/app/perspectives/list/index.tsxindex 390576a6d..c96767663 100644--- a/app/perspectives/list/index.tsx+++ b/app/perspectives/list/index.tsx@@ -24,7 +24,7 @@ export const defaultSettings = {entrySize: 'small', // small, normal, bigthumbnailMode: 'contain', // cover containshowDirectories: true,- showDetails: false,+ showDetails: true,showDescription: false,showTags: true,gridPageLimit: 100