Added actual owner data this time.
このコミットが含まれているのは:
コミット
c4442268be
|
@ -1,5 +1,7 @@
|
||||||
/node_modules
|
/node_modules
|
||||||
/public/hot
|
/public/hot
|
||||||
|
/public/js
|
||||||
|
/public/css
|
||||||
/public/storage/*
|
/public/storage/*
|
||||||
/public/assets
|
/public/assets
|
||||||
/storage/*.key
|
/storage/*.key
|
||||||
|
|
|
@ -60,17 +60,26 @@ class FileController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFileTitle($id) { // /api/rpc/file/getfiletitle/id
|
public function getFileTitle($id) { // /api/rpc/file/getfiletitle/id
|
||||||
return DB::table('str_file')
|
return DB::table('str_owners')
|
||||||
->select(
|
->join('str_file', 'str_owners.file_id', '=', 'str_file.id')
|
||||||
'title',
|
->join('for_users', 'str_owners.user_id', '=', 'for_users.id')
|
||||||
'version',
|
->take(1)
|
||||||
'views',
|
->where('file_id', $id)
|
||||||
'downloads',
|
->get(array(
|
||||||
'submit_date',
|
"user_id",
|
||||||
'last_date'
|
"title",
|
||||||
)
|
"version",
|
||||||
->where('id', $id)
|
"views",
|
||||||
->get();
|
"downloads",
|
||||||
|
"submit_date",
|
||||||
|
"last_date",
|
||||||
|
"username",
|
||||||
|
"avatar",
|
||||||
|
"group",
|
||||||
|
"gender",
|
||||||
|
"display_name",
|
||||||
|
"name_colour",
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFileDescription($id) { // /api/rpc/file/getfiledescription/id
|
public function getFileDescription($id) { // /api/rpc/file/getfiledescription/id
|
||||||
|
|
|
@ -60794,6 +60794,8 @@ exports.push([module.i, "\n.col {\n\t\ttext-align: center;\n}\n", ""]);
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment__ = __webpack_require__(0);
|
||||||
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_moment__);
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
@ -60863,30 +60865,55 @@ Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* harmony default export */ __webpack_exports__["default"] = ({
|
/* harmony default export */ __webpack_exports__["default"] = ({
|
||||||
name: 'entry-title',
|
name: 'entry-title',
|
||||||
props: ['fid'],
|
props: ['fid'],
|
||||||
data: function data() {
|
data: function data() {
|
||||||
return {
|
return {
|
||||||
id: this.fid,
|
id: this.fid,
|
||||||
|
uid: 0,
|
||||||
title: '',
|
title: '',
|
||||||
version: '',
|
version: '',
|
||||||
|
username: '',
|
||||||
|
avatar: '',
|
||||||
|
gender: '',
|
||||||
|
display_name: '',
|
||||||
|
name_colour: '',
|
||||||
views: 0,
|
views: 0,
|
||||||
downloads: 0,
|
downloads: 0,
|
||||||
submit_date: 0,
|
submit_date: 0,
|
||||||
last_date: 0
|
last_date: 0,
|
||||||
|
showName: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created: function created() {
|
created: function created() {
|
||||||
var _this = this;
|
var _this = this;
|
||||||
|
|
||||||
axios.get('/api/rpc/file/getfiletitle/' + this.id).then(function (data) {
|
axios.get('/api/rpc/file/getfiletitle/' + this.id).then(function (data) {
|
||||||
|
_this.uid = data.data[0].user_id;
|
||||||
_this.title = data.data[0].title;
|
_this.title = data.data[0].title;
|
||||||
_this.version = data.data[0].version;
|
_this.version = data.data[0].version;
|
||||||
_this.views = data.data[0].views;
|
_this.views = data.data[0].views;
|
||||||
_this.downloads = data.data[0].downloads;
|
_this.downloads = data.data[0].downloads;
|
||||||
_this.submit_date = data.data[0].submit_date;
|
_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;
|
_this.last_date = data.data[0].last_date;
|
||||||
|
|
||||||
|
_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;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -60902,12 +60929,11 @@ var render = function() {
|
||||||
return _c("div", { staticClass: "panel panel-default" }, [
|
return _c("div", { staticClass: "panel panel-default" }, [
|
||||||
_c("div", { staticClass: "panel-heading" }, [
|
_c("div", { staticClass: "panel-heading" }, [
|
||||||
_vm._v(
|
_vm._v(
|
||||||
"\n " +
|
"\n " + _vm._s(_vm.title) + " " + _vm._s(_vm.version) + " by "
|
||||||
_vm._s(_vm.title) +
|
),
|
||||||
" " +
|
_c("a", { attrs: { href: "/profile/" + _vm.uid } }, [
|
||||||
_vm._s(_vm.version) +
|
_c("span", { style: _vm.name_colour }, [_vm._v(_vm._s(_vm.showName))])
|
||||||
" by Some Hardcoded Person\n "
|
])
|
||||||
)
|
|
||||||
]),
|
]),
|
||||||
_vm._v(" "),
|
_vm._v(" "),
|
||||||
_c("div", { staticClass: "panel-body" }, [
|
_c("div", { staticClass: "panel-body" }, [
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading">
|
<div class="panel-heading">
|
||||||
<!--@lang('entry.title', ['name' => 'Some Mod 2.0', 'user' => 'Someuser'])-->
|
<!--@lang('entry.title', ['name' => 'Some Mod 2.0', 'user' => 'Someuser'])-->
|
||||||
{{ title }} {{ version }} by Some Hardcoded Person
|
{{ title }} {{ version }} by <a :href="'/profile/' + uid"><span :style="name_colour">{{ showName }}</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
@ -67,29 +67,56 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import moment from 'moment';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'entry-title',
|
name: 'entry-title',
|
||||||
props: ['fid'],
|
props: ['fid'],
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
id: this.fid,
|
id: this.fid,
|
||||||
|
uid: 0,
|
||||||
title: '',
|
title: '',
|
||||||
version: '',
|
version: '',
|
||||||
|
username: '',
|
||||||
|
avatar: '',
|
||||||
|
gender: '',
|
||||||
|
display_name: '',
|
||||||
|
name_colour: '',
|
||||||
views: 0,
|
views: 0,
|
||||||
downloads: 0,
|
downloads: 0,
|
||||||
submit_date: 0,
|
submit_date: 0,
|
||||||
last_date: 0,
|
last_date: 0,
|
||||||
|
showName: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created: function () {
|
created: function () {
|
||||||
axios.get('/api/rpc/file/getfiletitle/' + this.id).then(data => {
|
axios.get('/api/rpc/file/getfiletitle/' + this.id).then(data => {
|
||||||
|
this.uid = data.data[0].user_id;
|
||||||
this.title = data.data[0].title;
|
this.title = data.data[0].title;
|
||||||
this.version = data.data[0].version;
|
this.version = data.data[0].version;
|
||||||
this.views = data.data[0].views;
|
this.views = data.data[0].views;
|
||||||
this.downloads = data.data[0].downloads;
|
this.downloads = data.data[0].downloads;
|
||||||
this.submit_date = data.data[0].submit_date;
|
this.submit_date = moment.unix(data.data[0].submit_date).format("YYYY/MM/DD");
|
||||||
this.last_date = data.data[0].last_date;
|
this.last_date = data.data[0].last_date;
|
||||||
|
|
||||||
|
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>
|
</script>
|
||||||
|
|
新しいイシューから参照