mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Idea for contacts screen route
This commit is contained in:
parent
a25d35d6df
commit
fc141fe29b
10 changed files with 197 additions and 9 deletions
33
dev/Screen/User/Contacts.js
Normal file
33
dev/Screen/User/Contacts.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import { ScopeContacts } from 'Common/Enums';
|
||||
import { i18n } from 'Common/Translator';
|
||||
|
||||
import { AppUserStore } from 'Stores/User/App';
|
||||
|
||||
import { SystemDropDownUserView } from 'View/User/SystemDropDown';
|
||||
import { AddressBooks } from 'View/User/Contacts/AddressBooks';
|
||||
import { ContactsList } from 'View/User/Contacts/ContactsList';
|
||||
import { ContactView } from 'View/User/Contacts/ContactView';
|
||||
|
||||
import { AbstractScreen } from 'Knoin/AbstractScreen';
|
||||
|
||||
export class ContactsUserScreen extends AbstractScreen {
|
||||
|
||||
constructor() {
|
||||
super('contacts', [
|
||||
SystemDropDownUserView,
|
||||
AddressBooks,
|
||||
ContactsList,
|
||||
ContactView
|
||||
]);
|
||||
}
|
||||
|
||||
onShow() {
|
||||
this.setTitle();
|
||||
AppUserStore.focusedState('none');
|
||||
AppUserStore.focusedState(ScopeContacts);
|
||||
}
|
||||
|
||||
setTitle() {
|
||||
rl.setTitle(i18n('GLOBAL/CONTACTS'));
|
||||
}
|
||||
}
|
||||
|
|
@ -39,7 +39,7 @@ export class MailBoxUserScreen extends AbstractScreen {
|
|||
/**
|
||||
* @returns {void}
|
||||
*/
|
||||
updateWindowTitle() {
|
||||
setTitle() {
|
||||
const count = Settings.app('listPermanentFiltered') ? 0 : FolderUserStore.foldersInboxUnreadCount(),
|
||||
email = AccountUserStore.email();
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ export class MailBoxUserScreen extends AbstractScreen {
|
|||
* @returns {void}
|
||||
*/
|
||||
onShow() {
|
||||
this.updateWindowTitle();
|
||||
this.setTitle();
|
||||
AppUserStore.focusedState('none');
|
||||
AppUserStore.focusedState(ScopeMessageList);
|
||||
}
|
||||
|
|
@ -99,7 +99,7 @@ export class MailBoxUserScreen extends AbstractScreen {
|
|||
email === item?.email && item?.count(e.detail)
|
||||
);
|
||||
*/
|
||||
this.updateWindowTitle();
|
||||
this.setTitle();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,11 +66,11 @@ export class SettingsUserScreen extends AbstractSettingsScreen {
|
|||
}
|
||||
|
||||
onShow() {
|
||||
this.setSettingsTitle();
|
||||
this.setTitle();
|
||||
keyScope(ScopeSettings);
|
||||
}
|
||||
|
||||
setSettingsTitle() {
|
||||
setTitle() {
|
||||
const sEmail = AccountUserStore.email();
|
||||
rl.setTitle((sEmail ? sEmail + ' - ' : '') + this.sSettingsTitle);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue