Skip to content

Commit 3444dcc

Browse files
committed
fix footer position
1 parent ffd05dd commit 3444dcc

File tree

5 files changed

+46
-10
lines changed

5 files changed

+46
-10
lines changed

src/app/views/sidebar/resource-explorer/collection/APICollection.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { useEffect, useState } from 'react';
1919
import { ResourcePath } from '../../../../../types/resources';
2020
import { setQueryResponseStatus } from '../../../../services/slices/query-status.slice';
2121
import { isGeneratedCollectionInCollection } from './upload-collection.util';
22+
import './api-collections.scss';
2223

2324
export interface APICollection {
2425
version: string;
@@ -190,6 +191,13 @@ const APICollection: React.FC<PopupsComponent<APICollection>> = (props) => {
190191
iconProps: { iconName: 'Upload' },
191192
onClick: () => document.getElementById('file-input')?.click()
192193
}
194+
// {
195+
// key: 'download-permissions',
196+
// text: translateMessage('Download postman collection'),
197+
// iconProps: { iconName: 'Download' },
198+
// disabled: items.length === 0,
199+
// onClick: generateCollection
200+
// }
193201
];
194202

195203
const farItems: ICommandBarItemProps[] = [
@@ -243,7 +251,7 @@ const APICollection: React.FC<PopupsComponent<APICollection>> = (props) => {
243251
)}
244252

245253
{items && items.length > 0 ?
246-
(<div style={{ height: '80vh' }}>
254+
(<div className='container'>
247255
<Paths
248256
resources={items}
249257
columns={columns}
@@ -252,16 +260,13 @@ const APICollection: React.FC<PopupsComponent<APICollection>> = (props) => {
252260
) :
253261
(
254262
<Label
255-
style={{ display: 'flex', width: '100%',
256-
height: '80vh',
257-
justifyContent: 'center',
258-
alignItems: 'center' }}>
263+
className='label'>
259264
{translateMessage('Add queries in the API Explorer and History tab')}
260265
</Label>
261266
)}
262267
<DialogFooter
263268
styles={{
264-
actionsRight: { bottom: 0, justifyContent: 'start' }
269+
actionsRight: { bottom: 0, justifyContent: 'start', position: 'fixed', width: '100%', zIndex: 1 }
265270
}}>
266271
<PrimaryButton onClick={generateCollection} disabled={items.length === 0}>
267272
{translateMessage('Download postman collection')}

src/app/views/sidebar/resource-explorer/collection/CollectionPermissions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ const CollectionPermissions: FC<PopupsComponent<null>> = (props) => {
112112
</div>
113113
{permissions &&
114114
<DialogFooter styles={{
115-
actionsRight: { bottom: 0, justifyContent: 'start' }
115+
actionsRight: { bottom: 0, justifyContent: 'start', position: 'fixed', width: '100%', zIndex: 1 }
116116
}}>
117117
<PrimaryButton onClick={downloadPermissions}>
118118
{translateMessage('Download permissions')}

src/app/views/sidebar/resource-explorer/collection/EditCollectionPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const EditCollectionPanel: React.FC<EditCollectionPanelProps> = ({closePopup}) =
6060
)}
6161
<DialogFooter
6262
styles={{
63-
actionsRight: { bottom: 0, justifyContent: 'start' }
63+
actionsRight: { bottom: 0, justifyContent: 'start', position: 'fixed', width: '100%', zIndex: 1 }
6464
}}>
6565
<PrimaryButton onClick={removeSelectedItems} disabled={selectedItems.length === 0}>
6666
{translateMessage('Delete all selected')}

src/app/views/sidebar/resource-explorer/collection/EditScopePanel.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ const EditScopePanel: React.FC<EditScopePanelProps> = ({ closePopup }) => {
105105
actionsRight: {
106106
display: 'flex',
107107
justifyContent: 'flex-start',
108-
padding: '5px'
109-
}
108+
padding: '5px',
109+
position: 'fixed',
110+
width: '100%',
111+
zIndex: 1 }
110112
}}>
111113
<PrimaryButton onClick={saveAllScopes} disabled={pendingChanges.length === 0}>
112114
{translateMessage('Save all')}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.container {
2+
height: 80vh;
3+
}
4+
5+
.label {
6+
display: flex;
7+
width: 100%;
8+
height: 80vh;
9+
justify-content: center;
10+
align-items: center;
11+
}
12+
13+
@media (max-width: 1200px) {
14+
.container, .label {
15+
height: 70vh; /* Adjust height for medium screens */
16+
}
17+
}
18+
19+
@media (max-width: 900px) {
20+
.container, .label {
21+
height: 60vh; /* Adjust height for smaller screens */
22+
}
23+
}
24+
25+
@media (max-width: 700px) {
26+
.container, .label {
27+
height: 50vh; /* Adjust height for very small screens */
28+
}
29+
}

0 commit comments

Comments
 (0)