fix(devtools): set proper icon sizes

This commit is contained in:
mgechev 2021-04-30 18:11:45 -07:00 committed by Minko Gechev
parent 89e495dfff
commit cf682b59b5
17 changed files with 37 additions and 24 deletions

View file

@ -24,7 +24,7 @@
"tsConfig": "tsconfig.app.json",
"vendorChunk": false,
"aot": true,
"assets": ["src/favicon.ico", "src/assets"],
"assets": ["src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
},
@ -92,7 +92,7 @@
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"assets": ["src/assets"],
"styles": ["src/styles.scss"],
"scripts": []
}
@ -141,7 +141,6 @@
"vendorChunk": false,
"aot": true,
"assets": [
"projects/shell-chrome/src/favicon.ico",
"projects/shell-chrome/src/assets",
"projects/shell-chrome/src/manifest.json",
"projects/shell-chrome/src/devtools.html",
@ -208,7 +207,7 @@
"polyfills": "projects/shell-chrome/src/polyfills.ts",
"tsConfig": "projects/shell-chrome/tsconfig.spec.json",
"karmaConfig": "projects/shell-chrome/karma.conf.js",
"assets": ["projects/shell-chrome/src/favicon.ico", "projects/shell-chrome/src/assets"],
"assets": ["projects/shell-chrome/src/assets"],
"styles": ["projects/shell-chrome/src/styles.scss"],
"scripts": []
}
@ -393,7 +392,7 @@
"main": "projects/demo-no-zone/src/main.ts",
"polyfills": "projects/demo-no-zone/src/polyfills.ts",
"tsConfig": "projects/demo-no-zone/tsconfig.app.json",
"assets": ["projects/demo-no-zone/src/favicon.ico", "projects/demo-no-zone/src/assets"],
"assets": ["projects/demo-no-zone/src/assets"],
"styles": ["projects/demo-no-zone/src/styles.css"],
"scripts": []
},
@ -448,7 +447,7 @@
"polyfills": "projects/demo-no-zone/src/polyfills.ts",
"tsConfig": "projects/demo-no-zone/tsconfig.spec.json",
"karmaConfig": "projects/demo-no-zone/karma.conf.js",
"assets": ["projects/demo-no-zone/src/favicon.ico", "projects/demo-no-zone/src/assets"],
"assets": ["projects/demo-no-zone/src/assets"],
"styles": ["projects/demo-no-zone/src/styles.css"],
"scripts": []
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -6,7 +6,7 @@
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/x-icon" href="assets/icon16.png" />
</head>
<body>
<app-root></app-root>

View file

@ -1,5 +1,15 @@
import { AngularDetection } from './ng-validate';
// By default use the black and white icon.
// Replace it only when we detect an Angular app.
chrome.browserAction.setIcon({
path: {
16: `assets/icon-bw16.png`,
48: `assets/icon-bw48.png`,
128: `assets/icon-bw128.png`,
},
});
const ports: {
[tab: string]:
| {
@ -113,7 +123,9 @@ chrome.runtime.onMessage.addListener((req, sender) => {
chrome.browserAction.setIcon({
tabId: sender.tab.id,
path: {
16: `assets/favicon.ico`,
16: `assets/icon16.png`,
48: `assets/icon48.png`,
128: `assets/icon128.png`,
},
});
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -1 +1 @@
chrome.devtools.panels.create('Angular', 'favicon.ico', 'index.html');
chrome.devtools.panels.create('Angular', 'assets/icon-bw16.png', 'index.html');

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

View file

@ -1,14 +1,14 @@
<!doctype html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>ShellChrome</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
<app-root></app-root>
</body>
<head>
<meta charset="utf-8" />
<title>ShellChrome</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link rel="icon" type="image/x-icon" href="assets/icon16.png" />
</head>
<body>
<app-root></app-root>
</body>
</html>

View file

@ -2,13 +2,15 @@
"manifest_version": 2,
"short_name": "Angular DevTools",
"name": "Angular Developer Tools",
"description": "Extends the Developer Tools, adding tools for debugging and profiling Angular applications.",
"description": "Angular DevTools extends Chrome DevTools adding Angular specific debugging and profiling capabilities.",
"version": "1.0.0",
"version_name": "1.0.0",
"minimum_chrome_version": "50",
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
"icons": {
"16": "favicon.ico"
"16": "assets/icon16.png",
"48": "assets/icon48.png",
"128": "assets/icon128.png"
},
"browser_action": {
"default_popup": "popups/not-angular.html"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 948 B

View file

@ -5,7 +5,7 @@
<title>AngularDevtools</title>
<base href="/" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<link rel="icon" type="image/x-icon" href="assets/icon16.png" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
</head>
<body>