fix: panel resizer callback
This commit is contained in:
@@ -37,7 +37,7 @@ interface PanelResizerScope {
|
|||||||
hoverable: boolean
|
hoverable: boolean
|
||||||
index: number
|
index: number
|
||||||
minWidth: number
|
minWidth: number
|
||||||
onResizeFinish: ResizeFinishCallback
|
onResizeFinish: () => ResizeFinishCallback
|
||||||
panelId: string
|
panelId: string
|
||||||
property: PanelSide
|
property: PanelSide
|
||||||
}
|
}
|
||||||
@@ -52,7 +52,7 @@ class PanelResizerCtrl implements PanelResizerScope {
|
|||||||
hoverable!: boolean
|
hoverable!: boolean
|
||||||
index!: number
|
index!: number
|
||||||
minWidth!: number
|
minWidth!: number
|
||||||
onResizeFinish!: ResizeFinishCallback
|
onResizeFinish!: () => ResizeFinishCallback
|
||||||
panelId!: string
|
panelId!: string
|
||||||
property!: PanelSide
|
property!: PanelSide
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ class PanelResizerCtrl implements PanelResizerScope {
|
|||||||
}
|
}
|
||||||
this.finishSettingWidth();
|
this.finishSettingWidth();
|
||||||
const newCollapseState = !preClickCollapseState;
|
const newCollapseState = !preClickCollapseState;
|
||||||
this.onResizeFinish(
|
this.onResizeFinish()(
|
||||||
this.lastWidth,
|
this.lastWidth,
|
||||||
this.lastLeft,
|
this.lastLeft,
|
||||||
this.isAtMaxWidth(),
|
this.isAtMaxWidth(),
|
||||||
@@ -227,7 +227,7 @@ class PanelResizerCtrl implements PanelResizerScope {
|
|||||||
this.panel.classList.remove(CssClass.NoSelection);
|
this.panel.classList.remove(CssClass.NoSelection);
|
||||||
const isMaxWidth = this.isAtMaxWidth();
|
const isMaxWidth = this.isAtMaxWidth();
|
||||||
if (this.onResizeFinish) {
|
if (this.onResizeFinish) {
|
||||||
this.onResizeFinish(
|
this.onResizeFinish()(
|
||||||
this.lastWidth,
|
this.lastWidth,
|
||||||
this.lastLeft,
|
this.lastLeft,
|
||||||
isMaxWidth,
|
isMaxWidth,
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export class PreferencesManager extends ApplicationService {
|
|||||||
predicate,
|
predicate,
|
||||||
contentType,
|
contentType,
|
||||||
FillItemContent({})
|
FillItemContent({})
|
||||||
)) as SNUserPrefs;
|
)) as SNUserPrefs;
|
||||||
this.loadingPrefs = false;
|
this.loadingPrefs = false;
|
||||||
const didChange = !previousRef || (
|
const didChange = !previousRef || (
|
||||||
this.userPreferences.lastSyncBegan?.getTime() !== previousRef?.lastSyncBegan?.getTime()
|
this.userPreferences.lastSyncBegan?.getTime() !== previousRef?.lastSyncBegan?.getTime()
|
||||||
|
|||||||
@@ -199,7 +199,7 @@
|
|||||||
hoverable='true',
|
hoverable='true',
|
||||||
min-width='300',
|
min-width='300',
|
||||||
ng-if='self.state.marginResizersEnabled',
|
ng-if='self.state.marginResizersEnabled',
|
||||||
on-resize-finish='self.onPanelResizeFinish()',
|
on-resize-finish='self.onPanelResizeFinish',
|
||||||
panel-id="'editor-content'",
|
panel-id="'editor-content'",
|
||||||
property="'left'"
|
property="'left'"
|
||||||
)
|
)
|
||||||
@@ -226,7 +226,7 @@
|
|||||||
control='self.rightPanelPuppet',
|
control='self.rightPanelPuppet',
|
||||||
hoverable='true', min-width='300',
|
hoverable='true', min-width='300',
|
||||||
ng-if='self.state.marginResizersEnabled',
|
ng-if='self.state.marginResizersEnabled',
|
||||||
on-resize-finish='self.onPanelResizeFinish()',
|
on-resize-finish='self.onPanelResizeFinish',
|
||||||
panel-id="'editor-content'",
|
panel-id="'editor-content'",
|
||||||
property="'right'"
|
property="'right'"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -107,13 +107,17 @@ class FooterViewCtrl extends PureViewCtrl {
|
|||||||
async onAppLaunch() {
|
async onAppLaunch() {
|
||||||
super.onAppLaunch();
|
super.onAppLaunch();
|
||||||
this.reloadPasscodeStatus();
|
this.reloadPasscodeStatus();
|
||||||
|
this.reloadUser();
|
||||||
this.reloadUpgradeStatus();
|
this.reloadUpgradeStatus();
|
||||||
this.user = this.application!.getUser();
|
|
||||||
this.updateOfflineStatus();
|
this.updateOfflineStatus();
|
||||||
this.findErrors();
|
this.findErrors();
|
||||||
this.streamItems();
|
this.streamItems();
|
||||||
this.registerComponentHandler();
|
this.registerComponentHandler();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reloadUser() {
|
||||||
|
this.user = this.application!.getUser();
|
||||||
|
}
|
||||||
|
|
||||||
async reloadPasscodeStatus() {
|
async reloadPasscodeStatus() {
|
||||||
const hasPasscode = this.application!.hasPasscode();
|
const hasPasscode = this.application!.hasPasscode();
|
||||||
@@ -193,6 +197,11 @@ class FooterViewCtrl extends PureViewCtrl {
|
|||||||
} else if (eventName === ApplicationEvent.FailedSync) {
|
} else if (eventName === ApplicationEvent.FailedSync) {
|
||||||
this.findErrors();
|
this.findErrors();
|
||||||
this.updateOfflineStatus();
|
this.updateOfflineStatus();
|
||||||
|
} else if (
|
||||||
|
eventName === ApplicationEvent.SignedIn ||
|
||||||
|
eventName === ApplicationEvent.SignedOut
|
||||||
|
) {
|
||||||
|
this.reloadUser();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -137,6 +137,6 @@
|
|||||||
control="self.panelPuppet"
|
control="self.panelPuppet"
|
||||||
default-width="300"
|
default-width="300"
|
||||||
hoverable="true"
|
hoverable="true"
|
||||||
on-resize-finish="self.onPanelResize()"
|
on-resize-finish="self.onPanelResize"
|
||||||
panel-id="'notes-column'"
|
panel-id="'notes-column'"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -67,6 +67,6 @@
|
|||||||
control='self.panelPuppet',
|
control='self.panelPuppet',
|
||||||
default-width='150',
|
default-width='150',
|
||||||
hoverable='true',
|
hoverable='true',
|
||||||
on-resize-finish='self.onPanelResize()',
|
on-resize-finish='self.onPanelResize',
|
||||||
panel-id="'tags-column'"
|
panel-id="'tags-column'"
|
||||||
)
|
)
|
||||||
|
|||||||
34
dist/javascripts/app.js
vendored
34
dist/javascripts/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/javascripts/app.js.map
vendored
2
dist/javascripts/app.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user