Skip to content

Commit 2849e70

Browse files
committed
CrateSidebar: Remove "Manage Owners" link
This is now much more prominently displayed as a dedicated tab
1 parent e47aee6 commit 2849e70

File tree

3 files changed

+3
-19
lines changed

3 files changed

+3
-19
lines changed

app/components/crate-sidebar.hbs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,6 @@
7979
<div>
8080
<h3>Owners</h3>
8181

82-
{{#if this.isOwner}}
83-
<p>
84-
<LinkTo @route="crate.owners" @model={{@crate}} data-test-manage-owners-link>
85-
Manage owners
86-
</LinkTo>
87-
</p>
88-
{{/if}}
89-
9082
<ul local-class='owners' data-test-owners>
9183
{{#each @crate.owner_team as |team|}}
9284
<li>

app/components/crate-sidebar.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
import { computed } from '@ember/object';
22
import { gt, readOnly } from '@ember/object/computed';
3-
import { inject as service } from '@ember/service';
43
import Component from '@glimmer/component';
54

65
const NUM_VERSIONS = 5;
76

87
export default class DownloadGraph extends Component {
9-
@service session;
10-
11-
@computed('args.crate.owner_user', 'session.currentUser.id')
12-
get isOwner() {
13-
return this.args.crate.owner_user.findBy('id', this.session.currentUser?.id);
14-
}
15-
168
@readOnly('args.crate.versions') sortedVersions;
179

1810
@computed('sortedVersions')

tests/acceptance/crate-test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ module('Acceptance | crate page', function (hooks) {
211211

212212
await visit('/crates/nanomsg');
213213

214-
assert.dom('[data-test-manage-owners-link]').doesNotExist();
214+
assert.dom('[data-test-settings-tab]').doesNotExist();
215215
});
216216

217217
test('navigating to the owners page when not an owner', async function (assert) {
@@ -222,7 +222,7 @@ module('Acceptance | crate page', function (hooks) {
222222

223223
await visit('/crates/nanomsg');
224224

225-
assert.dom('[data-test-manage-owners-link]').doesNotExist();
225+
assert.dom('[data-test-settings-tab]').doesNotExist();
226226
});
227227

228228
test('navigating to the owners page', async function (assert) {
@@ -232,7 +232,7 @@ module('Acceptance | crate page', function (hooks) {
232232
this.authenticateAs(user);
233233

234234
await visit('/crates/nanomsg');
235-
await click('[data-test-manage-owners-link]');
235+
await click('[data-test-settings-tab] a');
236236

237237
assert.equal(currentURL(), '/crates/nanomsg/owners');
238238
});

0 commit comments

Comments
 (0)