From 2ba5785d684d926a59f59ecb64c663268d46c013 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 20 Jul 2016 15:49:01 +0200 Subject: sort tokens --- settings/js/authtoken_collection.js | 2 +- settings/js/authtoken_view.js | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'settings/js') 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 cef5dc9f7bb..354173341bc 100644 --- a/settings/js/authtoken_view.js +++ b/settings/js/authtoken_view.js @@ -121,7 +121,11 @@ 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) { -- cgit v1.2.3