diff options
author | Pierre Gordon <pierregordon@protonmail.com> | 2018-01-09 05:14:27 -0500 |
---|---|---|
committer | Pierre Gordon <pierregordon@protonmail.com> | 2018-01-19 20:35:50 -0500 |
commit | 7109604c012768a7bd8f547db0f466d6fda69ca2 (patch) | |
tree | 3df370b7da14c6bee0846e2f1629bed38411e3d5 /settings/js | |
parent | 9386b07ed8c469189779949debb4483e713e3836 (diff) | |
download | nextcloud-server-7109604c012768a7bd8f547db0f466d6fda69ca2.tar.gz nextcloud-server-7109604c012768a7bd8f547db0f466d6fda69ca2.zip |
Add icons to devices/sessions
Signed off by: Pierre Gordon <pierregordon@protonmail.com>
Diffstat (limited to 'settings/js')
-rw-r--r-- | settings/js/authtoken_view.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js index a20434be872..1e2a6643d59 100644 --- a/settings/js/authtoken_view.js +++ b/settings/js/authtoken_view.js @@ -27,6 +27,9 @@ var TEMPLATE_TOKEN = '<tr data-id="{{id}}">' + + '<td class="client">' + + '<img src="{{icon}}" />' + + '</td>' + '<td class="has-tooltip" title="{{title}}">' + '<span class="token-name">{{name}}</span>' + '</td>' @@ -146,6 +149,22 @@ sailfishBrowser: 'SailfishBrowser' }; + 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' + }; + if (matches) { viewData.name = t('settings', 'Sync client - {os}', { os: matches[1], @@ -161,6 +180,11 @@ } else { viewData.name = nameMap[client]; } + + // update title - for easier view + viewData.title = viewData.name; + + viewData.icon = '/settings/img/clients/' + iconMap[client]; } } if (viewData.current) { |