fucking pagination

This commit is contained in:
Flummi
2022-05-06 17:01:42 +02:00
parent 7b2ad52fe0
commit 2162f1565c
5 changed files with 28 additions and 21 deletions

View File

@@ -64,8 +64,17 @@ export default new class {
if(env.tag) link.push("tag", env.tag);
if(env.user) link.push("user", env.user, env.type ?? 'f0cks');
if(env.mime.length > 2) link.push(env.mime);
if(env.page) link.push("p", env.page);
return link.join("/");
let tmp = link.length === 0 ? '/' : link.join('/');
if(!tmp.endsWith('/'))
tmp = tmp + '/';
if(!tmp.startsWith('/'))
tmp = '/' + tmp;
return {
main: tmp,
path: env.path ? env.path : ''
};
};
parseTag(tag) {
if(!tag)