mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Interface redesign (attachments, new preview pane layout)
This commit is contained in:
parent
6755a0ce51
commit
e3e7c1d963
64 changed files with 1286 additions and 1009 deletions
|
|
@ -52,6 +52,7 @@
|
|||
'Themes': 'THEMES',
|
||||
'UserBackground': 'USER_BACKGROUND',
|
||||
'Sieve': 'SIEVE',
|
||||
'AttachmentThumbnails': 'ATTACHMENT_THUMBNAILS',
|
||||
'AdditionalAccounts': 'ADDITIONAL_ACCOUNTS',
|
||||
'AdditionalIdentities': 'ADDITIONAL_IDENTITIES'
|
||||
};
|
||||
|
|
@ -304,7 +305,7 @@
|
|||
'EqualTo': 'EqualTo',
|
||||
'NotEqualTo': 'NotEqualTo'
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @enum {string}
|
||||
*/
|
||||
|
|
|
|||
168
dev/Common/Mime.js
Normal file
168
dev/Common/Mime.js
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
(function () {
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
|
||||
'eml' : 'message/rfc822',
|
||||
'mime' : 'message/rfc822',
|
||||
'txt' : 'text/plain',
|
||||
'text' : 'text/plain',
|
||||
'def' : 'text/plain',
|
||||
'list' : 'text/plain',
|
||||
'in' : 'text/plain',
|
||||
'ini' : 'text/plain',
|
||||
'log' : 'text/plain',
|
||||
'sql' : 'text/plain',
|
||||
'cfg' : 'text/plain',
|
||||
'conf' : 'text/plain',
|
||||
'asc' : 'text/plain',
|
||||
'rtx' : 'text/richtext',
|
||||
'vcard' : 'text/vcard',
|
||||
'vcf' : 'text/vcard',
|
||||
'htm' : 'text/html',
|
||||
'html' : 'text/html',
|
||||
'csv' : 'text/csv',
|
||||
'ics' : 'text/calendar',
|
||||
'ifb' : 'text/calendar',
|
||||
'xml' : 'text/xml',
|
||||
'json' : 'application/json',
|
||||
'swf' : 'application/x-shockwave-flash',
|
||||
'hlp' : 'application/winhlp',
|
||||
'wgt' : 'application/widget',
|
||||
'chm' : 'application/vnd.ms-htmlhelp',
|
||||
'p10' : 'application/pkcs10',
|
||||
'p7c' : 'application/pkcs7-mime',
|
||||
'p7m' : 'application/pkcs7-mime',
|
||||
'p7s' : 'application/pkcs7-signature',
|
||||
'torrent' : 'application/x-bittorrent',
|
||||
|
||||
// scripts
|
||||
'js' : 'application/javascript',
|
||||
'pl' : 'text/perl',
|
||||
'css' : 'text/css',
|
||||
'asp' : 'text/asp',
|
||||
'php' : 'application/x-httpd-php',
|
||||
'php3' : 'application/x-httpd-php',
|
||||
'php4' : 'application/x-httpd-php',
|
||||
'php5' : 'application/x-httpd-php',
|
||||
'phtml' : 'application/x-httpd-php',
|
||||
|
||||
// images
|
||||
'png' : 'image/png',
|
||||
'jpg' : 'image/jpeg',
|
||||
'jpeg' : 'image/jpeg',
|
||||
'jpe' : 'image/jpeg',
|
||||
'jfif' : 'image/jpeg',
|
||||
'gif' : 'image/gif',
|
||||
'bmp' : 'image/bmp',
|
||||
'cgm' : 'image/cgm',
|
||||
'ief' : 'image/ief',
|
||||
'ico' : 'image/x-icon',
|
||||
'tif' : 'image/tiff',
|
||||
'tiff' : 'image/tiff',
|
||||
'svg' : 'image/svg+xml',
|
||||
'svgz' : 'image/svg+xml',
|
||||
'djv' : 'image/vnd.djvu',
|
||||
'djvu' : 'image/vnd.djvu',
|
||||
'webp' : 'image/webp',
|
||||
|
||||
// archives
|
||||
'zip' : 'application/zip',
|
||||
'7z' : 'application/x-7z-compressed',
|
||||
'rar' : 'application/x-rar-compressed',
|
||||
'exe' : 'application/x-msdownload',
|
||||
'dll' : 'application/x-msdownload',
|
||||
'scr' : 'application/x-msdownload',
|
||||
'com' : 'application/x-msdownload',
|
||||
'bat' : 'application/x-msdownload',
|
||||
'msi' : 'application/x-msdownload',
|
||||
'cab' : 'application/vnd.ms-cab-compressed',
|
||||
'gz' : 'application/x-gzip',
|
||||
'tgz' : 'application/x-gzip',
|
||||
'bz' : 'application/x-bzip',
|
||||
'bz2' : 'application/x-bzip2',
|
||||
'deb' : 'application/x-debian-package',
|
||||
|
||||
// fonts
|
||||
'psf' : 'application/x-font-linux-psf',
|
||||
'otf' : 'application/x-font-otf',
|
||||
'pcf' : 'application/x-font-pcf',
|
||||
'snf' : 'application/x-font-snf',
|
||||
'ttf' : 'application/x-font-ttf',
|
||||
'ttc' : 'application/x-font-ttf',
|
||||
|
||||
// audio
|
||||
'mp3' : 'audio/mpeg',
|
||||
'amr' : 'audio/amr',
|
||||
'aac' : 'audio/x-aac',
|
||||
'aif' : 'audio/x-aiff',
|
||||
'aifc' : 'audio/x-aiff',
|
||||
'aiff' : 'audio/x-aiff',
|
||||
'wav' : 'audio/x-wav',
|
||||
'wma' : 'audio/x-ms-wma',
|
||||
'wax' : 'audio/x-ms-wax',
|
||||
'midi' : 'audio/midi',
|
||||
'mp4a' : 'audio/mp4',
|
||||
'ogg' : 'audio/ogg',
|
||||
'weba' : 'audio/webm',
|
||||
'ra' : 'audio/x-pn-realaudio',
|
||||
'ram' : 'audio/x-pn-realaudio',
|
||||
'rmp' : 'audio/x-pn-realaudio-plugin',
|
||||
'm3u' : 'audio/x-mpegurl',
|
||||
|
||||
// video
|
||||
'flv' : 'video/x-flv',
|
||||
'qt' : 'video/quicktime',
|
||||
'mov' : 'video/quicktime',
|
||||
'wmv' : 'video/windows-media',
|
||||
'avi' : 'video/x-msvideo',
|
||||
'mpg' : 'video/mpeg',
|
||||
'mpeg' : 'video/mpeg',
|
||||
'mpe' : 'video/mpeg',
|
||||
'm1v' : 'video/mpeg',
|
||||
'm2v' : 'video/mpeg',
|
||||
'3gp' : 'video/3gpp',
|
||||
'3g2' : 'video/3gpp2',
|
||||
'h261' : 'video/h261',
|
||||
'h263' : 'video/h263',
|
||||
'h264' : 'video/h264',
|
||||
'jpgv' : 'video/jpgv',
|
||||
'mp4' : 'video/mp4',
|
||||
'mp4v' : 'video/mp4',
|
||||
'mpg4' : 'video/mp4',
|
||||
'ogv' : 'video/ogg',
|
||||
'webm' : 'video/webm',
|
||||
'm4v' : 'video/x-m4v',
|
||||
'asf' : 'video/x-ms-asf',
|
||||
'asx' : 'video/x-ms-asf',
|
||||
'wm' : 'video/x-ms-wm',
|
||||
'wmx' : 'video/x-ms-wmx',
|
||||
'wvx' : 'video/x-ms-wvx',
|
||||
'movie' : 'video/x-sgi-movie',
|
||||
|
||||
// adobe
|
||||
'pdf' : 'application/pdf',
|
||||
'psd' : 'image/vnd.adobe.photoshop',
|
||||
'ai' : 'application/postscript',
|
||||
'eps' : 'application/postscript',
|
||||
'ps' : 'application/postscript',
|
||||
|
||||
// ms office
|
||||
'doc' : 'application/msword',
|
||||
'dot' : 'application/msword',
|
||||
'rtf' : 'application/rtf',
|
||||
'xls' : 'application/vnd.ms-excel',
|
||||
'ppt' : 'application/vnd.ms-powerpoint',
|
||||
'docx' : 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
|
||||
'xlsx' : 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
|
||||
'dotx' : 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
|
||||
'pptx' : 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
|
||||
|
||||
// open office
|
||||
'odt' : 'application/vnd.oasis.opendocument.text',
|
||||
'ods' : 'application/vnd.oasis.opendocument.spreadsheet'
|
||||
|
||||
};
|
||||
|
||||
}());
|
||||
|
|
@ -15,6 +15,8 @@
|
|||
Autolinker = require('Autolinker'),
|
||||
JSEncrypt = require('JSEncrypt'),
|
||||
|
||||
Mime = require('Common/Mime'),
|
||||
|
||||
Enums = require('Common/Enums'),
|
||||
Consts = require('Common/Consts'),
|
||||
Globals = require('Common/Globals')
|
||||
|
|
@ -1060,6 +1062,7 @@
|
|||
oData.capaAdditionalIdentities = ko.observable(false);
|
||||
oData.capaGravatar = ko.observable(false);
|
||||
oData.capaSieve = ko.observable(false);
|
||||
oData.capaAttachmentThumbnails = ko.observable(false);
|
||||
oData.determineUserLanguage = ko.observable(false);
|
||||
oData.determineUserDomain = ko.observable(false);
|
||||
|
||||
|
|
@ -1256,7 +1259,7 @@
|
|||
Utils.draggablePlace = function ()
|
||||
{
|
||||
return $('<div class="draggablePlace">' +
|
||||
'<span class="text"></span> ' +
|
||||
'<span class="text"></span> ' +
|
||||
'<i class="icon-copy icon-white visible-on-ctrl"></i><i class="icon-mail icon-white hidden-on-ctrl"></i></div>').appendTo('#rl-hidden');
|
||||
};
|
||||
|
||||
|
|
@ -2029,6 +2032,45 @@
|
|||
$('#rl-head-viewport').attr('content', aContent.join(', '));
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sFileName
|
||||
* @return {string}
|
||||
*/
|
||||
Utils.getFileExtension = function (sFileName)
|
||||
{
|
||||
sFileName = Utils.trim(sFileName).toLowerCase();
|
||||
|
||||
var sResult = sFileName.split('.').pop();
|
||||
return (sResult === sFileName) ? '' : sResult;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sFileName
|
||||
* @return {string}
|
||||
*/
|
||||
Utils.mimeContentType = function (sFileName)
|
||||
{
|
||||
var
|
||||
sExt = '',
|
||||
sResult = 'application/octet-stream'
|
||||
;
|
||||
|
||||
sFileName = Utils.trim(sFileName).toLowerCase();
|
||||
|
||||
if ('winmail.dat' === sFileName)
|
||||
{
|
||||
return 'application/ms-tnef';
|
||||
}
|
||||
|
||||
sExt = Utils.getFileExtension(sFileName);
|
||||
if (sExt && 0 < sExt.length && !Utils.isUnd(Mime[sExt]))
|
||||
{
|
||||
sResult = Mime[sExt];
|
||||
}
|
||||
|
||||
return sResult;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {mixed} mPropOrValue
|
||||
* @param {mixed} mValue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue