Skip to content

Commit

Permalink
PackageDetail.vue: add download button
Browse files Browse the repository at this point in the history
  • Loading branch information
dmstern committed Nov 5, 2018
1 parent a54b09c commit ae053d9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,9 @@ th {
.subheading &,
.heading &,
.title &,
.subtitle & .link--external & {
font-size: inherit;
transform: none;
.subtitle & .link--external &,
.v-btn:not(.v-btn--icon) & {
font-size: 1.2em;
}
}
Expand Down
3 changes: 2 additions & 1 deletion src/plugins/vuetify.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export const icons = {
tags: 'fas fa-tags',
package: 'mdi-package-variant-closed',
author: 'fas fa-user-circle',
install: 'fas fa-download',
download: 'fas fa-download',
install: 'mdi-package-down',
version: 'fas fa-code-branch',
legal: 'fas fa-balance-scale',
code: 'fas fa-code',
Expand Down
14 changes: 14 additions & 0 deletions src/views/PackageDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@
<PackageDetailItem title="install" :bigContent="false" v-if="data.config && data.config.artifactory" :icon="$vuetify.icons.install" :full="true">
<CodeBlock :code="getInstallCode().config" language="bash"></CodeBlock>
<CodeBlock :code="getInstallCode().install" language="bash"></CodeBlock>
<v-btn
color="success"
class="v-btn--standalone"
:href="data.versionsHistory[data.currentPackage.version].dist.tarball"
>
<v-icon left dark>{{$vuetify.icons.download}}</v-icon>
<span>Direct Download</span>
</v-btn>
</PackageDetailItem>
<PackageDetailItem title="Version" :icon="$vuetify.icons.version">
<span>{{data.currentPackage.version}}</span>
Expand Down Expand Up @@ -674,6 +682,12 @@ export default class PackageDetail extends Vue {
}
}
.v-btn--standalone {
.v-card & {
margin-left: 0;
}
}
.transition {
transition: $transition-smooth;
}
Expand Down

0 comments on commit ae053d9

Please sign in to comment.