Skip to content

Commit 3b3c684

Browse files
SaraVieiraCompuIves
authored andcommitted
adds more icons (codesandbox#2023)
1 parent 59febe0 commit 3b3c684

File tree

4 files changed

+5
-19
lines changed

4 files changed

+5
-19
lines changed

packages/app/src/app/pages/Sandbox/Editor/Workspace/Files/DirectoryEntry/Entry/EntryIcons/GetIconURL.js

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
import folderSvg from '@codesandbox/common/lib/components/icons/folder.svg';
22
import folderOpenSvg from '@codesandbox/common/lib/components/icons/folder-open.svg';
3-
import faviconSvg from '@codesandbox/common/lib/components/icons/favicon.svg';
43
import fileSvg from '@codesandbox/common/lib/components/icons/file.svg';
54
import imageSvg from '@codesandbox/common/lib/components/icons/image.svg';
65
import codesandboxSvg from '@codesandbox/common/lib/components/icons/codesandbox.svg';
76
import nowSvg from '@codesandbox/common/lib/components/icons/now.svg';
8-
import svelteSvg from '@codesandbox/common/lib/components/icons/svelte.svg';
97

108
function imageExists(url) {
119
return new Promise((resolve, reject) => {
@@ -18,7 +16,7 @@ function imageExists(url) {
1816

1917
async function getIconURL(type) {
2018
const base =
21-
'https://cdn.jsdelivr.net/gh/PKief/vscode-material-icon-theme@e04ab459209a1d0c9fdb7b3682e5b4aa6d586090/icons';
19+
'https://cdn.jsdelivr.net/gh/PKief/vscode-material-icon-theme@master/icons';
2220

2321
let url;
2422

@@ -27,10 +25,6 @@ async function getIconURL(type) {
2725
url = codesandboxSvg;
2826
break;
2927

30-
case 'favicon':
31-
url = faviconSvg;
32-
break;
33-
3428
case 'image':
3529
url = imageSvg;
3630
break;
@@ -39,10 +33,6 @@ async function getIconURL(type) {
3933
url = nowSvg;
4034
break;
4135

42-
case 'svelte':
43-
url = svelteSvg;
44-
break;
45-
4636
case 'directory':
4737
url = folderSvg;
4838
break;

packages/app/src/app/utils/get-type.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ type regexCasesMap = {
1212
javascript: RegExp;
1313
typescript: RegExp;
1414
console: RegExp;
15+
prisma: RegExp;
1516
git: RegExp;
1617
flow: RegExp;
1718
};
@@ -22,7 +23,8 @@ const specialCasesMap = {
2223
'package.json': 'npm',
2324
'sandbox.config.json': 'codesandbox',
2425
'now.json': 'now',
25-
'netlify.toml': 'settings',
26+
prisma: 'prisma',
27+
'netlify.toml': 'netlify',
2628
'readme.md': 'readme',
2729
'contributing.md': 'contributing',
2830
'tsconfig.json': 'typescript',
@@ -40,6 +42,7 @@ const regexCasesMap = {
4042
javascript: /\.m?js$/,
4143
typescript: /\.tsx?$/,
4244
console: /\.sh$/,
45+
prisma: /\.prisma$/,
4346
// STARTS WITH
4447
git: /^.git/i,
4548
flow: /^.flow/i,

packages/common/src/components/icons/favicon.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/common/src/components/icons/svelte.svg

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

0 commit comments

Comments
 (0)