summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2018-02-15 11:27:54 +0100
committerGitHub <noreply@github.com>2018-02-15 11:27:54 +0100
commit07e91d2d62a3853fb9329123756560ba258cb970 (patch)
tree297972ae8e2723f077a85e3e971e28948359ff01 /settings
parentcd2e5b549c882473eef74b759b0e3f6af0acb3a8 (diff)
parent05d8537078ae008c244804ec21cf5eab78b796ac (diff)
downloadnextcloud-server-07e91d2d62a3853fb9329123756560ba258cb970.tar.gz
nextcloud-server-07e91d2d62a3853fb9329123756560ba258cb970.zip
Merge pull request #7754 from pierlon/master
Add icons to devices/sessions
Diffstat (limited to 'settings')
-rw-r--r--settings/css/settings.scss16
-rw-r--r--settings/js/authtoken_view.js24
-rw-r--r--settings/templates/settings/personal/security.php1
3 files changed, 39 insertions, 2 deletions
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>