Skip to content

Commit 321a4bb

Browse files
committed
Adjusts yank button positioning and sizing
1 parent c42c5a8 commit 321a4bb

File tree

7 files changed

+21
-11
lines changed

7 files changed

+21
-11
lines changed

app/components/yank-button.hbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<button
33
type="button"
44
local-class="button"
5+
...attributes
56
disabled={{@version.unyankTask.isRunning}}
67
{{on "click" (perform @version.unyankTask)}}
78
>
@@ -15,6 +16,7 @@
1516
<button
1617
type="button"
1718
local-class="button"
19+
...attributes
1820
disabled={{@version.yankTask.isRunning}}
1921
{{on "click" (perform @version.yankTask)}}
2022
>

app/components/yank-button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Component from '@ember/component';
22

33
export default Component.extend({
4-
tagName: '',
4+
tagName: '',
55
});

app/components/yank-button.module.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.button {
2-
composes: yellow-button small from '../styles/shared/buttons.module.css';
3-
}
2+
composes: yellow-button from '../styles/shared/buttons.module.css';
3+
padding: 6px 12px;
4+
border-radius: 18px;
5+
}

app/styles/crate/version.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,7 @@ div.header {
273273
.yanked {
274274
composes: yanked from '../shared/typography.module.css';
275275
}
276+
277+
.version {
278+
padding: 4px 0;
279+
}

app/styles/crate/versions.module.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
.arrow {
3838
display: inline-block;
3939
float: right;
40+
margin-left: 8px;
4041

4142
svg {
4243
background: #EEECDD;

app/templates/crate/version.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
<h3>Versions</h3>
164164
<ul>
165165
{{#each this.smallSortedVersions as |version|}}
166-
<li>
166+
<li local-class="version">
167167
<LinkTo @route="crate.version" @model={{version.num}} data-test-version-link={{version.num}}>
168168
{{ version.num }}
169169
</LinkTo>

app/templates/crate/versions.hbs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,18 @@
1313
<LinkTo @route="crate.version" @model={{version.num}}>{{ version.num }}</LinkTo>
1414

1515
<span local-class="date">{{moment-format version.created_at 'LL'}}</span>
16+
{{#if version.yanked}}
17+
<span local-class='yanked'>yanked</span>
18+
{{/if}}
19+
</div>
20+
<div>
1621
{{#if this.isOwner}}
1722
<YankButton @version={{version}} />
18-
{{else}}
19-
{{#if version.yanked}}
20-
<span local-class='yanked'>yanked</span>
21-
{{/if}}
2223
{{/if}}
24+
<LinkTo @route="crate.version" @model={{version.num}} local-class="arrow">
25+
{{svg-jar "right-arrow"}}
26+
</LinkTo>
2327
</div>
24-
<LinkTo @route="crate.version" @model={{version.num}} local-class="arrow">
25-
{{svg-jar "right-arrow"}}
26-
</LinkTo>
2728
</div>
2829
{{/each}}
2930
</div>

0 commit comments

Comments
 (0)