Обновить UI и документы личных сообщений

This commit is contained in:
AidarKC
2026-08-29 15:12:13 +04:00
parent 357a05f7ec
commit b47440dd72
26 changed files with 851 additions and 257 deletions
+10 -5
View File
@@ -300,15 +300,15 @@ function createInitialState({ withStoredSession = true } = {}) {
keyStorage: {
rootKey: 'Ключ root хранится в зашифрованном виде',
blockchainKey: 'Ключ blockchain хранится в зашифрованном виде',
clientKey: 'Ключ device хранится в зашифрованном виде',
clientKey: 'Client key хранится в зашифрованном виде',
saveRoot: true,
saveBlockchain: true,
saveDevice: true,
saveClient: true,
},
deviceConnect: {
root: true,
blockchain: true,
device: true,
client: true,
},
authUi: {
busy: false,
@@ -848,6 +848,11 @@ export function checkServerAvailability(address) {
return /^(https?:\/\/|wss?:\/\/)/i.test(normalized) ? 'available' : 'unavailable';
}
export function saveEntryLanguage(language) {
state.entrySettings.language = String(language || 'ru');
persistEntrySettings(state.entrySettings);
}
export async function saveEntrySettings(nextSettings) {
const nextSolanaServer = normalizeStoredSolanaServer(nextSettings?.solanaServer || state.entrySettings.solanaServer || DEFAULT_SOLANA_SERVER);
const nextShineServerLogin = String(nextSettings?.shineServerLogin || state.entrySettings.shineServerLogin || DEFAULT_SHINE_SERVER_LOGIN_VALUE).trim().toLowerCase()
@@ -1013,7 +1018,7 @@ async function tryCloseCurrentSessionOnServer() {
}
}
export async function terminateCurrentSession({ infoMessage = '', closeServerSession = false } = {}) {
export async function terminateCurrentSession({ infoMessage = '', closeServerSession = false, notifySessionReset = true } = {}) {
if (closeServerSession) {
await tryCloseCurrentSessionOnServer();
}
@@ -1031,7 +1036,7 @@ export async function terminateCurrentSession({ infoMessage = '', closeServerSes
} catch {
// ignore reconnect errors on sign out
}
if (onSessionReset) {
if (notifySessionReset && onSessionReset) {
onSessionReset();
}
}