app passwords/device tokens wording

This commit is contained in:
Christoph Wurst 2016-06-16 10:54:03 +02:00
parent 704a993e37
commit 31f3aaa36b
No known key found for this signature in database
GPG Key ID: FEECD2543CA6EAF0
4 changed files with 36 additions and 36 deletions

View File

@ -101,24 +101,24 @@ table.nostyle label { margin-right: 2em; }
table.nostyle td { padding: 0.2em 0; } table.nostyle td { padding: 0.2em 0; }
#sessions table, #sessions table,
#devices table { #apppasswords table {
width: 100%; width: 100%;
min-height: 150px; min-height: 150px;
padding-top: 25px; padding-top: 25px;
} }
#sessions table th, #sessions table th,
#devices table th { #apppasswords table th {
font-weight: 800; font-weight: 800;
} }
#sessions table th, #sessions table th,
#sessions table td, #sessions table td,
#devices table th, #apppasswords table th,
#devices table td { #apppasswords table td {
padding: 10px; padding: 10px;
} }
#sessions .token-list td, #sessions .token-list td,
#devices .token-list td { #apppasswords .token-list td {
border-top: 1px solid #DDD; border-top: 1px solid #DDD;
text-overflow: ellipsis; text-overflow: ellipsis;
max-width: 200px; max-width: 200px;
@ -126,12 +126,12 @@ table.nostyle td { padding: 0.2em 0; }
overflow: hidden; overflow: hidden;
} }
#sessions .token-list td a.icon-delete, #sessions .token-list td a.icon-delete,
#devices .token-list td a.icon-delete { #apppasswords .token-list td a.icon-delete {
display: block; display: block;
opacity: 0.6; opacity: 0.6;
} }
#device-new-token { #new-app-password {
width: 186px; width: 186px;
font-family: monospace; font-family: monospace;
background-color: lightyellow; background-color: lightyellow;

View File

