Skip to content

Commit 1efb2f2

Browse files
committed
UI redesign changes.
1 parent 23554a3 commit 1efb2f2

File tree

18 files changed

+1091
-1170
lines changed

18 files changed

+1091
-1170
lines changed

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/actions/explorerActions.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import axiosInstance from "../utils/API/API";
22
import {
3-
ADD_LAYOUT_CONTAINER,
4-
CHANGE_ACTIVE_REMOTE_CONTAINER,
5-
CHANGE_DISTRACTION_FREE_MODE,
6-
CHANGE_LAYOUT_COLS,
7-
GET_CONFIG_FOR_REMOTE,
8-
GET_FILES_LIST,
9-
GET_REMOTE_LIST,
10-
REMOVE_LAYOUT_CONTAINER,
11-
REQUEST_ERROR,
12-
REQUEST_SUCCESS
3+
ADD_LAYOUT_CONTAINER,
4+
CHANGE_ACTIVE_REMOTE_CONTAINER,
5+
CHANGE_DISTRACTION_FREE_MODE,
6+
CHANGE_LAYOUT_COLS,
7+
GET_CONFIG_FOR_REMOTE,
8+
GET_FILES_LIST,
9+
GET_REMOTE_LIST,
10+
REMOVE_LAYOUT_CONTAINER,
11+
REQUEST_ERROR,
12+
REQUEST_SUCCESS
1313
} from "./types";
1414
import {addColonAtLast, isLocalRemoteName, makeUniqueID} from "../utils/Tools";
15-
import {createPath} from "./explorerStateActions";
15+
import {createPath, removePath} from "./explorerStateActions";
1616
import urls from "../utils/API/endpoint";
1717

