add CONST and one line a tag in pagination - add request to false in store handler
This commit is contained in:
parent
211ee4b97c
commit
db43813aa0
3 changed files with 13 additions and 17 deletions
|
@ -5,6 +5,7 @@
|
|||
|
||||
((gl) => {
|
||||
const PAGINATION_UI_BUTTON_LIMIT = 4;
|
||||
const UI_LIMIT = 6;
|
||||
const SPREAD = '...';
|
||||
const PREV = 'Prev';
|
||||
const NEXT = 'Next';
|
||||
|
@ -104,7 +105,7 @@
|
|||
items.push({ title: PREV, disabled: true });
|
||||
}
|
||||
|
||||
if (page > 6) items.push({ title: SPREAD, separator: true });
|
||||
if (page > UI_LIMIT) items.push({ title: SPREAD, separator: true });
|
||||
|
||||
const start = Math.max(page - PAGINATION_UI_BUTTON_LIMIT, 1);
|
||||
const end = Math.min(page + PAGINATION_UI_BUTTON_LIMIT, total);
|
||||
|
@ -139,11 +140,7 @@
|
|||
disabled: item.disabled
|
||||
}'
|
||||
>
|
||||
<a
|
||||
@click="changePage($event)"
|
||||
>
|
||||
{{item.title}}
|
||||
</a>
|
||||
<a @click="changePage($event)">{{item.title}}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
|
|
@ -36,14 +36,12 @@
|
|||
'vue-pipelines': gl.VuePipelines,
|
||||
},
|
||||
template: `
|
||||
<div>
|
||||
<vue-pipelines
|
||||
:scope='scope'
|
||||
:store='store'
|
||||
:svgs='svgs'
|
||||
>
|
||||
</vue-pipelines>
|
||||
</div>
|
||||
<vue-pipelines
|
||||
:scope='scope'
|
||||
:store='store'
|
||||
:svgs='svgs'
|
||||
>
|
||||
</vue-pipelines>
|
||||
`,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -34,9 +34,10 @@
|
|||
|
||||
updatePipelineNums(this.count);
|
||||
this.pageRequest = false;
|
||||
}, () => new Flash(
|
||||
'Something went wrong on our end.',
|
||||
));
|
||||
}, () => {
|
||||
this.pageRequest = false;
|
||||
return new Flash('Something went wrong on our end.');
|
||||
});
|
||||
|
||||
goFetch();
|
||||
|
||||
|
|
Loading…
Reference in a new issue