Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Folder icons: implement logic #843

Closed
sebastianjnuwu opened this issue Sep 25, 2023 Discussed in #779 · 1 comment
Closed

Folder icons: implement logic #843

sebastianjnuwu opened this issue Sep 25, 2023 Discussed in #779 · 1 comment

Comments

@sebastianjnuwu
Copy link
Contributor

sebastianjnuwu commented Sep 25, 2023

implement the same application logic from file icons to folder icons (in my opinion this seems right, but it's up to you to improve!)

item.icon = 'folder';

if (item.isDirectory) {
  item.icon = this.getIconForFolder(item.name);
 } else {
  item.icon = this.getIconForFile(item.name);
}

getIconForFolder(name) {
  const regex = /* regex */;
  return `icon folder type_folder_${name}`;
};

Does this logic work or is it more difficult than it seems?

@sebastianjnuwu
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant