diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-02-15 11:27:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-15 11:27:54 +0100 |
commit | 07e91d2d62a3853fb9329123756560ba258cb970 (patch) | |
tree | 297972ae8e2723f077a85e3e971e28948359ff01 | |
parent | cd2e5b549c882473eef74b759b0e3f6af0acb3a8 (diff) | |
parent | 05d8537078ae008c244804ec21cf5eab78b796ac (diff) | |
download | nextcloud-server-07e91d2d62a3853fb9329123756560ba258cb970.tar.gz nextcloud-server-07e91d2d62a3853fb9329123756560ba258cb970.zip |
Merge pull request #7754 from pierlon/master
Add icons to devices/sessions
-rw-r--r-- | core/css/icons.scss | 14 | ||||
-rw-r--r-- | core/img/clients/desktop.svg | 1 | ||||
-rw-r--r-- | core/img/clients/phone.svg | 1 | ||||
-rw-r--r-- | core/img/clients/tablet.svg | 1 | ||||
-rw-r--r-- | settings/css/settings.scss | 16 | ||||
-rw-r--r-- | settings/js/authtoken_view.js | 24 | ||||
-rw-r--r-- | settings/templates/settings/personal/security.php | 1 |
7 files changed, 56 insertions, 2 deletions
diff --git a/core/css/icons.scss b/core/css/icons.scss index fbf36e2fbbc..3c3dff56c1a 100644 --- a/core/css/icons.scss +++ b/core/css/icons.scss @@ -516,6 +516,20 @@ img, object, video, button, textarea, input, select, div[contenteditable=true] { background-image: url('../img/places/picture.svg?v=1'); } +/* CLIENTS ------------------------------------------------------------------- */ + +.icon-desktop { + background-image: url('../img/clients/desktop.svg?v=1'); +} + +.icon-phone { + background-image: url('../img/clients/phone.svg?v=1'); +} + +.icon-tablet { + background-image: url('../img/clients/tablet.svg?v=1'); +} + /* APP CATEGORIES ------------------------------------------------------------------- */ .icon-category-installed { background-image: url('../img/actions/user.svg?v=1'); diff --git a/core/img/clients/desktop.svg b/core/img/clients/desktop.svg new file mode 100644 index 00000000000..df4f5b6884a --- /dev/null +++ b/core/img/clients/desktop.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 4.233 4.233"><path d="M1.597 3.082v.47l-.085.043-.395.202h2l-.403-.206-.079-.04v-.469zM.267.436C.175.436.04.512.04.606v2.307c0 .094.075.17.167.17h3.82a.168.168 0 0 0 .168-.17V.606a.169.169 0 0 0-.167-.17zm-.035.16L3.967.57c.052 0 .09.042.09.095v2.141c0 .053-.04.095-.09.095h-3.7a.092.092 0 0 1-.093-.094V.675A.14.14 0 0 1 .232.597z" stroke="#000" stroke-width=".079" stroke-linejoin="round"/></svg>
\ No newline at end of file diff --git a/core/img/clients/phone.svg b/core/img/clients/phone.svg new file mode 100644 index 00000000000..a45c5c4c729 --- /dev/null +++ b/core/img/clients/phone.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 4.233 4.233"><path d="M1.19 0a.399.399 0 0 0-.396.396v3.441a.4.4 0 0 0 .396.397h1.72a.4.4 0 0 0 .397-.397V.396a.399.399 0 0 0-.396-.397zm.135.398h1.453a.13.13 0 0 1 .134.133v2.974a.13.13 0 0 1-.133.133H1.325a.13.13 0 0 1-.134-.133V.531a.13.13 0 0 1 .134-.133z"/></svg>
\ No newline at end of file diff --git a/core/img/clients/tablet.svg b/core/img/clients/tablet.svg new file mode 100644 index 00000000000..a4d41be3057 --- /dev/null +++ b/core/img/clients/tablet.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 4.233 4.233"><path d="M.971 0A.452.452 0 0 0 .53.455v3.323c0 .249.2.455.442.455h2.29a.452.452 0 0 0 .443-.455V.455c0-.249-.2-.455-.442-.455zm0 .426h2.29c.02 0 .03.008.03.029v3.323c0 .02-.01.03-.03.03H.972c-.02 0-.027-.01-.027-.03V.455c0-.02.008-.029.027-.029z"/></svg>
\ No newline at end of file diff --git a/settings/css/settings.scss b/settings/css/settings.scss index 59f32cc7131..05d62423d17 100644 --- a/settings/css/settings.scss +++ b/settings/css/settings.scss @@ -329,11 +329,23 @@ table.nostyle { } } .token-list td { - &.more { + &%icon { overflow: visible; position: relative; width: 16px; } + &.more { + @extend %icon; + } + &.client { + @extend %icon; + + div { + opacity: 0.57; + width: inherit; + padding-top: 5px; + } + } border-top: 1px solid #DDD; text-overflow: ellipsis; max-width: 200px; @@ -342,7 +354,7 @@ table.nostyle { vertical-align: top; position: relative; } - tr > *:nth-child(2) { + tr > *:nth-child(3) { text-align: right; } .token-list { diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js index a20434be872..b8645e4cc85 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">' + + '<div class="{{icon}}" />' + + '</td>' + '<td class="has-tooltip" title="{{title}}">' + '<span class="token-name">{{name}}</span>' + '</td>' @@ -146,6 +149,22 @@ sailfishBrowser: 'SailfishBrowser' }; + var iconMap = { + ie: 'icon-desktop', + edge: 'icon-desktop', + firefox: 'icon-desktop', + chrome: 'icon-desktop', + safari: 'icon-desktop', + androidChrome: 'icon-phone', + iphone: 'icon-phone', + ipad: 'icon-tablet', + iosClient: 'icon-phone', + androidClient: 'icon-phone', + davDroid: 'icon-phone', + webPirate: 'icon-link', + sailfishBrowser: 'icon-link' + }; + 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 = iconMap[client]; } } if (viewData.current) { diff --git a/settings/templates/settings/personal/security.php b/settings/templates/settings/personal/security.php index 3a324bf8d21..cf52315ff04 100644 --- a/settings/templates/settings/personal/security.php +++ b/settings/templates/settings/personal/security.php @@ -37,6 +37,7 @@ script('settings', [ <table class="icon-loading"> <thead class="token-list-header"> <tr> + <th></th> <th><?php p($l->t('Device'));?></th> <th><?php p($l->t('Last activity'));?></th> <th></th> |