Skip to content

Commit

Permalink
Merge pull request #56 from uasoft-indonesia/feature/v2/media-base-url
Browse files Browse the repository at this point in the history
Add media base url meta
  • Loading branch information
rizkiheryandi authored Jun 23, 2021
2 parents fd1e283 + 486a7ce commit a3f748e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/resources/js/components/BadasoContentRead.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<template v-if="tr.type === 'image'">
<img
v-if="tr.data"
:src="tr.data"
:src="meta.mediaBaseUrl + tr.data"
:alt="tr.data"
class="image-container"
/>
Expand Down Expand Up @@ -53,6 +53,10 @@ export default {
items: {
type: Object,
required: true
},
meta: {
type: Object,
required: true
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/resources/js/pages/content/read.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<template v-if="tr.type === 'image'">
<img
v-if="tr.data"
:src="$storage.view(tr.data)"
:src="meta.mediaBaseUrl + tr.data"
:alt="tr.data"
class="image-container"
/>
Expand All @@ -64,7 +64,7 @@
</vs-row>
</template>
<template v-if="tr.type === 'group'">
<badaso-content-read :items="tr.data"></badaso-content-read>
<badaso-content-read :items="tr.data" :meta="meta"></badaso-content-read>
</template>
</td>
</tr>
Expand Down Expand Up @@ -99,6 +99,7 @@ export default {
slug: "",
json: {},
},
meta: {}
}),
mounted() {
this.getContent();
Expand All @@ -111,6 +112,7 @@ export default {
id: this.$route.params.id,
})
.then((response) => {
this.meta = response.meta
this.$closeLoader();
this.selected = [];
this.content.label = response.data.content.label;
Expand Down

0 comments on commit a3f748e

Please sign in to comment.