mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-14 19:20:28 +03:00
Remove unused javascript (#2470)
Some checks are pending
Deploy to Netlify (dev) / Deploy to Netlify (push) Waiting to run
Some checks are pending
Deploy to Netlify (dev) / Deploy to Netlify (push) Waiting to run
This commit is contained in:
parent
399b1a373e
commit
90ca8ca2c5
214 changed files with 341 additions and 8768 deletions
|
|
@ -28,11 +28,11 @@ import {
|
|||
} from '../../../hooks/useRoomAliases';
|
||||
import { AsyncStatus, useAsyncCallback } from '../../../hooks/useAsyncCallback';
|
||||
import { CutoutCard } from '../../../components/cutout-card';
|
||||
import { getIdServer } from '../../../../util/matrixUtil';
|
||||
import { replaceSpaceWithDash } from '../../../utils/common';
|
||||
import { useAlive } from '../../../hooks/useAlive';
|
||||
import { StateEvent } from '../../../../types/matrix/room';
|
||||
import { RoomPermissionsAPI } from '../../../hooks/useRoomPermissions';
|
||||
import { getMxIdServer } from '../../../utils/matrix';
|
||||
|
||||
type RoomPublishedAddressesProps = {
|
||||
permissions: RoomPermissionsAPI;
|
||||
|
|
@ -133,7 +133,7 @@ export function RoomPublishedAddresses({ permissions }: RoomPublishedAddressesPr
|
|||
function LocalAddressInput({ addLocalAlias }: { addLocalAlias: (alias: string) => Promise<void> }) {
|
||||
const mx = useMatrixClient();
|
||||
const userId = mx.getSafeUserId();
|
||||
const server = getIdServer(userId);
|
||||
const server = getMxIdServer(userId);
|
||||
const alive = useAlive();
|
||||
|
||||
const [addState, addAlias] = useAsyncCallback(addLocalAlias);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import { useRoomUnread } from '../../state/hooks/unread';
|
|||
import { roomToUnreadAtom } from '../../state/room/roomToUnread';
|
||||
import { usePowerLevels } from '../../hooks/usePowerLevels';
|
||||
import { copyToClipboard } from '../../utils/dom';
|
||||
import { markAsRead } from '../../../client/action/notifications';
|
||||
import { markAsRead } from '../../utils/notifications';
|
||||
import { UseStateProvider } from '../../components/UseStateProvider';
|
||||
import { LeaveRoomPrompt } from '../../components/leave-room-prompt';
|
||||
import { useRoomTypingMember } from '../../hooks/useRoomTypingMembers';
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ import { settingsAtom } from '../../state/settings';
|
|||
import { PowerLevelsContextProvider, usePowerLevels } from '../../hooks/usePowerLevels';
|
||||
import { useRoom } from '../../hooks/useRoom';
|
||||
import { useKeyDown } from '../../hooks/useKeyDown';
|
||||
import { markAsRead } from '../../../client/action/notifications';
|
||||
import { markAsRead } from '../../utils/notifications';
|
||||
import { useMatrixClient } from '../../hooks/useMatrixClient';
|
||||
import { useRoomMembers } from '../../hooks/useRoomMembers';
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ import {
|
|||
getIntersectionObserverEntry,
|
||||
useIntersectionObserver,
|
||||
} from '../../hooks/useIntersectionObserver';
|
||||
import { markAsRead } from '../../../client/action/notifications';
|
||||
import { markAsRead } from '../../utils/notifications';
|
||||
import { useDebounce } from '../../hooks/useDebounce';
|
||||
import { getResizeObserverEntry, useResizeObserver } from '../../hooks/useResizeObserver';
|
||||
import * as css from './RoomTimeline.css';
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import { Page } from '../../components/page';
|
|||
import { RoomViewHeader } from './RoomViewHeader';
|
||||
import { useKeyDown } from '../../hooks/useKeyDown';
|
||||
import { editableActiveElement } from '../../utils/dom';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
import { settingsAtom } from '../../state/settings';
|
||||
import { useSetting } from '../../state/hooks/settings';
|
||||
import { useRoomPermissions } from '../../hooks/useRoomPermissions';
|
||||
|
|
@ -80,10 +79,9 @@ export function RoomView({ room, eventId }: { room: Room; eventId?: string }) {
|
|||
useCallback(
|
||||
(evt) => {
|
||||
if (editableActiveElement()) return;
|
||||
if (
|
||||
document.body.lastElementChild?.className !== 'ReactModalPortal' ||
|
||||
navigation.isRawModalVisible
|
||||
) {
|
||||
// means some menu or modal window is open
|
||||
const lastNode = document.body.lastElementChild;
|
||||
if (lastNode && !lastNode.hasAttribute('data-last-node')) {
|
||||
return;
|
||||
}
|
||||
if (shouldFocusMessageField(evt) || isKeyHotkey('mod+v', evt)) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ import { _SearchPathSearchParams } from '../../pages/paths';
|
|||
import * as css from './RoomViewHeader.css';
|
||||
import { useRoomUnread } from '../../state/hooks/unread';
|
||||
import { usePowerLevelsContext } from '../../hooks/usePowerLevels';
|
||||
import { markAsRead } from '../../../client/action/notifications';
|
||||
import { markAsRead } from '../../utils/notifications';
|
||||
import { roomToUnreadAtom } from '../../state/room/roomToUnread';
|
||||
import { copyToClipboard } from '../../utils/dom';
|
||||
import { LeaveRoomPrompt } from '../../components/leave-room-prompt';
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ import { roomToUnreadAtom } from '../../state/room/roomToUnread';
|
|||
import { UnreadBadge, UnreadBadgeCenter } from '../../components/unread-badge';
|
||||
import { searchModalAtom } from '../../state/searchModal';
|
||||
import { useKeyDown } from '../../hooks/useKeyDown';
|
||||
import navigation from '../../../client/state/navigation';
|
||||
import { useMediaAuthentication } from '../../hooks/useMediaAuthentication';
|
||||
import { KeySymbol } from '../../utils/key-symbol';
|
||||
import { isMacOS } from '../../utils/user-agent';
|
||||
|
|
@ -436,11 +435,8 @@ export function SearchModalRenderer() {
|
|||
}
|
||||
|
||||
// means some menu or modal window is open
|
||||
const { lastChild } = document.body;
|
||||
if (
|
||||
(lastChild && 'className' in lastChild && lastChild.className !== 'ReactModalPortal') ||
|
||||
navigation.isRawModalVisible
|
||||
) {
|
||||
const lastNode = document.body.lastElementChild;
|
||||
if (lastNode && !lastNode.hasAttribute('data-last-node')) {
|
||||
return;
|
||||
}
|
||||
setOpen(true);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import { SequenceCard } from '../../../components/sequence-card';
|
|||
import { SequenceCardStyle } from '../styles.css';
|
||||
import { SettingTile } from '../../../components/setting-tile';
|
||||
import CinnySVG from '../../../../../public/res/svg/cinny.svg';
|
||||
import cons from '../../../../client/state/cons';
|
||||
import { clearCacheAndReload } from '../../../../client/initMatrix';
|
||||
import { useMatrixClient } from '../../../hooks/useMatrixClient';
|
||||
|
||||
|
|
@ -47,7 +46,7 @@ export function About({ requestClose }: AboutProps) {
|
|||
<Box direction="Column" gap="100">
|
||||
<Box gap="100" alignItems="End">
|
||||
<Text size="H3">Cinny</Text>
|
||||
<Text size="T200">v{cons.version}</Text>
|
||||
<Text size="T200">v4.9.1</Text>
|
||||
</Box>
|
||||
<Text>Yet another matrix client.</Text>
|
||||
</Box>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { useMatrixClient } from '../../../hooks/useMatrixClient';
|
|||
import { SequenceCard } from '../../../components/sequence-card';
|
||||
import { SequenceCardStyle } from '../styles.css';
|
||||
import { SettingTile } from '../../../components/setting-tile';
|
||||
import { copyToClipboard } from '../../../../util/common';
|
||||
import { copyToClipboard } from '../../../utils/dom';
|
||||
|
||||
export function MatrixId() {
|
||||
const mx = useMatrixClient();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue