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

Use Alby as extension icon #370

Merged
merged 5 commits into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/extension/background-script/actions/setup/setIcon.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
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 @@ -36,8 +36,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 @@ -47,10 +47,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.0",

"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 @@ -39,10 +39,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