Added pagination size
This commit is contained in:
parent
d4e6d23459
commit
bf2e9be3b7
11 changed files with 54 additions and 17 deletions
|
@ -7,8 +7,8 @@ Vue.createApp({
|
|||
total: 0,
|
||||
// eslint-disable-next-line no-undef
|
||||
page: query.page || 1,
|
||||
limit: 16,
|
||||
totalPages: 1,
|
||||
limit: 24,
|
||||
artist: "",
|
||||
format: "",
|
||||
year: "",
|
||||
|
@ -69,7 +69,7 @@ Vue.createApp({
|
|||
|
||||
this.sortOrder = `${sortOrder.sort}-${sortOrder.order}`;
|
||||
|
||||
let url = `/api/v1/albums?page=${this.page}&limit=${this.limit}&sort=${this.sort}&order=${this.order}`;
|
||||
let url = `/api/v1/albums?page=${this.page}&sort=${this.sort}&order=${this.order}`;
|
||||
if (this.artist) {
|
||||
url += `&artist=${this.formatParams(this.artist)}`;
|
||||
}
|
||||
|
@ -94,6 +94,7 @@ Vue.createApp({
|
|||
.get(url)
|
||||
.then((response) => {
|
||||
this.items = response.data.rows;
|
||||
this.limit = response.data.limit;
|
||||
this.total = response.data.count || 0;
|
||||
this.totalPages =
|
||||
parseInt(response.data.count / this.limit, 10) +
|
||||
|
|
|
@ -11,6 +11,8 @@ if (typeof email !== "undefined" && typeof username !== "undefined") {
|
|||
password: "",
|
||||
passwordConfirm: "",
|
||||
// eslint-disable-next-line no-undef
|
||||
pagination,
|
||||
// eslint-disable-next-line no-undef
|
||||
mastodon: mastodon || {
|
||||
publish: false,
|
||||
url: "",
|
||||
|
@ -56,7 +58,7 @@ if (typeof email !== "undefined" && typeof username !== "undefined") {
|
|||
// eslint-disable-next-line no-unused-vars
|
||||
async updateProfil() {
|
||||
this.errors = [];
|
||||
const { oldPassword, password, passwordConfirm, mastodon } =
|
||||
const { oldPassword, password, passwordConfirm, mastodon, pagination } =
|
||||
this.formData;
|
||||
|
||||
if (password && !oldPassword) {
|
||||
|
@ -82,6 +84,8 @@ if (typeof email !== "undefined" && typeof username !== "undefined") {
|
|||
data.oldPassword = oldPassword;
|
||||
}
|
||||
|
||||
data.pagination = pagination;
|
||||
|
||||
try {
|
||||
await axios.patch(`/api/v1/me`, data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue