mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Remove capa.Folders and always allow mailbox folders
This commit is contained in:
parent
1ac96c93d6
commit
e8deb4ff16
16 changed files with 21 additions and 105 deletions
|
|
@ -18,7 +18,6 @@ export const Capa = {
|
|||
TwoFactorForce: 'TWO_FACTOR_FORCE',
|
||||
OpenPGP: 'OPEN_PGP',
|
||||
Prefetch: 'PREFETCH',
|
||||
Folders: 'FOLDERS',
|
||||
Composer: 'COMPOSER',
|
||||
Contacts: 'CONTACTS',
|
||||
Reload: 'RELOAD',
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ export const dropdownVisibility = ko.observable(false).extend({ rateLimit: 0 });
|
|||
|
||||
export const moveAction = ko.observable(false);
|
||||
export const leftPanelDisabled = ko.observable(false);
|
||||
export const leftPanelType = ko.observable('');
|
||||
|
||||
export const createElement = (name, attr) => {
|
||||
let el = doc.createElement(name);
|
||||
|
|
@ -26,11 +25,6 @@ leftPanelDisabled.subscribe(value => {
|
|||
$htmlCL.toggle('rl-left-panel-disabled', value);
|
||||
});
|
||||
|
||||
leftPanelType.subscribe(sValue => {
|
||||
$htmlCL.toggle('rl-left-panel-none', 'none' === sValue);
|
||||
$htmlCL.toggle('rl-left-panel-short', 'short' === sValue);
|
||||
});
|
||||
|
||||
moveAction.subscribe(value => value && leftPanelDisabled() && leftPanelDisabled(false));
|
||||
|
||||
// keys
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import { Capa } from 'Common/Enums';
|
||||
import { Focused } from 'Common/EnumsUser';
|
||||
import { doc, leftPanelDisabled, leftPanelType, moveAction, Settings } from 'Common/Globals';
|
||||
import { doc, leftPanelDisabled, moveAction, Settings } from 'Common/Globals';
|
||||
import { pString, pInt } from 'Common/Utils';
|
||||
import { getFolderFromCacheList, getFolderFullNameRaw, getFolderInboxName } from 'Common/Cache';
|
||||
import { i18n } from 'Common/Translator';
|
||||
|
|
@ -58,12 +57,6 @@ export class MailBoxUserScreen extends AbstractScreen {
|
|||
AppStore.focusedState(Focused.MessageList);
|
||||
|
||||
ThemeStore.isMobile() && leftPanelDisabled(true);
|
||||
|
||||
if (Settings.capa(Capa.Folders)) {
|
||||
leftPanelType('');
|
||||
} else {
|
||||
leftPanelType(Settings.capa(Capa.Composer) || Settings.capa(Capa.Contacts) ? 'short' : 'none');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Capa, KeyState } from 'Common/Enums';
|
||||
import { keyScope, leftPanelType, leftPanelDisabled, Settings } from 'Common/Globals';
|
||||
import { keyScope, leftPanelDisabled, Settings } from 'Common/Globals';
|
||||
import { runSettingsViewModelHooks } from 'Common/Plugins';
|
||||
import { initOnStartOrLangChange, i18n } from 'Common/Translator';
|
||||
|
||||
|
|
@ -77,9 +77,7 @@ export class SettingsUserScreen extends AbstractSettingsScreen {
|
|||
);
|
||||
}
|
||||
|
||||
if (Settings.capa(Capa.Folders)) {
|
||||
settingsAddViewModel(FoldersUserSettings, 'SettingsFolders', 'SETTINGS_LABELS/LABEL_FOLDERS_NAME', 'folders');
|
||||
}
|
||||
settingsAddViewModel(FoldersUserSettings, 'SettingsFolders', 'SETTINGS_LABELS/LABEL_FOLDERS_NAME', 'folders');
|
||||
|
||||
if (Settings.capa(Capa.Themes)) {
|
||||
settingsAddViewModel(ThemesUserSettings, 'SettingsThemes', 'SETTINGS_LABELS/LABEL_THEMES_NAME', 'themes');
|
||||
|
|
@ -99,8 +97,6 @@ export class SettingsUserScreen extends AbstractSettingsScreen {
|
|||
onShow() {
|
||||
this.setSettingsTitle();
|
||||
keyScope(KeyState.Settings);
|
||||
leftPanelType('');
|
||||
|
||||
ThemeStore.isMobile() && leftPanelDisabled(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
html.rl-left-panel-disabled, html.rl-left-panel-short {
|
||||
html.rl-left-panel-disabled {
|
||||
.buttonComposeText{
|
||||
display: none;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -223,11 +223,6 @@ html:not(.rl-left-panel-disabled) #rl-left.resizable > .resizer,
|
|||
}
|
||||
}
|
||||
|
||||
.hidden-on-ctrl-btn,
|
||||
.visible-on-ctrl-btn {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
html:not(.rl-ctrl-key-pressed) .visible-on-ctrl-btn,
|
||||
html.rl-ctrl-key-pressed .hidden-on-ctrl-btn,
|
||||
.show-on-panel-disabled {
|
||||
|
|
@ -257,16 +252,6 @@ html.rl-left-panel-disabled {
|
|||
}
|
||||
}
|
||||
|
||||
html.rl-left-panel-short #rl-left,
|
||||
html.rl-left-panel-short #rl-right {
|
||||
width: 60px !important;
|
||||
}
|
||||
|
||||
html.rl-left-panel-none #rl-left,
|
||||
html.rl-left-panel-none #rl-right {
|
||||
width: 10px !important;
|
||||
}
|
||||
|
||||
html.rl-mobile,
|
||||
html.rl-no-preview-pane {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import {
|
||||
Capa,
|
||||
KeyState,
|
||||
StorageResultType,
|
||||
Notification,
|
||||
|
|
@ -128,7 +127,6 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
this.sLastFocusedField = 'to';
|
||||
|
||||
this.allowContacts = !!AppStore.contactsIsAllowed();
|
||||
this.allowFolders = !!Settings.capa(Capa.Folders);
|
||||
|
||||
this.bSkipNextHide = false;
|
||||
this.composeInEdit = AppStore.composeInEdit;
|
||||
|
|
@ -398,10 +396,6 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
}
|
||||
}
|
||||
|
||||
if (!this.allowFolders) {
|
||||
sSentFolder = UNUSED_OPTION_VALUE;
|
||||
}
|
||||
|
||||
if (!sSentFolder) {
|
||||
showScreenPopup(FolderSystemPopupView, [SetSystemFoldersNotification.Sent]);
|
||||
} else {
|
||||
|
|
@ -437,10 +431,6 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
}
|
||||
|
||||
saveCommand() {
|
||||
if (!this.allowFolders) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (FolderStore.draftFolderNotEnabled()) {
|
||||
showScreenPopup(FolderSystemPopupView, [SetSystemFoldersNotification.Draft]);
|
||||
} else {
|
||||
|
|
@ -1146,16 +1136,14 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
return false;
|
||||
});
|
||||
|
||||
if (this.allowFolders) {
|
||||
shortcuts.add('s', 'meta', KeyState.Compose, () => {
|
||||
this.saveCommand();
|
||||
return false;
|
||||
});
|
||||
shortcuts.add('save', KeyState.Compose, () => {
|
||||
this.saveCommand();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
shortcuts.add('s', 'meta', KeyState.Compose, () => {
|
||||
this.saveCommand();
|
||||
return false;
|
||||
});
|
||||
shortcuts.add('save', KeyState.Compose, () => {
|
||||
this.saveCommand();
|
||||
return false;
|
||||
});
|
||||
|
||||
if (Settings.app('allowCtrlEnterOnCompose')) {
|
||||
shortcuts.add('enter', 'meta', KeyState.Compose, () => {
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@ export class FolderListMailBoxUserView extends AbstractViewLeft {
|
|||
|
||||
this.allowComposer = !!Settings.capa(Capa.Composer);
|
||||
this.allowContacts = !!AppStore.contactsIsAllowed();
|
||||
this.allowFolders = !!Settings.capa(Capa.Folders);
|
||||
|
||||
this.folderListFocused = ko.computed(() => Focused.FolderList === AppStore.focusedState());
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ export class MessageListMailBoxUserView extends AbstractViewRight {
|
|||
this.allowComposer = !!Settings.capa(Capa.Composer);
|
||||
this.allowMessageListActions = !!Settings.capa(Capa.MessageListActions);
|
||||
this.allowDangerousActions = !!Settings.capa(Capa.DangerousActions);
|
||||
this.allowFolders = !!Settings.capa(Capa.Folders);
|
||||
|
||||
this.popupVisibility = popupVisibility;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue