chore: 🤖 rename account settings to set-password
This commit is contained in:
9 files changed
+26
-19
No files matched your search
@@ -75,14 +75,14 @@ Router.map(function () {
|
||||
this.route('auth-method', { path: ':auth_method_id' }, function() {
|
||||
this.route('accounts', function() {
|
||||
this.route('account', { path: ':account_id' }, function() {
|
||||
this.route('settings');
|
||||
this.route('set-password');
|
||||
});
|
||||
this.route('new');
|
||||
});
|
||||
});
|
||||
this.route('new');
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
+16
-2
@@ -9,6 +9,20 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountSettingsRout
|
||||
@service intl;
|
||||
@service notify;
|
||||
|
||||
// =methods
|
||||
|
||||
/**
|
||||
* Renders the route-set specific page sections
|
||||
* @override
|
||||
*/
|
||||
renderTemplate() {
|
||||
super.renderTemplate(...arguments);
|
||||
this.render('scopes/scope/auth-methods/auth-method/accounts/account/set-password/-header', {
|
||||
into: 'scopes/scope/auth-methods/auth-method',
|
||||
outlet: 'header'
|
||||
});
|
||||
}
|
||||
|
||||
// =actions
|
||||
|
||||
/**
|
||||
@@ -20,7 +34,7 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountSettingsRout
|
||||
async setPassword(account) {
|
||||
try {
|
||||
await account.setPassword();
|
||||
await this.replaceWith('scopes.scope.auth-methods.auth-method.accounts.account.settings');
|
||||
await this.replaceWith('scopes.scope.auth-methods.auth-method.accounts.account.set-password');
|
||||
this.notify.success(
|
||||
this.intl.t('notify.save-success')
|
||||
);
|
||||
@@ -35,6 +49,6 @@ export default class ScopesScopeAuthMethodsAuthMethodAccountsAccountSettingsRout
|
||||
*/
|
||||
@action
|
||||
cancel() {
|
||||
this.replaceWith('scopes.scope.auth-methods.auth-method.accounts.account.settings');
|
||||
this.replaceWith('scopes.scope.auth-methods.auth-method.accounts.account.set-password');
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1 @@
|
||||
<h2>{{t "resources.auth-method"}}</h2>
|
||||
{{!--
|
||||
<Rose::Badge>
|
||||
{{t (concat 'auth.method-types.' @model.type)}}
|
||||
</Rose::Badge>
|
||||
--}}
|
||||
-3
@@ -1,4 +1 @@
|
||||
<h2>{{t "resources.account"}}</h2>
|
||||
<Rose::Badge>
|
||||
{{t (concat 'account.types.' @model.type)}}
|
||||
</Rose::Badge>
|
||||
+2
-2
@@ -2,7 +2,7 @@
|
||||
<nav.link @route='scopes.scope.auth-methods.auth-method.accounts.account.index'>
|
||||
{{t 'titles.details'}}
|
||||
</nav.link>
|
||||
<nav.link @route='scopes.scope.auth-methods.auth-method.accounts.account.settings'>
|
||||
{{t 'titles.settings'}}
|
||||
<nav.link @route='scopes.scope.auth-methods.auth-method.accounts.account.set-password'>
|
||||
{{t 'actions.set-password'}}
|
||||
</nav.link>
|
||||
</Rose::Nav::Tabs>
|
||||
-2
@@ -1,5 +1,3 @@
|
||||
<p>{{t 'descriptions.account-settings-overview'}}</p>
|
||||
|
||||
<Form::Account::Password::SetPassword
|
||||
@model={{@model}}
|
||||
@submit={{route-action "setPassword" @model}}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<h2>{{t "resources.account"}}</h2>
|
||||
<p>{{t 'descriptions.account-set-password-overview'}}</p>
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import { module, test } from 'qunit';
|
||||
import { setupTest } from 'ember-qunit';
|
||||
|
||||
module('Unit | Route | scopes/scope/auth-methods/auth-method/accounts/account/settings', function(hooks) {
|
||||
module('Unit | Route | scopes/scope/auth-methods/auth-method/accounts/account/set-password', function(hooks) {
|
||||
setupTest(hooks);
|
||||
|
||||
test('it exists', function(assert) {
|
||||
let route = this.owner.lookup('route:scopes/scope/auth-methods/auth-method/accounts/account/settings');
|
||||
let route = this.owner.lookup('route:scopes/scope/auth-methods/auth-method/accounts/account/set-password');
|
||||
assert.ok(route);
|
||||
});
|
||||
});
|
||||
@@ -29,6 +29,7 @@ actions:
|
||||
add-members: Add Members
|
||||
add-hosts: Add Hosts
|
||||
add-account: Create Account
|
||||
set-password: Set Password
|
||||
auth:
|
||||
titles:
|
||||
no-scopes: No Scopes Available
|
||||
@@ -132,7 +133,7 @@ descriptions:
|
||||
no-principals-available: Principals are not available for assignment.
|
||||
group-members-welcome: Users belonging to this group appear here.
|
||||
no-available-users: No users are available to add to this group.
|
||||
account-settings-overview: Set the password for current account.
|
||||
account-set-password-overview: Set the password for current account.
|
||||
accounts-welcome: No accounts are available in this auth method.
|
||||
states:
|
||||
info: Info
|
||||
|
||||
Reference in new issue
Block a user