Merge pull request #417 from ONLYOFFICE/bugfix/profile-active-sessions

bugfix/profile-active-sessions
This commit is contained in:
Alexey Safronov 2024-05-21 13:10:59 +04:00 committed by GitHub
commit 3801069692
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 17 deletions

View File

@ -36,7 +36,6 @@ import TickSvgUrl from "PUBLIC_DIR/images/tick.svg?url";
const SessionsRow = (props) => { const SessionsRow = (props) => {
const { const {
item, item,
standalone,
sectionWidth, sectionWidth,
currentSession, currentSession,
setPlatformModalData, setPlatformModalData,
@ -88,19 +87,16 @@ const SessionsRow = (props) => {
ip={item.ip} ip={item.ip}
sectionWidth={sectionWidth} sectionWidth={sectionWidth}
showTickIcon={showTickIcon} showTickIcon={showTickIcon}
standalone={standalone}
/> />
</Row> </Row>
); );
}; };
export default inject(({ setup, settingsStore }) => { export default inject(({ setup }) => {
const { standalone } = settingsStore;
const { currentSession, setLogoutDialogVisible, setPlatformModalData } = const { currentSession, setLogoutDialogVisible, setPlatformModalData } =
setup; setup;
return { return {
standalone,
currentSession, currentSession,
setLogoutDialogVisible, setLogoutDialogVisible,
setPlatformModalData, setPlatformModalData,

View File

@ -47,7 +47,6 @@ const StyledRowContent = styled(RowContent)`
const SessionsRowContent = ({ const SessionsRowContent = ({
id, id,
standalone,
platform, platform,
browser, browser,
date, date,
@ -70,10 +69,11 @@ const SessionsRowContent = ({
<IconButton size={12} iconName={TickSvgUrl} color="#20D21F" /> <IconButton size={12} iconName={TickSvgUrl} color="#20D21F" />
)} )}
<Text truncate>{convertTime(date)}</Text> <Text truncate>{convertTime(date)}</Text>
{!standalone && ( {(country || city) && (
<Text truncate> <Text truncate>
{country} {country}
{` ${city}`} {country && city && ", "}
{city}
</Text> </Text>
)} )}
<Text truncate containerWidth="160px"> <Text truncate containerWidth="160px">

View File

@ -82,7 +82,6 @@ const SessionsTableRow = (props) => {
const { const {
item, item,
hideColumns, hideColumns,
standalone,
currentSession, currentSession,
setPlatformModalData, setPlatformModalData,
setLogoutDialogVisible, setLogoutDialogVisible,
@ -125,15 +124,15 @@ const SessionsTableRow = (props) => {
<TableCell> <TableCell>
<Text className="session-info" truncate> <Text className="session-info" truncate>
{!standalone ? ( {(country || city) && (
<> <>
{country}, {city} {country}
{country && city && ", "}
{city}
<span className="divider"></span> <span className="divider"></span>
{ip}
</> </>
) : (
<>{ip}</>
)} )}
{ip}
</Text> </Text>
</TableCell> </TableCell>
@ -153,13 +152,11 @@ const SessionsTableRow = (props) => {
); );
}; };
export default inject(({ setup, settingsStore }) => { export default inject(({ setup }) => {
const { standalone } = settingsStore;
const { currentSession, setLogoutDialogVisible, setPlatformModalData } = const { currentSession, setLogoutDialogVisible, setPlatformModalData } =
setup; setup;
return { return {
standalone,
currentSession, currentSession,
setLogoutDialogVisible, setLogoutDialogVisible,
setPlatformModalData, setPlatformModalData,