Removed permanent scrollbar in embedded object browser (#2237)

Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
Alex
2022-08-09 12:02:09 -05:00
committed by GitHub
parent 3f41a82fd3
commit 4aa3f40792
4 changed files with 29 additions and 6 deletions

View File

@@ -29,7 +29,6 @@ const LoginMinIOLogo = (props: SVGProps<SVGSVGElement>) => (
<path
d="M10822.423,3589.089c0-14.873,14.033-24.285,33.612-24.285s33.7,9.328,33.7,24.285-13.782,24.282-33.7,24.282C10836.374,3613.371,10822.423,3604.046,10822.423,3589.089Zm7.731,0c0,11.763,11.263,18.065,25.881,18.065s25.966-6.3,25.966-18.065c0-11.681-11.345-18.068-25.966-18.068S10830.154,3577.408,10830.154,3589.089Zm-43.43,23.094-41.918-22.23a1.586,1.586,0,0,0-2.329,1.4v21.011H10726.5v-42.123a4.421,4.421,0,0,1,4.42-4.422h.029a4.4,4.4,0,0,1,2.077.519l41.752,22.233a1.587,1.587,0,0,0,2.334-1.4v-21.35h16.11v42.454a4.42,4.42,0,0,1-6.493,3.905Zm-88.75.186v-46.534h15.884v46.534Zm-28.218,0v-20.147a1.588,1.588,0,0,0-2.392-1.367l-19.068,11.186a5.668,5.668,0,0,1-5.818-.055l-18.07-11.057a1.589,1.589,0,0,0-2.416,1.355v20.084h-15.876v-42.323a4.423,4.423,0,0,1,4.423-4.422h.038a4.453,4.453,0,0,1,2.3.648l32.246,19.694a1.429,1.429,0,0,0,1.5,0l32.243-19.694a4.453,4.453,0,0,1,2.3-.648h.041a4.421,4.421,0,0,1,4.42,4.422v42.323Zm136.353-.011v-46.534h7.39v46.534Z"
transform="translate(-10606.116 -3564.803)"
stroke="rgba(0,0,0,0)"
strokeWidth="1"
/>
</g>

View File

@@ -151,7 +151,12 @@ const BrowserHandler = () => {
>
<Grid>
<LoginMinIOLogo
style={{ width: 105, marginRight: 30, marginTop: 10 }}
style={{
width: 105,
marginRight: 30,
marginTop: 10,
fill: "#081C42",
}}
/>
</Grid>
<Grid item xs>

View File

@@ -75,6 +75,9 @@ const styles = (theme: Theme) =>
bucketList: {
marginTop: 25,
height: "calc(100vh - 210px)",
"&.isEmbedded": {
height: "calc(100vh - 128px)",
},
},
searchField: {
...searchField.searchField,
@@ -221,7 +224,12 @@ const ListBuckets = ({ classes }: IListBucketsProps) => {
{obOnly && (
<Grid item xs>
<LoginMinIOLogo
style={{ width: 105, marginRight: 15, marginTop: 10 }}
style={{
width: 105,
marginRight: 15,
marginTop: 10,
fill: "#081C42",
}}
/>
</Grid>
)}
@@ -325,7 +333,11 @@ const ListBuckets = ({ classes }: IListBucketsProps) => {
{loading && <LinearProgress />}
{!loading && (
<Grid item xs={12} className={classes.bucketList}>
<Grid
item
xs={12}
className={`${classes.bucketList} ${obOnly ? "isEmbedded" : ""}`}
>
{filteredRecords.length !== 0 && (
<VirtualizedList
rowRenderFunction={renderItemLine}

View File

@@ -127,6 +127,7 @@ import {
setBucketInfo,
} from "../../../BucketDetails/bucketDetailsSlice";
import RenameLongFileName from "../../../../ObjectBrowser/RenameLongFilename";
import { selFeatures } from "../../../../consoleSlice";
const HistoryIcon = React.lazy(
() => import("../../../../../../icons/HistoryIcon")
@@ -155,6 +156,9 @@ const useStyles = makeStyles((theme: Theme) =>
browsePaper: {
border: 0,
height: "calc(100vh - 210px)",
"&.isEmbedded": {
height: "calc(100vh - 315px)",
},
"&.actionsPanelOpen": {
minHeight: "100%",
},
@@ -315,6 +319,9 @@ const ListObjects = () => {
(state: AppState) => state.console.session.allowResources
);
const features = useSelector(selFeatures);
const obOnly = !!features?.includes("object-browser-only");
const [records, setRecords] = useState<BucketObjectItem[]>([]);
const [deleteMultipleOpen, setDeleteMultipleOpen] = useState<boolean>(false);
const [loadingStartTime, setLoadingStartTime] = useState<number>(0);
@@ -1539,8 +1546,8 @@ const ListObjects = () => {
idField="name"
records={payload}
customPaperHeight={`${classes.browsePaper} ${
detailsOpen ? "actionsPanelOpen" : ""
}`}
obOnly ? "isEmbedded" : ""
} ${detailsOpen ? "actionsPanelOpen" : ""}`}
selectedItems={selectedObjects}
onSelect={selectListObjects}
customEmptyMessage={`This location is empty${