Merge pull request #14578 from JoVictorNunes/issue-14443
fix: toast notification style
This commit is contained in:
commit
c89f952868
@ -27,7 +27,6 @@ import {
|
||||
borderSizeSmall,
|
||||
toastIconMd,
|
||||
toastIconSm,
|
||||
smPaddingY,
|
||||
jumboPaddingY,
|
||||
} from '/imports/ui/stylesheets/styled-components/general';
|
||||
import { smallOnly } from '/imports/ui/stylesheets/styled-components/breakpoints';
|
||||
@ -180,7 +179,6 @@ const Toast = styled.div`
|
||||
const ToastifyContainer = styled(Toastify)`
|
||||
z-index: 9998;
|
||||
position: fixed;
|
||||
padding: ${smPaddingY};
|
||||
min-width: 20rem !important;
|
||||
max-width: 23rem !important;
|
||||
box-sizing: border-box;
|
||||
|
@ -175,27 +175,14 @@ class Presentation extends PureComponent {
|
||||
politeSRAlert(intl.formatMessage(intlMessages.slideContentChanged, { 0: currentSlide.num }));
|
||||
}
|
||||
|
||||
if (prevProps?.slidePosition && slidePosition) {
|
||||
const { width: prevWidth, height: prevHeight } = prevProps.slidePosition;
|
||||
const { width: currWidth, height: currHeight } = slidePosition;
|
||||
|
||||
if (prevWidth !== currWidth || prevHeight !== currHeight) {
|
||||
layoutContextDispatch({
|
||||
type: ACTIONS.SET_PRESENTATION_CURRENT_SLIDE_SIZE,
|
||||
value: {
|
||||
width: currWidth,
|
||||
height: currHeight,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const downloadableOn = !prevProps.currentPresentation.downloadable
|
||||
if (currentPresentation) {
|
||||
const downloadableOn = !prevProps?.currentPresentation?.downloadable
|
||||
&& currentPresentation.downloadable;
|
||||
|
||||
const shouldCloseToast = !(currentPresentation.downloadable && !userIsPresenter);
|
||||
|
||||
if (
|
||||
prevProps.currentPresentation.name !== currentPresentation.name
|
||||
prevProps?.currentPresentation?.name !== currentPresentation.name
|
||||
|| (downloadableOn && !userIsPresenter)
|
||||
) {
|
||||
if (this.currentPresentationToastId) {
|
||||
@ -212,7 +199,7 @@ class Presentation extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
const downloadableOff = prevProps.currentPresentation.downloadable
|
||||
const downloadableOff = prevProps?.currentPresentation?.downloadable
|
||||
&& !currentPresentation.downloadable;
|
||||
|
||||
if (this.currentPresentationToastId && downloadableOff) {
|
||||
@ -221,6 +208,21 @@ class Presentation extends PureComponent {
|
||||
render: this.renderCurrentPresentationToast(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (prevProps?.slidePosition && slidePosition) {
|
||||
const { width: prevWidth, height: prevHeight } = prevProps.slidePosition;
|
||||
const { width: currWidth, height: currHeight } = slidePosition;
|
||||
|
||||
if (prevWidth !== currWidth || prevHeight !== currHeight) {
|
||||
layoutContextDispatch({
|
||||
type: ACTIONS.SET_PRESENTATION_CURRENT_SLIDE_SIZE,
|
||||
value: {
|
||||
width: currWidth,
|
||||
height: currHeight,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (layoutSwapped && restoreOnUpdate && !userIsPresenter && currentSlide) {
|
||||
const slideChanged = currentSlide.id !== prevProps.currentSlide.id;
|
||||
|
@ -143,6 +143,9 @@ const GlobalStyle = createGlobalStyle`
|
||||
|
||||
.actionToast {
|
||||
background-color: ${colorWhite};
|
||||
display: flex;
|
||||
padding: ${smPaddingX};
|
||||
border-radius: ${borderRadius};
|
||||
|
||||
i.close {
|
||||
left: none !important;
|
||||
|
Loading…
Reference in New Issue
Block a user