TbSync icon indicating copy to clipboard operation
TbSync copied to clipboard

Feature request: using favicon of the source server as icon for the account

Open provelo-ict opened this issue 5 years ago • 3 comments

Your environment

TbSync version: 2.19 Thunderbird version: 78.5

Expected behavior

When I add a new account, I would love that TbSync retrieves, if it exists, the favicon of the source webserver (in my case, Caldav servers) and use it as the icon for the account.

This would help discriminate between multiple servers.

It could be the default behavior or an optionnal one. One could customize the icon he wants for a specific account.

Actual behavior

TBsync currently displays the icon of the provider used the account. So if one has multiple account using the same provider, the all look the same.

Steps to reproduce

Adding an account, I guess.

If unclear, I mean those icons:

icons

provelo-ict avatar Dec 02 '20 11:12 provelo-ict

Is there a public API to get the provider icon?

jobisoft avatar Apr 15 '21 07:04 jobisoft

Well, before you asked, I naively thought it was standardized and that one could simply go and fetch https://<hostname>/favico.ico.

But reading more about the subject (e.g. https://en.wikipedia.org/wiki/Favicon), I realize that it's a bit more complex than that: one needs to fetch an html page from the site, then parse it and find a link element with a rel attribute of "icon". This link element will also have a href attribute, pointing to the icon file. e.g.: <link rel="icon" href="https://example.com/image.ico"> But beware, there might be multiple element, each with either a different type of file (ico, png, jpeg, gif,...) or a different size

Here is an example of what you could find in a regular HTML page regarding icons (multiple choice per type/size/device):

image

And here is what you can find on a Nextcloud (just one element):

image

So maybe, it's not that simple to begin with...

provelo-ict avatar Apr 19 '21 06:04 provelo-ict

@jobisoft @provelo-ict See https://github.com/keepassxreboot/keepassxc/issues/2258 :)

cnmicha avatar May 11 '21 16:05 cnmicha

Since I am going to sunset the Dav provider, this will not be worked on anymore.

jobisoft avatar Apr 01 '24 10:04 jobisoft