1818
/**
@@ -159,7 +159,7 @@ export const addRemoteContainer = (paneID) => (dispatch) => {
159159
* @returns {Function}
160160
*/
161161
export const removeRemoteContainer = (containerID, paneID) => (dispatch) => {
162-
// dispatch(removePath(containerID));
162+
dispatch(removePath(containerID));
163163
// console.log("Removing : " + containerID);
164164
dispatch({
165165
type: REMOVE_LAYOUT_CONTAINER,

src/containers/DefaultLayout/__snapshots__/DefaultLayout.test.js.snap

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ exports[`Remote Explorer renders should match snapshot 1`] = `
123123
"_result": null,
124124
"_status": -1,
125125
},
126-
"name": "New Drive",
126+
"name": "Edit Remote",
127127
"path": "/newdrive/edit/:drivePrefix",
128128
},
129129
Object {
@@ -134,7 +134,7 @@ exports[`Remote Explorer renders should match snapshot 1`] = `
134134
"_status": -1,
135135
},
136136
"exact": true,
137-
"name": "New Drive",
137+
"name": "New Remote",
138138
"path": "/newdrive",
139139
},
140140
Object {
@@ -145,7 +145,7 @@ exports[`Remote Explorer renders should match snapshot 1`] = `
145145
"_status": -1,
146146
},
147147
"exact": true,
148-
"name": "New Drive",
148+
"name": "Login Page",
149149
"path": "/login",
150150
},
151151
Object {
@@ -220,21 +220,21 @@ exports[`Remote Explorer renders should match snapshot 1`] = `
220220
<Switch>
221221
<Route
222222
key="1"
223-
name="New Drive"
223+
name="Edit Remote"
224224
path="/newdrive/edit/:drivePrefix"
225225
render={[Function]}
226226
/>
227227
<Route
228228
exact={true}
229229
key="2"
230-
name="New Drive"
230+
name="New Remote"
231231
path="/newdrive"
232232
render={[Function]}
233233
/>
234234
<Route
235235
exact={true}
236236
key="3"
237-
name="New Drive"
237+
name="Login Page"
238238
path="/login"
239239
render={[Function]}
240240
/>
@@ -277,25 +277,6 @@ exports[`Remote Explorer renders should match snapshot 1`] = `
277277
</Suspense>
278278
</Container>
279279
</main>
280-
<AppAside
281-
display=""
282-
fixed={true}
283-
isOpen={false}
284-
offCanvas={true}
285-
tag="aside"
286-
>
287-
<Suspense
288-
fallback={
289-
<div
290-
className="animated fadeIn pt-1 text-center"
291-
>
292-
Loading...
293-
</div>
294-
}
295-
>
296-
<lazy />
297-
</Suspense>
298-
</AppAside>
299280
</div>
300281
<AppFooter
301282
fixed={false}

src/reducers/explorerReducer.test.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ describe('Explorer Reducer', function () {
55
it('should return default state', function () {
66
const newState = explorerReducer(undefined, {});
77
expect(newState).toEqual({
8-
configs: {},
9-
remotes: [],
10-
files: {},
11-
hasError: false,
12-
numCols: 0,
13-
distractionFreeMode: false,
14-
});
8+
configs: {},
9+
remotes: [],
10+
files: {},
11+
hasError: false,
12+
numContainers: 0,
13+
containers: [],
14+
activeRemoteContainerID: {},
15+
distractionFreeMode: false,
16+
numCols: 1
17+
});
1518
});
1619

1720
it('should change state for GET_CONFIG_FOR_REMOTE SUCCESS', function () {
@@ -86,4 +89,4 @@ describe('Explorer Reducer', function () {
8689
expect(newState.hasError).toBe(true);
8790
expect(newState.error).toEqual(error);
8891
});
89-
});
92+
});

src/reducers/explorerStateReducer.js

Lines changed: 49 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import {
2-
CHANGE_GRID_MODE,
3-
CHANGE_LOAD_IMAGES,
4-
CHANGE_PATH,
5-
CHANGE_REMOTE_NAME,
6-
CHANGE_REMOTE_PATH,
7-
CHANGE_SEARCH_QUERY,
8-
CHANGE_SORT_FILTER,
9-
CHANGE_VISIBILITY_FILTER,
10-
CREATE_PATH,
11-
NAVIGATE_BACK,
12-
NAVIGATE_FWD,
13-
NAVIGATE_UP,
14-
REMOVE_PATH
2+
CHANGE_GRID_MODE,
3+
CHANGE_LOAD_IMAGES,
4+
CHANGE_PATH,
5+
CHANGE_REMOTE_NAME,
6+
CHANGE_REMOTE_PATH,
7+
CHANGE_SEARCH_QUERY,
8+
CHANGE_SORT_FILTER,
9+
CHANGE_VISIBILITY_FILTER,
10+
CREATE_PATH,
11+
NAVIGATE_BACK,
12+
NAVIGATE_FWD,
13+
NAVIGATE_UP,
14+
REMOVE_PATH
1515
} from "../actions/types";
1616
import BackStack from "../utils/classes/BackStack";
1717

@@ -93,38 +93,38 @@ export default function (state = initialState, action) {
9393
break;
9494

9595
case CHANGE_REMOTE_PATH:
96-
backStack.push({remoteName: backStack.peek().remoteName, remotePath: remotePath});
97-
// ptr++;
98-
99-
break;
100-
101-
case CREATE_PATH:
102-
if (!backStack || !(backStack instanceof BackStack))
103-
backStack = new BackStack();
104-
break;
105-
case REMOVE_PATH:
106-
// return {
107-
// ...state,
108-
// backStacks: {...state.backStacks, [id]: undefined},
109-
// currentPaths: {...state.currentPaths, [id]: undefined},
110-
// visibilityFilters: {...state.visibilityFilters, [id]: undefined},
111-
// gridMode: {...state.gridMode, [id]: undefined},
112-
// searchQueries: {...state.searchQueries, [id]: undefined},
113-
// loadImages: {...state.loadImages, [id]: undefined},
114-
// sortFilters: {...state.sortFilters, [id]: undefined},
115-
// sortFiltersAscending: {...state.sortFiltersAscending, [id]: undefined},
116-
// };
117-
break;
118-
case NAVIGATE_UP:
119-
// TODO: Write logic for up, which will navigate one directory up
120-
let current = backStack.peek();
121-
122-
if (current.remotePath && current.remotePath !== "") {
123-
const splitPath = current.remotePath.split('/');
124-
current.remotePath = "";
125-
if (splitPath.length > 1)
126-
for (let i = 0; i < splitPath.length - 1; i++) {
127-
current.remotePath = current.remotePath + ((i !== 0) ? '/' : '') + splitPath[i];
96+
backStack.push({remoteName: backStack.peek().remoteName, remotePath: remotePath});
97+
// ptr++;
98+
99+
break;
100+
101+
case CREATE_PATH:
102+
if (!backStack || !(backStack instanceof BackStack))
103+
backStack = new BackStack();
104+
break;
105+
case REMOVE_PATH:
106+
return {
107+
...state,
108+
backStacks: {...state.backStacks, [id]: undefined},
109+
currentPaths: {...state.currentPaths, [id]: undefined},
110+
visibilityFilters: {...state.visibilityFilters, [id]: undefined},
111+
gridMode: {...state.gridMode, [id]: undefined},
112+
searchQueries: {...state.searchQueries, [id]: undefined},
113+
loadImages: {...state.loadImages, [id]: undefined},
114+
sortFilters: {...state.sortFilters, [id]: undefined},
115+
sortFiltersAscending: {...state.sortFiltersAscending, [id]: undefined},
116+
};
117+
// break;
118+
case NAVIGATE_UP:
119+
// TODO: Write logic for up, which will navigate one directory up
120+
let current = backStack.peek();
121+
122+
if (current.remotePath && current.remotePath !== "") {
123+
const splitPath = current.remotePath.split('/');
124+
current.remotePath = "";
125+
if (splitPath.length > 1)
126+
for (let i = 0; i < splitPath.length - 1; i++) {
127+
current.remotePath = current.remotePath + ((i !== 0) ? '/' : '') + splitPath[i];
128128
}
129129
}
130130
backStack.push(current);
@@ -138,8 +138,10 @@ export default function (state = initialState, action) {
138138
backStack.moveBack();
139139
break;
140140
case CHANGE_VISIBILITY_FILTER:
141-
if (action.filter)
142-
visibilityFilter = action.filter;
141+
if (action.filter)
142+
visibilityFilter = action.filter;
143+
else
144+
visibilityFilter = "";
143145
break;
144146
case CHANGE_GRID_MODE:
145147
if (action.mode) {

src/scss/_custom.scss

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Here you can add other styles
22
body{
3-
font-family: Noto Sans;
3+
font-family: Noto Sans, sans-serif;
44
}
55

66
.card, .card-header, .card-body {
@@ -10,7 +10,6 @@ body{
1010
.btn-white {
1111
font-style: normal;
1212
font-weight: normal;
13-
font-size: 20px;
1413
color: rgba(44,44,44,1);
1514
background-color: rgba(232,239,247,1);
1615
}
@@ -25,20 +24,17 @@ body{
2524
background-color: rgba(188,201,214,1);
2625
font-style: normal;
2726
font-weight: bold;
28-
font-size: 25px;
2927
color: rgba(44,44,44,1);
3028
}
3129

3230
.card .card-subtitle{
3331
font-style: normal;
3432
font-weight: bold;
35-
font-size: 20px;
3633
color: rgba(63,121,173,1);
3734
}
3835
.card .card-text {
3936
font-style: normal;
4037
font-weight: normal;
41-
font-size: 20px;
4238
color: rgba(114,114,114,1);
4339
}
4440

@@ -51,7 +47,6 @@ body{
5147
.text-choose-layout {
5248
font-style: normal;
5349
font-weight: bold;
54-
font-size: 20px;
5550
color: rgba(114,114,114,1);
5651
}
5752
.layout-change-button{
@@ -67,7 +62,7 @@ body{
6762

6863
.btn-explorer-action :hover {
6964
border: 1px;
70-
background-color: none;
65+
background: none;
7166
}
7267

7368
.table-fix-head { overflow-y: auto; height: 100px; }
@@ -140,9 +135,9 @@ body{
140135

141136
.btn-step-count {
142137
border-radius: 100px;
143-
background-color: none;
144-
border: 5px solid rgba(140,140,140,1);
145-
color:rgba(66,66,66,1);
138+
background: none;
139+
border: 5px solid rgba(140, 140, 140, 1);
140+
color: rgba(66, 66, 66, 1);
146141
font-weight: bold;
147142

148143
}
@@ -177,7 +172,7 @@ body{
177172
.sidebar{
178173
ul.nav {
179174
background-color: #ffffff;
180-
font-family: Nunito;
175+
font-family: Nunito, sans-serif;
181176
font-weight: bold;
182177
}
183178
.nav-link.active {

0 commit comments

Comments
 (0)