mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
parent
9bdd7d5564
commit
13c23141ee
12 changed files with 34 additions and 9 deletions
|
|
@ -25,6 +25,8 @@ import { /*koComputable,*/ addObservablesTo } from 'External/ko';
|
||||||
|
|
||||||
import Remote from 'Remote/User/Fetch';
|
import Remote from 'Remote/User/Fetch';
|
||||||
|
|
||||||
|
import { FileInfo } from 'Common/File';
|
||||||
|
|
||||||
const
|
const
|
||||||
// isPosNumeric = value => null != value && /^[0-9]*$/.test(value.toString()),
|
// isPosNumeric = value => null != value && /^[0-9]*$/.test(value.toString()),
|
||||||
|
|
||||||
|
|
@ -304,6 +306,7 @@ export class FolderModel extends AbstractModel {
|
||||||
this.etag = '';
|
this.etag = '';
|
||||||
this.id = 0;
|
this.id = 0;
|
||||||
this.uidNext = 0;
|
this.uidNext = 0;
|
||||||
|
this.size = 0;
|
||||||
|
|
||||||
addObservablesTo(this, {
|
addObservablesTo(this, {
|
||||||
name: '',
|
name: '',
|
||||||
|
|
@ -456,6 +459,8 @@ export class FolderModel extends AbstractModel {
|
||||||
return '';
|
return '';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
friendlySize: () => FileInfo.friendlySize(this.size),
|
||||||
|
|
||||||
detailedName: () => this.name() + ' ' + this.nameInfo(),
|
detailedName: () => this.name() + ' ' + this.nameInfo(),
|
||||||
|
|
||||||
hasSubscribedUnreadMessagesSubfolders: () =>
|
hasSubscribedUnreadMessagesSubfolders: () =>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,8 @@
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.folder-system-name {
|
.folder-system-name, .folder-size {
|
||||||
|
margin-left: 0.2em;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ const
|
||||||
imapDisable_sort: false,
|
imapDisable_sort: false,
|
||||||
imapDisable_thread: false,
|
imapDisable_thread: false,
|
||||||
imapDisable_binary: false,
|
imapDisable_binary: false,
|
||||||
|
imapDisable_status_size: true,
|
||||||
imapExpunge_all_on_delete: false,
|
imapExpunge_all_on_delete: false,
|
||||||
imapFast_simple_search: true,
|
imapFast_simple_search: true,
|
||||||
imapFetch_new_messages: true,
|
imapFetch_new_messages: true,
|
||||||
|
|
@ -86,6 +87,7 @@ const
|
||||||
disable_sort: !!oDomain.imapDisable_sort(),
|
disable_sort: !!oDomain.imapDisable_sort(),
|
||||||
disable_thread: !!oDomain.imapDisable_thread(),
|
disable_thread: !!oDomain.imapDisable_thread(),
|
||||||
disable_binary: !!oDomain.imapDisable_binary(),
|
disable_binary: !!oDomain.imapDisable_binary(),
|
||||||
|
disable_status_size: !!oDomain.imapDisable_status_size(),
|
||||||
folder_list_limit: pInt(oDomain.imapFolder_list_limit()),
|
folder_list_limit: pInt(oDomain.imapFolder_list_limit()),
|
||||||
message_list_limit: pInt(oDomain.imapMessage_list_limit())
|
message_list_limit: pInt(oDomain.imapMessage_list_limit())
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@
|
||||||
"disable_sort": false,
|
"disable_sort": false,
|
||||||
"disable_thread": false,
|
"disable_thread": false,
|
||||||
"disable_binary": false,
|
"disable_binary": false,
|
||||||
|
"disable_status_size": true,
|
||||||
"use_expunge_all_on_delete": false,
|
"use_expunge_all_on_delete": false,
|
||||||
"fast_simple_search": true,
|
"fast_simple_search": true,
|
||||||
"force_select": false,
|
"force_select": false,
|
||||||
|
|
|
||||||
|
|
@ -143,6 +143,10 @@ trait Folders
|
||||||
if ($this->hasCapability('APPENDLIMIT')) {
|
if ($this->hasCapability('APPENDLIMIT')) {
|
||||||
$aStatusItems[] = FolderStatus::APPENDLIMIT;
|
$aStatusItems[] = FolderStatus::APPENDLIMIT;
|
||||||
}
|
}
|
||||||
|
// RFC 8438
|
||||||
|
if ($this->hasCapability('STATUS=SIZE')) {
|
||||||
|
$aStatusItems[] = FolderStatus::SIZE;
|
||||||
|
}
|
||||||
// RFC 8474
|
// RFC 8474
|
||||||
if ($this->hasCapability('OBJECTID')) {
|
if ($this->hasCapability('OBJECTID')) {
|
||||||
$aStatusItems[] = FolderStatus::MAILBOXID;
|
$aStatusItems[] = FolderStatus::MAILBOXID;
|
||||||
|
|
@ -151,11 +155,6 @@ trait Folders
|
||||||
$aStatusItems[] = 'X-GUID';
|
$aStatusItems[] = 'X-GUID';
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
/* // STATUS SIZE can take a significant amount of time, therefore not active
|
|
||||||
if ($this->hasCapability('IMAP4rev2')) {
|
|
||||||
$aStatusItems[] = FolderStatus::SIZE;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
return $aStatusItems;
|
return $aStatusItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,8 +28,8 @@ abstract class FolderStatus
|
||||||
const HIGHESTMODSEQ = 'HIGHESTMODSEQ';
|
const HIGHESTMODSEQ = 'HIGHESTMODSEQ';
|
||||||
// RFC 7889
|
// RFC 7889
|
||||||
const APPENDLIMIT = 'APPENDLIMIT';
|
const APPENDLIMIT = 'APPENDLIMIT';
|
||||||
|
// RFC 8438
|
||||||
|
const SIZE = 'SIZE';
|
||||||
// RFC 8474
|
// RFC 8474
|
||||||
const MAILBOXID = 'MAILBOXID';
|
const MAILBOXID = 'MAILBOXID';
|
||||||
// RFC 9051 IMAP4rev2
|
|
||||||
const SIZE = 'SIZE';
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,7 @@ class Folder implements \JsonSerializable
|
||||||
'totalEmails' => $this->MESSAGES,
|
'totalEmails' => $this->MESSAGES,
|
||||||
'unreadEmails' => $this->UNSEEN,
|
'unreadEmails' => $this->UNSEEN,
|
||||||
'id' => $this->MAILBOXID,
|
'id' => $this->MAILBOXID,
|
||||||
|
'size' => $this->SIZE,
|
||||||
'role' => $this->Role()
|
'role' => $this->Role()
|
||||||
/*
|
/*
|
||||||
'myRights' => [
|
'myRights' => [
|
||||||
|
|
|
||||||
|
|
@ -325,6 +325,10 @@ class ImapClient extends \MailSo\Net\NetClient
|
||||||
}
|
}
|
||||||
if (8 > PHP_INT_SIZE) {
|
if (8 > PHP_INT_SIZE) {
|
||||||
$aList = \array_diff($aList, ['CONDSTORE']);
|
$aList = \array_diff($aList, ['CONDSTORE']);
|
||||||
|
$aList = \array_diff($aList, ['STATUS=SIZE']);
|
||||||
|
}
|
||||||
|
if ($this->Settings->disable_status_size) {
|
||||||
|
$aList = \array_diff($aList, ['STATUS=SIZE']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->aCapabilityItems = $aList;
|
$this->aCapabilityItems = $aList;
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ class Settings extends \MailSo\Net\ConnectSettings
|
||||||
$disable_sort = false,
|
$disable_sort = false,
|
||||||
$disable_thread = false,
|
$disable_thread = false,
|
||||||
$disable_binary = false,
|
$disable_binary = false,
|
||||||
|
// STATUS SIZE can take a significant amount of time, therefore not active by default
|
||||||
|
$disable_status_size = true,
|
||||||
$expunge_all_on_delete = false,
|
$expunge_all_on_delete = false,
|
||||||
$fast_simple_search = true,
|
$fast_simple_search = true,
|
||||||
$fetch_new_messages = true,
|
$fetch_new_messages = true,
|
||||||
|
|
@ -53,6 +55,7 @@ class Settings extends \MailSo\Net\ConnectSettings
|
||||||
'disable_sort',
|
'disable_sort',
|
||||||
'disable_thread',
|
'disable_thread',
|
||||||
'disable_binary',
|
'disable_binary',
|
||||||
|
'disable_status_size',
|
||||||
'expunge_all_on_delete',
|
'expunge_all_on_delete',
|
||||||
'fast_simple_search',
|
'fast_simple_search',
|
||||||
'fetch_new_messages',
|
'fetch_new_messages',
|
||||||
|
|
@ -91,6 +94,7 @@ class Settings extends \MailSo\Net\ConnectSettings
|
||||||
'disable_sort' => $this->disable_sort,
|
'disable_sort' => $this->disable_sort,
|
||||||
'disable_thread' => $this->disable_thread,
|
'disable_thread' => $this->disable_thread,
|
||||||
'disable_binary' => $this->disable_binary,
|
'disable_binary' => $this->disable_binary,
|
||||||
|
'disable_status_size' => $this->disable_status_size,
|
||||||
'use_expunge_all_on_delete' => $this->expunge_all_on_delete,
|
'use_expunge_all_on_delete' => $this->expunge_all_on_delete,
|
||||||
// 'body_text_limit' => $this->body_text_limit,
|
// 'body_text_limit' => $this->body_text_limit,
|
||||||
'fast_simple_search' => $this->fast_simple_search,
|
'fast_simple_search' => $this->fast_simple_search,
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ trait Status
|
||||||
public ?string $MAILBOXID = null;
|
public ?string $MAILBOXID = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* RFC 9051
|
* RFC 8438
|
||||||
* The total size of the mailbox in octets.
|
* The total size of the mailbox in octets.
|
||||||
*/
|
*/
|
||||||
public ?int $SIZE = null;
|
public ?int $SIZE = null;
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,13 @@
|
||||||
label: 'BINARY'
|
label: 'BINARY'
|
||||||
}
|
}
|
||||||
}"></div>
|
}"></div>
|
||||||
|
<div data-bind="component: {
|
||||||
|
name: 'Checkbox',
|
||||||
|
params: {
|
||||||
|
value: imapDisable_status_size,
|
||||||
|
label: 'STATUS SIZE'
|
||||||
|
}
|
||||||
|
}"></div>
|
||||||
|
|
||||||
<h4 data-i18n="POPUPS_DOMAIN/LIMITS"></h4>
|
<h4 data-i18n="POPUPS_DOMAIN/LIMITS"></h4>
|
||||||
<div class="control-group">
|
<div class="control-group">
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||||
data-bind="textInput: nameForEdit, visible: editing, hasfocus: editing, onEnter: rename, onEsc: unedit">
|
data-bind="textInput: nameForEdit, visible: editing, hasfocus: editing, onEnter: rename, onEsc: unedit">
|
||||||
<span class="folder-system-name" data-bind="text: nameInfo, visible: isSystemFolder"></span>
|
<span class="folder-system-name" data-bind="text: nameInfo, visible: isSystemFolder"></span>
|
||||||
|
<span class="folder-size" data-bind="text: friendlySize, visible: size"></span>
|
||||||
</td>
|
</td>
|
||||||
<td data-i18n="[title]SETTINGS_FOLDERS/HELP_DELETE_FOLDER">
|
<td data-i18n="[title]SETTINGS_FOLDERS/HELP_DELETE_FOLDER">
|
||||||
<a class="btn btn-small btn-danger button-confirm-delete" data-bind="css: {'delete-access': askDelete()}, click: $root.deleteFolder"
|
<a class="btn btn-small btn-danger button-confirm-delete" data-bind="css: {'delete-access': askDelete()}, click: $root.deleteFolder"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue