wulkano / Kap

An open-source screen recorder built with web technology
https://getkap.co
MIT License
17.95k stars 818 forks source link

Feature: Plugin icons #803

Open karaggeorge opened 4 years ago

karaggeorge commented 4 years ago

It would be nice if plugins were able to include icons that we can use in the Preferences panel. Especially now that we'll have more and more, it might be nice to have plugins like Dropbox, Giphy, Now etc have their logo there.

We should also have a default generic plugin icon for some that don't have one

Thoughts on implementation? Thinking either a url in the package.json, or an icon file at the top level of the plugin?

sindresorhus commented 4 years ago

I would prefer it to be bundled in the package. Maybe just a convention? icon.png in the root? What should the size be? I’m thinking 512px as that gives us more flexibility in the future. We could for example show plugin icons on the website.

karaggeorge commented 4 years ago

Thinking about it, will we be able to pull that icon from npm packages that we haven't installed yet? I know we can pull the package.json, can we pull a local file icon.png without downloading the entire package?

sindresorhus commented 4 years ago

Get the repo field from package.json and fetch it from the repo root.

SeaMac commented 4 years ago

I think this is the default plugin icon - from the OS - maybe it can be used or adapted? The zipped file has the Icon you need pasted onto it already ... or - inside is a folder wearing the icon - and maybe an .icn file inside that. You can copy paste icons by Command+I (+I) "Get Info" then clicking on the icon in the upper left until it is highlighted - then Copying (Or pasting on) the Icon itself. This has worked since System 9 ... plugin_default_icon.zip

image