Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
RikuHirose committed Oct 27, 2019
1 parent 2dbd363 commit 48a2b75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 52 deletions.
58 changes: 9 additions & 49 deletions public/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3245,6 +3245,13 @@ __webpack_require__.r(__webpack_exports__);
return totalScore += score.score;
});
return totalScore;
},
getImage: function getImage(room_files) {
if (room_files[0]) {
return room_files[0].file.url;
}

return 'https://sphere-app-production.s3-ap-northeast-1.amazonaws.com/sphere/img/photo/1571046297_EF86A256-7740-4A51-85B4-5C43A01C806D.jpeg';
}
}
});
Expand Down Expand Up @@ -78089,7 +78096,7 @@ var render = function() {
staticClass: "white--text align-end",
attrs: {
height: "200px",
src: room.room_files[0].file.url
src: _vm.getImage(room.room_files)
}
},
[
Expand Down Expand Up @@ -78234,54 +78241,7 @@ var render = function() {
"div",
{ staticClass: "col-12" },
[
_c(
"div",
{ staticClass: "text-right" },
[
_c("v-container", [
_c(
"div",
{
staticClass: "w-25 text-right",
staticStyle: { float: "right" }
},
[
_c(
"div",
{ staticClass: "text-right mb-2" },
[
_c("v-icon", [_vm._v("thumb_up_alt")]),
_vm._v("1\n "),
_c("v-icon", [_vm._v("thumb_down_alt")]),
_vm._v("0\n ")
],
1
),
_vm._v(" "),
_c("v-progress-linear", {
attrs: {
"background-opacity": ".3",
"background-color": "#1867c0",
color: "#1867c0",
height: "5",
reactive: _vm.reactive,
disabled: _vm.disabled
},
model: {
value: _vm.percent,
callback: function($$v) {
_vm.percent = $$v
},
expression: "percent"
}
})
],
1
)
])
],
1
),
_c("div", { staticClass: "text-right" }),
_vm._v(" "),
_c("v-card-title", [_vm._v(_vm._s(_vm.room.name))]),
_vm._v(" "),
Expand Down
9 changes: 8 additions & 1 deletion resources/js/components/rooms/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<v-img
class="white--text align-end"
height="200px"
:src="room.room_files[0].file.url"
:src="getImage(room.room_files)"
>
<v-card-actions>
<v-list-item class="grow">
Expand Down Expand Up @@ -82,6 +82,13 @@ export default {
let totalScore = 0;
room_scores.map(score => totalScore += score.score)
return totalScore
},
getImage(room_files) {
if (room_files[0]) {
return room_files[0].file.url
}
return 'https://sphere-app-production.s3-ap-northeast-1.amazonaws.com/sphere/img/photo/1571046297_EF86A256-7740-4A51-85B4-5C43A01C806D.jpeg'
}
},
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/rooms/Show.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div class="col-12">
<div class="text-right">
<!-- https://vuetifyjs.com/ja/components/progress-linear -->
<v-container>
<!-- <v-container>
<div class="w-25 text-right" style="float: right;">
<div class="text-right mb-2">
<v-icon>thumb_up_alt</v-icon>1
Expand All @@ -44,7 +44,7 @@
>
</v-progress-linear>
</div>
</v-container>
</v-container> -->
</div>

<v-card-title>{{ room.name }}</v-card-title>
Expand Down

0 comments on commit 48a2b75

Please sign in to comment.