vojo/src/app/pages/paths.ts
v.lagerev 6a8c4bc2ef feat(auth): rebrand auth pages to Vojo with mascot, glassmorphism, and i18n
Rework the entire authentication UI to match the Vojo brand:

- Add mascot video with purple gradient halo behind the auth form
- Glassmorphism card (backdrop-blur, semi-transparent bg) with JS-driven
  layout ported from element-web (ResizeObserver + requestAnimationFrame)
- Custom folds theme overrides via color token references (not hardcoded
  CSS variable hashes) for transparent inputs and white primary button
- Server edit modal dialog replacing browser prompt, with proper
  role="dialog", aria-modal, and Escape key support
- Footer: "Powered by Matrix · Hosted on Yandex Cloud"

Localization:
- Add ru.json, update en.json and de.json with all auth page keys
- Wire up react-i18next t() across all auth components
- Set fallbackLng to 'ru' while preserving LanguageDetector for en/de

Cleanup:
- Remove SSO login flow (SSOLogin, getSSOFlow, SSO rendering)
- Remove token login flow (TokenLogin.tsx, getTokenFlow, loginToken param)
- Strip unused imports (useState, usePathWithOrigin, useClientConfig)
- Fix ESLint: nested ternary → if-return, consistent-return, a11y

Config: vojo.chat as default and only homeserver.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 00:27:34 +03:00

89 lines
2.6 KiB
TypeScript

export const ROOT_PATH = '/';
export type LoginPathSearchParams = {
username?: string;
email?: string;
};
export const LOGIN_PATH = '/login/:server?/';
export type RegisterPathSearchParams = {
username?: string;
email?: string;
token?: string;
};
export const REGISTER_PATH = '/register/:server?/';
export type ResetPasswordPathSearchParams = {
email?: string;
};
export const RESET_PASSWORD_PATH = '/reset-password/:server?/';
export const _CREATE_PATH = 'create/';
export const _JOIN_PATH = 'join/';
export const _LOBBY_PATH = 'lobby/';
/**
* array of rooms and senders mxId assigned
* to search param as string should be "," separated
* Like: url?rooms=!one:server,!two:server
*/
export type _SearchPathSearchParams = {
global?: string;
term?: string;
order?: string;
rooms?: string;
senders?: string;
};
export const _SEARCH_PATH = 'search/';
export type _RoomSearchParams = {
/* comma separated string of servers */
viaServers?: string;
};
export const _ROOM_PATH = ':roomIdOrAlias/:eventId?/';
export const HOME_PATH = '/home/';
export const HOME_CREATE_PATH = `/home/${_CREATE_PATH}`;
export const HOME_JOIN_PATH = `/home/${_JOIN_PATH}`;
export const HOME_SEARCH_PATH = `/home/${_SEARCH_PATH}`;
export const HOME_ROOM_PATH = `/home/${_ROOM_PATH}`;
export const DIRECT_PATH = '/direct/';
export type DirectCreateSearchParams = {
userId?: string;
};
export const DIRECT_CREATE_PATH = `/direct/${_CREATE_PATH}`;
export const DIRECT_ROOM_PATH = `/direct/${_ROOM_PATH}`;
export const SPACE_PATH = '/:spaceIdOrAlias/';
export const SPACE_LOBBY_PATH = `/:spaceIdOrAlias/${_LOBBY_PATH}`;
export const SPACE_SEARCH_PATH = `/:spaceIdOrAlias/${_SEARCH_PATH}`;
export const SPACE_ROOM_PATH = `/:spaceIdOrAlias/${_ROOM_PATH}`;
export const _FEATURED_PATH = 'featured/';
export const _SERVER_PATH = ':server/';
export const EXPLORE_PATH = '/explore/';
export const EXPLORE_FEATURED_PATH = `/explore/${_FEATURED_PATH}`;
export type ExploreServerPathSearchParams = {
limit?: string;
since?: string;
term?: string;
type?: string;
instance?: string;
};
export const EXPLORE_SERVER_PATH = `/explore/${_SERVER_PATH}`;
export const CREATE_PATH = '/create';
export const _NOTIFICATIONS_PATH = 'notifications/';
export const _INVITES_PATH = 'invites/';
export const INBOX_PATH = '/inbox/';
export type InboxNotificationsPathSearchParams = {
only?: string;
};
export const INBOX_NOTIFICATIONS_PATH = `/inbox/${_NOTIFICATIONS_PATH}`;
export const INBOX_INVITES_PATH = `/inbox/${_INVITES_PATH}`;
export const SPACE_SETTINGS_PATH = '/space-settings/';
export const ROOM_SETTINGS_PATH = '/room-settings/';