diff --git a/web/components/modals/AuthModal/AuthModal.tsx b/web/components/modals/AuthModal/AuthModal.tsx index 44d1a7f9d..87fe8e16f 100644 --- a/web/components/modals/AuthModal/AuthModal.tsx +++ b/web/components/modals/AuthModal/AuthModal.tsx @@ -14,8 +14,6 @@ import { accessTokenAtom, } from '../../stores/ClientConfigStore'; -const { TabPane } = Tabs; - export const AuthModal: FC = () => { const currentUser = useRecoilValue(currentUserAtom); if (!currentUser) { @@ -27,45 +25,48 @@ export const AuthModal: FC = () => { const federationEnabled = true; const { displayName } = currentUser; + const indieAuthTabTitle = ( + + IndieAuth + IndieAuth + + ); + const indieAuthTab = ( + + ); + + const fediAuthTabTitle = ( + + Fediverse auth + FediAuth + + ); + const fediAuthTab = ( + + ); + + const items = [ + { label: indieAuthTabTitle, key: '1', children: indieAuthTab }, + { label: fediAuthTabTitle, key: '2', children: fediAuthTab }, + ]; + return (
null} - > - - IndieAuth - IndieAuth - - } - key="1" - > - - - - Fediverse auth - FediAuth - - } - key="2" - > - - - + />
); }; diff --git a/web/components/ui/Content/Content.tsx b/web/components/ui/Content/Content.tsx index d333d422e..0dccff395 100644 --- a/web/components/ui/Content/Content.tsx +++ b/web/components/ui/Content/Content.tsx @@ -34,7 +34,6 @@ import { ServerStatus } from '../../../interfaces/server-status.model'; import { Statusbar } from '../Statusbar/Statusbar'; import { ChatMessage } from '../../../interfaces/chat-message.model'; -const { TabPane } = Tabs; const { Content: AntContent } = Layout; // Lazy loaded components @@ -59,31 +58,34 @@ const ChatContainer = dynamic(() => import('../../chat/ChatContainer/ChatContainer').then(mod => mod.ChatContainer), ); -const DesktopContent = ({ name, streamTitle, summary, tags, socialHandles, extraPageContent }) => ( - <> -
- -
+const DesktopContent = ({ name, streamTitle, summary, tags, socialHandles, extraPageContent }) => { + const aboutTabContent = ; + const followersTabContent = ; -
- - - - - - - - -
- -); + const items = [ + { label: 'About', key: '2', children: aboutTabContent }, + { label: 'Followers', key: '3', children: followersTabContent }, + ]; + + return ( + <> +
+ +
+ +
+ +
+ + ); +}; const MobileContent = ({ name, @@ -96,37 +98,44 @@ const MobileContent = ({ chatDisplayName, chatUserId, showChat, -}) => ( -
- - {showChat && ( - - - - )} - - - - - - - - -
-); +}) => { + const chatContent = showChat && ( + + ); + + const aboutTabContent = ( + <> + + + + ); + const followersTabContent = ; + + const items = [ + { label: 'Chat', key: '1', children: chatContent }, + { label: 'About', key: '2', children: aboutTabContent }, + { label: 'Followers', key: '3', children: followersTabContent }, + ]; + + return ( +
+ +
+ ); +}; export const Content: FC = () => { const appState = useRecoilValue(appStateAtom); diff --git a/web/pages/admin/chat/users.tsx b/web/pages/admin/chat/users.tsx index a7bc3acae..354d8e6a2 100644 --- a/web/pages/admin/chat/users.tsx +++ b/web/pages/admin/chat/users.tsx @@ -12,8 +12,6 @@ import { UserTable } from '../../../components/UserTable'; import { ClientTable } from '../../../components/ClientTable'; import { BannedIPsTable } from '../../../components/BannedIPsTable'; -const { TabPane } = Tabs; - export const FETCH_INTERVAL = 10 * 1000; // 10 sec export default function ChatUsers() { @@ -88,20 +86,25 @@ export default function ChatUsers() {

); - return ( - - Connected {online ? `(${clients.length})` : '(offline)'}} key="1"> - {connectedUsers} - - Banned Users ({disabledUsers.length})} key="2"> - - - IP Bans ({ipBans.length})} key="3"> - - - Moderators ({moderators.length})} key="4"> - - - + const connectedUserTabTitle = ( + Connected {online ? `(${clients.length})` : '(offline)'} ); + + const bannedUsersTabTitle = Banned Users ({disabledUsers.length}); + const bannedUsersTable = ; + + const bannedIPTabTitle = IP Bans ({ipBans.length}); + const bannedIpTable = ; + + const moderatorUsersTabTitle = Moderators ({moderators.length}); + const moderatorTable = ; + + const items = [ + { label: connectedUserTabTitle, key: '1', children: connectedUsers }, + { label: bannedUsersTabTitle, key: '2', children: bannedUsersTable }, + { label: bannedIPTabTitle, key: '3', children: bannedIpTable }, + { label: moderatorUsersTabTitle, key: '4', children: moderatorTable }, + ]; + + return ; } diff --git a/web/pages/admin/federation/followers.tsx b/web/pages/admin/federation/followers.tsx index b10863ff4..3f095a4d0 100644 --- a/web/pages/admin/federation/followers.tsx +++ b/web/pages/admin/federation/followers.tsx @@ -13,7 +13,6 @@ import { } from '../../../utils/apis'; import { isEmptyObject } from '../../../utils/format'; -const { TabPane } = Tabs; export interface Follower { link: string; username: string; @@ -293,11 +292,21 @@ export default function FediverseFollowers() { }, ); - const pendingRequestsTab = isPrivate && ( - Requests {followersPending.length > 0 && `(${followersPending.length})`}} - key="2" - > + const followersTabTitle = ( + Followers {followers.length > 0 && `(${followers.length})`} + ); + const followersTab = ( + <> +

The following accounts get notified when you go live or send a post.

+ {makeTable(followers, followersColumns)}{' '} + + ); + + const pendingRequestsTabTitle = ( + Requests {followersPending.length > 0 && `(${followersPending.length})`} + ); + const pendingRequestsTab = ( + <>

The following people are requesting to follow your Owncast server on the{' '} @@ -306,31 +315,31 @@ export default function FediverseFollowers() { and be alerted to when you go live. Each must be approved.

{makeTable(followersPending, pendingColumns)} -
+ ); + const blockedTabTitle = ( + Blocked {followersBlocked.length > 0 && `(${followersBlocked.length})`} + ); + const blockedTab = ( + <> +

+ The following people were either rejected or blocked by you. You can approve them as a + follower. +

+

{makeTable(followersBlocked, blockedColumns)}

+ + ); + + const items = [ + { label: followersTabTitle, key: '1', children: followersTab }, + isPrivate && { label: pendingRequestsTabTitle, key: '2', children: pendingRequestsTab }, + { label: blockedTabTitle, key: '3', children: blockedTab }, + ]; + return (
- - Followers {followers.length > 0 && `(${followers.length})`}} - key="1" - > -

The following accounts get notified when you go live or send a post.

- {makeTable(followers, followersColumns)}{' '} -
- {pendingRequestsTab} - Blocked {followersBlocked.length > 0 && `(${followersBlocked.length})`}} - key="3" - > -

- The following people were either rejected or blocked by you. You can approve them as a - follower. -

-

{makeTable(followersBlocked, blockedColumns)}

-
-
+
); }