mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-20 13:55:58 +00:00
feat(mail): Add a setting to show the attachments above the mail body
This commit is contained in:
@@ -129,6 +129,7 @@
|
||||
SOGoMailDisplayFullEmail = NO;
|
||||
SOGoMailDisplayRemoteInlineImages = "never";
|
||||
SOGoMailCertificateEnabled = YES;
|
||||
SOGoMailDisplayAttachmentAbove = NO;
|
||||
|
||||
SOGoMailAutoMarkAsReadDelay = "0";
|
||||
SOGoMailAutoSave = "5";
|
||||
|
||||
@@ -156,12 +156,14 @@ extern NSString *SOGoPasswordRecoverySecondaryEmail;
|
||||
- (void) setMailComposeFontSize: (int) newValue;
|
||||
- (int) mailComposeFontSize;
|
||||
|
||||
- (void) setMailDisplayFullEmail: (BOOL *) newValue;
|
||||
- (BOOL *) mailDisplayFullEmail;
|
||||
- (void) setMailDisplayFullEmail: (BOOL) newValue;
|
||||
- (BOOL) mailDisplayFullEmail;
|
||||
|
||||
- (void) setMailDisplayRemoteInlineImages: (NSString *) newValue;
|
||||
- (NSString *) mailDisplayRemoteInlineImages;
|
||||
|
||||
- (void) setMailDisplayAttachmentAbove: (BOOL) newValue;
|
||||
- (BOOL) mailDisplayAttachmentAbove;
|
||||
|
||||
- (void) setMailAutoMarkAsReadDelay: (int) newValue;
|
||||
- (int) mailAutoMarkAsReadDelay;
|
||||
|
||||
@@ -634,12 +634,12 @@ NSString *SOGoPasswordRecoverySecondaryEmail = @"SecondaryEmail";
|
||||
return [self integerForKey: @"SOGoMailComposeFontSize"];
|
||||
}
|
||||
|
||||
- (void) setMailDisplayFullEmail: (BOOL *) newValue
|
||||
- (void) setMailDisplayFullEmail: (BOOL) newValue
|
||||
{
|
||||
[self setBool: newValue forKey: @"SOGoMailDisplayFullEmail"];
|
||||
}
|
||||
|
||||
- (BOOL *) mailDisplayFullEmail;
|
||||
- (BOOL) mailDisplayFullEmail;
|
||||
{
|
||||
return [self boolForKey: @"SOGoMailDisplayFullEmail"];
|
||||
}
|
||||
@@ -654,6 +654,16 @@ NSString *SOGoPasswordRecoverySecondaryEmail = @"SecondaryEmail";
|
||||
return [self stringForKey: @"SOGoMailDisplayRemoteInlineImages"];
|
||||
}
|
||||
|
||||
- (void) setMailDisplayAttachmentAbove: (BOOL) newValue
|
||||
{
|
||||
[self setBool: newValue forKey: @"SOGoMailDisplayAttachmentAbove"];
|
||||
}
|
||||
|
||||
- (BOOL) mailDisplayAttachmentAbove;
|
||||
{
|
||||
return [self boolForKey: @"SOGoMailDisplayAttachmentAbove"];
|
||||
}
|
||||
|
||||
- (void) setMailAutoMarkAsReadDelay: (int) newValue
|
||||
{
|
||||
[self setInteger: newValue forKey: @"SOGoMailAutoMarkAsReadDelay"];
|
||||
|
||||
@@ -114,7 +114,7 @@ See <a href=\"http://www.sogo.nu/en/support/community.html\">this page</a> for v
|
||||
"New password" = "New password";
|
||||
"Passwords don't match" = "Passwords don't match";
|
||||
"Confirmation" = "Confirmation";
|
||||
"Change" = "Changer";
|
||||
"Change" = "Change";
|
||||
"Cancel" = "Cancel";
|
||||
"Please wait..." = "Please wait...";
|
||||
"Close" = "Close";
|
||||
|
||||
@@ -207,6 +207,7 @@
|
||||
"Insert signature on forward" = "Insert signature on forward";
|
||||
"Show recipients or sender full email in mailboxes" = "Show recipients or sender full email in mailboxes";
|
||||
"Hide attachements for inline images" = "Hide attachments for inline images";
|
||||
"Show attachments above the message" = "Show attachments above the message";
|
||||
|
||||
/* Base font size for messages composed in HTML */
|
||||
"Default font size" = "Default font size";
|
||||
|
||||
@@ -207,6 +207,7 @@
|
||||
"Insert signature on forward" = "Insérer la signature sur un transfert";
|
||||
"Show recipients or sender full email in mailboxes" = "Afficher l'email complet du destinataire ou expéditeur dans les boîtes aux lettres";
|
||||
"Hide attachements for inline images" = "Cacher les pièces jointes pour les images 'inline'";
|
||||
"Show attachments above the message" = "Montrer les pièces jointes au dessus du message";
|
||||
|
||||
/* Base font size for messages composed in HTML */
|
||||
"Default font size" = "Taille de la police par défaut";
|
||||
|
||||
@@ -429,6 +429,9 @@ static SoProduct *preferencesProduct = nil;
|
||||
if (![[defaults source] objectForKey: @"SOGoMailDisplayRemoteInlineImages"])
|
||||
[[defaults source] setObject: [defaults mailDisplayRemoteInlineImages] forKey: @"SOGoMailDisplayRemoteInlineImages"];
|
||||
|
||||
if (![[defaults source] objectForKey: @"SOGoMailDisplayAttachmentAbove"])
|
||||
[[defaults source] setObject: [defaults mailDisplayAttachmentAbove] forKey: @"SOGoMailDisplayAttachmentAbove"];
|
||||
|
||||
if ([[defaults source] objectForKey: @"SOGoMailAutoMarkAsReadDelay"] == nil)
|
||||
[[defaults source] setObject: [NSNumber numberWithInt: [defaults mailAutoMarkAsReadDelay]] forKey: @"SOGoMailAutoMarkAsReadDelay"];
|
||||
|
||||
|
||||
@@ -721,6 +721,16 @@
|
||||
</md-checkbox>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<md-checkbox
|
||||
ng-model="app.preferences.defaults.SOGoMailDisplayAttachmentAbove"
|
||||
ng-true-value="1"
|
||||
ng-false-value="0"
|
||||
label:aria-label="Show attachments above the message">
|
||||
<var:string label:value="Show attachments above the message"/>
|
||||
</md-checkbox>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<md-checkbox
|
||||
ng-model="app.preferences.defaults.SOGoMailAutoMarkAsReadEnabled"
|
||||
|
||||
@@ -462,7 +462,12 @@
|
||||
// Trusted content that can be compiled (Angularly-speaking)
|
||||
part.compile = true;
|
||||
if (!Object.hasOwn(part, 'shouldDisplayAttachment') || 1 == part.shouldDisplayAttachment ) {
|
||||
parts.push(part);
|
||||
if(Message.$Preferences.defaults.SOGoMailDisplayAttachmentAbove) {
|
||||
parts.unshift(part);
|
||||
}
|
||||
else {
|
||||
parts.push(part);
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user