Browse Source

Rename file: JoyWarn -> JoyStatus

Alex Siman 5 years ago
parent
commit
73900d6c0b

+ 1 - 1
packages/joy-forum/src/CategoryList.tsx

@@ -12,7 +12,7 @@ import { ViewThread } from './ViewThread';
 import { MutedSpan } from '@polkadot/joy-utils/MutedText';
 import { UrlHasIdProps, CategoryCrumbs, Pagination, ThreadsPerPage } from './utils';
 import Section from '@polkadot/joy-utils/Section';
-import { JoyWarn } from '@polkadot/joy-utils/JoyWarn';
+import { JoyWarn } from '@polkadot/joy-utils/JoyStatus';
 import { withForumCalls } from './calls';
 import { withMulti, withApi } from '@polkadot/react-api';
 import { ApiProps } from '@polkadot/react-api/types';

+ 3 - 3
packages/joy-forum/src/ForumSudo.tsx

@@ -14,7 +14,7 @@ import Section from '@polkadot/joy-utils/Section';
 import { useMyAccount } from '@polkadot/joy-utils/MyAccountContext';
 import { withOnlySudo } from '@polkadot/joy-utils/Sudo';
 import { AccountId } from '@polkadot/types/interfaces';
-import { JoyWarn } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 import AddressMini from '@polkadot/react-components/AddressMiniJoy';
 import { withForumCalls } from './calls';
 import { TxFailedCallback, TxCallback } from '@polkadot/react-components/Status/types';
@@ -212,10 +212,10 @@ function innerWithOnlyForumSudo<P extends LoadStructProps> (Component: React.Com
       return <Component {...props} />;
     } else {
       return (
-        <JoyWarn title={`Only forum sudo can access this functionality.`}>
+        <JoyError title={`Only forum sudo can access this functionality.`}>
           <div>Current forum sudo:</div>
           <div>{sudo ? <AddressMini value={sudo} /> : 'UNDEFINED'}</div>
-        </JoyWarn>
+        </JoyError>
       );
     }
   };

+ 1 - 1
packages/joy-forum/src/ViewReply.tsx

@@ -5,7 +5,7 @@ import { Segment, Button } from 'semantic-ui-react';
 
 import { Post, Category, Thread } from '@joystream/types/forum';
 import { Moderate } from './Moderate';
-import { JoyWarn } from '@polkadot/joy-utils/JoyWarn';
+import { JoyWarn } from '@polkadot/joy-utils/JoyStatus';
 import { useMyAccount } from '@polkadot/joy-utils/MyAccountContext';
 import { IfIAmForumSudo } from './ForumSudo';
 import { MemberPreview } from '@polkadot/joy-members/MemberPreview';

+ 1 - 1
packages/joy-forum/src/ViewThread.tsx

@@ -10,7 +10,7 @@ import { Pagination, RepliesPerPage, CategoryCrumbs } from './utils';
 import { ViewReply } from './ViewReply';
 import { Moderate } from './Moderate';
 import { MutedSpan } from '@polkadot/joy-utils/MutedText';
-import { JoyWarn } from '@polkadot/joy-utils/JoyWarn';
+import { JoyWarn } from '@polkadot/joy-utils/JoyStatus';
 import { withForumCalls } from './calls';
 import { withApi, withMulti } from '@polkadot/react-api';
 import { ApiProps } from '@polkadot/react-api/types';

+ 1 - 1
packages/joy-media/src/DiscoveryProvider.tsx

@@ -8,7 +8,7 @@ import { Vec } from '@polkadot/types';
 import { Url } from '@joystream/types/discovery'
 import ApiContext from '@polkadot/react-api/ApiContext';
 import { ApiProps } from '@polkadot/react-api/types';
