mirror of
https://github.com/sismics/docs.git
synced 2024-11-21 21:47:57 +01:00
#180: expain that only unread emails will be imported, fix logo display
This commit is contained in:
parent
2b23a1d048
commit
1ce5ba4f06
@ -18,6 +18,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.mail.*;
|
||||
import javax.mail.search.FlagTerm;
|
||||
import java.util.Date;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
@ -114,7 +115,7 @@ public class InboxService extends AbstractScheduledService {
|
||||
Folder inbox = null;
|
||||
try {
|
||||
inbox = openInbox();
|
||||
return inbox.getMessageCount();
|
||||
return inbox.search(new FlagTerm(new Flags(Flags.Flag.SEEN), false)).length;
|
||||
} catch (Exception e) {
|
||||
log.error("Error testing inbox", e);
|
||||
return -1;
|
||||
|
@ -118,7 +118,7 @@
|
||||
<span ng-if="appName == 'Sismics Docs'">
|
||||
<span style="color: #e43935;">Sismics</span> <span style="color: #2aabd2;">Docs</span>
|
||||
</span>
|
||||
<span ng-if="appName != 'Sismics Docs'">{{ appName }}</span>
|
||||
<span ng-if="appName != 'Sismics Docs'" style="color: #888;">{{ appName }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
|
@ -363,7 +363,7 @@
|
||||
},
|
||||
"inbox": {
|
||||
"title": "Inbox scanning",
|
||||
"message": "By enabling this feature, the system while periodically scan the specified inbox for new emails and automatically import them.",
|
||||
"message": "By enabling this feature, the system will scan the specified inbox every 15 minutes for <strong>unread</strong> emails and automatically import them.<br/>After importing an email, it will be marked as read.<br/>Configuration settings for <a href=\"https://support.google.com/mail/answer/7126229?hl=en\" target=\"_blank\">Gmail</a>, <a href=\"https://support.office.com/en-us/article/pop-imap-and-smtp-settings-for-outlook-com-d088b986-291d-42b8-9564-9c414e2aa040\" target=\"_blank\">Outlook.com</a>, <a href=\"https://help.yahoo.com/kb/SLN4075.html\" target=\"_blank\">Yahoo</a>.",
|
||||
"enabled": "Enable inbox scanning",
|
||||
"hostname": "IMAP hostname",
|
||||
"port": "IMAP port (143 or 993)",
|
||||
@ -371,8 +371,8 @@
|
||||
"password": "IMAP password",
|
||||
"tag": "Tag added to imported documents",
|
||||
"test": "Test the parameters",
|
||||
"last_sync": "Last synchronization: {{ data.date | date }}, {{ data.count }} message{{ data.count > 1 ? 's' : '' }} imported",
|
||||
"test_success": "The connection to the inbox is successful ({{ count }} message{{ count > 1 ? 's' : '' }})",
|
||||
"last_sync": "Last synchronization: {{ data.date | date: 'medium' }}, {{ data.count }} message{{ data.count > 1 ? 's' : '' }} imported",
|
||||
"test_success": "The connection to the inbox is successful ({{ count }} <strong>unread</strong> message{{ count > 1 ? 's' : '' }})",
|
||||
"test_fail": "An error occurred while connecting to the inbox, please check the parameters"
|
||||
},
|
||||
"log": {
|
||||
|
@ -73,4 +73,6 @@
|
||||
|
||||
<div class="alert col-sm-9"
|
||||
ng-class="{ 'alert-success': testResult.count >= 0, 'alert-danger': testResult.count == -1 }"
|
||||
ng-show="testResult">{{ testResult.count >= 0 ? 'settings.inbox.test_success' : 'settings.inbox.test_fail' | translate: { count: testResult.count } }}</div>
|
||||
ng-show="testResult"
|
||||
translate="{{ testResult.count >= 0 ? 'settings.inbox.test_success' : 'settings.inbox.test_fail' }}"
|
||||
translate-values="{ count: testResult.count }"></div>
|
@ -1,9 +1,11 @@
|
||||
// Logo
|
||||
.navbar-logo {
|
||||
margin: 3px;
|
||||
|
||||
img {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user