Change style of compose post button + remove thumbnail preview. Closes #2463

This commit is contained in:
Gabe Kangas
2022-12-19 11:57:49 -08:00
parent 58e4a118a6
commit edfb44d7a8

View File

@@ -100,12 +100,9 @@ export const MainLayout: FC<MainLayoutProps> = ({ children }) => {
const streamDurationString = broadcaster const streamDurationString = broadcaster
? parseSecondsToDurationString(differenceInSeconds(new Date(), new Date(broadcaster.time))) ? parseSecondsToDurationString(differenceInSeconds(new Date(), new Date(broadcaster.time)))
: ''; : '';
const currentThumbnail = online ? (
<img src="/thumbnail.jpg" className="online-thumbnail" alt="current thumbnail" width="1rem" />
) : null;
const statusIcon = online ? <PlayCircleFilled /> : <MinusSquareFilled />; const statusIcon = online ? <PlayCircleFilled /> : <MinusSquareFilled />;
const statusMessage = online ? `Online ${streamDurationString}` : 'Offline'; const statusMessage = online ? `Online ${streamDurationString}` : 'Offline';
const popoverTitle = <Typography.Text>Thumbnail</Typography.Text>;
const statusIndicator = ( const statusIndicator = (
<div className="online-status-indicator"> <div className="online-status-indicator">
@@ -113,13 +110,6 @@ export const MainLayout: FC<MainLayoutProps> = ({ children }) => {
<span className="status-icon">{statusIcon}</span> <span className="status-icon">{statusIcon}</span>
</div> </div>
); );
const statusIndicatorWithThumb = online ? (
<Popover content={currentThumbnail} title={popoverTitle} trigger="hover">
{statusIndicator}
</Popover>
) : (
statusIndicator
);
const integrationsMenu = [ const integrationsMenu = [
{ {
@@ -288,28 +278,29 @@ export const MainLayout: FC<MainLayoutProps> = ({ children }) => {
<Layout className="layout-main"> <Layout className="layout-main">
<Header className="layout-header"> <Header className="layout-header">
<Space direction="horizontal"> <Space direction="horizontal">
<Tooltip title="Compose post to your followers"> <Tooltip title="Compose post to your social followers">
<Button <Button
type="primary" type="link"
shape="circle"
icon={<EditOutlined />} icon={<EditOutlined />}
size="large" size="small"
onClick={handleCreatePostButtonPressed} onClick={handleCreatePostButtonPressed}
style={{ display: federationEnabled ? 'block' : 'none' }} style={{ display: federationEnabled ? 'block' : 'none', margin: '10px' }}
/> >
Compose Post
</Button>
</Tooltip> </Tooltip>
</Space> </Space>
<div className="global-stream-title-container"> <div className="global-stream-title-container">
<TextFieldWithSubmit <TextFieldWithSubmit
fieldName="streamTitle" fieldName="streamTitle"
{...TEXTFIELD_PROPS_STREAM_TITLE} {...TEXTFIELD_PROPS_STREAM_TITLE}
placeholder="What are you streaming now" placeholder="What are you streaming now? (Stream title)"
value={currentStreamTitle} value={currentStreamTitle}
initialValue={instanceDetails.streamTitle} initialValue={instanceDetails.streamTitle}
onChange={handleStreamTitleChanged} onChange={handleStreamTitleChanged}
/> />
</div> </div>
<Space direction="horizontal">{statusIndicatorWithThumb}</Space> <Space direction="horizontal">{statusIndicator}</Space>
</Header> </Header>
{headerAlertMessage} {headerAlertMessage}