Commit db43813a authored by Regis's avatar Regis

add CONST and one line a tag in pagination - add request to false in store handler

parent 211ee4b9
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
((gl) => { ((gl) => {
const PAGINATION_UI_BUTTON_LIMIT = 4; const PAGINATION_UI_BUTTON_LIMIT = 4;
const UI_LIMIT = 6;
const SPREAD = '...'; const SPREAD = '...';
const PREV = 'Prev'; const PREV = 'Prev';
const NEXT = 'Next'; const NEXT = 'Next';
...@@ -104,7 +105,7 @@ ...@@ -104,7 +105,7 @@
items.push({ title: PREV, disabled: true }); 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 start = Math.max(page - PAGINATION_UI_BUTTON_LIMIT, 1);
const end = Math.min(page + PAGINATION_UI_BUTTON_LIMIT, total); const end = Math.min(page + PAGINATION_UI_BUTTON_LIMIT, total);
...@@ -139,11 +140,7 @@ ...@@ -139,11 +140,7 @@
disabled: item.disabled disabled: item.disabled
}' }'
> >
<a <a @click="changePage($event)">{{item.title}}</a>
@click="changePage($event)"
>
{{item.title}}
</a>
</li> </li>
</ul> </ul>
</div> </div>
......
...@@ -36,14 +36,12 @@ ...@@ -36,14 +36,12 @@
'vue-pipelines': gl.VuePipelines, 'vue-pipelines': gl.VuePipelines,
}, },
template: ` template: `
<div> <vue-pipelines
<vue-pipelines :scope='scope'
:scope='scope' :store='store'
:store='store' :svgs='svgs'
:svgs='svgs' >
> </vue-pipelines>
</vue-pipelines>
</div>
`, `,
}); });
} }
......
...@@ -34,9 +34,10 @@ ...@@ -34,9 +34,10 @@
updatePipelineNums(this.count); updatePipelineNums(this.count);
this.pageRequest = false; this.pageRequest = false;
}, () => new Flash( }, () => {
'Something went wrong on our end.', this.pageRequest = false;
)); return new Flash('Something went wrong on our end.');
});
goFetch(); goFetch();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment