mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Cleanup links
This commit is contained in:
parent
6a92912a3d
commit
32c3f1f059
8 changed files with 25 additions and 133 deletions
|
|
@ -61,42 +61,6 @@ export function attachmentDownload(download, customSpecSuffix) {
|
|||
return serverRequestRaw('Download', download, customSpecSuffix);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} download
|
||||
* @param {string=} customSpecSuffix
|
||||
* @returns {string}
|
||||
*/
|
||||
export function attachmentPreview(download, customSpecSuffix) {
|
||||
return serverRequestRaw('View', download, customSpecSuffix);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} download
|
||||
* @param {string=} customSpecSuffix
|
||||
* @returns {string}
|
||||
*/
|
||||
export function attachmentThumbnailPreview(download, customSpecSuffix) {
|
||||
return serverRequestRaw('ViewThumbnail', download, customSpecSuffix);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} download
|
||||
* @param {string=} customSpecSuffix
|
||||
* @returns {string}
|
||||
*/
|
||||
export function attachmentPreviewAsPlain(download, customSpecSuffix) {
|
||||
return serverRequestRaw('ViewAsPlain', download, customSpecSuffix);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} download
|
||||
* @param {string=} customSpecSuffix
|
||||
* @returns {string}
|
||||
*/
|
||||
export function attachmentFramed(download, customSpecSuffix) {
|
||||
return serverRequestRaw('FramedView', download, customSpecSuffix);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} type
|
||||
* @returns {string}
|
||||
|
|
@ -105,34 +69,6 @@ export function serverRequest(type) {
|
|||
return SERVER_PREFIX + '/' + type + '/' + SUB_QUERY_PREFIX + '/' + getHash() + '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function upload() {
|
||||
return serverRequest('Upload');
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function uploadContacts() {
|
||||
return serverRequest('UploadContacts');
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function uploadBackground() {
|
||||
return serverRequest('UploadBackground');
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function append() {
|
||||
return serverRequest('Append');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} email
|
||||
* @returns {string}
|
||||
|
|
@ -141,30 +77,6 @@ export function change(email) {
|
|||
return serverRequest('Change') + encodeURIComponent(email) + '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} requestHash
|
||||
* @returns {string}
|
||||
*/
|
||||
export function messageViewLink(requestHash) {
|
||||
return serverRequestRaw('ViewAsPlain', requestHash);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} requestHash
|
||||
* @returns {string}
|
||||
*/
|
||||
export function messageDownloadLink(requestHash) {
|
||||
return serverRequestRaw('Download', requestHash);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} hash
|
||||
* @returns {string}
|
||||
*/
|
||||
export function publicLink(hash) {
|
||||
return SERVER_PREFIX + '/Raw/0/Public/' + hash + '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} hash
|
||||
* @returns {string}
|
||||
|
|
@ -182,20 +94,6 @@ export function langLink(lang, isAdmin) {
|
|||
return SERVER_PREFIX + '/Lang/0/' + (isAdmin ? 'Admin' : 'App') + '/' + encodeURI(lang) + '/' + VERSION + '/';
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function exportContactsVcf() {
|
||||
return serverRequestRaw('ContactsVcf');
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
export function exportContactsCsv() {
|
||||
return serverRequestRaw('ContactsCsv');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} path
|
||||
* @returns {string}
|
||||
|
|
@ -301,13 +199,11 @@ export function mailBox(folder, page = 1, search = '', threadUid = '') {
|
|||
}
|
||||
|
||||
if (1 < page) {
|
||||
result = result.replace(/[/]+$/, '');
|
||||
result += '/p' + page;
|
||||
result = result.replace(/[/]+$/, '') + '/p' + page;
|
||||
}
|
||||
|
||||
if (search) {
|
||||
result = result.replace(/[/]+$/, '');
|
||||
result += '/' + encodeURI(search);
|
||||
result = result.replace(/[/]+$/, '') + '/' + encodeURI(search);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue