Skip to content

Commit bf98398

Browse files
committed
Cleanup and wip breadcrumb
1 parent f05c5bb commit bf98398

24 files changed

+48
-285
lines changed

ui/ftp/components/diskView.tsx

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import {
55
DeviceType
66
} from '../main.type.ts'
77

8+
import BreadCrumb from './ui/BreadCrumb'
9+
810
type DiskViewParams = {
911
waiting: Boolean,
1012
diskPath: String
@@ -47,26 +49,13 @@ const DiskView: React.FC = ({ logic }) => {
4749
)
4850
}
4951

50-
const NavigationItem = (name: string, i:number) => {
51-
const crumbs = diskPath.split('/').filter(c => c !== '')
52-
const path = '/' + crumbs.slice(0, i).join('/')
53-
return (
54-
<button key={i} onClick={() => navigate(path)}>{name}</button>
55-
)
56-
}
57-
let diskPathArray = []
58-
if (diskPath) {
59-
diskPathArray = ['/'].concat(
60-
diskPath.split('/').filter(s => s !== '')
61-
)
62-
}
6352
return (
6453
<div className="column file-panel">
6554
<div className="toolbar row full-width">
6655
<button onClick={openFolder}>Select folder</button>
6756
</div>
6857
<div className="row full-width navigation">
69-
{diskPathArray.map(NavigationItem)}
58+
{BreadCrumb(diskPath, navigate)}
7059
</div>
7160
<div className="column full-width full-height list">
7261
{diskFiles.map(ListItem)}

ui/ftp/components/files/diskFiles.tsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

ui/ftp/components/files/diskFiles.type.ts

Lines changed: 0 additions & 9 deletions
This file was deleted.

ui/ftp/components/files/fileManagement.tsx

Lines changed: 0 additions & 16 deletions
This file was deleted.

ui/ftp/components/files/fileManagement.type.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.

ui/ftp/components/files/serialFiles.tsx

Lines changed: 0 additions & 30 deletions
This file was deleted.

ui/ftp/components/files/serialFiles.type.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

ui/ftp/components/navigation/diskNavigation.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

ui/ftp/components/navigation/diskNavigation.type.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

ui/ftp/components/navigation/serialNavigation.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy