Merge branch 'main' of github.com:openreplay/openreplay into dev

This commit is contained in:
Shekar Siri 2021-08-10 17:04:38 +05:30
commit b3dfa22f7b
10 changed files with 27 additions and 23 deletions

View file

@ -14,8 +14,8 @@ modify this Software and publish patches to the Software. You agree that OpenRep
and/or its licensors (as applicable) retain all right, title and interest in and
to all such modifications and/or patches, and all such modifications and/or
patches may only be used, copied, modified, displayed, distributed, or otherwise
exploited with a valid OpenReplay Enterprise license for the correct
number of user seats. Notwithstanding the foregoing, you may copy and modify
exploited with a valid OpenReplay Enterprise license for the correct
number of user seats and profiles. Notwithstanding the foregoing, you may copy and modify
the Software for development and testing purposes, without requiring a
subscription. You agree that OpenReplay and/or its licensors (as applicable) retain
all right, title and interest in and to all such modifications. You are not

View file

@ -103,7 +103,7 @@ class ManageUsers extends React.PureComponent {
</div>
{ !account.smtp &&
<div className={cn("mb-4 p-2", styles.smtpMessage)}>
SMTP is not configured. Please follow <a className="link" href="https://docs.openreplay.com/configuration/configure-smtp" target="_blank">these steps</a> to set it up.
SMTP is not configured. Please follow (see <a className="link" href="https://docs.openreplay.com/configuration/configure-smtp" target="_blank">here</a> how to set it up). You can still add new users, but youd have to manually copy then send them the invitation link.
</div>
}
<div className={ styles.formGroup }>

View file

@ -22,7 +22,7 @@ const checkDontMatch = (newPassword, newPasswordRepeat) =>
(state, props) => ({
errors: state.getIn([ 'user', 'requestResetPassowrd', 'errors' ]),
resetErrors: state.getIn([ 'user', 'resetPassword', 'errors' ]),
loading: state.getIn([ 'user', 'requestResetPassowrd', 'loading' ]),
loading: state.getIn([ 'user', 'requestResetPassowrd', 'loading' ]) || state.getIn([ 'user', 'resetPassword', 'loading' ]),
params: new URLSearchParams(props.location.search)
}),
{ requestResetPassword, resetPassword },
@ -111,7 +111,7 @@ export default class ForgotPassword extends React.PureComponent {
<div className="w-6/12 flex items-center justify-center">
<form onSubmit={ this.onSubmit }>
<div className="mb-8">
<h2 className="text-center text-3xl mb-6">Reset Password</h2>
<h2 className="text-center text-3xl mb-6">{`${resetting ? 'Create' : 'Reset'} Password`}</h2>
</div>
<Loader loading={ loading }>
<div data-hidden={ updated }>
@ -168,7 +168,7 @@ export default class ForgotPassword extends React.PureComponent {
<input
autocomplete="new-password"
type="password"
placeholder="New Password"
placeholder="Password"
name="password"
onChange={ this.write }
className={ stl.input }
@ -182,7 +182,7 @@ export default class ForgotPassword extends React.PureComponent {
<input
autocomplete="new-password"
type="password"
placeholder="Repeat New Password"
placeholder="Confirm Password"
name="passwordRepeat"
onChange={ this.write }
className={ stl.input }
@ -212,9 +212,10 @@ export default class ForgotPassword extends React.PureComponent {
<Button
data-hidden={ updated || requested }
type="submit" primary
loading={loading}
disabled={ (resetting && this.isSubmitDisabled()) || (!resetting && !validEmail)}
>
{ 'Reset' }
{ resetting ? 'Create' : 'Reset' }
</Button>
<div className={ stl.links }>

View file

@ -37,7 +37,7 @@ function PageInsightsPanel({
}, [insights])
useEffect(() => {
const url = insightsFilters.url ? insightsFilters.url : host + '/' + urlOptions[0].value;
const url = insightsFilters.url ? insightsFilters.url : host + urlOptions[0].value;
Player.pause();
fetchInsights({ ...insightsFilters, url })
}, [insightsFilters])
@ -45,7 +45,7 @@ function PageInsightsPanel({
const onPageSelect = (e, { name, value }) => {
const event = events.find(item => item.url === value)
Player.jump(event.time + JUMP_OFFSET)
setInsightsFilters({ ...insightsFilters, url: host + '/' + value })
setInsightsFilters({ ...insightsFilters, url: host + value })
markTargets([])
};

View file

@ -12,8 +12,8 @@ interface Props {
export default function SelectorCard({ index = 1, target, showContent } : Props) {
return (
<div className={cn(stl.wrapper, { [stl.active]: showContent })}>
<div className={stl.top} onClick={() => activeTarget(index)}>
<div className={cn(stl.wrapper, { [stl.active]: showContent })} onClick={() => activeTarget(index)}>
<div className={stl.top}>
<div className={stl.index}>{index + 1}</div>
<div className="truncate">{target.selector}</div>
</div>

View file

@ -54,7 +54,7 @@ const getPointerIcon = (type) => {
events: state.eventList,
skip: state.skip,
skipToIssue: state.skipToIssue,
disabled: state.cssLoading || state.messagesLoading,
disabled: state.cssLoading || state.messagesLoading || state.markedTargets,
endTime: state.endTime,
live: state.live,
logList: state.logList,

View file

@ -2,7 +2,7 @@ import React from 'react';
import Marker from './ElementsMarker/Marker';
export default function ElementsMarker({ targets, activeIndex }) {
return targets && targets.map(t => <Marker target={t} active={activeIndex === t.index - 1}/>)
return targets && targets.map(t => <Marker target={t} active={activeIndex === t.index}/>)
}

View file

@ -18,8 +18,8 @@ export default function Marker({ target, active }: Props) {
height: `${ target.boundingRect.height }px`,
}
return (
<div className={ cn(stl.marker, { [stl.active] : active }) } style={ style } onClick={() => activeTarget(target.index - 1)}>
<div className={stl.index}>{target.index}</div>
<div className={ cn(stl.marker, { [stl.active] : active }) } style={ style } onClick={() => activeTarget(target.index)}>
<div className={stl.index}>{target.index + 1}</div>
<Tooltip
open={active}
arrow

View file

@ -49,6 +49,7 @@ const setClient = (state, data) => {
const reducer = (state = initialState, action = {}) => {
switch (action.type) {
case RESET_PASSWORD.SUCCESS:
case UPDATE_PASSWORD.SUCCESS:
case LOGIN.SUCCESS:
return setClient(

View file

@ -101,21 +101,23 @@ export default class StatedScreen extends Screen {
setMarkedTargets(selections: { selector: string, count: number }[] | null) {
if (selections) {
const targets: MarkedTarget[] = [];
const totalCount = selections.reduce((a, b) => {
return a + b.count
}, 0);
selections.forEach((s, index) => {
let index = 0;
selections.forEach((s) => {
const el = this.getElementBySelector(s.selector);
if (!el) return;
targets.push({
...s,
el,
index,
percent: Math.round((s.count * totalCount) / 100),
index: index++,
percent: 0,
boundingRect: this.calculateRelativeBoundingRect(el),
})
});
update({ markedTargets: targets });
const totalCount = targets.reduce((a, b) => {
return a + b.count
}, 0);
update({ markedTargets: targets.map(i => ({...i, percent: Math.round((i.count * 100) / totalCount) })) });
} else {
update({ markedTargets: null });
}