diff options
author | Robin Appelman <icewind@owncloud.com> | 2016-08-03 12:03:18 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-11-16 15:24:27 +0100 |
commit | b4e27d35f59e359eb7591a15c7f037968081eb1b (patch) | |
tree | 3c156c70ef7fc3de6f79aace60f715e999e19d29 /settings | |
parent | 2389e0f25065ca9c7afbc70cc13d555524e363a8 (diff) | |
download | nextcloud-server-b4e27d35f59e359eb7591a15c7f037968081eb1b.tar.gz nextcloud-server-b4e27d35f59e359eb7591a15c7f037968081eb1b.zip |
app password scope wip
Signed-off-by: Robin Appelman <icewind@owncloud.com>
Diffstat (limited to 'settings')
-rw-r--r-- | settings/css/settings.css | 10 | ||||
-rw-r--r-- | settings/js/authtoken_view.js | 17 | ||||
-rw-r--r-- | settings/templates/personal.php | 1 |
3 files changed, 21 insertions, 7 deletions
diff --git a/settings/css/settings.css b/settings/css/settings.css index 7d139a632d0..debf69dbae2 100644 --- a/settings/css/settings.css +++ b/settings/css/settings.css @@ -149,6 +149,12 @@ table.nostyle td { padding: 0.2em 0; } padding: 10px 10px 10px 0; } +#sessions .token-list td.icon, +#apppasswords .token-list td.icon { + width: 16px; + padding: 10px; +} + #sessions .token-list td, #apppasswords .token-list td { border-top: 1px solid #DDD; @@ -162,8 +168,8 @@ table.nostyle td { padding: 0.2em 0; } #apppasswords tr *:nth-child(2) { text-align: right; } -#sessions .token-list td a.icon-delete, -#apppasswords .token-list td a.icon-delete { +#sessions .token-list td a.icon, +#apppasswords .token-list td a.icon { display: block; opacity: 0.6; } diff --git a/settings/js/authtoken_view.js b/settings/js/authtoken_view.js index 6eb04b63f20..361b5dcc7a8 100644 --- a/settings/js/authtoken_view.js +++ b/settings/js/authtoken_view.js @@ -29,11 +29,16 @@ '<tr data-id="{{id}}">' + '<td class="has-tooltip" title="{{title}}"><span class="token-name">{{name}}</span></td>' + '<td><span class="last-activity has-tooltip" title="{{lastActivityTime}}">{{lastActivity}}</span></td>' + + '<td class="icon">' + + '{{#if canScope}}' + + '<a class="icon icon-settings has-tooltip" title="' + t('core', 'Configure') + '"></a>' + + '{{/if}}' + + '</td>' + + '<td class="icon">' + '{{#if canDelete}}' - + '<td><a class="icon-delete has-tooltip" title="' + t('core', 'Disconnect') + '"></a></td>' - + '{{else}}' - + '<td></td>' + + '<a class="icon icon-delete has-tooltip" title="' + t('core', 'Disconnect') + '"></a>' + '{{/if}}' + + '</td>' + '<tr>'; var SubView = OC.Backbone.View.extend({ @@ -78,7 +83,7 @@ this._toggleHeader(tokens.length > 0); tokens.forEach(function (token) { - var viewData = this._formatViewData(token.toJSON()); + var viewData = this._formatViewData(token); var html = _this.template(viewData); var $html = $(html); $html.find('.has-tooltip').tooltip({container: 'body'}); @@ -94,10 +99,12 @@ this.$('.hidden-when-empty').toggleClass('hidden', !show); }, - _formatViewData: function (viewData) { + _formatViewData: function (token) { + var viewData = token.toJSON(); var ts = viewData.lastActivity * 1000; viewData.lastActivity = OC.Util.relativeModifiedDate(ts); viewData.lastActivityTime = OC.Util.formatDate(ts, 'LLL'); + viewData.canScope = token.get('type') === '1'; // preserve title for cases where we format it further viewData.title = viewData.name; diff --git a/settings/templates/personal.php b/settings/templates/personal.php index ea1c7ba6459..c66a9d60d14 100644 --- a/settings/templates/personal.php +++ b/settings/templates/personal.php @@ -220,6 +220,7 @@ if($_['passwordChangeSupported']) { <th><?php p($l->t('Name'));?></th> <th><?php p($l->t('Last activity'));?></th> <th></th> + <th></th> </tr> </thead> <tbody class="token-list icon-loading"> |