* Update websockets to allow joining document-based rooms * dynamic websocket joining * emit user.join/leave events when entering and exiting document rooms * presence storage * feat: frontend presence store * lint * UI updates * First pass editing state * refactoring * Timeout per user/doc lint * Document data loading refactor to keep Socket mounted * restore: Mark as viewed functionality Add display of 'you' to collaborators * fix: Socket/document remount when document slug changes due to title change * Revert unneccessary package update * Move editing ping interval to a shared constant * fix: Flash of sidebar when loading page directly on editing mode * separate document and revision loading * add comments for socket events * fix: Socket events getting bound multiple times on reconnect * fix: Clear client side presence state on disconnect * fix: Don't ignore server side error Improved documentation * More comments / why comments * rename Socket -> SocketPresence * fix: Handle redis is down remove unneccessary join * fix: PR feedback
50 lines
948 B
JavaScript
50 lines
948 B
JavaScript
// @flow
|
|
import styled from 'styled-components';
|
|
import breakpoint from 'styled-components-breakpoint';
|
|
import Flex from 'shared/components/Flex';
|
|
|
|
export const Action = styled(Flex)`
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 0 0 0 12px;
|
|
height: 32px;
|
|
font-size: 15px;
|
|
flex-shrink: 0;
|
|
|
|
a {
|
|
color: ${props => props.theme.text};
|
|
height: 24px;
|
|
}
|
|
`;
|
|
|
|
export const Separator = styled.div`
|
|
flex-shrink: 0;
|
|
margin-left: 12px;
|
|
width: 1px;
|
|
height: 28px;
|
|
background: ${props => props.theme.divider};
|
|
`;
|
|
|
|
const Actions = styled(Flex)`
|
|
position: fixed;
|
|
top: 0;
|
|
right: 0;
|
|
left: 0;
|
|
border-radius: 3px;
|
|
background: ${props => props.theme.background};
|
|
transition: ${props => props.theme.backgroundTransition};
|
|
padding: 12px;
|
|
-webkit-backdrop-filter: blur(20px);
|
|
|
|
@media print {
|
|
display: none;
|
|
}
|
|
|
|
${breakpoint('tablet')`
|
|
left: auto;
|
|
padding: 24px;
|
|
`};
|
|
`;
|
|
|
|
export default Actions;
|