feat: use SNJS userCanManageSessions
This commit is contained in:
@@ -102,7 +102,7 @@ class AccountMenuCtrl extends PureViewCtrl<{}, AccountMenuState> {
|
|||||||
mutable: {},
|
mutable: {},
|
||||||
showBetaWarning: false,
|
showBetaWarning: false,
|
||||||
errorReportingEnabled: !storage.get(StorageKey.DisableErrorReporting),
|
errorReportingEnabled: !storage.get(StorageKey.DisableErrorReporting),
|
||||||
showSessions: this.appState.enableUnfinishedFeatures,
|
showSessions: false,
|
||||||
} as AccountMenuState;
|
} as AccountMenuState;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,8 +132,12 @@ class AccountMenuCtrl extends PureViewCtrl<{}, AccountMenuState> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
$onInit() {
|
async $onInit() {
|
||||||
super.$onInit();
|
super.$onInit();
|
||||||
|
this.setState({
|
||||||
|
showSessions: await this.application.userCanManageSessions()
|
||||||
|
});
|
||||||
|
|
||||||
const sync = this.appState.sync;
|
const sync = this.appState.sync;
|
||||||
this.removeSyncObserver = autorun(() => {
|
this.removeSyncObserver = autorun(() => {
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export class AppState {
|
|||||||
showBetaWarning = false;
|
showBetaWarning = false;
|
||||||
readonly actionsMenu = new ActionsMenuState();
|
readonly actionsMenu = new ActionsMenuState();
|
||||||
readonly sync = new SyncState();
|
readonly sync = new SyncState();
|
||||||
isSessionsModalVisible = true;
|
isSessionsModalVisible = false;
|
||||||
|
|
||||||
/* @ngInject */
|
/* @ngInject */
|
||||||
constructor(
|
constructor(
|
||||||
|
|||||||
Reference in New Issue
Block a user