rename atoms-2.ts to atoms.ts

This commit is contained in:
Michael Peters 2022-02-06 17:29:45 -06:00
parent eac2c42e53
commit 0b4c5356a9
26 changed files with 25 additions and 25 deletions

View File

@ -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<HTMLElement>; // clicks outside this ref will close the overlay

View File

@ -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';

View File

@ -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;

View File

@ -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 {

View File

@ -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 {

View File

@ -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';

View File

@ -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';

View File

@ -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 {

View File

@ -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';

View File

@ -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';

View File

@ -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';

View File

@ -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 = () => {

View File

@ -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 = () => {

View File

@ -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';

View File

@ -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,

View File

@ -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

View File

@ -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";

View File

@ -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 {

View File

@ -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 {

View File

@ -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

View File

@ -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';

View File

@ -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 = () => {

View File

@ -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<HTMLDivElement>(null);

View File

@ -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';

View File

@ -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 = () => {