From c198318999dffe7846c87d3ee0d32f36761e5b7a Mon Sep 17 00:00:00 2001 From: Edouard Oger Date: Tue, 13 Aug 2019 02:52:07 +0000 Subject: [PATCH] Bug 1567569 - Add VR and TV device icons. r=markh Differential Revision: https://phabricator.services.mozilla.com/D41464 --HG-- extra : moz-landing-system : lando --- browser/base/content/browser-sync.js | 5 ++++- browser/themes/shared/icons/device-tv.svg | 6 ++++++ browser/themes/shared/icons/device-vr.svg | 7 +++++++ browser/themes/shared/jar.inc.mn | 2 ++ browser/themes/shared/syncedtabs/sidebar.inc.css | 8 ++++++++ browser/themes/shared/urlbar-searchbar.inc.css | 8 ++++++++ 6 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 browser/themes/shared/icons/device-tv.svg create mode 100644 browser/themes/shared/icons/device-vr.svg diff --git a/browser/base/content/browser-sync.js b/browser/base/content/browser-sync.js index 8d95e74f4224..01d1b4c99313 100644 --- a/browser/base/content/browser-sync.js +++ b/browser/base/content/browser-sync.js @@ -873,7 +873,10 @@ var gSync = { ); lastModified = new Date(target.clientRecord.serverLastModified * 1000); } else { - type = target.type === "desktop" ? "desktop" : "phone"; // Normalizing the FxA types just in case. + const validFxADeviceTypes = ["desktop", "phone", "tablet", "tv", "vr"]; + type = validFxADeviceTypes.includes(target.type) + ? target.type + : "desktop"; lastModified = null; } addTargetDevice(target.id, target.name, type, lastModified); diff --git a/browser/themes/shared/icons/device-tv.svg b/browser/themes/shared/icons/device-tv.svg new file mode 100644 index 000000000000..ed65b4a22906 --- /dev/null +++ b/browser/themes/shared/icons/device-tv.svg @@ -0,0 +1,6 @@ + + + + diff --git a/browser/themes/shared/icons/device-vr.svg b/browser/themes/shared/icons/device-vr.svg new file mode 100644 index 000000000000..1a60279c8860 --- /dev/null +++ b/browser/themes/shared/icons/device-vr.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/browser/themes/shared/jar.inc.mn b/browser/themes/shared/jar.inc.mn index 04035d9c23a5..a5adf51d73c3 100644 --- a/browser/themes/shared/jar.inc.mn +++ b/browser/themes/shared/jar.inc.mn @@ -165,6 +165,8 @@ skin/classic/browser/device-phone.svg (../shared/icons/device-phone.svg) skin/classic/browser/device-tablet.svg (../shared/icons/device-tablet.svg) skin/classic/browser/device-desktop.svg (../shared/icons/device-desktop.svg) + skin/classic/browser/device-tv.svg (../shared/icons/device-tv.svg) + skin/classic/browser/device-vr.svg (../shared/icons/device-vr.svg) skin/classic/browser/edit-copy.svg (../shared/icons/edit-copy.svg) skin/classic/browser/edit-cut.svg (../shared/icons/edit-cut.svg) skin/classic/browser/edit-paste.svg (../shared/icons/edit-paste.svg) diff --git a/browser/themes/shared/syncedtabs/sidebar.inc.css b/browser/themes/shared/syncedtabs/sidebar.inc.css index dd184e0abeb9..15add650d6ad 100644 --- a/browser/themes/shared/syncedtabs/sidebar.inc.css +++ b/browser/themes/shared/syncedtabs/sidebar.inc.css @@ -123,6 +123,14 @@ body { background-image: url("chrome://browser/skin/device-desktop.svg"); } +.item.client[clientType=tv] > .item-title-container > .item-icon-container { + background-image: url("chrome://browser/skin/device-tv.svg"); +} + +.item.client[clientType=vr] > .item-title-container > .item-icon-container { + background-image: url("chrome://browser/skin/device-vr.svg"); +} + .item.tab > .item-title-container > .item-icon-container { background-image: url("chrome://mozapps/skin/places/defaultFavicon.svg"); -moz-context-properties: fill; diff --git a/browser/themes/shared/urlbar-searchbar.inc.css b/browser/themes/shared/urlbar-searchbar.inc.css index bddf8f7b88ec..35aaf1833fec 100644 --- a/browser/themes/shared/urlbar-searchbar.inc.css +++ b/browser/themes/shared/urlbar-searchbar.inc.css @@ -220,6 +220,14 @@ list-style-image: url("chrome://browser/skin/device-desktop.svg"); } +.pageAction-sendToDevice-device[clientType=tv] { + list-style-image: url("chrome://browser/skin/device-tv.svg"); +} + +.pageAction-sendToDevice-device[clientType=vr] { + list-style-image: url("chrome://browser/skin/device-vr.svg"); +} + .pageAction-sendToDevice-device.signintosync, #pageAction-panel-sendToDevice-fxa, #pageAction-urlbar-sendToDevice-fxa {