Got entry components to work again, and some other shit.

このコミットが含まれているのは:
テクニカル諏訪子 2018-01-26 01:10:15 +09:00
コミット f13f546675
9個のファイルの変更143行の追加93行の削除

ファイルの表示

@ -63,7 +63,7 @@ class FileController extends Controller {
return DB::table('str_owners')
->join('str_file', 'str_owners.file_id', '=', 'str_file.id')
->join('for_users', 'str_owners.user_id', '=', 'for_users.id')
->take(1)
// ->take(1)
->where('file_id', $id)
->get(array(
"user_id",

99
public/js/app.js vendored
ファイルの表示

@ -17645,9 +17645,9 @@ Vue.component('hot-items', __webpack_require__(168));
// Entry page.
Vue.component('entry-title', __webpack_require__(214));
Vue.component('entry-screenshots', __webpack_require__(211));
Vue.component('entry-description', __webpack_require__(206));
Vue.component('entry-changelog', __webpack_require__(201));
Vue.component('entry-screenshots', __webpack_require__(211));
new Vue({
el: '#app'
@ -60094,7 +60094,7 @@ exports = module.exports = __webpack_require__(3)(false);
// module
exports.push([module.i, "\n.col {\n\t\ttext-align: center;\n}\n", ""]);
exports.push([module.i, "\n.col {\n text-align: center;\n}\n", ""]);
// exports
@ -60129,25 +60129,25 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
//
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'hot-items',
data: function data() {
return {
items: []
};
},
created: function created() {
var _this = this;
name: 'hot-items',
data: function data() {
return {
items: []
};
},
created: function created() {
var _this = this;
axios.get('/api/rpc/file/gethotfiles').then(function (data) {
data.data.forEach(function (cb) {
_this.items.push({
'id': cb.id,
'title': cb.title,
'downloads': cb.downloads
});
});
});
}
axios.get('/api/rpc/file/gethotfiles').then(function (data) {
data.data.forEach(function (cb) {
_this.items.push({
'id': cb.id,
'title': cb.title,
'downloads': cb.downloads
});
});
});
}
});
/***/ }),
@ -60175,18 +60175,24 @@ var render = function() {
}),
_vm._v(" "),
_c("br"),
_vm._v("\n\t\t\t\t\t\t" + _vm._s(item.title) + "\n\t\t\t\t\t")
_vm._v(
"\n " +
_vm._s(item.title) +
"\n "
)
]),
_vm._v(" "),
_c("br"),
_vm._v(" "),
_c("a", { attrs: { href: "/profile/0" } }, [
_vm._v("\n\t\t\t\t\t\tName\n\t\t\t\t\t")
_vm._v("\n Name\n ")
]),
_vm._v(" "),
_c("br"),
_vm._v(
"\n\t\t\t\t\tDownloads: " + _vm._s(item.downloads) + "\n\t\t\t\t"
"\n Downloads: " +
_vm._s(item.downloads) +
"\n "
)
])
])
@ -60525,10 +60531,13 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'entry-description',
props: ['fid'],
props: ['fid', 'translations'],
data: function data() {
return {
id: this.fid,
@ -60554,7 +60563,7 @@ var render = function() {
var _c = _vm._self._c || _h
return _c("div", { staticClass: "panel panel-default" }, [
_c("div", { staticClass: "panel-heading" }, [
_vm._v("@lang('entry.description')")
_vm._v("\n @lang('entry.description')\n Description\n ")
]),
_vm._v(" "),
_c("div", { staticClass: "panel-body" }, [
@ -60651,9 +60660,15 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
//
//
//
//
//
//
/* harmony default export */ __webpack_exports__["default"] = ({
name: 'entry-screenshots'
name: 'entry-screenshots',
data: function data() {
return {};
}
});
/***/ }),
@ -60673,7 +60688,7 @@ var staticRenderFns = [
var _c = _vm._self._c || _h
return _c("div", { staticClass: "panel panel-default" }, [
_c("div", { staticClass: "panel-heading" }, [
_vm._v("@lang('entry.screenshots')")
_vm._v("\n Screenshots\n ")
]),
_vm._v(" "),
_c("div", { staticClass: "panel-body" }, [
@ -60872,6 +60887,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
props: ['fid'],
data: function data() {
return {
owners: [],
id: this.fid,
uid: 0,
title: '',
@ -60885,7 +60901,7 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
downloads: 0,
submit_date: 0,
last_date: 0,
showName: ''
showName: []
};
},
created: function created() {
@ -60900,20 +60916,29 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
_this.submit_date = __WEBPACK_IMPORTED_MODULE_0_moment___default.a.unix(data.data[0].submit_date).format("YYYY/MM/DD");
_this.last_date = data.data[0].last_date;
data.data.forEach(function (cb) {
_this.owners.push({
'username': cb.username,
'display_name': cb.display_name,
'avatar': cb.avatar,
'gender': cb.gender,
'name_colour': cb.name_colour
});
if (_this.last_date !== 0) {
_this.last_date = __WEBPACK_IMPORTED_MODULE_0_moment___default.a.unix(_this.last_date).format("YYYY/MM/DD");
}
if (cb.display_name !== '') {
_this.showName += cb.display_name;
} else {
_this.showName += cb.username;
}
});
_this.username = data.data[0].username;
_this.display_name = data.data[0].display_name;
_this.gender = data.data[0].gender;
_this.avatar = data.data[0].avatar;
_this.name_colour = data.data[0].name_colour;
}).then(function () {
if (_this.last_date !== 0) {
_this.last_date = __WEBPACK_IMPORTED_MODULE_0_moment___default.a.unix(_this.last_date).format("YYYY/MM/DD");
}
if (_this.display_name !== '') {
_this.showName = _this.display_name;
} else {
_this.showName = _this.username;
}
});
}
});

ファイルの表示

@ -23,9 +23,9 @@ Vue.component('hot-items', require('./components/HotEntries.vue'));
// Entry page.
Vue.component('entry-title', require('./components/Entry/Title.vue'));
Vue.component('entry-screenshots', require('./components/Entry/Screenshots.vue'));
Vue.component('entry-description', require('./components/Entry/Description.vue'));
Vue.component('entry-changelog', require('./components/Entry/Changelog.vue'));
Vue.component('entry-screenshots', require('./components/Entry/Screenshots.vue'));
new Vue({
el: '#app'

ファイルの表示

@ -1,6 +1,9 @@
<template>
<div class="panel panel-default">
<div class="panel-heading">@lang('entry.description')</div>
<div class="panel-heading">
@lang('entry.description')
Description
</div>
<div class="panel-body">
<div class="container">
@ -17,7 +20,10 @@
<script>
export default {
name: 'entry-description',
props: ['fid'],
props: [
'fid',
'translations'
],
data: function () {
return {
id: this.fid,

ファイルの表示

@ -1,6 +1,9 @@
<template>
<div class="panel panel-default">
<div class="panel-heading">@lang('entry.screenshots')</div>
<div class="panel-heading">
<!--@lang('entry.screenshots')-->
Screenshots
</div>
<div class="panel-body">
<div class="container">
@ -16,6 +19,9 @@
<script>
export default {
name: 'entry-screenshots'
name: 'entry-screenshots',
data: function () {
return {}
}
}
</script>

ファイルの表示

@ -74,6 +74,7 @@
props: ['fid'],
data: function () {
return {
owners: [],
id: this.fid,
uid: 0,
title: '',
@ -87,7 +88,7 @@
downloads: 0,
submit_date: 0,
last_date: 0,
showName: '',
showName: [],
}
},
created: function () {
@ -100,23 +101,33 @@
this.submit_date = moment.unix(data.data[0].submit_date).format("YYYY/MM/DD");
this.last_date = data.data[0].last_date;
data.data.forEach(cb => {
this.owners.push(
{
'username': cb.username,
'display_name': cb.display_name,
'avatar': cb.avatar,
'gender': cb.gender,
'name_colour': cb.name_colour,
}
);
if (this.last_date !== 0) {
this.last_date = moment.unix(this.last_date).format("YYYY/MM/DD");
}
if (cb.display_name !== '') {
this.showName += cb.display_name;
}
else {
this.showName += cb.username;
}
});
this.username = data.data[0].username;
this.display_name = data.data[0].display_name;
this.gender = data.data[0].gender;
this.avatar = data.data[0].avatar;
this.name_colour = data.data[0].name_colour;
}).then(() => {
if (this.last_date !== 0) {
this.last_date = moment.unix(this.last_date).format("YYYY/MM/DD");
}
if (this.display_name !== '') {
this.showName = this.display_name;
}
else {
this.showName = this.username;
}
})
});
}
}
</script>

ファイルの表示

@ -1,49 +1,49 @@
<template>
<div class="container">
<div class="row">
<span v-for="item in items">
<div class="col-md-2">
<a :href="'/entry/' + item.id">
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
<br />
{{ item.title }}
</a>
<br />
<a href="/profile/0">
Name
</a>
<br />
Downloads: {{ item.downloads }}
</div>
</span>
<span v-for="item in items">
<div class="col-md-2">
<a :href="'/entry/' + item.id">
<img :src="'/assets/store/' + item.id + '/screens/1.png'" width="100px" height="100px" />
<br />
{{ item.title }}
</a>
<br />
<a href="/profile/0">
Name
</a>
<br />
Downloads: {{ item.downloads }}
</div>
</span>
</div>
</div>
</template>
<script>
export default {
name: 'hot-items',
data: function () {
return {
items: []
}
},
created: function () {
axios.get('/api/rpc/file/gethotfiles').then(data => {
data.data.forEach(cb => {
this.items.push({
'id': cb.id,
'title': cb.title,
'downloads': cb.downloads
});
});
})
}
name: 'hot-items',
data: function () {
return {
items: []
}
},
created: function () {
axios.get('/api/rpc/file/gethotfiles').then(data => {
data.data.forEach(cb => {
this.items.push({
'id': cb.id,
'title': cb.title,
'downloads': cb.downloads
});
});
})
}
}
</script>
<style>
.col {
text-align: center;
text-align: center;
}
</style>

ファイルの表示

@ -1,12 +1,13 @@
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-12">
<entry-title fid="{{ $file_id }}" />
<entry-screenshots fid="{{ $file_id }}" />
<entry-description fid="{{ $file_id }}" />
<entry-changelog fid="{{ $file_id }}" />
<div><entry-title fid="{{ $file_id }}" /></div>
<div><entry-screenshots fid="{{ $file_id }}" /></div>
<div><entry-description fid="{{ $file_id }}" /></div>
<div><entry-changelog fid="{{ $file_id }}" /></div>
</div>
</div>
</div>

ファイルの表示

@ -78,5 +78,6 @@
<!-- Scripts -->
<script src="/js/lang.js"></script>
<script src="{{ asset('js/app.js') }}"></script>
<script>console.log(i18n.entry)</script>
</body>
</html>