From 282037b53c8357c6a81a3affd34c9659cd33aae6 Mon Sep 17 00:00:00 2001 From: John Gruen Date: Mon, 20 Feb 2017 18:44:53 -0500 Subject: [PATCH] clean up container icons --- data/usercontext.css | 13 +++++++- data/usercontext.svg | 53 +++++++++++++++++++++++++++----- index.js | 3 ++ webextension/css/popup.css | 12 ++++++++ webextension/img/usercontext.svg | 53 +++++++++++++++++++++++++++----- webextension/js/popup.js | 2 +- 6 files changed, 118 insertions(+), 18 deletions(-) diff --git a/data/usercontext.css b/data/usercontext.css index 1b061f9..a16c07e 100644 --- a/data/usercontext.css +++ b/data/usercontext.css @@ -75,10 +75,21 @@ value, or chrome url path as an alternate selector mitiages this bug.*/ } [data-identity-icon="circle"] { - /* --identity-icon: url("chrome://browser/content/usercontext.svg#circle"); */ --identity-icon: url("resource://testpilot-containers/data/usercontext.svg#circle"); } +[data-identity-icon="gift"] { + --identity-icon: url("resource://testpilot-containers/data/usercontext.svg#gift"); +} + +[data-identity-icon="vacation"] { + --identity-icon: url("resource://testpilot-containers/data/usercontext.svg#vacation"); +} + +[data-identity-icon="food"] { + --identity-icon: url("resource://testpilot-containers/data/usercontext.svg#food"); +} + #userContext-indicator { height: 16px; width: 16px; diff --git a/data/usercontext.svg b/data/usercontext.svg index 8bc353b..0b53f91 100644 --- a/data/usercontext.svg +++ b/data/usercontext.svg @@ -2,19 +2,56 @@ - + - - - - + + + + + + + - \ No newline at end of file + diff --git a/index.js b/index.js index 4ffbfe8..f01122f 100644 --- a/index.js +++ b/index.js @@ -24,6 +24,9 @@ const IDENTITY_ICONS = [ { name: "briefcase", image: "chrome://browser/skin/usercontext/work.svg" }, { name: "dollar", image: "chrome://browser/skin/usercontext/banking.svg" }, { name: "cart", image: "chrome://browser/skin/usercontext/shopping.svg" }, + { name: "gift", image: "gift" }, + { name: "vacation", image: "vacation" }, + { name: "food", image: "food" }, { name: "circle", image: "circle" }, // this doesn't exist in m-b ]; diff --git a/webextension/css/popup.css b/webextension/css/popup.css index d88d9ff..cdb0a99 100644 --- a/webextension/css/popup.css +++ b/webextension/css/popup.css @@ -96,6 +96,18 @@ table { --identity-icon: url("/img/usercontext.svg#circle"); } +[data-identity-icon="food"] { + --identity-icon: url("/img/usercontext.svg#food"); +} + +[data-identity-icon="gift"] { + --identity-icon: url("/img/usercontext.svg#gift"); +} + +[data-identity-icon="vacation"] { + --identity-icon: url("/img/usercontext.svg#vacation"); +} + /* Buttons */ .button.primary { background-color: #0996f8; diff --git a/webextension/img/usercontext.svg b/webextension/img/usercontext.svg index 8bc353b..0b53f91 100644 --- a/webextension/img/usercontext.svg +++ b/webextension/img/usercontext.svg @@ -2,19 +2,56 @@ - + - - - - + + + + + + + - \ No newline at end of file + diff --git a/webextension/js/popup.js b/webextension/js/popup.js index 0455fb7..5264f71 100644 --- a/webextension/js/popup.js +++ b/webextension/js/popup.js @@ -494,7 +494,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, { return `