From 0cb47bbfcdf6aa8d5c78b2c27b966e8b5c8f6e5a Mon Sep 17 00:00:00 2001 From: Damian Tarnawski Date: Tue, 17 Dec 2024 11:18:06 +0100 Subject: [PATCH] Change panel icon style to outline --- .changeset/long-adults-shout.md | 5 +++ packages/extension/background/background.ts | 4 +- packages/extension/devtools/devtools.ts | 4 +- packages/extension/package.json | 2 +- packages/extension/public/solid-white-32.png | Bin 0 -> 1058 bytes packages/extension/shared/icons.ts | 40 ++++++++++++------- packages/extension/vite.config.ts | 14 +++---- 7 files changed, 43 insertions(+), 26 deletions(-) create mode 100644 .changeset/long-adults-shout.md create mode 100644 packages/extension/public/solid-white-32.png diff --git a/.changeset/long-adults-shout.md b/.changeset/long-adults-shout.md new file mode 100644 index 00000000..59dd02ca --- /dev/null +++ b/.changeset/long-adults-shout.md @@ -0,0 +1,5 @@ +--- +"@solid-devtools/extension": patch +--- + +Change panel icon style to outline diff --git a/packages/extension/background/background.ts b/packages/extension/background/background.ts index a9fba383..93c271be 100644 --- a/packages/extension/background/background.ts +++ b/packages/extension/background/background.ts @@ -8,7 +8,7 @@ It has to coordinate the communication between the different scripts based on th import {error, log} from '@solid-devtools/shared/utils' import * as bridge from '../shared/bridge.ts' -import {icons} from '../shared/icons.ts' +import * as icons from '../shared/icons.ts' log('Background script working.') @@ -201,7 +201,7 @@ chrome.runtime.onConnect.addListener(async port => { data.setVersions(v) // Change the popup icon to indicate that Solid is present on the page - chrome.action.setIcon({tabId: tab_id, path: icons.normal}) + chrome.action.setIcon({tabId: tab_id, path: icons.blue}) }) // "DetectSolid" from content-script (realWorld) diff --git a/packages/extension/devtools/devtools.ts b/packages/extension/devtools/devtools.ts index e40bb624..c71ad5dc 100644 --- a/packages/extension/devtools/devtools.ts +++ b/packages/extension/devtools/devtools.ts @@ -9,7 +9,7 @@ It connects to the background script. import {error, log} from '@solid-devtools/shared/utils' import {ConnectionName, createPortMessanger, once} from '../shared/bridge.ts' -import {icons} from '../shared/icons.ts' +import * as icons from '../shared/icons.ts' log('Devtools_Script loaded.') @@ -28,7 +28,7 @@ once(fromBackground, 'Versions', () => { chrome.devtools.panels.create( 'Solid', - PATH_PREFIX + icons.disabled[32], + PATH_PREFIX + icons.OUTLINE_32, PATH_PREFIX + 'index.html', () => { if (chrome.runtime.lastError) { diff --git a/packages/extension/package.json b/packages/extension/package.json index ee6475bc..c4a8c17d 100644 --- a/packages/extension/package.json +++ b/packages/extension/package.json @@ -12,7 +12,7 @@ "build": "node --experimental-transform-types ./build.ts --browser=firefox --browser=chrome", "test:unit": "echo \"No unit tests\"", "test:types": "tsc --noEmit --paths null", - "firefox-run": "web-ext run -s dist/firefox -p dev" + "firefox-run": "pnpx web-ext run -s dist/firefox -p dev" }, "devDependencies": { "@crxjs/vite-plugin": "2.0.0-beta.28", diff --git a/packages/extension/public/solid-white-32.png b/packages/extension/public/solid-white-32.png new file mode 100644 index 0000000000000000000000000000000000000000..dce67800bb2adaaea65b036b835d544116445bef GIT binary patch literal 1058 zcmV+-1l{|IP)&P*f(iD6-gArTga#KM9EvBH9dNLZM5h9E42HUu$Gi5MCQ z9hwlc7#gknz1F^?s?wF}dtX0KC*mYu>b`q#o%2`Kxu@!h{9}v$>gF`FVI&N& z{ZsH1KEpXBilRGG-$wAo@B+R=1yn)?sw_WktM^J^2lSKrFdVIb&+rw>t$?&86p*&! z%B|QFFiY|^I(LE61OXW@cy)|`Z%_tb;4aJz{ikx!upFAlY4h+cin*u1yTVpP+|oh$ zFDIIP@fH+Vv4ysEL>_8CZ7|nX*=zs4V;gL&OTZbLUhod~z-ckr-VItpe;5IyVg!W5 z-M^eI_*A$FS7C-^7uo_Q!y&u=6+sSY{(OWF@E+d6YnT>gak`(TGrZxuo+>#S{d9I# z!!R-H9=8m7uNc2$lAMf#3vd~ROCF{|U?toOX5gKjf!~Rk^cD0JlUOCFydZfP{hq;k zF2}n9-Scjh`lBY4krZf}8B&iOlM9h-BgzfIVBmuW!I&{F%0@UtI2r^X6 zT5FK*Vm{X|P!6r2OlsCY4F_Pi8@*b#Bs@sdNz5{7$9;5s#r?rzrgfGL;%Y;ICGvuP zg0pZKj?=#^jFU}3dz!6QL_=sKCVN}iK!sjVhYE3-o`Fhu4~q$YGA>RkA-JxeW~nM} zBc|x6fEM0pQ{Hu04V{3D?Y9A+ed1z8LEw%w3t_Ac=0;lRU8fR8@AiNyJ90MznhzCl zky)4@3J8->*L8~2uKBs(k6cBh10k_zgH$m3*+KAvnCpU=;C_X3WIPd-b`~Vt3@nn` z865_C0Yz{L?%IC(`RSUh=O#agF z(FxAO6+KfxkEC~XU5CI&F$ay_FjW5DbnPFDS^pwN|0LM z3VJR$io=_d9K5fX(~#~RI*V(vjXqX@=WK!}B&_u+LidS>Vv0~((2?txq(w-#|Aq(|NHbB)|G{QbQ}O(xw=2Jj9yr$K5 { // Convert from Semver (example: 0.1.0-beta6) - const [major, minor, patch, label = '0'] = ext_pkg.version + const [major, minor, patch, label = '0'] = pkg.version // can only contain digits, dots, or dash .replace(/[^\d.-]+/g, '') // split into version parts @@ -36,7 +36,7 @@ const manifest: crx.ManifestV3Export & Manifest_Additional_Fields = { description: 'Chrome Developer Tools extension for debugging SolidJS applications.', homepage_url: 'https://github.com/thetarnav/solid-devtools', version: manifest_version, - version_name: is_chrome ? ext_pkg.version : undefined, + version_name: is_chrome ? pkg.version : undefined, browser_specific_settings: is_chrome ? undefined : {gecko: {id: '{abfd162e-9948-403a-a75c-6e61184e1d47}'}}, @@ -73,11 +73,11 @@ const manifest: crx.ManifestV3Export & Manifest_Additional_Fields = { }, permissions: [], action: { - default_icon: icons.disabled, + default_icon: icons.gray, default_title: 'Solid Devtools', default_popup: 'popup/popup.html', }, - icons: icons.normal, + icons: icons.blue, } const sdt_pkg: {version: string} = JSON.parse(fs.readFileSync(require.resolve('solid-devtools/package.json'), 'utf-8'))