From 4f09e6bbb5a633715937a3b89307dd685229606c Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Mon, 8 Jul 2024 16:57:10 +0530 Subject: [PATCH] (chore) remove outdated code (#1765) * optimize room typing members hook * remove unused code - WIP * remove old code from initMatrix * remove twemojify function * remove old sanitize util * delete old markdown util * delete Math atom component * uninstall unused dependencies * remove old notification system * decrypt message in inbox notification center and fix refresh in background * improve notification --------- Co-authored-by: Krishan <33421343+kfiven@users.noreply.github.com> --- index.html | 6 - package-lock.json | 188 +--- package.json | 6 - src/app/atoms/avatar/Avatar.jsx | 62 +- src/app/atoms/math/Math.jsx | 33 - src/app/atoms/math/Math.scss | 3 - src/app/features/room/RoomInput.tsx | 10 +- src/app/features/room/RoomTimeline.tsx | 30 +- src/app/hooks/useCategorizedSpaces.js | 25 - src/app/hooks/useCommands.ts | 4 +- src/app/hooks/usePreviousValue.ts | 11 + src/app/hooks/useRoomTypingMembers.ts | 24 +- src/app/hooks/useSelectedSpace.js | 21 - src/app/hooks/useSelectedTab.js | 21 - src/app/hooks/useSpaceShortcut.js | 25 - src/app/molecules/dialog/Dialog.jsx | 29 +- .../following-members/FollowingMembers.jsx | 61 -- .../following-members/FollowingMembers.scss | 31 - .../image-lightbox/ImageLightbox.jsx | 47 - .../image-lightbox/ImageLightbox.scss | 50 - src/app/molecules/media/Media.jsx | 366 -------- src/app/molecules/media/Media.scss | 90 -- src/app/molecules/message/Message.jsx | 853 ------------------ src/app/molecules/message/Message.scss | 479 ---------- src/app/molecules/message/TimelineChange.jsx | 78 -- src/app/molecules/message/TimelineChange.scss | 37 - .../people-selector/PeopleSelector.jsx | 16 +- .../molecules/popup-window/PopupWindow.jsx | 66 +- .../room-notification/RoomNotification.jsx | 146 +-- .../molecules/room-options/RoomOptions.jsx | 73 -- .../molecules/room-profile/RoomProfile.jsx | 93 +- src/app/molecules/room-search/RoomSearch.jsx | 201 ----- src/app/molecules/room-search/RoomSearch.scss | 62 -- .../molecules/room-selector/RoomSelector.jsx | 41 +- src/app/molecules/room-tile/RoomTile.jsx | 48 +- .../sidebar-avatar/SidebarAvatar.jsx | 55 -- .../sidebar-avatar/SidebarAvatar.scss | 64 -- .../space-add-existing/SpaceAddExisting.jsx | 15 +- .../molecules/space-options/SpaceOptions.jsx | 128 --- src/app/molecules/sso-buttons/SSOButtons.jsx | 41 - src/app/molecules/sso-buttons/SSOButtons.scss | 25 - src/app/organisms/create-room/CreateRoom.jsx | 154 ++-- src/app/organisms/emoji-board/EmojiBoard.jsx | 356 -------- src/app/organisms/emoji-board/EmojiBoard.scss | 137 --- .../emoji-board/EmojiBoardOpener.jsx | 78 -- src/app/organisms/emoji-board/custom-emoji.js | 127 +-- src/app/organisms/emoji-board/emoji.js | 69 -- src/app/organisms/emoji-board/recent.js | 36 - .../emoji-verification/EmojiVerification.jsx | 48 +- src/app/organisms/invite-list/InviteList.jsx | 145 --- src/app/organisms/invite-list/InviteList.scss | 26 - src/app/organisms/invite-user/InviteUser.jsx | 128 +-- src/app/organisms/join-alias/JoinAlias.jsx | 69 +- src/app/organisms/navigation/Directs.jsx | 71 -- src/app/organisms/navigation/Drawer.jsx | 93 -- src/app/organisms/navigation/Drawer.scss | 56 -- .../organisms/navigation/DrawerBreadcrumb.jsx | 142 --- .../navigation/DrawerBreadcrumb.scss | 66 -- src/app/organisms/navigation/DrawerHeader.jsx | 159 ---- .../organisms/navigation/DrawerHeader.scss | 28 - src/app/organisms/navigation/Home.jsx | 112 --- src/app/organisms/navigation/Navigation.jsx | 16 - src/app/organisms/navigation/Navigation.scss | 7 - .../organisms/navigation/RoomsCategory.jsx | 92 -- .../organisms/navigation/RoomsCategory.scss | 54 -- src/app/organisms/navigation/Selector.jsx | 93 -- src/app/organisms/navigation/SideBar.jsx | 390 -------- src/app/organisms/navigation/SideBar.scss | 75 -- .../profile-editor/ProfileEditor.jsx | 24 +- .../profile-viewer/ProfileViewer.jsx | 165 ++-- .../organisms/public-rooms/PublicRooms.jsx | 295 ------ .../organisms/public-rooms/PublicRooms.scss | 85 -- src/app/organisms/pw/Dialogs.jsx | 6 - src/app/organisms/pw/Windows.jsx | 28 - .../organisms/read-receipts/ReadReceipts.jsx | 76 -- src/app/organisms/room/EventLimit.js | 35 - src/app/organisms/room/PeopleDrawer.jsx | 215 ----- src/app/organisms/room/PeopleDrawer.scss | 93 -- src/app/organisms/room/Room.scss | 20 - src/app/organisms/room/RoomSettings.jsx | 3 +- src/app/organisms/room/RoomView.scss | 46 - src/app/organisms/room/RoomViewCmdBar.jsx | 297 ------ src/app/organisms/room/RoomViewCmdBar.scss | 57 -- src/app/organisms/room/RoomViewContent.jsx | 644 ------------- src/app/organisms/room/RoomViewContent.scss | 30 - src/app/organisms/room/RoomViewFloating.jsx | 125 --- src/app/organisms/room/RoomViewFloating.scss | 125 --- src/app/organisms/room/RoomViewHeader.jsx | 132 --- src/app/organisms/room/RoomViewHeader.scss | 47 - src/app/organisms/room/RoomViewInput.jsx | 491 ---------- src/app/organisms/room/RoomViewInput.scss | 108 --- src/app/organisms/room/TimelineScroll.js | 136 --- src/app/organisms/room/commands.jsx | 220 ----- src/app/organisms/room/commands.scss | 10 - src/app/organisms/room/common.jsx | 222 ----- src/app/organisms/search/Search.jsx | 31 +- src/app/organisms/settings/CrossSigning.jsx | 109 ++- src/app/organisms/settings/KeyBackup.jsx | 93 +- .../shortcut-spaces/ShortcutSpaces.jsx | 169 ---- .../shortcut-spaces/ShortcutSpaces.scss | 52 -- .../organisms/space-manage/SpaceManage.jsx | 433 --------- .../organisms/space-manage/SpaceManage.scss | 168 ---- .../space-settings/SpaceSettings.jsx | 9 +- .../organisms/sticker-board/StickerBoard.jsx | 115 --- .../organisms/sticker-board/StickerBoard.scss | 74 -- src/app/organisms/view-source/ViewSource.jsx | 73 -- src/app/organisms/view-source/ViewSource.scss | 19 - src/app/organisms/welcome/Welcome.jsx | 20 - src/app/organisms/welcome/Welcome.scss | 23 - src/app/pages/Router.tsx | 21 +- src/app/pages/client/ClientNonUIFeatures.tsx | 231 +++++ src/app/pages/client/ClientRoot.tsx | 2 - src/app/pages/client/inbox/Notifications.tsx | 88 +- src/app/state/room/roomToUnread.ts | 2 +- src/app/state/typingMembers.ts | 6 - src/app/templates/auth/Auth.jsx | 684 -------------- src/app/templates/auth/Auth.scss | 173 ---- src/app/templates/client/Client.jsx | 68 -- src/app/templates/client/Client.scss | 57 -- src/app/templates/client/ClientContent.jsx | 49 - src/app/utils/disposable.ts | 20 +- src/app/utils/dom.ts | 6 + src/client/action/accountData.js | 41 - src/client/action/auth.js | 104 --- src/client/action/auth.ts | 13 + src/client/action/navigation.js | 87 -- src/client/action/notifications.js | 1 - src/client/action/room.js | 32 +- src/client/action/roomTimeline.js | 34 - src/client/event/hotkeys.js | 59 -- src/client/event/roomList.js | 38 - src/client/initMatrix.js | 19 - src/client/state/AccountData.js | 144 --- src/client/state/Notifications.js | 412 --------- src/client/state/RoomList.js | 383 -------- src/client/state/RoomTimeline.js | 407 --------- src/client/state/RoomsHierarchy.js | 49 - src/client/state/RoomsInput.js | 423 --------- src/client/state/cons.js | 71 -- src/client/state/navigation.js | 318 ------- src/util/Postie.js | 97 -- src/util/colorMXID.js | 2 +- src/util/markdown.js | 515 ----------- src/util/matrixUtil.js | 14 - src/util/mimetypes.js | 39 - src/util/sanitize.js | 140 --- src/util/twemojify.jsx | 31 - 147 files changed, 1164 insertions(+), 15330 deletions(-) delete mode 100644 src/app/atoms/math/Math.jsx delete mode 100644 src/app/atoms/math/Math.scss delete mode 100644 src/app/hooks/useCategorizedSpaces.js create mode 100644 src/app/hooks/usePreviousValue.ts delete mode 100644 src/app/hooks/useSelectedSpace.js delete mode 100644 src/app/hooks/useSelectedTab.js delete mode 100644 src/app/hooks/useSpaceShortcut.js delete mode 100644 src/app/molecules/following-members/FollowingMembers.jsx delete mode 100644 src/app/molecules/following-members/FollowingMembers.scss delete mode 100644 src/app/molecules/image-lightbox/ImageLightbox.jsx delete mode 100644 src/app/molecules/image-lightbox/ImageLightbox.scss delete mode 100644 src/app/molecules/media/Media.jsx delete mode 100644 src/app/molecules/media/Media.scss delete mode 100644 src/app/molecules/message/Message.jsx delete mode 100644 src/app/molecules/message/Message.scss delete mode 100644 src/app/molecules/message/TimelineChange.jsx delete mode 100644 src/app/molecules/message/TimelineChange.scss delete mode 100644 src/app/molecules/room-options/RoomOptions.jsx delete mode 100644 src/app/molecules/room-search/RoomSearch.jsx delete mode 100644 src/app/molecules/room-search/RoomSearch.scss delete mode 100644 src/app/molecules/sidebar-avatar/SidebarAvatar.jsx delete mode 100644 src/app/molecules/sidebar-avatar/SidebarAvatar.scss delete mode 100644 src/app/molecules/space-options/SpaceOptions.jsx delete mode 100644 src/app/molecules/sso-buttons/SSOButtons.jsx delete mode 100644 src/app/molecules/sso-buttons/SSOButtons.scss delete mode 100644 src/app/organisms/emoji-board/EmojiBoard.jsx delete mode 100644 src/app/organisms/emoji-board/EmojiBoard.scss delete mode 100644 src/app/organisms/emoji-board/EmojiBoardOpener.jsx delete mode 100644 src/app/organisms/emoji-board/emoji.js delete mode 100644 src/app/organisms/emoji-board/recent.js delete mode 100644 src/app/organisms/invite-list/InviteList.jsx delete mode 100644 src/app/organisms/invite-list/InviteList.scss delete mode 100644 src/app/organisms/navigation/Directs.jsx delete mode 100644 src/app/organisms/navigation/Drawer.jsx delete mode 100644 src/app/organisms/navigation/Drawer.scss delete mode 100644 src/app/organisms/navigation/DrawerBreadcrumb.jsx delete mode 100644 src/app/organisms/navigation/DrawerBreadcrumb.scss delete mode 100644 src/app/organisms/navigation/DrawerHeader.jsx delete mode 100644 src/app/organisms/navigation/DrawerHeader.scss delete mode 100644 src/app/organisms/navigation/Home.jsx delete mode 100644 src/app/organisms/navigation/Navigation.jsx delete mode 100644 src/app/organisms/navigation/Navigation.scss delete mode 100644 src/app/organisms/navigation/RoomsCategory.jsx delete mode 100644 src/app/organisms/navigation/RoomsCategory.scss delete mode 100644 src/app/organisms/navigation/Selector.jsx delete mode 100644 src/app/organisms/navigation/SideBar.jsx delete mode 100644 src/app/organisms/navigation/SideBar.scss delete mode 100644 src/app/organisms/public-rooms/PublicRooms.jsx delete mode 100644 src/app/organisms/public-rooms/PublicRooms.scss delete mode 100644 src/app/organisms/read-receipts/ReadReceipts.jsx delete mode 100644 src/app/organisms/room/EventLimit.js delete mode 100644 src/app/organisms/room/PeopleDrawer.jsx delete mode 100644 src/app/organisms/room/PeopleDrawer.scss delete mode 100644 src/app/organisms/room/Room.scss delete mode 100644 src/app/organisms/room/RoomView.scss delete mode 100644 src/app/organisms/room/RoomViewCmdBar.jsx delete mode 100644 src/app/organisms/room/RoomViewCmdBar.scss delete mode 100644 src/app/organisms/room/RoomViewContent.jsx delete mode 100644 src/app/organisms/room/RoomViewContent.scss delete mode 100644 src/app/organisms/room/RoomViewFloating.jsx delete mode 100644 src/app/organisms/room/RoomViewFloating.scss delete mode 100644 src/app/organisms/room/RoomViewHeader.jsx delete mode 100644 src/app/organisms/room/RoomViewHeader.scss delete mode 100644 src/app/organisms/room/RoomViewInput.jsx delete mode 100644 src/app/organisms/room/RoomViewInput.scss delete mode 100644 src/app/organisms/room/TimelineScroll.js delete mode 100644 src/app/organisms/room/commands.jsx delete mode 100644 src/app/organisms/room/commands.scss delete mode 100644 src/app/organisms/room/common.jsx delete mode 100644 src/app/organisms/shortcut-spaces/ShortcutSpaces.jsx delete mode 100644 src/app/organisms/shortcut-spaces/ShortcutSpaces.scss delete mode 100644 src/app/organisms/space-manage/SpaceManage.jsx delete mode 100644 src/app/organisms/space-manage/SpaceManage.scss delete mode 100644 src/app/organisms/sticker-board/StickerBoard.jsx delete mode 100644 src/app/organisms/sticker-board/StickerBoard.scss delete mode 100644 src/app/organisms/view-source/ViewSource.jsx delete mode 100644 src/app/organisms/view-source/ViewSource.scss delete mode 100644 src/app/organisms/welcome/Welcome.jsx delete mode 100644 src/app/organisms/welcome/Welcome.scss create mode 100644 src/app/pages/client/ClientNonUIFeatures.tsx delete mode 100644 src/app/templates/auth/Auth.jsx delete mode 100644 src/app/templates/auth/Auth.scss delete mode 100644 src/app/templates/client/Client.jsx delete mode 100644 src/app/templates/client/Client.scss delete mode 100644 src/app/templates/client/ClientContent.jsx delete mode 100644 src/client/action/accountData.js delete mode 100644 src/client/action/auth.js create mode 100644 src/client/action/auth.ts delete mode 100644 src/client/action/roomTimeline.js delete mode 100644 src/client/event/roomList.js delete mode 100644 src/client/state/AccountData.js delete mode 100644 src/client/state/Notifications.js delete mode 100644 src/client/state/RoomList.js delete mode 100644 src/client/state/RoomTimeline.js delete mode 100644 src/client/state/RoomsHierarchy.js delete mode 100644 src/client/state/RoomsInput.js delete mode 100644 src/util/Postie.js delete mode 100644 src/util/markdown.js delete mode 100644 src/util/mimetypes.js delete mode 100644 src/util/sanitize.js delete mode 100644 src/util/twemojify.jsx diff --git a/index.html b/index.html index af2952d..9196cf3 100644 --- a/index.html +++ b/index.html @@ -90,12 +90,6 @@ window.global ||= window;
- -