mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Cleanup links
This commit is contained in:
parent
6a92912a3d
commit
32c3f1f059
8 changed files with 25 additions and 133 deletions
|
|
@ -3,10 +3,7 @@ import ko from 'ko';
|
|||
import { File, FileType } from 'Common/File';
|
||||
import {
|
||||
attachmentDownload,
|
||||
attachmentPreview,
|
||||
attachmentFramed,
|
||||
attachmentPreviewAsPlain,
|
||||
attachmentThumbnailPreview
|
||||
serverRequestRaw
|
||||
} from 'Common/Links';
|
||||
|
||||
import { AbstractModel } from 'Knoin/AbstractModel';
|
||||
|
|
@ -140,14 +137,14 @@ export class AttachmentModel extends AbstractModel {
|
|||
* @returns {string}
|
||||
*/
|
||||
linkPreview() {
|
||||
return attachmentPreview(this.download);
|
||||
return serverRequestRaw('View', this.download);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
linkThumbnail() {
|
||||
return this.hasThumbnail() ? attachmentThumbnailPreview(this.download) : '';
|
||||
return this.hasThumbnail() ? serverRequestRaw('ViewThumbnail', this.download) : '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -158,18 +155,11 @@ export class AttachmentModel extends AbstractModel {
|
|||
return link ? 'background:url(' + link + ')' : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
linkFramed() {
|
||||
return attachmentFramed(this.download);
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
*/
|
||||
linkPreviewAsPlain() {
|
||||
return attachmentPreviewAsPlain(this.download);
|
||||
return serverRequestRaw('ViewAsPlain', this.download);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue