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