fix(dashboard): correct default items per page with expanded list setting

This commit is contained in:
Jake Fulmine 2022-11-28 07:19:12 +01:00
parent 15a5f78cf1
commit 5bfb0d030e
2 changed files with 16 additions and 2 deletions

View File

@ -109,9 +109,16 @@
isPublic: isPublic,
type: 'member',
isMain: false,
itemsPerPage: listView === 'card' ? 24 : 25
itemsPerPage: getDefaultItemsPerpage()
};
function getDefaultItemsPerpage(): number {
if (listView === 'card') return 24;
else if (settings && settings.accessibility && settings.accessibility.expandedcards)
return 10;
else return 25;
}
async function copyShortLink(event?) {
if (event) {
let ctrlDown = event.ctrlKey||event.metaKey; // mac support

View File

@ -108,9 +108,16 @@
isPublic: isPublic,
type: 'group',
isMain: false,
itemsPerPage: listView === 'card' ? 24 : 25
itemsPerPage: getDefaultItemsPerpage()
};
function getDefaultItemsPerpage(): number {
if (listView === 'card') return 24;
else if (settings && settings.accessibility && settings.accessibility.expandedcards)
return 10;
else return 25
}
async function copyShortLink(event?) {
if (event) {
let ctrlDown = event.ctrlKey||event.metaKey; // mac support