Skip to content

Commit

Permalink
Merge pull request #370 from getAlby/feature/new-icon
Browse files Browse the repository at this point in the history
Use Alby as extension icon
  • Loading branch information
MoritzKa authored Nov 22, 2021
2 parents 9e1b300 + 5ab48a3 commit 2fe79b0
Show file tree
Hide file tree
Showing 40 changed files with 201 additions and 21 deletions.
12 changes: 6 additions & 6 deletions src/extension/background-script/actions/setup/setIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ import browser from "webextension-polyfill";
const setIcon = async (message, sender) => {
// TODO: refactor names / rename files?
const names = {
active: "satsymbol",
off: "satsymbol-black",
active: "alby_icon_yellow",
off: "alby_icon_sleeping",
};
const name = names[message.args.icon];
return browser.browserAction
.setIcon({
path: {
16: `assets/icons/${name}-16.png`,
32: `assets/icons/${name}-32.png`,
48: `assets/icons/${name}-48.png`,
128: `assets/icons/${name}-128.png`,
16: `assets/icons/${name}_16x16.png`,
32: `assets/icons/${name}_32x32.png`,
48: `assets/icons/${name}_48x48.png`,
128: `assets/icons/${name}_128x128.png`,
},
tabId: sender.tab.id,
})
Expand Down
12 changes: 6 additions & 6 deletions src/extension/background-script/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const updateIcon = async (tabId, changeInfo, tabInfo) => {

// TODO: move to some config file
const names = {
active: "satsymbol",
off: "satsymbol-black",
active: "alby_icon_yellow",
off: "alby_icon_sleeping",
};
let name;
if (allowance) {
Expand All @@ -46,10 +46,10 @@ const updateIcon = async (tabId, changeInfo, tabInfo) => {
}
return browser.browserAction.setIcon({
path: {
16: `assets/icons/${name}-16.png`,
32: `assets/icons/${name}-32.png`,
48: `assets/icons/${name}-48.png`,
128: `assets/icons/${name}-128.png`,
16: `assets/icons/${name}_16x16.png`,
32: `assets/icons/${name}_32x32.png`,
48: `assets/icons/${name}_48x48.png`,
128: `assets/icons/${name}_128x128.png`,
},
tabId: tabId,
});
Expand Down
16 changes: 8 additions & 8 deletions src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"version": "1.0.1",

"icons": {
"16": "assets/icons/satsymbol-black-16.png",
"32": "assets/icons/satsymbol-black-32.png",
"48": "assets/icons/satsymbol-black-48.png",
"128": "assets/icons/satsymbol-black-128.png"
"16": "assets/icons/alby_icon_yellow_16x16.png",
"32": "assets/icons/alby_icon_yellow_32x32.png",
"48": "assets/icons/alby_icon_yellow_48x48.png",
"128": "assets/icons/alby_icon_yellow_128x128.png"
},
"description": "Bitcoin buzz for your browser. The extension for the Bitcoin Lightning Network.",
"homepage_url": "https://getAlby.com/",
Expand Down Expand Up @@ -40,10 +40,10 @@
"browser_action": {
"default_popup": "popup.html",
"default_icon": {
"16": "assets/icons/satsymbol-black-16.png",
"32": "assets/icons/satsymbol-black-32.png",
"48": "assets/icons/satsymbol-black-48.png",
"128": "assets/icons/satsymbol-black-128.png"
"16": "assets/icons/alby_icon_sleeping_16x16.png",
"32": "assets/icons/alby_icon_sleeping_32x32.png",
"48": "assets/icons/alby_icon_sleeping_48x48.png",
"128": "assets/icons/alby_icon_sleeping_128x128.png"
},
"default_title": "Alby",
"__chrome|opera__chrome_style": false,
Expand Down
Binary file added static/assets/icons/alby_icon_blue_128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions static/assets/icons/alby_icon_blue_128x128.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/icons/alby_icon_blue_16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions static/assets/icons/alby_icon_blue_16x16.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/icons/alby_icon_blue_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions static/assets/icons/alby_icon_blue_32x32.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/icons/alby_icon_blue_48x48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions static/assets/icons/alby_icon_blue_48x48.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/icons/alby_icon_blue_64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions static/assets/icons/alby_icon_blue_64x64.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions static/assets/icons/alby_icon_sleeping_128x128.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/assets/icons/alby_icon_sleeping_16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2fe79b0

Please sign in to comment.