mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
easier mailBox() link generator
This commit is contained in:
parent
df293960d0
commit
c41adf35f5
2 changed files with 9 additions and 7 deletions
|
|
@ -134,11 +134,13 @@ export class MailBoxUserScreen extends AbstractScreen {
|
|||
fNormS = (request, vals) => [folder(request, vals), request ? pInt(vals[1]) : 1, decodeURI(pString(vals[2]))];
|
||||
|
||||
return [
|
||||
// Folder: INBOX | INBOX.sub | Sent | fullNameHash
|
||||
[/^([^/]*)$/, { normalize_: fNormS }],
|
||||
// Regex the fullNameHash
|
||||
// Search: {folder}/{string}
|
||||
[/^([a-zA-Z0-9.~_-]+)\/(.+)\/?$/, { normalize_: (request, vals) =>
|
||||
[folder(request, vals), 1, decodeURI(pString(vals[1]))]
|
||||
}],
|
||||
// Page: {folder}/p{int}(/{search})?
|
||||
[/^([a-zA-Z0-9.~_-]+)\/p([1-9][0-9]*)(?:\/(.+)\/?)?$/, { normalize_: fNormS }]
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue