Skip to content
Snippets Groups Projects
Commit ac0165a1 authored by thomas.blanc.2@etu.univ-amu.fr's avatar thomas.blanc.2@etu.univ-amu.fr
Browse files

Small fixs

parent 7a07fd31
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,6 @@
<a class="box" v-on:click="onClick">
<article class="media">
<figure></figure>
</article>
<div class="media-content">
<div class="content">
<p>
......@@ -17,6 +16,10 @@
</b-taglist>
</div>
</div>
<div class="media-right">
<h2 class="title is-4">{{model.votes}} votes</h2>
</div>
</article>
</a>
</template>
......
......@@ -48,7 +48,7 @@ export default {
},
data () {
return {
account: ''
account: {}
}
},
async mounted () {
......
......@@ -27,9 +27,16 @@
<small>Last modification: </small><strong>{{new Date(model.modificationDate).toLocaleDateString()}}</strong>
<br>
<br>
<b-button type="is-primary" size="is-medium" icon-left="download" @click="downloadModel(model.id)">
<b-button type="is-primary" size="is-medium" icon-left="download">
Download model
</b-button>
<a
class="button is-primary is-medium"
icon-left="download"
:href="downloadUrl"
download>
Download model
</a>
<hr>
<strong>{{model.customLayers.length}} customs layers</strong>
<br>
......@@ -72,7 +79,8 @@ export default {
model: '',
isError: false,
isLoading: true,
isAuthor: false
isAuthor: false,
downloadUrl: null
}
},
computed: {
......@@ -91,6 +99,8 @@ export default {
const userRole = await localStorage.getItem('user_role')
if (userRole === 'ROLE_ADMIN') this.isAuthor = true
this.downloadUrl = this.$serverurl + 'models/download?id=' + this.model.id
},
methods: {
async getModel (id) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment