used mdi icons instead of font awesome

This commit is contained in:
Jan Prochazka
2020-11-09 19:33:46 +01:00
parent 4bf797c27d
commit a7fcf1d3a3
25 changed files with 85 additions and 51 deletions

View File

@@ -78,7 +78,7 @@ const FileNameWrapper = styled.span`
margin-left: 5px;
`;
const CloseButton = styled.i`
const CloseButton = styled.span`
margin-left: 5px;
color: gray;
&:hover {
@@ -117,9 +117,9 @@ function getTabDbKey(tab) {
}
function getDbIcon(key) {
if (key.startsWith('database://')) return 'fas fa-database';
if (key.startsWith('archive://')) return 'fas fa-archive';
return 'fas fa-file';
if (key.startsWith('database://')) return 'mdi mdi-database';
if (key.startsWith('archive://')) return 'mdi mdi-archive';
return 'mdi mdi-file';
}
export default function TabsPanel() {
@@ -253,7 +253,7 @@ export default function TabsPanel() {
selected={tabsByDb[dbKey][0].tabDbKey == currentDbKey}
onClick={() => handleSetDb(tabsByDb[dbKey][0].props)}
>
<i className={getDbIcon(dbKey)} /> {tabsByDb[dbKey][0].tabDbName}
<span className={getDbIcon(dbKey)} /> {tabsByDb[dbKey][0].tabDbName}
</DbNameWrapper>
<DbGroupHandler>
{_.sortBy(tabsByDb[dbKey], 'title').map((tab) => (
@@ -265,10 +265,10 @@ export default function TabsPanel() {
onMouseUp={(e) => handleMouseUp(e, tab.tabid)}
onContextMenu={(e) => handleContextMenu(e, tab.tabid, tab.props)}
>
{tab.busy ? <i className="fas fa-spinner fa-spin"></i> : getIconImage(tab.icon)}
{tab.busy ? <i className="mdi mdi-loading mdi-spin"></i> : getIconImage(tab.icon)}
<FileNameWrapper>{tab.title}</FileNameWrapper>
<CloseButton
className="fas fa-times tabCloseButton"
className="mdi mdi-close tabCloseButton"
onClick={(e) => {
e.preventDefault();
closeTab(tab.tabid);