Skip to content

Commit

Permalink
Merge branch 'develop' into fix/attachment-author-color
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored May 2, 2024
2 parents f91054e + 92cf2b6 commit c29b7e4
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-squids-deliver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

Changes the scrollbar color in order to improve the contrast and accessibility compliance
7 changes: 7 additions & 0 deletions .changeset/wild-teachers-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@rocket.chat/meteor": minor
"@rocket.chat/core-typings": minor
"@rocket.chat/i18n": minor
---

Added "Rocket.Chat Cloud Workspace ID" to workspace statistics page
5 changes: 4 additions & 1 deletion apps/meteor/app/api/server/lib/getServerInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ import {
getCachedSupportedVersionsToken,
wrapPromise,
} from '../../../cloud/server/functions/supportedVersionsToken/supportedVersionsToken';
import { settings } from '../../../settings/server';
import { Info, minimumClientVersions } from '../../../utils/rocketchat.info';

const removePatchInfo = (version: string): string => version.replace(/(\d+\.\d+).*/, '$1');

export async function getServerInfo(userId?: string): Promise<IWorkspaceInfo> {
const hasPermissionToViewStatistics = userId && (await hasPermissionAsync(userId, 'view-statistics'));
const supportedVersionsToken = await wrapPromise(getCachedSupportedVersionsToken());
const cloudWorkspaceId = settings.get<string | undefined>('Cloud_Workspace_Id');

return {
version: removePatchInfo(Info.version),

...(hasPermissionToViewStatistics && {
info: {
...Info,
Expand All @@ -28,5 +29,7 @@ export async function getServerInfo(userId?: string): Promise<IWorkspaceInfo> {
supportedVersionsToken.result && {
supportedVersions: { signed: supportedVersionsToken.result },
}),

cloudWorkspaceId,
};
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Palette } from '@rocket.chat/fuselage';
import type { ScrollValues } from 'rc-scrollbars';
import { Scrollbars } from 'rc-scrollbars';
import type { MutableRefObject, CSSProperties, ReactNode, ReactElement } from 'react';
Expand Down Expand Up @@ -43,7 +44,7 @@ const CustomScrollbars = forwardRef<HTMLElement, CustomScrollbarsProps>(function
overflowX ? undefined : (props): ReactElement => <div {...props} className='track-horizontal' style={{ display: 'none' }} />
}
renderThumbVertical={({ style, ...props }): JSX.Element => (
<div {...props} style={{ ...style, backgroundColor: 'rgba(0, 0, 0, 0.5)', borderRadius: '7px' }} />
<div {...props} style={{ ...style, backgroundColor: Palette.stroke['stroke-dark'].toString(), borderRadius: '4px' }} />
)}
children={children}
ref={refSetter}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type DeploymentCardProps = {
statistics: IStats;
};

const DeploymentCard = ({ serverInfo: { info }, statistics, instances }: DeploymentCardProps): ReactElement => {
const DeploymentCard = ({ serverInfo: { info, cloudWorkspaceId }, statistics, instances }: DeploymentCardProps): ReactElement => {
const t = useTranslation();
const formatDateAndTime = useFormatDateAndTime();
const setModal = useSetModal();
Expand All @@ -33,6 +33,8 @@ const DeploymentCard = ({ serverInfo: { info }, statistics, instances }: Deploym
<WorkspaceCardSection title={t('Version')} body={statistics.version} />
<WorkspaceCardSection title={t('Deployment_ID')} body={statistics.uniqueId} />

{cloudWorkspaceId && <WorkspaceCardSection title={t('Cloud_Workspace_Id')} body={cloudWorkspaceId} />}

{appsEngineVersion && <WorkspaceCardSection title={t('Apps_Engine_Version')} body={appsEngineVersion} />}
<WorkspaceCardSection title={t('Node_version')} body={statistics.process.nodeVersion} />
<WorkspaceCardSection
Expand Down
1 change: 1 addition & 0 deletions packages/core-typings/src/IWorkspaceInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ export type IWorkspaceInfo = {
supportedVersions?: { signed: string };
minimumClientVersions: { desktop: string; mobile: string };
version: string;
cloudWorkspaceId?: string;
};
1 change: 1 addition & 0 deletions packages/i18n/src/locales/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,7 @@
"Cloud_workspace_connected_without_account": "Your workspace is now connected to the Rocket.Chat Cloud. If you would like, you can login to the Rocket.Chat Cloud and associate your workspace with your Cloud account.",
"Cloud_workspace_disconnect": "If you no longer wish to utilize cloud services you can disconnect your workspace from Rocket.Chat Cloud.",
"Cloud_workspace_support": "If you have trouble with a cloud service, please try to sync first. Should the issue persist, please open a support ticket in the Cloud Console.",
"Cloud_Workspace_Id": "Cloud Workspace ID",
"Collaborative": "Collaborative",
"Collapse": "Collapse",
"Collapse_Embedded_Media_By_Default": "Collapse Embedded Media by Default",
Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/src/locales/pt-BR.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -5016,4 +5016,4 @@
"Enterprise": "Enterprise",
"UpgradeToGetMore_engagement-dashboard_Title": "Analytics",
"UpgradeToGetMore_auditing_Title": "Auditoria de mensagem"
}
}

0 comments on commit c29b7e4

Please sign in to comment.