diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-20 20:57:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-20 20:57:06 +0200 |
commit | 9a7b27b238efd18273f60d32e2630defbbadfdff (patch) | |
tree | 40fd538682c357421ecb74e08dfdb41d922c42b3 | |
parent | e08278494d0ccc785065dfb6666e2e67e4cda705 (diff) | |
parent | 2ba5785d684d926a59f59ecb64c663268d46c013 (diff) | |
download | nextcloud-server-9a7b27b238efd18273f60d32e2630defbbadfdff.tar.gz nextcloud-server-9a7b27b238efd18273f60d32e2630defbbadfdff.zip |
Merge pull request #461 from nextcloud/session-styling
Minor sessions/app password improvements
-rw-r--r-- | settings/css/settings.css | 7 | ||||
-rw-r--r-- | settings/js/authtoken_collection.js | 2 | ||||
-rw-r--r-- | settings/js/authtoken_view.js | 12 | ||||
-rw-r--r-- | settings/templates/personal.php | 4 |
4 files changed, 18 insertions, 7 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css index a190cd91b00..4cd85598443 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -102,7 +102,7 @@ table.nostyle td { padding: 0.2em 0; } #sessions table, #apppasswords table { width: 100%; - min-height: 150px; + min-height: 50px; padding-top: 5px; max-width: 580px; } @@ -125,6 +125,11 @@ table.nostyle td { padding: 0.2em 0; } white-space: nowrap; overflow: hidden; } + +#sessions tr *:nth-child(2), +#apppasswords tr *:nth-child(2) { + text-align: right; +} #sessions .token-list td a.icon-delete, #apppasswords .token-list td a.icon-delete { display: block; diff --git a/settings/js/authtoken_collection.js b/settings/js/authtoken_collection.js index ab7f7d5804a..d1ffc25a599 100644 --- a/settings/js/authtoken_collection.js +++ b/settings/js/authtoken_collection.js @@ -39,7 +39,7 @@ comparator: function (t1, t2) { var ts1 = parseInt(t1.get('lastActivity'), 10); var ts2 = parseInt(t2.get('lastActivity'), 10); - return ts1 < ts2; + return ts2 - ts1; }, tokenType: null, diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js index 2ebedb4131c..354173341bc 100644 --- a/settings/js/authtoken_view.js +++ b/settings/js/authtoken_view.js @@ -114,14 +114,18 @@ // Chrome User Agent from https://developer.chrome.com/multidevice/user-agent chrome: /^Mozilla\/5\.0 \([^)]*(Windows|OS X|Linux)[^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Chrome\/(\d+)[0-9.]+ (?:Mobile Safari|Safari)\/[0-9.]+$/, // Safari User Agent from http://www.useragentstring.com/pages/Safari/ - safari: /^Mozilla\/5\.0 \([^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\) Version\/([0-9]+)[0-9.]+ Safari\/[0-9.A-Z]+$/, + safari: /^Mozilla\/5\.0 \([^)]*(Windows|OS X)[^)]+\) AppleWebKit\/[0-9.]+ \(KHTML, like Gecko\)(?: Version\/([0-9]+)[0-9.]+)? Safari\/[0-9.A-Z]+$/, // Android Chrome user agent: https://developers.google.com/chrome/mobile/docs/user-agent androidChrome: /Android.*(?:; (.*) Build\/).*Chrome\/(\d+)[0-9.]+/, iphone: / *CPU +iPhone +OS +(\d+)_\d+ +like +Mac +OS +X */, iosClient: /^Mozilla\/5\.0 \(iOS\) ownCloud\-iOS.*$/, androidClient:/^Mozilla\/5\.0 \(Android\) ownCloud\-android.*$/, // DAVdroid/1.2 (2016/07/03; dav4android; okhttp3) Android/6.0.1 - davDroid: /DAVdroid\/([0-9.]+)/ + davDroid: /DAVdroid\/([0-9.]+)/, + // Mozilla/5.0 (U; Linux; Maemo; Jolla; Sailfish; like Android 4.3) AppleWebKit/538.1 (KHTML, like Gecko) WebPirate/2.0 like Mobile Safari/538.1 (compatible) + webPirate: /(Sailfish).*WebPirate\/(\d+)/, + // Mozilla/5.0 (Maemo; Linux; U; Jolla; Sailfish; Mobile; rv:31.0) Gecko/31.0 Firefox/31.0 SailfishBrowser/1.0 + sailfishBrowser: /(Sailfish).*SailfishBrowser\/(\d+)/ }; var nameMap = { ie: t('setting', 'Internet Explorer'), @@ -133,7 +137,9 @@ iphone: t('setting', 'iPhone'), iosClient: t('setting', 'iOS Client'), androidClient: t('setting', 'Android Client'), - davDroid: 'DAVdroid' + davDroid: 'DAVdroid', + webPirate: 'WebPirate', + sailfishBrowser: 'SailfishBrowser' }; if (matches) { diff --git a/settings/templates/personal.php b/settings/templates/personal.php index e3164eb5b98..4f580e41287 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -172,7 +172,7 @@ if($_['passwordChangeSupported']) { <thead class="token-list-header"> <tr> <th><?php p($l->t('Device'));?></th> - <th><?php p($l->t('Recent activity'));?></th> + <th><?php p($l->t('Last activity'));?></th> <th></th> </tr> </thead> @@ -188,7 +188,7 @@ if($_['passwordChangeSupported']) { <thead class="hidden-when-empty"> <tr> <th><?php p($l->t('Name'));?></th> - <th><?php p($l->t('Recent activity'));?></th> + <th><?php p($l->t('Last activity'));?></th> <th></th> </tr> </thead> |