-import { JoyInfo } from '@polkadot/joy-utils/JoyWarn';
+import { JoyInfo } from '@polkadot/joy-utils/JoyStatus';
 
 export type BootstrapNodes = {
   bootstrapNodes?: Url[],

+ 1 - 1
packages/joy-media/src/Upload.tsx

@@ -22,7 +22,7 @@ import TxButton from '@polkadot/joy-utils/TxButton';
 import IpfsHash from 'ipfs-only-hash';
 import { ChannelId } from '@joystream/types/content-working-group';
 import { EditVideoView } from './upload/EditVideo.view';
-import { JoyInfo } from '@polkadot/joy-utils/JoyWarn';
+import { JoyInfo } from '@polkadot/joy-utils/JoyStatus';
 
 const MAX_FILE_SIZE_MB = 500;
 const MAX_FILE_SIZE_BYTES = MAX_FILE_SIZE_MB * 1024 * 1024;

+ 1 - 1
packages/joy-media/src/channels/ChannelsByOwner.view.tsx

@@ -4,7 +4,7 @@ import { RouteComponentProps } from 'react-router';
 import { GenericAccountId } from '@polkadot/types';
 import { MediaView } from '../MediaView';
 import { ChannelsByOwnerProps, ChannelsByOwner } from './ChannelsByOwner';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = ChannelsByOwnerProps;
 

+ 1 - 1
packages/joy-media/src/channels/EditChannel.tsx

@@ -16,7 +16,7 @@ import { ChannelPublicationStatusDropdownOptions, isAccountAChannelOwner } from
 import { TxCallback } from '@polkadot/react-components/Status/types';
 import { SubmittableResult } from '@polkadot/api';
 import { ChannelValidationConstraints } from '../transport';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 export type OuterProps = {
   history?: History,

+ 1 - 1
packages/joy-media/src/channels/EditChannel.view.tsx

@@ -3,7 +3,7 @@ import { RouteComponentProps } from 'react-router';
 import { MediaView } from '../MediaView';
 import { OuterProps, EditForm } from './EditChannel';
 import { ChannelId } from '@joystream/types/content-working-group';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = OuterProps;
 

+ 1 - 1
packages/joy-media/src/channels/ViewChannel.tsx

@@ -8,7 +8,7 @@ import { ViewVideoChannel } from './ViewVideoChannel';
 import { ViewMusicChannel } from './ViewMusicChannel';
 import { toVideoPreviews } from '../video/VideoPreview';
 import { isVideoChannel, isMusicChannel } from './ChannelHelpers';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 export type ViewChannelProps = {
   id: ChannelId,

+ 1 - 1
packages/joy-media/src/channels/ViewChannel.view.tsx

@@ -3,7 +3,7 @@ import { RouteComponentProps } from 'react-router';
 import { MediaView } from '../MediaView';
 import { ViewChannelProps, ViewChannel } from './ViewChannel';
 import { ChannelId } from '@joystream/types/content-working-group';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = ViewChannelProps;
 

+ 1 - 1
packages/joy-media/src/common/MediaPlayerView.tsx

@@ -15,7 +15,7 @@ import { VideoType } from '../schemas/video/Video';
 import { isAccountAChannelOwner } from '../channels/ChannelHelpers';
 import { ChannelEntity } from '../entities/ChannelEntity';
 import { useMyMembership } from '@polkadot/joy-utils/MyMembershipContext';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 const PLAYER_COMMON_PARAMS = {
   lang: 'en',

+ 1 - 1
packages/joy-media/src/common/MediaPlayerWithResolver.tsx

@@ -13,7 +13,7 @@ import { DiscoveryProviderProps, withDiscoveryProvider } from '../DiscoveryProvi
 import { DataObjectStorageRelationshipId, DataObjectStorageRelationship } from '@joystream/types/media';
 import { Message } from 'semantic-ui-react';
 import { MediaPlayerView, RequiredMediaPlayerProps } from './MediaPlayerView';
-import { JoyInfo } from '@polkadot/joy-utils/JoyWarn';
+import { JoyInfo } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = ApiProps & I18nProps & DiscoveryProviderProps & RequiredMediaPlayerProps;
 

+ 1 - 1
packages/joy-media/src/upload/EditVideo.view.tsx

@@ -4,7 +4,7 @@ import { MediaView } from '../MediaView';
 import { OuterProps, EditForm } from './UploadVideo';
 import EntityId from '@joystream/types/versioned-store/EntityId';
 import { ChannelId } from '@joystream/types/content-working-group';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = OuterProps;
 

+ 1 - 1
packages/joy-media/src/upload/UploadVideo.tsx

@@ -30,7 +30,7 @@ import { ParametrizedPropertyValue } from '@joystream/types/versioned-store/perm
 import { ParameterizedClassPropertyValues } from '@joystream/types/versioned-store/permissions/batching/operations';
 import { useMyMembership } from '@polkadot/joy-utils/MyMembershipContext';
 import { isAccountAChannelOwner } from '../channels/ChannelHelpers';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 /** Example: "2019-01-23" -> 1548201600 */
 function humanDateToUnixTs(humanFriendlyDate: string): number | undefined {

+ 1 - 1
packages/joy-media/src/video/PlayVideo.tsx

@@ -12,7 +12,7 @@ import { printExplicit, printReleaseDate, printLanguage } from '../entities/Enti
 import { MediaObjectType } from '../schemas/general/MediaObject';
 import { MediaPlayerWithResolver } from '../common/MediaPlayerWithResolver';
 import { ContentId } from '@joystream/types/media';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 export type PlayVideoProps = {
   channel?: ChannelEntity

+ 1 - 1
packages/joy-media/src/video/PlayVideo.view.tsx

@@ -4,7 +4,7 @@ import { MediaView } from '../MediaView';
 import { PlayVideoProps, PlayVideo } from './PlayVideo';
 import { ChannelId } from '@joystream/types/content-working-group';
 import { EntityId } from '@joystream/types/versioned-store';
-import { JoyError } from '@polkadot/joy-utils/JoyWarn';
+import { JoyError } from '@polkadot/joy-utils/JoyStatus';
 
 type Props = PlayVideoProps;
 

+ 0 - 0
packages/joy-utils/src/JoyWarn.tsx → packages/joy-utils/src/JoyStatus.tsx