This repository contains all the icons available within the Sentinel 2-Factor Authentication app.
A lot of icons are already present, but if you are missing one you can either:
- open an issue here and I'll try to add it as soon as possible
- create a pull request submitting your icons
It's super simple, here are the requirements:
- icons must be in
.png
format - icons must be of
squared size
(400x400 preferred size, do not submit huge images to avoid slow load times) - icons name must be
lowercase
- Insert the icon in the
/icons/assets/
folder - Add a row in the
/icons/index.json
referenced to the icon (check the following section to understand how the algorithm works) - Submit a
pull request
The index.json
is structured in this way
<issuer>: <name of the icon without extension>
an example is the following where we have 2 issuers pointing to the same icon.
"binance": "binance",
"binance.us": "binance"
The app will take the issuer and apply
- a
lowercase()
- a
replace('.com','')
- a
trim()
before trying to match the resulting string with a key of the index.json
.
If the attempt fails, it will try to split()
the issuer on the blank space, take the first substring and try to match it again.
Issuer = "Binance US.com"
lowercase()
+ replace('.com','')
+ trim()
Resulting Issuer = "binance us"
The match will fail ❌, no key was found in index.json
.
split(" ")[0]
Resulting Issuer = [binance, us] -> "binance"
Match found ✅! The correct icon will be displayed.
If you have any questions or suggestion feel free to reach out to me!
For more info, check out getsentinel.io