SHA256
UI: мультиаккаунты профиля и улучшенный поиск каналов
This commit is contained in:
+7
-1
@@ -30,6 +30,7 @@ import {
|
||||
markIncomingReadByBaseKey,
|
||||
markOutgoingReadByBaseKey,
|
||||
setContacts,
|
||||
cancelAddAccountFlow,
|
||||
} from './state.js';
|
||||
|
||||
import * as startView from './pages/start-view.js';
|
||||
@@ -44,6 +45,7 @@ import * as loginPasswordView from './pages/login-password-view.js';
|
||||
import * as keyStorageView from './pages/key-storage-view.js';
|
||||
|
||||
import * as profileView from './pages/profile-view.js';
|
||||
import * as accountSwitcherView from './pages/account-switcher-view.js';
|
||||
import * as profileEditView from './pages/profile-edit-view.js';
|
||||
import * as walletView from './pages/wallet-view.js';
|
||||
import * as settingsView from './pages/settings-view.js';
|
||||
@@ -83,6 +85,7 @@ const routes = {
|
||||
'login-password-view': loginPasswordView,
|
||||
'key-storage-view': keyStorageView,
|
||||
'profile-view': profileView,
|
||||
'account-switcher-view': accountSwitcherView,
|
||||
'profile-edit-view': profileEditView,
|
||||
'wallet-view': walletView,
|
||||
'settings-view': settingsView,
|
||||
@@ -676,10 +679,13 @@ function renderApp() {
|
||||
return;
|
||||
}
|
||||
|
||||
if (state.session.isAuthorized && PRE_AUTH_PAGES.includes(pageId)) {
|
||||
if (state.session.isAuthorized && PRE_AUTH_PAGES.includes(pageId) && !state.accountAddingMode) {
|
||||
navigate('messages-list');
|
||||
return;
|
||||
}
|
||||
if (state.session.isAuthorized && !PRE_AUTH_PAGES.includes(pageId) && state.accountAddingMode) {
|
||||
cancelAddAccountFlow();
|
||||
}
|
||||
|
||||
const page = routes[pageId] || routes['start-view'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user