Skip to content

Commit 69b9b7e

Browse files
committed
1 parent ecba6b2 commit 69b9b7e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+380
-369
lines changed

app/templates/application.hbs

+30-20
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,21 @@
1616
</LinkTo>
1717

1818
<form class='search' action='/search' {{ action "search" on="submit" }} data-test-search-form>
19-
<input type="text" class="search" name="q" id="cargo-desktop-search"
20-
placeholder="Click or press 'S' to search..."
21-
value={{searchQuery}}
22-
oninput={{action (mut searchQuery) value="target.value"}}
23-
autocorrect="off"
24-
autocapitalize="off"
25-
autofocus="autofocus"
26-
spellcheck="false"
27-
required
28-
data-test-search-input>
19+
<input
20+
type="text"
21+
class="search"
22+
name="q"
23+
id="cargo-desktop-search"
24+
placeholder="Click or press 'S' to search..."
25+
value={{this.searchQuery}}
26+
oninput={{action (mut this.searchQuery) value="target.value"}}
27+
autocorrect="off"
28+
autocapitalize="off"
29+
autofocus="autofocus"
30+
spellcheck="false"
31+
required
32+
data-test-search-input
33+
>
2934
<label for="cargo-desktop-search">Search</label>
3035
</form>
3136

@@ -58,11 +63,11 @@
5863
</RlDropdown>
5964
</RlDropdownContainer>
6065
<span class="sep">|</span>
61-
{{#if session.currentUser}}
66+
{{#if this.session.currentUser}}
6267
<RlDropdownContainer class="dropdown-container">
6368
<RlDropdownToggle class="dropdown">
64-
<UserAvatar @user={{session.currentUser}} @size="small" />
65-
{{ session.currentUser.name }}
69+
<UserAvatar @user={{this.session.currentUser}} @size="small" />
70+
{{ this.session.currentUser.name }}
6671
<span class='arrow'></span>
6772
</RlDropdownToggle>
6873

@@ -89,7 +94,7 @@
8994
</RlDropdownToggle>
9095
<RlDropdown @tagName="ul" class="dropdown current-user-links">
9196
<li><LinkTo @route="crates">Browse All Crates</LinkTo></li>
92-
{{#if session.currentUser}}
97+
{{#if this.session.currentUser}}
9398
<li><LinkTo @route="dashboard">Dashboard</LinkTo></li>
9499
<li><LinkTo @route="me">Account Settings</LinkTo></li>
95100
<li><LinkTo @route="me.pending-invites">Owner Invites</LinkTo></li>
@@ -106,12 +111,17 @@
106111
</nav>
107112

108113
<form id='mobile-search' class='search' action='/search' {{ action "search" on="submit" }} >
109-
<input type="text" class="search" name="q" id="cargo-mobile-search"
110-
placeholder="Search"
111-
value={{searchQuery}}
112-
oninput={{action (mut searchQuery) value="target.value"}}
113-
autocorrect="off"
114-
required>
114+
<input
115+
type="text"
116+
class="search"
117+
name="q"
118+
id="cargo-mobile-search"
119+
placeholder="Search"
120+
value={{this.searchQuery}}
121+
oninput={{action (mut this.searchQuery) value="target.value"}}
122+
autocorrect="off"
123+
required
124+
>
115125
<label for="cargo-mobile-search">Search</label>
116126
</form>
117127

app/templates/catch-all.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@type="text"
88
class="search"
99
placeholder="Search"
10-
@value={{search}}
10+
@value={{this.search}}
1111
@enter={{action "search"}}
1212
required={{true}}
1313
/>

app/templates/categories.hbs

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
<div class='nav' data-test-categories-nav>
1010
<span class='amt small'>
1111
Displaying
12-
<span class='cur'>{{ currentPageStart }}-{{ currentPageEnd }}</span>
13-
of <span class='total'>{{ totalItems }}</span> total results
12+
<span class='cur'>{{ this.currentPageStart }}-{{ this.currentPageEnd }}</span>
13+
of <span class='total'>{{ this.totalItems }}</span> total results
1414
</span>
1515
</div>
1616

@@ -19,7 +19,7 @@
1919
<RlDropdownContainer class="dropdown-container">
2020
<RlDropdownToggle @tagName="a" class="dropdown" data-test-current-order>
2121
{{svg-jar "sort"}}
22-
{{ currentSortBy }}
22+
{{ this.currentSortBy }}
2323
<span class='arrow'></span>
2424
</RlDropdownToggle>
2525

@@ -40,7 +40,7 @@
4040
</div>
4141

4242
<div class='white-rows'>
43-
{{#each model as |category|}}
43+
{{#each this.model as |category|}}
4444
<div class='row' data-test-category={{category.slug}}>
4545
<div class='desc'>
4646
<div class='info'>
@@ -60,13 +60,13 @@
6060
</div>
6161

6262
<div class='pagination'>
63-
<LinkTo @query={{hash page=prevPage}} class="prev" @rel="prev" @title="previous page">
63+
<LinkTo @query={{hash page=this.prevPage}} class="prev" @rel="prev" @title="previous page">
6464
{{svg-jar "left-pag"}}
6565
</LinkTo>
66-
{{#each pages as |page|}}
66+
{{#each this.pages as |page|}}
6767
<LinkTo @query={{hash page=page}}>{{ page }}</LinkTo>
6868
{{/each}}
69-
<LinkTo @query={{hash page=nextPage}} class="next" @rel="next" @title="next page">
69+
<LinkTo @query={{hash page=this.nextPage}} class="next" @rel="next" @title="next page">
7070
{{svg-jar "right-pag"}}
7171
</LinkTo>
7272
</div>

app/templates/category-slugs.hbs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<div class='white-rows'>
1010
<dl>
11-
{{#each model as |category|}}
11+
{{#each this.model as |category|}}
1212
<dt data-test-category-slug={{category.slug}}>{{category.slug}}</dt>
1313
<dd data-test-category-description={{category.slug}}>{{category.description}}</dd>
1414
{{/each}}

app/templates/category/index.hbs

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
{{ title category.category ' - Categories' }}
1+
{{ title this.category.category ' - Categories' }}
22

33
<div id='crates-heading'>
44
<LinkTo @route="categories" aria-label="Categories">{{svg-jar "crate"}}</LinkTo>
55
<h1>
6-
{{#each category.parent_categories as |parent|}}<LinkTo @route="category" @model={{parent.slug}}>{{parent.category}}</LinkTo>::{{/each}}
7-
{{~ category.category }}
6+
{{#each this.category.parent_categories as |parent|}}<LinkTo @route="category" @model={{parent.slug}}>{{parent.category}}</LinkTo>::{{/each}}
7+
{{~ this.category.category }}
88
</h1>
99
</div>
1010

1111
<div>
12-
<p>{{ category.description }}</p>
12+
<p>{{ this.category.description }}</p>
1313
</div>
1414

15-
{{#if category.subcategories }}
15+
{{#if this.category.subcategories }}
1616
<div id='subcategories'>
1717
<h2>Subcategories</h2>
1818
<div class='white-rows'>
19-
{{#each category.subcategories as |subcategory| }}
19+
{{#each this.category.subcategories as |subcategory| }}
2020
<div class='row'>
2121
<div class='desc'>
2222
<div class='info'>
@@ -42,8 +42,8 @@
4242
<div class='nav' data-test-category-nav>
4343
<span class='amt small'>
4444
Displaying
45-
<span class='cur'>{{ currentPageStart }}-{{ currentPageEnd }}</span>
46-
of <span class='total'>{{ totalItems }}</span> total results
45+
<span class='cur'>{{ this.currentPageStart }}-{{ this.currentPageEnd }}</span>
46+
of <span class='total'>{{ this.totalItems }}</span> total results
4747
</span>
4848
</div>
4949

@@ -52,7 +52,7 @@
5252
<RlDropdownContainer class="dropdown-container">
5353
<RlDropdownToggle @tagName="a" class="dropdown" data-test-current-order>
5454
{{svg-jar "sort"}}
55-
{{ currentSortBy }}
55+
{{ this.currentSortBy }}
5656
<span class='arrow'></span>
5757
</RlDropdownToggle>
5858

@@ -83,19 +83,19 @@
8383
</div>
8484

8585
<div id='crates' class='white-rows'>
86-
{{#each model as |crate|}}
86+
{{#each this.model as |crate|}}
8787
<CrateRow @crate={{crate}} />
8888
{{/each}}
8989
</div>
9090

9191
<div class='pagination'>
92-
<LinkTo @query={{hash page=prevPage}} class="prev" @rel="prev" @title="previous page">
92+
<LinkTo @query={{hash page=this.prevPage}} class="prev" @rel="prev" @title="previous page">
9393
{{svg-jar "left-pag"}}
9494
</LinkTo>
95-
{{#each pages as |page|}}
95+
{{#each this.pages as |page|}}
9696
<LinkTo @query={{hash page=page}}>{{ page }}</LinkTo>
9797
{{/each}}
98-
<LinkTo @query={{hash page=nextPage}} class="next" @rel="next" @title="next page">
98+
<LinkTo @query={{hash page=this.nextPage}} class="next" @rel="next" @title="next page">
9999
{{svg-jar "right-pag"}}
100100
</LinkTo>
101101
</div>
+22-21
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
1-
<div class={{if api_token.isNew "row create-token" "row"}}>
1+
<div class={{if this.api_token.isNew "row create-token" "row"}}>
22
<div class='name'>
3-
{{#if api_token.isNew}}
3+
{{#if this.api_token.isNew}}
44
<Input
5-
@type="text" placeholder="New token name"
6-
@disabled={{api_token.isSaving}}
7-
@value={{api_token.name}}
5+
@type="text"
6+
placeholder="New token name"
7+
@disabled={{this.api_token.isSaving}}
8+
@value={{this.api_token.name}}
89
@autofocus="autofocus"
910
@enter="saveToken"
1011
data-test-focused-input
1112
/>
1213
{{else}}
13-
{{ api_token.name }}
14+
{{ this.api_token.name }}
1415
{{/if}}
1516
</div>
1617

1718
<div class='spacer'></div>
1819

19-
{{#unless api_token.isNew}}
20+
{{#unless this.api_token.isNew}}
2021
<div class='dates'>
2122
<div class='created-at'>
22-
<span class='small' title={{api_token.created_at}}>
23-
Created {{moment-from-now api_token.created_at}}
23+
<span class='small' title={{this.api_token.created_at}}>
24+
Created {{moment-from-now this.api_token.created_at}}
2425
</span>
2526
</div>
26-
{{#if api_token.last_used_at}}
27+
{{#if this.api_token.last_used_at}}
2728
<div class='last_used_at'>
28-
<span class='small' title={{api_token.last_used_at}}>
29-
Last used {{moment-from-now api_token.last_used_at}}
29+
<span class='small' title={{this.api_token.last_used_at}}>
30+
Last used {{moment-from-now this.api_token.last_used_at}}
3031
</span>
3132
</div>
3233
{{else}}
@@ -38,12 +39,12 @@
3839
{{/unless}}
3940

4041
<div class='actions'>
41-
{{#if api_token.isNew}}
42+
{{#if this.api_token.isNew}}
4243
<button
4344
type="button"
4445
class='small yellow-button'
45-
disabled={{disableCreate}}
46-
title={{if emptyName "You must specify a name" ""}}
46+
disabled={{this.disableCreate}}
47+
title={{if this.emptyName "You must specify a name" ""}}
4748
{{action "saveToken"}}
4849
>
4950
Create
@@ -52,34 +53,34 @@
5253
<button
5354
type="button"
5455
class='small tan-button'
55-
disabled={{api_token.isSaving}}
56+
disabled={{this.api_token.isSaving}}
5657
{{action "revokeToken"}}
5758
>
5859
Revoke
5960
</button>
6061
{{/if}}
61-
{{#if api_token.isSaving}}
62+
{{#if this.api_token.isSaving}}
6263
<img class='overlay' src="/assets/ajax-loader.gif">
6364
{{/if}}
6465
</div>
6566
</div>
6667

67-
{{#if serverError}}
68+
{{#if this.serverError}}
6869
<div class='row error'>
6970
<div>
70-
{{ serverError }}
71+
{{ this.serverError }}
7172
</div>
7273
</div>
7374
{{/if}}
7475

75-
{{#if api_token.token}}
76+
{{#if this.api_token.token}}
7677
<div class='row new-token'>
7778
<div>
7879
Please record this token somewhere, you cannot retrieve
7980
its value again. For use on the command line you can save it to <code>~/.cargo/credentials</code>
8081
with:
8182

82-
<pre>cargo login {{ api_token.token }}</pre>
83+
<pre>cargo login {{ this.api_token.token }}</pre>
8384
</div>
8485
</div>
8586
{{/if}}
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<a href="https://ci.appveyor.com/project/{{ projectName }}">
1+
<a href="https://ci.appveyor.com/project/{{ this.projectName }}">
22
<img
3-
src="{{ imageUrl }}"
4-
alt="{{ text }}"
3+
src="{{ this.imageUrl }}"
4+
alt="{{ this.text }}"
55
width="106"
66
height="20"
7-
title="{{ text }}">
7+
title="{{ this.text }}">
88
</a>
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<a href="https://dev.azure.com/{{ project }}/_build/latest?definitionId={{ build }}">
2-
<img src="https://dev.azure.com/{{ project }}/_apis/build/status/{{ pipeline }}" alt="{{ text }}" title="{{ text }}">
1+
<a href="https://dev.azure.com/{{ this.project }}/_build/latest?definitionId={{ this.build }}">
2+
<img src="https://dev.azure.com/{{ this.project }}/_apis/build/status/{{ this.pipeline }}" alt="{{ this.text }}" title="{{ this.text }}">
33
</a>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<a href="https://bitbucket.org/{{ repository }}/addon/pipelines/home#!/results/branch/{{ branch }}/page/1">
1+
<a href="https://bitbucket.org/{{ this.repository }}/addon/pipelines/home#!/results/branch/{{ this.branch }}/page/1">
22
<img
3-
src="https://img.shields.io/bitbucket/pipelines/{{ repository }}/{{ branch }}"
4-
alt="{{ text }}"
5-
title="{{ text }}">
3+
src="https://img.shields.io/bitbucket/pipelines/{{ this.repository }}/{{ this.branch }}"
4+
alt="{{ this.text }}"
5+
title="{{ this.text }}">
66
</a>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<a href="https://circleci.com/gh/{{ repository }}">
1+
<a href="https://circleci.com/gh/{{ this.repository }}">
22
<img
3-
src="https://circleci.com/gh/{{ repository }}/tree/{{ branch }}.svg?style=shield"
4-
alt="{{ text }}"
5-
title="{{ text }}">
3+
src="https://circleci.com/gh/{{ this.repository }}/tree/{{ this.branch }}.svg?style=shield"
4+
alt="{{ this.text }}"
5+
title="{{ this.text }}">
66
</a>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<a href="https://cirrus-ci.com/github/{{ repository }}">
1+
<a href="https://cirrus-ci.com/github/{{ this.repository }}">
22
<img
3-
src="https://api.cirrus-ci.com/github/{{ repository }}.svg?branch={{ branch }}"
4-
alt="{{ text }}"
5-
title="{{ text }}">
3+
src="https://api.cirrus-ci.com/github/{{ this.repository }}.svg?branch={{ this.branch }}"
4+
alt="{{ this.text }}"
5+
title="{{ this.text }}">
66
</a>
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<a href="https://codecov.io/{{ service }}/{{ repository }}?branch={{ branch }}">
1+
<a href="https://codecov.io/{{ this.service }}/{{ this.repository }}?branch={{ this.branch }}">
22
<img
3-
src="https://codecov.io/{{ service }}/{{ repository }}/coverage.svg?branch={{ branch }}"
4-
alt="{{ text }}"
5-
title="{{ text }}">
3+
src="https://codecov.io/{{ this.service }}/{{ this.repository }}/coverage.svg?branch={{ this.branch }}"
4+
alt="{{ this.text }}"
5+
title="{{ this.text }}">
66
</a>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<a href="https://coveralls.io/{{ service }}/{{ repository }}?branch={{ branch }}">
1+
<a href="https://coveralls.io/{{ this.service }}/{{ this.repository }}?branch={{ this.branch }}">
22
<img
3-
src="https://coveralls.io/repos/{{ service }}/{{ repository }}/badge.svg?branch={{ branch }}"
4-
alt="{{ text }}"
5-
title="{{ text }}">
3+
src="https://coveralls.io/repos/{{ this.service }}/{{ this.repository }}/badge.svg?branch={{ this.branch }}"
4+
alt="{{ this.text }}"
5+
title="{{ this.text }}">
66
</a>

0 commit comments

Comments
 (0)