@ -103,13 +103,13 @@
_tokenName: undefined, _tokenName: undefined,
_addTokenBtn: undefined, _addAppPasswordBtn: undefined,
_result: undefined, _result: undefined,
_newToken: undefined, _newAppPassword: undefined,
_hideTokenBtn: undefined, _hideAppPasswordBtn: undefined,
_addingToken: false, _addingToken: false,
@ -119,7 +119,7 @@
var tokenTypes = [0, 1]; var tokenTypes = [0, 1];
var _this = this; var _this = this;
_.each(tokenTypes, function(type) { _.each(tokenTypes, function(type) {
var el = type === 0 ? '#sessions' : '#devices'; var el = type === 0 ? '#sessions' : '#apppasswords';
_this._views.push(new SubView({ _this._views.push(new SubView({
el: el, el: el,
type: type, type: type,
@ -130,16 +130,16 @@
$el.on('click', 'a.icon-delete', _.bind(_this._onDeleteToken, _this)); $el.on('click', 'a.icon-delete', _.bind(_this._onDeleteToken, _this));
}); });
this._form = $('#device-token-form'); this._form = $('#app-password-form');
this._tokenName = $('#device-token-name'); this._tokenName = $('#app-password-name');
this._addTokenBtn = $('#device-add-token'); this._addAppPasswordBtn = $('#add-app-password');
this._addTokenBtn.click(_.bind(this._addDeviceToken, this)); this._addAppPasswordBtn.click(_.bind(this._addAppPassword, this));
this._result = $('#device-token-result'); this._result = $('#app-password-result');
this._newToken = $('#device-new-token'); this._newAppPassword = $('#new-app-password');
this._newToken.on('focus', _.bind(this._onNewTokenFocus, this)); this._newAppPassword.on('focus', _.bind(this._onNewTokenFocus, this));
this._hideTokenBtn = $('#device-token-hide'); this._hideAppPasswordBtn = $('#app-password-hide');
this._hideTokenBtn.click(_.bind(this._hideToken, this)); this._hideAppPasswordBtn.click(_.bind(this._hideToken, this));
}, },
render: function() { render: function() {
@ -166,7 +166,7 @@
}); });
}, },
_addDeviceToken: function() { _addAppPassword: function() {
var _this = this; var _this = this;
this._toggleAddingToken(true); this._toggleAddingToken(true);
@ -181,9 +181,9 @@
$.when(creatingToken).done(function(resp) { $.when(creatingToken).done(function(resp) {
_this.collection.add(resp.deviceToken); _this.collection.add(resp.deviceToken);
_this.render(); _this.render();
_this._newToken.val(resp.token); _this._newAppPassword.val(resp.token);
_this._toggleFormResult(false); _this._toggleFormResult(false);
_this._newToken.select(); _this._newAppPassword.select();
_this._tokenName.val(''); _this._tokenName.val('');
}); });
$.when(creatingToken).fail(function() { $.when(creatingToken).fail(function() {
@ -195,7 +195,7 @@
}, },
_onNewTokenFocus: function() { _onNewTokenFocus: function() {
this._newToken.select(); this._newAppPassword.select();
}, },
_hideToken: function() { _hideToken: function() {
@ -204,7 +204,7 @@
_toggleAddingToken: function(state) { _toggleAddingToken: function(state) {
this._addingToken = state; this._addingToken = state;
this._addTokenBtn.toggleClass('icon-loading-small', state); this._addAppPasswordBtn.toggleClass('icon-loading-small', state);
}, },
_onDeleteToken: function(event) { _onDeleteToken: function(event) {

View File

@ -177,7 +177,7 @@ $tmpl->assign('groups', $groups2);
$formsAndMore = []; $formsAndMore = [];
$formsAndMore[]= ['anchor' => 'avatar', 'section-name' => $l->t('Personal info')]; $formsAndMore[]= ['anchor' => 'avatar', 'section-name' => $l->t('Personal info')];
$formsAndMore[]= ['anchor' => 'sessions', 'section-name' => $l->t('Sessions')]; $formsAndMore[]= ['anchor' => 'sessions', 'section-name' => $l->t('Sessions')];
$formsAndMore[]= ['anchor' => 'devices', 'section-name' => $l->t('Devices')]; $formsAndMore[]= ['anchor' => 'apppasswords', 'section-name' => $l->t('App passwords')];
$formsAndMore[]= ['anchor' => 'clientsbox', 'section-name' => $l->t('Sync clients')]; $formsAndMore[]= ['anchor' => 'clientsbox', 'section-name' => $l->t('Sync clients')];
$forms=OC_App::getForms('personal'); $forms=OC_App::getForms('personal');

View File

@ -183,9 +183,9 @@ if($_['passwordChangeSupported']) {
</table> </table>
</div> </div>
<div id="devices" class="section"> <div id="apppasswords" class="section">
<h2><?php p($l->t('Devices'));?></h2> <h2><?php p($l->t('App passwords'));?></h2>
<span class="hidden-when-empty"><?php p($l->t("You've linked these devices."));?></span> <span class="hidden-when-empty"><?php p($l->t("You've linked these apps."));?></span>
<table> <table>
<thead class="hidden-when-empty"> <thead class="hidden-when-empty">
<tr> <tr>
@ -197,14 +197,14 @@ if($_['passwordChangeSupported']) {
<tbody class="token-list icon-loading"> <tbody class="token-list icon-loading">
</tbody> </tbody>
</table> </table>
<p><?php p($l->t('A device password is a passcode that gives an app or device permissions to access your ownCloud account.'));?></p> <p><?php p($l->t('An app password is a passcode that gives an app or device permissions to access your ownCloud account.'));?></p>
<div id="device-token-form"> <div id="app-password-form">
<input id="device-token-name" type="text" placeholder="Device name"> <input id="app-password-name" type="text" placeholder="App name">
<button id="device-add-token" class="button">Create new device password</button> <button id="add-app-password" class="button">Create new app password</button>
</div> </div>
<div id="device-token-result" class="hidden"> <div id="app-password-result" class="hidden">
<input id="device-new-token" type="text" readonly="readonly"/> <input id="new-app-password" type="text" readonly="readonly"/>
<button id="device-token-hide" class="button">Done</button> <button id="app-password-hide" class="button">Done</button>
</div> </div>
</div> </div>