SHA256
Закомитил промежуточную почти работающую версию ...
This commit is contained in:
+66
-36
@@ -1,7 +1,7 @@
|
||||
import { navigate, getRoute, PRE_AUTH_PAGES } from './router.js?v=20260405171816';
|
||||
import { renderToolbar } from './components/toolbar.js?v=20260405171816';
|
||||
import { captureClientError, setClientErrorTransport } from './services/client-error-reporter.js?v=20260405171816';
|
||||
import { initPwaPush } from './services/pwa-push-service.js?v=20260405171816';
|
||||
import { navigate, getRoute, PRE_AUTH_PAGES } from './router.js?v=20260407105357';
|
||||
import { renderToolbar } from './components/toolbar.js?v=20260407105357';
|
||||
import { captureClientError, setClientErrorTransport } from './services/client-error-reporter.js?v=20260407105357';
|
||||
import { initPwaPush } from './services/pwa-push-service.js?v=20260407105357';
|
||||
import {
|
||||
authService,
|
||||
authorizeSession,
|
||||
@@ -12,38 +12,38 @@ import {
|
||||
terminateCurrentSession,
|
||||
addIncomingMessage,
|
||||
setContacts,
|
||||
} from './state.js?v=20260405171816';
|
||||
} from './state.js?v=20260407105357';
|
||||
|
||||
import * as startView from './pages/start-view.js?v=20260405171816';
|
||||
import * as entrySettingsView from './pages/entry-settings-view.js?v=20260405171816';
|
||||
import * as registerView from './pages/register-view.js?v=20260405171816';
|
||||
import * as registrationPaymentView from './pages/registration-payment-view.js?v=20260405171816';
|
||||
import * as registrationKeysView from './pages/registration-keys-view.js?v=20260405171816';
|
||||
import * as topupView from './pages/topup-view.js?v=20260405171816';
|
||||
import * as loginView from './pages/login-view.js?v=20260405171816';
|
||||
import * as loginCameraView from './pages/login-camera-view.js?v=20260405171816';
|
||||
import * as loginPasswordView from './pages/login-password-view.js?v=20260405171816';
|
||||
import * as keyStorageView from './pages/key-storage-view.js?v=20260405171816';
|
||||
import * as startView from './pages/start-view.js?v=20260407105357';
|
||||
import * as entrySettingsView from './pages/entry-settings-view.js?v=20260407105357';
|
||||
import * as registerView from './pages/register-view.js?v=20260407105357';
|
||||
import * as registrationPaymentView from './pages/registration-payment-view.js?v=20260407105357';
|
||||
import * as registrationKeysView from './pages/registration-keys-view.js?v=20260407105357';
|
||||
import * as topupView from './pages/topup-view.js?v=20260407105357';
|
||||
import * as loginView from './pages/login-view.js?v=20260407105357';
|
||||
import * as loginCameraView from './pages/login-camera-view.js?v=20260407105357';
|
||||
import * as loginPasswordView from './pages/login-password-view.js?v=20260407105357';
|
||||
import * as keyStorageView from './pages/key-storage-view.js?v=20260407105357';
|
||||
|
||||
import * as profileView from './pages/profile-view.js?v=20260405171816';
|
||||
import * as walletView from './pages/wallet-view.js?v=20260405171816';
|
||||
import * as settingsView from './pages/settings-view.js?v=20260405171816';
|
||||
import * as serverSettingsView from './pages/server-settings-view.js?v=20260405171816';
|
||||
import * as deviceView from './pages/device-view.js?v=20260405171816';
|
||||
import * as connectDeviceView from './pages/connect-device-view.js?v=20260405171816';
|
||||
import * as deviceQrView from './pages/device-qr-view.js?v=20260405171816';
|
||||
import * as deviceCameraView from './pages/device-camera-view.js?v=20260405171816';
|
||||
import * as showKeysView from './pages/show-keys-view.js?v=20260405171816';
|
||||
import * as deviceSessionView from './pages/device-session-view.js?v=20260405171816';
|
||||
import * as languageView from './pages/language-view.js?v=20260405171816';
|
||||
import * as messagesList from './pages/messages-list.js?v=20260405171816';
|
||||
import * as contactSearchView from './pages/contact-search-view.js?v=20260405171816';
|
||||
import * as chatView from './pages/chat-view.js?v=20260405171816';
|
||||
import * as channelsList from './pages/channels-list.js?v=20260405171816';
|
||||
import * as channelView from './pages/channel-view.js?v=20260405171816';
|
||||
import * as addChannelView from './pages/add-channel-view.js?v=20260405171816';
|
||||
import * as networkView from './pages/network-view.js?v=20260405171816';
|
||||
import * as notificationsView from './pages/notifications-view.js?v=20260405171816';
|
||||
import * as profileView from './pages/profile-view.js?v=20260407105357';
|
||||
import * as walletView from './pages/wallet-view.js?v=20260407105357';
|
||||
import * as settingsView from './pages/settings-view.js?v=20260407105357';
|
||||
import * as serverSettingsView from './pages/server-settings-view.js?v=20260407105357';
|
||||
import * as deviceView from './pages/device-view.js?v=20260407105357';
|
||||
import * as connectDeviceView from './pages/connect-device-view.js?v=20260407105357';
|
||||
import * as deviceQrView from './pages/device-qr-view.js?v=20260407105357';
|
||||
import * as deviceCameraView from './pages/device-camera-view.js?v=20260407105357';
|
||||
import * as showKeysView from './pages/show-keys-view.js?v=20260407105357';
|
||||
import * as deviceSessionView from './pages/device-session-view.js?v=20260407105357';
|
||||
import * as languageView from './pages/language-view.js?v=20260407105357';
|
||||
import * as messagesList from './pages/messages-list.js?v=20260407105357';
|
||||
import * as contactSearchView from './pages/contact-search-view.js?v=20260407105357';
|
||||
import * as chatView from './pages/chat-view.js?v=20260407105357';
|
||||
import * as channelsList from './pages/channels-list.js?v=20260407105357';
|
||||
import * as channelView from './pages/channel-view.js?v=20260407105357';
|
||||
import * as addChannelView from './pages/add-channel-view.js?v=20260407105357';
|
||||
import * as networkView from './pages/network-view.js?v=20260407105357';
|
||||
import * as notificationsView from './pages/notifications-view.js?v=20260407105357';
|
||||
|
||||
const routes = {
|
||||
'start-view': startView,
|
||||
@@ -84,7 +84,20 @@ let currentCleanup = null;
|
||||
|
||||
setClientErrorTransport((payload) => authService.reportClientError(payload));
|
||||
|
||||
function showGlobalErrorAlert(title, details = {}) {
|
||||
const lines = [title];
|
||||
if (details.message) lines.push(`Сообщение: ${details.message}`);
|
||||
if (details.pageId) lines.push(`Экран: ${details.pageId}`);
|
||||
if (details.sourceUrl) lines.push(`Источник: ${details.sourceUrl}`);
|
||||
if (Number.isFinite(details.lineNumber)) lines.push(`Строка: ${details.lineNumber}`);
|
||||
if (Number.isFinite(details.columnNumber)) lines.push(`Колонка: ${details.columnNumber}`);
|
||||
if (details.reasonType) lines.push(`Тип: ${details.reasonType}`);
|
||||
if (details.stack) lines.push(`Stack:\n${details.stack}`);
|
||||
window.alert(lines.join('\n'));
|
||||
}
|
||||
|
||||
window.addEventListener('error', (event) => {
|
||||
const pageId = getRoute().pageId || '';
|
||||
captureClientError({
|
||||
kind: 'global_error',
|
||||
message: event.message || 'Global JS error',
|
||||
@@ -93,22 +106,39 @@ window.addEventListener('error', (event) => {
|
||||
lineNumber: event.lineno,
|
||||
columnNumber: event.colno,
|
||||
context: {
|
||||
pageId: getRoute().pageId || '',
|
||||
pageId,
|
||||
},
|
||||
});
|
||||
|
||||
showGlobalErrorAlert('Поймана глобальная ошибка UI', {
|
||||
message: event.message || 'Global JS error',
|
||||
stack: event.error?.stack || '',
|
||||
sourceUrl: event.filename || '',
|
||||
lineNumber: event.lineno,
|
||||
columnNumber: event.colno,
|
||||
pageId,
|
||||
});
|
||||
});
|
||||
|
||||
window.addEventListener('unhandledrejection', (event) => {
|
||||
const reason = event.reason;
|
||||
const pageId = getRoute().pageId || '';
|
||||
captureClientError({
|
||||
kind: 'unhandled_rejection',
|
||||
message: reason?.message || String(reason || 'Unhandled promise rejection'),
|
||||
stack: reason?.stack || '',
|
||||
context: {
|
||||
pageId: getRoute().pageId || '',
|
||||
pageId,
|
||||
reasonType: reason?.constructor?.name || typeof reason,
|
||||
},
|
||||
});
|
||||
|
||||
showGlobalErrorAlert('Пойман необработанный Promise reject', {
|
||||
message: reason?.message || String(reason || 'Unhandled promise rejection'),
|
||||
stack: reason?.stack || '',
|
||||
pageId,
|
||||
reasonType: reason?.constructor?.name || typeof reason,
|
||||
});
|
||||
});
|
||||
|
||||
function renderApp() {
|
||||
|
||||
Reference in New Issue
Block a user