Skip to content

Commit

Permalink
Show language icons in preview (Fixes #421)
Browse files Browse the repository at this point in the history
  • Loading branch information
PKief committed May 20, 2019
1 parent 02af51b commit 05bde2b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Binary file modified images/fileIcons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/folderIcons.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions src/scripts/preview/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
import { fileIcons } from './../../icons/fileIcons';
import { folderIcons } from './../../icons/folderIcons';
import { languageIcons } from './../../icons/languageIcons';
import { generatePreview } from './preview';

const filterDuplicates = (icons: string[]) => {
return [...new Set(icons)];
};

const basicFileIcons = fileIcons.icons
.map(i => ({ iconName: i.name, label: i.name }));
const basicFileIcons = filterDuplicates(
fileIcons.icons
.map(i => i.name)
// merge language icons
.concat(languageIcons.map(i => i.icon.name))
).map(i => ({ iconName: i, label: i }));

const folderThemes = filterDuplicates(folderIcons.map(theme => {
const folders = [];
Expand Down

0 comments on commit 05bde2b

Please sign in to comment.