From 0b4c5356a9b9a18ae90caf2b30bcad0790bab7ef Mon Sep 17 00:00:00 2001 From: Michael Peters Date: Sun, 6 Feb 2022 17:29:45 -0600 Subject: [PATCH] rename atoms-2.ts to atoms.ts --- src/client/webapp/elements/components/overlay.tsx | 2 +- src/client/webapp/elements/components/token-row.tsx | 2 +- .../webapp/elements/contexts/context-menu-connection-info.tsx | 2 +- .../webapp/elements/contexts/context-menu-guild-title.tsx | 2 +- src/client/webapp/elements/displays/display-guild-invites.tsx | 2 +- src/client/webapp/elements/displays/display-guild-overview.tsx | 2 +- src/client/webapp/elements/lists/channel-list.tsx | 2 +- src/client/webapp/elements/lists/components/channel-element.tsx | 2 +- .../webapp/elements/lists/components/guild-list-element.tsx | 2 +- src/client/webapp/elements/lists/components/member-element.tsx | 2 +- src/client/webapp/elements/lists/components/message-element.tsx | 2 +- src/client/webapp/elements/lists/guild-list.tsx | 2 +- src/client/webapp/elements/lists/member-list.tsx | 2 +- src/client/webapp/elements/lists/message-list.tsx | 2 +- src/client/webapp/elements/overlays/overlay-add-guild.tsx | 2 +- src/client/webapp/elements/overlays/overlay-channel.tsx | 2 +- src/client/webapp/elements/overlays/overlay-guild-settings.tsx | 2 +- src/client/webapp/elements/overlays/overlay-image.tsx | 2 +- src/client/webapp/elements/overlays/overlay-personalize.tsx | 2 +- src/client/webapp/elements/require/atoms-funcs.ts | 2 +- src/client/webapp/elements/require/{atoms-2.ts => atoms.ts} | 0 src/client/webapp/elements/root.tsx | 2 +- src/client/webapp/elements/sections/connection-info.tsx | 2 +- src/client/webapp/elements/sections/guild-list-container.tsx | 2 +- src/client/webapp/elements/sections/guild-title.tsx | 2 +- src/client/webapp/elements/sections/guild.tsx | 2 +- 26 files changed, 25 insertions(+), 25 deletions(-) rename src/client/webapp/elements/require/{atoms-2.ts => atoms.ts} (100%) diff --git a/src/client/webapp/elements/components/overlay.tsx b/src/client/webapp/elements/components/overlay.tsx index 248d8b3..39e4007 100644 --- a/src/client/webapp/elements/components/overlay.tsx +++ b/src/client/webapp/elements/components/overlay.tsx @@ -6,7 +6,7 @@ const LOG = Logger.create(__filename, electronConsole); import React, { FC, ReactNode, RefObject, useCallback, useEffect } from "react"; import { useActionWhenEscapeOrClickedOrContextOutsideEffect } from '../require/react-helper'; import { useSetRecoilState } from 'recoil'; -import { overlayState } from '../require/atoms-2'; +import { overlayState } from '../require/atoms'; interface OverlayProps { childRootRef?: RefObject; // clicks outside this ref will close the overlay diff --git a/src/client/webapp/elements/components/token-row.tsx b/src/client/webapp/elements/components/token-row.tsx index 1128bbb..6d3a668 100644 --- a/src/client/webapp/elements/components/token-row.tsx +++ b/src/client/webapp/elements/components/token-row.tsx @@ -5,7 +5,7 @@ import { Member, Token } from '../../data-types'; import CombinedGuild from '../../guild-combined'; import Util from '../../util'; import { IAddGuildData } from '../overlays/overlay-add-guild'; -import { guildMetaState, guildResourceSoftImgSrcState, useRecoilValueSoftImgSrc } from '../require/atoms-2'; +import { guildMetaState, guildResourceSoftImgSrcState, useRecoilValueSoftImgSrc } from '../require/atoms'; import BaseElements from '../require/base-elements'; import { isLoaded } from '../require/loadables'; import { useAsyncVoidCallback, useDownloadButton, useOneTimeAsyncAction } from '../require/react-helper'; diff --git a/src/client/webapp/elements/contexts/context-menu-connection-info.tsx b/src/client/webapp/elements/contexts/context-menu-connection-info.tsx index 40f75cd..00baea8 100644 --- a/src/client/webapp/elements/contexts/context-menu-connection-info.tsx +++ b/src/client/webapp/elements/contexts/context-menu-connection-info.tsx @@ -4,7 +4,7 @@ import { Member } from '../../data-types'; import PersonalizeOverlay from '../overlays/overlay-personalize'; import ContextMenu from './components/context-menu'; import CombinedGuild from '../../guild-combined'; -import { overlayState } from '../require/atoms-2'; +import { overlayState } from '../require/atoms'; export interface ConnectionInfoContextMenuProps { guild: CombinedGuild; diff --git a/src/client/webapp/elements/contexts/context-menu-guild-title.tsx b/src/client/webapp/elements/contexts/context-menu-guild-title.tsx index 2c3e566..601d928 100644 --- a/src/client/webapp/elements/contexts/context-menu-guild-title.tsx +++ b/src/client/webapp/elements/contexts/context-menu-guild-title.tsx @@ -9,7 +9,7 @@ import ChannelOverlay from '../overlays/overlay-channel'; import GuildSettingsOverlay from '../overlays/overlay-guild-settings'; import BaseElements from '../require/base-elements'; import ContextMenu from './components/context-menu'; -import { currGuildSelfMemberState, currGuildState, overlayState } from '../require/atoms-2'; +import { currGuildSelfMemberState, currGuildState, overlayState } from '../require/atoms'; import { isLoaded } from '../require/loadables'; export interface GuildTitleContextMenuProps { diff --git a/src/client/webapp/elements/displays/display-guild-invites.tsx b/src/client/webapp/elements/displays/display-guild-invites.tsx index 006c721..9307c83 100644 --- a/src/client/webapp/elements/displays/display-guild-invites.tsx +++ b/src/client/webapp/elements/displays/display-guild-invites.tsx @@ -15,7 +15,7 @@ import Button from '../components/button'; import TokenRow from '../components/token-row'; import CombinedGuild from '../../guild-combined'; import { useRecoilValue } from 'recoil'; -import { guildMetaState, guildResourceSoftImgSrcState, guildTokensState, useRecoilValueSoftImgSrc } from '../require/atoms-2'; +import { guildMetaState, guildResourceSoftImgSrcState, guildTokensState, useRecoilValueSoftImgSrc } from '../require/atoms'; import { isFailed, isLoaded } from '../require/loadables'; export interface GuildInvitesDisplayProps { diff --git a/src/client/webapp/elements/displays/display-guild-overview.tsx b/src/client/webapp/elements/displays/display-guild-overview.tsx index 4bca70f..9b8c743 100644 --- a/src/client/webapp/elements/displays/display-guild-overview.tsx +++ b/src/client/webapp/elements/displays/display-guild-overview.tsx @@ -10,7 +10,7 @@ import Display from '../components/display'; import TextInput from '../components/input-text'; import ImageEditInput from '../components/input-image-edit'; import CombinedGuild from '../../guild-combined'; -import { guildMetaState, guildResourceState } from '../require/atoms-2'; +import { guildMetaState, guildResourceState } from '../require/atoms'; import { useRecoilValue } from 'recoil'; import { isFailed, isLoaded } from '../require/loadables'; diff --git a/src/client/webapp/elements/lists/channel-list.tsx b/src/client/webapp/elements/lists/channel-list.tsx index 5c28ffc..50df6d0 100644 --- a/src/client/webapp/elements/lists/channel-list.tsx +++ b/src/client/webapp/elements/lists/channel-list.tsx @@ -1,7 +1,7 @@ import React, { FC, useMemo } from 'react' import { useRecoilValue } from 'recoil'; import { Channel } from '../../data-types'; -import { currGuildChannelsState, currGuildSelfMemberState, currGuildState } from '../require/atoms-2'; +import { currGuildChannelsState, currGuildSelfMemberState, currGuildState } from '../require/atoms'; import { isFailed, isLoaded } from '../require/loadables'; import ChannelElement from './components/channel-element'; diff --git a/src/client/webapp/elements/lists/components/channel-element.tsx b/src/client/webapp/elements/lists/components/channel-element.tsx index 3fde74c..a9c49d9 100644 --- a/src/client/webapp/elements/lists/components/channel-element.tsx +++ b/src/client/webapp/elements/lists/components/channel-element.tsx @@ -11,7 +11,7 @@ import BaseElements from '../../require/base-elements'; import { useContextHover } from '../../require/react-helper'; import BasicHover, { BasicHoverSide } from '../../contexts/context-hover-basic'; import { useRecoilValue, useSetRecoilState } from 'recoil'; -import { currGuildActiveChannelState, guildActiveChannelIdState, overlayState } from '../../require/atoms-2'; +import { currGuildActiveChannelState, guildActiveChannelIdState, overlayState } from '../../require/atoms'; import { isLoaded } from '../../require/loadables'; export interface ChannelElementProps { diff --git a/src/client/webapp/elements/lists/components/guild-list-element.tsx b/src/client/webapp/elements/lists/components/guild-list-element.tsx index 7ebe1ae..71393df 100644 --- a/src/client/webapp/elements/lists/components/guild-list-element.tsx +++ b/src/client/webapp/elements/lists/components/guild-list-element.tsx @@ -3,7 +3,7 @@ import { useRecoilState, useRecoilValue } from 'recoil'; import CombinedGuild from '../../../guild-combined'; import ContextMenu from '../../contexts/components/context-menu'; import BasicHover, { BasicHoverSide } from '../../contexts/context-hover-basic'; -import { currGuildIdState, guildMetaState, guildResourceSoftImgSrcState, guildSelfMemberState, guildsManagerState, useRecoilValueSoftImgSrc } from '../../require/atoms-2'; +import { currGuildIdState, guildMetaState, guildResourceSoftImgSrcState, guildSelfMemberState, guildsManagerState, useRecoilValueSoftImgSrc } from '../../require/atoms'; import BaseElements from '../../require/base-elements'; import { IAlignment } from '../../require/elements-util'; import { isLoaded } from '../../require/loadables'; diff --git a/src/client/webapp/elements/lists/components/member-element.tsx b/src/client/webapp/elements/lists/components/member-element.tsx index 457d074..68d523c 100644 --- a/src/client/webapp/elements/lists/components/member-element.tsx +++ b/src/client/webapp/elements/lists/components/member-element.tsx @@ -1,7 +1,7 @@ import React, { FC, useMemo } from 'react'; import { Member } from '../../../data-types'; import CombinedGuild from '../../../guild-combined'; -import { guildResourceSoftImgSrcState, useRecoilValueSoftImgSrc } from '../../require/atoms-2'; +import { guildResourceSoftImgSrcState, useRecoilValueSoftImgSrc } from '../../require/atoms'; export interface DummyMember { id: 'dummy'; diff --git a/src/client/webapp/elements/lists/components/message-element.tsx b/src/client/webapp/elements/lists/components/message-element.tsx index 9a05b43..8d8c037 100644 --- a/src/client/webapp/elements/lists/components/message-element.tsx +++ b/src/client/webapp/elements/lists/components/message-element.tsx @@ -5,7 +5,7 @@ import { Member, Message } from '../../../data-types'; import CombinedGuild from '../../../guild-combined'; import ImageContextMenu from '../../contexts/context-menu-image'; import ImageOverlay from '../../overlays/overlay-image'; -import { guildResourceSoftImgSrcState, guildResourceState, overlayState, useRecoilValueSoftImgSrc } from '../../require/atoms-2'; +import { guildResourceSoftImgSrcState, guildResourceState, overlayState, useRecoilValueSoftImgSrc } from '../../require/atoms'; import ElementsUtil, { IAlignment } from '../../require/elements-util'; import { isLoaded } from '../../require/loadables'; import { useContextClickContextMenu, useDownloadButton, useOneTimeAsyncAction } from '../../require/react-helper'; diff --git a/src/client/webapp/elements/lists/guild-list.tsx b/src/client/webapp/elements/lists/guild-list.tsx index eeb20f8..db68a71 100644 --- a/src/client/webapp/elements/lists/guild-list.tsx +++ b/src/client/webapp/elements/lists/guild-list.tsx @@ -1,6 +1,6 @@ import React, { FC, useMemo } from 'react'; import { useRecoilValue } from 'recoil'; -import { allGuildsState } from '../require/atoms-2'; +import { allGuildsState } from '../require/atoms'; import GuildListElement from './components/guild-list-element'; const GuildList: FC = () => { diff --git a/src/client/webapp/elements/lists/member-list.tsx b/src/client/webapp/elements/lists/member-list.tsx index 4448481..b57d582 100644 --- a/src/client/webapp/elements/lists/member-list.tsx +++ b/src/client/webapp/elements/lists/member-list.tsx @@ -7,7 +7,7 @@ import React, { FC, useMemo } from 'react'; import { Member } from '../../data-types'; import MemberElement from './components/member-element'; import { useRecoilValue } from 'recoil'; -import { currGuildMembersState, currGuildState } from '../require/atoms-2'; +import { currGuildMembersState, currGuildState } from '../require/atoms'; import { isFailed, isPended, isUnload } from '../require/loadables'; const MemberList: FC = () => { diff --git a/src/client/webapp/elements/lists/message-list.tsx b/src/client/webapp/elements/lists/message-list.tsx index 641a040..2fdb7c3 100644 --- a/src/client/webapp/elements/lists/message-list.tsx +++ b/src/client/webapp/elements/lists/message-list.tsx @@ -9,7 +9,7 @@ import CombinedGuild from '../../guild-combined'; import MessageElement from './components/message-element'; import InfiniteScroll from '../components/infinite-scroll'; import { useMessagesScrollingSubscription } from '../require/guild-subscriptions'; -import { currGuildActiveChannelMessagesState } from '../require/atoms-2'; +import { currGuildActiveChannelMessagesState } from '../require/atoms'; import { useRecoilValue } from 'recoil'; import { isFailed, isLoaded, isPended, isUnload } from '../require/loadables'; diff --git a/src/client/webapp/elements/overlays/overlay-add-guild.tsx b/src/client/webapp/elements/overlays/overlay-add-guild.tsx index b6c4551..56c6058 100644 --- a/src/client/webapp/elements/overlays/overlay-add-guild.tsx +++ b/src/client/webapp/elements/overlays/overlay-add-guild.tsx @@ -17,7 +17,7 @@ import * as fs from 'fs/promises'; import Button from '../components/button'; import Overlay from '../components/overlay'; import { useRecoilValue, useSetRecoilState } from 'recoil'; -import { currGuildIdState, guildsManagerState, overlayState } from '../require/atoms-2'; +import { currGuildIdState, guildsManagerState, overlayState } from '../require/atoms'; export interface IAddGuildData { name: string, diff --git a/src/client/webapp/elements/overlays/overlay-channel.tsx b/src/client/webapp/elements/overlays/overlay-channel.tsx index 8d119e6..a9d5070 100644 --- a/src/client/webapp/elements/overlays/overlay-channel.tsx +++ b/src/client/webapp/elements/overlays/overlay-channel.tsx @@ -13,7 +13,7 @@ import { useAsyncSubmitButton } from '../require/react-helper'; import Button from '../components/button'; import Overlay from '../components/overlay'; import { useRecoilValue, useSetRecoilState } from 'recoil'; -import { currGuildState, overlayState } from '../require/atoms-2'; +import { currGuildState, overlayState } from '../require/atoms'; export interface ChannelOverlayProps { channel?: Channel; // If this is undefined, this is an add-channel overlay diff --git a/src/client/webapp/elements/overlays/overlay-guild-settings.tsx b/src/client/webapp/elements/overlays/overlay-guild-settings.tsx index ecbee60..a57ff64 100644 --- a/src/client/webapp/elements/overlays/overlay-guild-settings.tsx +++ b/src/client/webapp/elements/overlays/overlay-guild-settings.tsx @@ -4,7 +4,7 @@ import GuildInvitesDisplay from "../displays/display-guild-invites"; import GuildOverviewDisplay from "../displays/display-guild-overview"; import Overlay from '../components/overlay'; import CombinedGuild from "../../guild-combined"; -import { guildMetaState } from "../require/atoms-2"; +import { guildMetaState } from "../require/atoms"; import { useRecoilValue } from "recoil"; import { isLoaded } from "../require/loadables"; diff --git a/src/client/webapp/elements/overlays/overlay-image.tsx b/src/client/webapp/elements/overlays/overlay-image.tsx index 57d3508..4dda5f3 100644 --- a/src/client/webapp/elements/overlays/overlay-image.tsx +++ b/src/client/webapp/elements/overlays/overlay-image.tsx @@ -11,7 +11,7 @@ import { useContextClickContextMenu } from '../require/react-helper'; import ImageContextMenu from '../contexts/context-menu-image'; import Overlay from '../components/overlay'; import { useRecoilValue } from 'recoil'; -import { guildResourceSoftImgSrcState, guildResourceState, useRecoilValueSoftImgSrc } from '../require/atoms-2'; +import { guildResourceSoftImgSrcState, guildResourceState, useRecoilValueSoftImgSrc } from '../require/atoms'; import { isFailed, isLoaded } from '../require/loadables'; export interface ImageOverlayProps { diff --git a/src/client/webapp/elements/overlays/overlay-personalize.tsx b/src/client/webapp/elements/overlays/overlay-personalize.tsx index f7fbd64..97254cf 100644 --- a/src/client/webapp/elements/overlays/overlay-personalize.tsx +++ b/src/client/webapp/elements/overlays/overlay-personalize.tsx @@ -14,7 +14,7 @@ import Overlay from '../components/overlay'; import { useRecoilValue, useSetRecoilState } from 'recoil'; import { Member } from '../../data-types'; import CombinedGuild from '../../guild-combined'; -import { guildResourceState, overlayState } from '../require/atoms-2'; +import { guildResourceState, overlayState } from '../require/atoms'; import { isFailed, isLoaded } from '../require/loadables'; interface PersonalizeOverlayProps { diff --git a/src/client/webapp/elements/require/atoms-funcs.ts b/src/client/webapp/elements/require/atoms-funcs.ts index f47a7db..2acde36 100644 --- a/src/client/webapp/elements/require/atoms-funcs.ts +++ b/src/client/webapp/elements/require/atoms-funcs.ts @@ -7,7 +7,7 @@ import { AtomEffect, Loadable, RecoilValue, useRecoilValueLoadable } from "recoi import CombinedGuild from "../../guild-combined"; import { Conflictable, Connectable } from "../../guild-types"; import { createFailedScrollingEnd, createFailedValue, createFailedValueScrolling, createLoadedScrollingEnd, createLoadedValue, createLoadedValueScrolling, createLoadingScrollingEnd, Defined, DEF_PENDED_SCROLLING_VALUE, DEF_PENDED_VALUE, DEF_UNLOADED_SCROLL_END, isEndPended, isLoaded, isPended, LoadableScrollingEnd, LoadableValue, LoadableValueScrolling, LoadedScrollingEnd, LoadedValueScrolling } from "./loadables"; -import { guildState } from './atoms-2'; +import { guildState } from './atoms'; import { Changes } from '../../data-types'; // General typescript type that infers the arguments of a function diff --git a/src/client/webapp/elements/require/atoms-2.ts b/src/client/webapp/elements/require/atoms.ts similarity index 100% rename from src/client/webapp/elements/require/atoms-2.ts rename to src/client/webapp/elements/require/atoms.ts diff --git a/src/client/webapp/elements/root.tsx b/src/client/webapp/elements/root.tsx index 054fca4..70761bc 100644 --- a/src/client/webapp/elements/root.tsx +++ b/src/client/webapp/elements/root.tsx @@ -1,7 +1,7 @@ import React, { FC, ReactNode } from 'react'; import { useRecoilValue } from 'recoil'; import GuildsManager from '../guilds-manager'; -import { initRecoil, overlayState } from './require/atoms-2'; +import { initRecoil, overlayState } from './require/atoms'; import GuildsManagerElement from './sections/guilds-manager'; import TitleBar from './sections/title-bar'; diff --git a/src/client/webapp/elements/sections/connection-info.tsx b/src/client/webapp/elements/sections/connection-info.tsx index 33a8d59..98cf0a3 100644 --- a/src/client/webapp/elements/sections/connection-info.tsx +++ b/src/client/webapp/elements/sections/connection-info.tsx @@ -4,7 +4,7 @@ import MemberElement, { DummyMember } from '../lists/components/member-element'; import ConnectionInfoContextMenu from '../contexts/context-menu-connection-info'; import { useContextMenu } from '../require/react-helper'; import { useRecoilValue } from 'recoil'; -import { currGuildSelfMemberState, currGuildState } from '../require/atoms-2'; +import { currGuildSelfMemberState, currGuildState } from '../require/atoms'; import { isFailed, isLoaded, isPended, isUnload } from '../require/loadables'; const ConnectionInfo: FC = () => { diff --git a/src/client/webapp/elements/sections/guild-list-container.tsx b/src/client/webapp/elements/sections/guild-list-container.tsx index e05e5b7..829a5e4 100644 --- a/src/client/webapp/elements/sections/guild-list-container.tsx +++ b/src/client/webapp/elements/sections/guild-list-container.tsx @@ -12,7 +12,7 @@ import ErrorMessageOverlay from '../overlays/overlay-error-message'; import BasicHover, { BasicHoverSide } from '../contexts/context-hover-basic'; import BaseElements from '../require/base-elements'; import { useSetRecoilState } from 'recoil'; -import { overlayState } from '../require/atoms-2'; +import { overlayState } from '../require/atoms'; const GuildListContainer: FC = () => { const addGuildRef = useRef(null); diff --git a/src/client/webapp/elements/sections/guild-title.tsx b/src/client/webapp/elements/sections/guild-title.tsx index f47832f..a69e68a 100644 --- a/src/client/webapp/elements/sections/guild-title.tsx +++ b/src/client/webapp/elements/sections/guild-title.tsx @@ -1,7 +1,7 @@ import React, { FC, useMemo, useRef } from 'react'; import { useRecoilValue } from 'recoil'; import GuildTitleContextMenu from '../contexts/context-menu-guild-title'; -import { currGuildMetaState, currGuildSelfMemberState } from '../require/atoms-2'; +import { currGuildMetaState, currGuildSelfMemberState } from '../require/atoms'; import { isLoaded } from '../require/loadables'; import { useContextMenu } from '../require/react-helper'; diff --git a/src/client/webapp/elements/sections/guild.tsx b/src/client/webapp/elements/sections/guild.tsx index 6b2fc02..8017c49 100644 --- a/src/client/webapp/elements/sections/guild.tsx +++ b/src/client/webapp/elements/sections/guild.tsx @@ -13,7 +13,7 @@ import ConnectionInfo from './connection-info'; import GuildTitle from './guild-title'; import SendMessage from './send-message'; import { useRecoilValue, useSetRecoilState } from 'recoil'; -import { currGuildActiveChannelState, currGuildChannelsState, currGuildSelfMemberState, currGuildState, guildActiveChannelIdState } from '../require/atoms-2'; +import { currGuildActiveChannelState, currGuildChannelsState, currGuildSelfMemberState, currGuildState, guildActiveChannelIdState } from '../require/atoms'; import { isLoaded, isUnload } from '../require/loadables'; const GuildElement: FC = () => {