mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Bugfix: .apply() error on leftPanelDisabled.toggle
This commit is contained in:
parent
08baff9e64
commit
b655e0ad70
|
@ -20,6 +20,7 @@ export const
|
|||
|
||||
moveAction = ko.observable(false),
|
||||
leftPanelDisabled = ko.observable(false),
|
||||
toggleLeftPanel = () => leftPanelDisabled(!leftPanelDisabled()),
|
||||
|
||||
createElement = (name, attr) => {
|
||||
let el = doc.createElement(name);
|
||||
|
@ -68,10 +69,9 @@ dropdownVisibility.subscribe(value => {
|
|||
}
|
||||
});
|
||||
|
||||
leftPanelDisabled.toggle = () => leftPanelDisabled(!leftPanelDisabled());
|
||||
leftPanelDisabled.subscribe(value => {
|
||||
value && moveAction() && moveAction(false);
|
||||
$htmlCL.toggle('rl-left-panel-disabled', value);
|
||||
});
|
||||
|
||||
moveAction.subscribe(value => value && leftPanelDisabled() && leftPanelDisabled(false));
|
||||
moveAction.subscribe(value => value && leftPanelDisabled(false));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { addObservablesTo, addComputablesTo, addSubscribablesTo } from 'External/ko';
|
||||
import { keyScope, addShortcut, SettingsGet, leftPanelDisabled, elementById } from 'Common/Globals';
|
||||
import { keyScope, addShortcut, SettingsGet, leftPanelDisabled, toggleLeftPanel, elementById } from 'Common/Globals';
|
||||
import { ViewTypePopup, showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import { SaveSettingStatus } from 'Common/Enums';
|
||||
|
@ -97,6 +97,7 @@ export class AbstractViewLeft extends AbstractView
|
|||
{
|
||||
super(templateID, 'left');
|
||||
this.leftPanelDisabled = leftPanelDisabled;
|
||||
this.toggleLeftPanel = toggleLeftPanel;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,12 +2,13 @@ import Remote from 'Remote/Admin/Fetch';
|
|||
|
||||
import { AbstractViewRight } from 'Knoin/AbstractViews';
|
||||
|
||||
import { leftPanelDisabled } from 'Common/Globals';
|
||||
import { leftPanelDisabled, toggleLeftPanel } from 'Common/Globals';
|
||||
|
||||
export class PaneSettingsAdminView extends AbstractViewRight {
|
||||
constructor() {
|
||||
super('AdminPane');
|
||||
this.leftPanelDisabled = leftPanelDisabled;
|
||||
this.toggleLeftPanel = toggleLeftPanel;
|
||||
}
|
||||
|
||||
logoutClick() {
|
||||
|
|
|
@ -5,7 +5,7 @@ import { Scope } from 'Common/Enums';
|
|||
|
||||
import { ComposeType, FolderType, MessageSetAction } from 'Common/EnumsUser';
|
||||
|
||||
import { leftPanelDisabled, moveAction,
|
||||
import { leftPanelDisabled, toggleLeftPanel, moveAction,
|
||||
Settings, SettingsCapa,
|
||||
addEventsListeners,
|
||||
addShortcut, registerShortcut, formFieldFocused
|
||||
|
@ -83,6 +83,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
|
||||
this.isMobile = ThemeStore.isMobile;
|
||||
this.leftPanelDisabled = leftPanelDisabled;
|
||||
this.toggleLeftPanel = toggleLeftPanel;
|
||||
|
||||
this.popupVisibility = arePopupsVisible;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { mailbox } from 'Common/Links';
|
||||
import { getFolderInboxName } from 'Common/Cache';
|
||||
import { leftPanelDisabled } from 'Common/Globals';
|
||||
import { leftPanelDisabled, toggleLeftPanel } from 'Common/Globals';
|
||||
|
||||
import { MessageUserStore } from 'Stores/User/Message';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
@ -13,6 +13,7 @@ export class SettingsPaneUserView extends AbstractViewRight {
|
|||
|
||||
this.isMobile = ThemeStore.isMobile;
|
||||
this.leftPanelDisabled = leftPanelDisabled;
|
||||
this.toggleLeftPanel = toggleLeftPanel;
|
||||
}
|
||||
|
||||
onShow() {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div class="b-toolbar g-ui-user-select-none">
|
||||
<a class="btn btn-thin fontastic toggleLeft" data-bind="click: leftPanelDisabled.toggle, text: leftPanelDisabled() ? '❯' : '❮'">❮</a>
|
||||
<a class="btn btn-thin fontastic toggleLeft" data-bind="click: toggleLeftPanel, text: leftPanelDisabled() ? '❯' : '❮'">❮</a>
|
||||
<h4>SnappyMail - <span data-i18n="TOP_PANEL/LABEL_ADMIN_PANEL"></span></h4>
|
||||
<a class="btn btn-logout fontastic" data-bind="click: logoutClick">⏻</a>
|
||||
</div>
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
<ul class="b-folders-user" data-bind="template: { name: 'MailFolderListItem', foreach: folderListVisible }"></ul>
|
||||
<div class="move-action-content-wrapper" data-bind="visible: moveAction"></div>
|
||||
</div>
|
||||
<div class="b-content show-on-panel-disabled" data-bind="click: leftPanelDisabled.toggle()"></div>
|
||||
<div class="b-content show-on-panel-disabled" data-bind="click: toggleLeftPanel"></div>
|
||||
<div class="b-footer btn-toolbar hide-mobile">
|
||||
<div class="btn-group">
|
||||
<a class="btn" data-bind="click: leftPanelDisabled.toggle(), css: {'icon-resize-out': leftPanelDisabled(), 'icon-resize-in': !leftPanelDisabled()}"></a>
|
||||
<a class="btn fontastic" data-bind="click: toggleLeftPanel, text: leftPanelDisabled() ? '❯' : '❮'"></a>
|
||||
</div>
|
||||
<div class="btn-group hide-on-panel-disabled">
|
||||
<a class="btn icon-folder-add" data-bind="click: createFolder" data-i18n="[title]POPUPS_CREATE_FOLDER/TITLE_CREATE_FOLDER"></a>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="btn-toolbar">
|
||||
<!-- ko if: isMobile() -->
|
||||
<a class="btn btn-thin fontastic toggleLeft" data-bind="click: leftPanelDisabled.toggle, text: leftPanelDisabled() ? '❯' : '❮'">❮</a>
|
||||
<a class="btn btn-thin fontastic toggleLeft" data-bind="click: toggleLeftPanel, text: leftPanelDisabled() ? '❯' : '❮'">❮</a>
|
||||
<a class="btn buttonCompose" data-bind="click: composeClick, css: {'btn-warning': composeInEdit, 'btn-success': !composeInEdit()}, visible: mobileCheckedStateHide()" data-i18n="[title]FOLDER_LIST/BUTTON_NEW_MESSAGE">
|
||||
<i class="icon-paper-plane"></i>
|
||||
</a>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<nav class="b-content" data-bind="foreach: menu">
|
||||
<a data-bind="css: {'selected': selected }, attr: { 'href': $root.link(route), 'data-i18n': label }"></a>
|
||||
</nav>
|
||||
<div class="b-content show-on-panel-disabled" data-bind="click: leftPanelDisabled.toggle()"></div>
|
||||
<div class="b-content show-on-panel-disabled" data-bind="click: toggleLeftPanel"></div>
|
||||
<div class="b-footer">
|
||||
<a class="btn" data-bind="click: leftPanelDisabled.toggle, css: {'icon-resize-out': leftPanelDisabled(), 'icon-resize-in': !leftPanelDisabled()}"></a>
|
||||
<a class="btn fontastic" data-bind="click: toggleLeftPanel, text: leftPanelDisabled() ? '❯' : '❮'"></a>
|
||||
</div>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div class="btn-toolbar">
|
||||
<!-- ko if: isMobile() -->
|
||||
<div class="btn-group" style="margin-left: -1px">
|
||||
<a class="btn btn-thin fontastic toggleLeft" data-bind="click: leftPanelDisabled.toggle, text: leftPanelDisabled() ? '❯' : '❮'">❮</a>
|
||||
<a class="btn btn-thin fontastic toggleLeft" data-bind="click: toggleLeftPanel, text: leftPanelDisabled() ? '❯' : '❮'">❮</a>
|
||||
</div>
|
||||
<!-- /ko -->
|
||||
<a class="btn" data-bind="click: backToInbox" data-icon="⬅" data-i18n="GLOBAL/BACK"></a>
|
||||
|
|
BIN
vendors/fontastic/fonts/snappymail.woff
vendored
BIN
vendors/fontastic/fonts/snappymail.woff
vendored
Binary file not shown.
BIN
vendors/fontastic/fonts/snappymail.woff2
vendored
BIN
vendors/fontastic/fonts/snappymail.woff2
vendored
Binary file not shown.
6
vendors/fontastic/styles.css
vendored
6
vendors/fontastic/styles.css
vendored
|
@ -103,12 +103,6 @@
|
|||
.icon-copy::before {
|
||||
content: "\e068";
|
||||
}
|
||||
.icon-resize-in::before {
|
||||
content: "\e06c";
|
||||
}
|
||||
.icon-resize-out::before {
|
||||
content: "⤢";
|
||||
}
|
||||
.icon-check-mark-circle-two::before {
|
||||
content: "\e073";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue