fix(ui): loader for player, remove thrashing tag from session list header
This commit is contained in:
parent
6dd22030d8
commit
fdbc3e646f
4 changed files with 7 additions and 12 deletions
|
|
@ -24,7 +24,8 @@ function PlayerBlockHeader(props: any) {
|
|||
const [hideBack, setHideBack] = React.useState(false);
|
||||
const { player, store } = React.useContext(PlayerContext);
|
||||
|
||||
const { width, height, showEvents } = store.get();
|
||||
const playerState = store?.get?.() || { width: 0, height: 0, showEvents: false }
|
||||
const { width = 0, height = 0, showEvents = false } = playerState
|
||||
|
||||
const {
|
||||
session,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { Modal } from 'UI';
|
||||
import { Modal, Loader } from 'UI';
|
||||
import { toggleFullscreen, closeBottomBlock } from 'Duck/components/player';
|
||||
import { fetchList } from 'Duck/integrations';
|
||||
import { createWebPlayer } from 'Player';
|
||||
|
|
@ -100,7 +100,7 @@ function WebPlayer(props: any) {
|
|||
contextValue.player.play();
|
||||
};
|
||||
|
||||
if (!contextValue.player || !session) return null;
|
||||
if (!session) return <Loader size={75} style={{ position: 'fixed', top: '50%', left: '50%', transform: 'translateX(-50%)' }} />;
|
||||
|
||||
return (
|
||||
<PlayerContext.Provider value={contextValue}>
|
||||
|
|
@ -112,12 +112,12 @@ function WebPlayer(props: any) {
|
|||
fullscreen={fullscreen}
|
||||
/>
|
||||
{/* @ts-ignore */}
|
||||
<PlayerContent
|
||||
{contextValue.player ? <PlayerContent
|
||||
activeTab={activeTab}
|
||||
fullscreen={fullscreen}
|
||||
setActiveTab={setActiveTab}
|
||||
session={session}
|
||||
/>
|
||||
/> : <Loader style={{ position: 'fixed', top: '0%', left: '50%', transform: 'translateX(-50%)' }} />}
|
||||
<Modal open={showNoteModal} onClose={onNoteClose}>
|
||||
{showNoteModal ? (
|
||||
<ReadNote
|
||||
|
|
|
|||
|
|
@ -4,21 +4,16 @@ import SessionHeader from './components/SessionHeader';
|
|||
import NotesList from './components/Notes/NoteList';
|
||||
import { connect } from 'react-redux';
|
||||
import LatestSessionsMessage from './components/LatestSessionsMessage';
|
||||
import { clearCurrentSession } from "Duck/sessions";
|
||||
|
||||
function SessionListContainer({
|
||||
activeTab,
|
||||
members,
|
||||
clearCurrentSession,
|
||||
}: {
|
||||
activeTab: string;
|
||||
fetchMembers: () => void;
|
||||
members: object[];
|
||||
clearCurrentSession: () => void;
|
||||
}) {
|
||||
React.useEffect(() => {
|
||||
clearCurrentSession()
|
||||
}, [])
|
||||
return (
|
||||
<div className="widget-wrapper">
|
||||
<SessionHeader />
|
||||
|
|
@ -36,5 +31,4 @@ export default connect(
|
|||
// @ts-ignore
|
||||
members: state.getIn(['members', 'list']),
|
||||
}),
|
||||
{ clearCurrentSession }
|
||||
)(SessionListContainer);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export default connect(
|
|||
const isEnterprise = state.getIn(['user', 'account', 'edition']) === 'ee';
|
||||
return {
|
||||
activeTab: state.getIn(['search', 'activeTab']),
|
||||
tags: issues_types.filter((tag: any) => (isEnterprise ? tag.type !== 'bookmark' : tag.type !== 'vault')),
|
||||
tags: issues_types.filter((tag: any) => tag.type !== 'mouse_thrashing' && (isEnterprise ? tag.type !== 'bookmark' : tag.type !== 'vault')),
|
||||
total: state.getIn(['sessions', 'total']) || 0,
|
||||
};
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue