From cd9de001f74a1d3fcfd6b7b073ad0ab7060d9f52 Mon Sep 17 00:00:00 2001 From: Pierre Gordon Date: Tue, 9 Jan 2018 08:21:27 -0500 Subject: [PATCH] Centralize icons Signed off by: Pierre Gordon --- core/css/icons.scss | 38 ++++++++++++++++++++++ {settings => core}/img/clients/android.svg | 0 {settings => core}/img/clients/apple.svg | 0 {settings => core}/img/clients/chrome.svg | 0 {settings => core}/img/clients/edge.svg | 0 {settings => core}/img/clients/firefox.svg | 0 {settings => core}/img/clients/ie.svg | 0 {settings => core}/img/clients/ipad.svg | 0 {settings => core}/img/clients/iphone.svg | 0 {settings => core}/img/clients/safari.svg | 0 settings/css/settings.scss | 2 +- settings/img/clients/globe.svg | 1 - settings/js/authtoken_view.js | 30 ++++++++--------- 13 files changed, 54 insertions(+), 17 deletions(-) rename {settings => core}/img/clients/android.svg (100%) rename {settings => core}/img/clients/apple.svg (100%) rename {settings => core}/img/clients/chrome.svg (100%) rename {settings => core}/img/clients/edge.svg (100%) rename {settings => core}/img/clients/firefox.svg (100%) rename {settings => core}/img/clients/ie.svg (100%) rename {settings => core}/img/clients/ipad.svg (100%) rename {settings => core}/img/clients/iphone.svg (100%) rename {settings => core}/img/clients/safari.svg (100%) delete mode 100644 settings/img/clients/globe.svg diff --git a/core/css/icons.scss b/core/css/icons.scss index fbf36e2fbb..4604c79e67 100644 --- a/core/css/icons.scss +++ b/core/css/icons.scss @@ -516,6 +516,44 @@ img, object, video, button, textarea, input, select, div[contenteditable=true] { background-image: url('../img/places/picture.svg?v=1'); } +/* CLIENTS ------------------------------------------------------------------- */ + +.icon-client-android { + background-image: url('../img/clients/android.svg?v=1'); +} + +.icon-client-apple { + background-image: url('../img/clients/apple.svg?v=1'); +} + +.icon-client-chrome { + background-image: url('../img/clients/chrome.svg?v=1'); +} + +.icon-client-edge { + background-image: url('../img/clients/edge.svg?v=1'); +} + +.icon-client-firefox { + background-image: url('../img/clients/firefox.svg?v=1'); +} + +.icon-client-ie { + background-image: url('../img/clients/ie.svg?v=1'); +} + +.icon-client-ipad { + background-image: url('../img/clients/ipad.svg?v=1'); +} + +.icon-client-iphone { + background-image: url('../img/clients/iphone.svg?v=1'); +} + +.icon-client-safari { + background-image: url('../img/clients/safari.svg?v=1'); +} + /* APP CATEGORIES ------------------------------------------------------------------- */ .icon-category-installed { background-image: url('../img/actions/user.svg?v=1'); diff --git a/settings/img/clients/android.svg b/core/img/clients/android.svg similarity index 100% rename from settings/img/clients/android.svg rename to core/img/clients/android.svg diff --git a/settings/img/clients/apple.svg b/core/img/clients/apple.svg similarity index 100% rename from settings/img/clients/apple.svg rename to core/img/clients/apple.svg diff --git a/settings/img/clients/chrome.svg b/core/img/clients/chrome.svg similarity index 100% rename from settings/img/clients/chrome.svg rename to core/img/clients/chrome.svg diff --git a/settings/img/clients/edge.svg b/core/img/clients/edge.svg similarity index 100% rename from settings/img/clients/edge.svg rename to core/img/clients/edge.svg diff --git a/settings/img/clients/firefox.svg b/core/img/clients/firefox.svg similarity index 100% rename from settings/img/clients/firefox.svg rename to core/img/clients/firefox.svg diff --git a/settings/img/clients/ie.svg b/core/img/clients/ie.svg similarity index 100% rename from settings/img/clients/ie.svg rename to core/img/clients/ie.svg diff --git a/settings/img/clients/ipad.svg b/core/img/clients/ipad.svg similarity index 100% rename from settings/img/clients/ipad.svg rename to core/img/clients/ipad.svg diff --git a/settings/img/clients/iphone.svg b/core/img/clients/iphone.svg similarity index 100% rename from settings/img/clients/iphone.svg rename to core/img/clients/iphone.svg diff --git a/settings/img/clients/safari.svg b/core/img/clients/safari.svg similarity index 100% rename from settings/img/clients/safari.svg rename to core/img/clients/safari.svg diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 1025a862b1..c5b7bba811 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -340,7 +340,7 @@ table.nostyle { &.client { @extend %icon; - img { + div { opacity: 0.57; width: inherit; } diff --git a/settings/img/clients/globe.svg b/settings/img/clients/globe.svg deleted file mode 100644 index 99dc6a0750..0000000000 --- a/settings/img/clients/globe.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js index 1e2a6643d5..4229929b4f 100644 --- a/settings/js/authtoken_view.js +++ b/settings/js/authtoken_view.js @@ -28,7 +28,7 @@ var TEMPLATE_TOKEN = '' + '' - + '' + + '
' + '' + '' + '{{name}}' @@ -150,19 +150,19 @@ }; var iconMap = { - ie: 'ie.svg', - edge: 'edge.svg', - firefox: 'firefox.svg', - chrome: 'chrome.svg', - safari: 'apple.svg', - androidChrome: 'chrome.svg', - iphone: 'iphone.svg', - ipad: 'ipad.svg', - iosClient: 'apple.svg', - androidClient: 'android.svg', - davDroid: 'android.svg', - webPirate: 'globe.svg', - sailfishBrowser: 'globe.svg' + ie: 'icon-client-ie', + edge: 'icon-client-edge', + firefox: 'icon-client-firefox', + chrome: 'icon-client-chrome', + safari: 'icon-client-safari', + androidChrome: 'icon-client-chrome', + iphone: 'icon-client-iphone', + ipad: 'icon-client-ipad', + iosClient: 'icon-client-apple', + androidClient: 'icon-client-android', + davDroid: 'icon-client-android', + webPirate: 'icon-link', + sailfishBrowser: 'icon-link' }; if (matches) { @@ -184,7 +184,7 @@ // update title - for easier view viewData.title = viewData.name; - viewData.icon = '/settings/img/clients/' + iconMap[client]; + viewData.icon = iconMap[client]; } } if (viewData.current) {