Skip to content

Commit 1513a7c

Browse files
reeseJoshua Nelson
authored and
Joshua Nelson
committed
Only show clipboard on crate/** endpoints.
1 parent d6ddbfe commit 1513a7c

File tree

4 files changed

+4
-1
lines changed

4 files changed

+4
-1
lines changed

src/web/builds.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ pub fn build_list_handler(req: &mut Request) -> IronResult<Response> {
140140
Page::new(builds_page)
141141
.set_true("show_package_navigation")
142142
.set_true("package_navigation_builds_tab")
143+
.set_true("show_clipboard")
143144
.to_resp("builds")
144145
}
145146
}

src/web/crate_details.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ pub fn crate_details_handler(req: &mut Request) -> IronResult<Response> {
290290
.set_true("show_package_navigation")
291291
.set_true("javascript_highlightjs")
292292
.set_true("package_navigation_crate_tab")
293+
.set_true("show_clipboard")
293294
.to_resp("crate_details")
294295
}
295296
MatchVersion::Semver((version, _)) => {

src/web/source.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ pub fn source_browser_handler(req: &mut Request) -> IronResult<Response> {
245245
let page = Page::new(list)
246246
.set_bool("show_parent_link", !req_path.is_empty())
247247
.set_true("javascript_highlightjs")
248+
.set_true("show_clipboard")
248249
.set_true("show_package_navigation")
249250
.set_true("package_source_tab");
250251

templates/navigation.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<div class="cratesfyi-package-container">
3636
<div class="container">
3737
<h1 id="crate-title">{{#if title}}{{title}}{{else}}{{content.metadata.name}} {{content.metadata.version}}{{/if}}</h1>
38-
<i class="fa fa-clipboard fa-1" id="clipboard" aria-label="Copy crate name and version information"></i>
38+
{{#if varsb.show_clipboard}}<i class="fa fa-clipboard fa-1" id="clipboard" aria-label="Copy crate name and version information"></i>{{/if}}
3939
<div class="description">{{#if content.metadata.description }}{{content.metadata.description}}{{else}}{{varss.description}}{{/if}}</div>
4040

4141
{{#if ../varsb.show_package_navigation}}

0 commit comments

Comments
 (0)