{!currentServer && (
Please select a server from the sidebar to view your files
)}
{currentServer && (
<>
Connected to: {currentServer.name} ({currentServer.user}@{currentServer.ip}:{currentServer.port})
{isSSHConnecting ? (
Connecting to SSH server...
) : (
<>
}
onClick={() => setActiveSection('recent')}
style={{ backgroundColor: activeSection === 'recent' ? '#36414C' : '#4A5568', color: 'white', borderColor: '#4A5568', transition: 'background 0.2s' }}
onMouseOver={e => e.currentTarget.style.backgroundColor = activeSection === 'recent' ? '#36414C' : '#36414C'}
onMouseOut={e => e.currentTarget.style.backgroundColor = activeSection === 'recent' ? '#36414C' : '#4A5568'}
>
Recent
}
onClick={() => setActiveSection('starred')}
style={{ backgroundColor: activeSection === 'starred' ? '#36414C' : '#4A5568', color: 'white', borderColor: '#4A5568', transition: 'background 0.2s' }}
onMouseOver={e => e.currentTarget.style.backgroundColor = activeSection === 'starred' ? '#36414C' : '#36414C'}
onMouseOut={e => e.currentTarget.style.backgroundColor = activeSection === 'starred' ? '#36414C' : '#4A5568'}
>
Starred
}
onClick={() => setActiveSection('folders')}
style={{ backgroundColor: activeSection === 'folders' ? '#36414C' : '#4A5568', color: 'white', borderColor: '#4A5568', transition: 'background 0.2s' }}
onMouseOver={e => e.currentTarget.style.backgroundColor = activeSection === 'folders' ? '#36414C' : '#36414C'}
onMouseOut={e => e.currentTarget.style.backgroundColor = activeSection === 'folders' ? '#36414C' : '#4A5568'}
>
Folder Shortcuts
{activeSection === 'recent' && (
{serverRecentFiles.length === 0 ? (
No recent files
) : (
serverRecentFiles.map(file => (
))
)}
)}
{activeSection === 'starred' && (
{serverStarredFiles.length === 0 ? (
No starred files
) : (
serverStarredFiles.map(file => (
))
)}
)}
{activeSection === 'folders' && (
setNewFolderPath(e.target.value)}
style={{ flex: 1 }}
styles={{
input: {
backgroundColor: '#36414C',
borderColor: '#4A5568',
color: 'white',
'&::placeholder': {
color: '#A0AEC0'
}
}
}}
/>
}
onClick={handleAddFolder}
variant="filled"
color="blue"
style={{
backgroundColor: '#36414C',
border: '1px solid #4A5568',
'&:hover': {
backgroundColor: '#4A5568'
}
}}
>
Add
{serverFolderShortcuts.length === 0 ? (
No folder shortcuts
) : (
serverFolderShortcuts.map(folder => (
))
)}
)}
>
)}
>
)}
);
}