Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into regression/fix-aud…
Browse files Browse the repository at this point in the history
…io-message
  • Loading branch information
hugocostadev committed Jul 11, 2022
2 parents 7ade707 + 8158bee commit 815d459
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 24 deletions.
2 changes: 1 addition & 1 deletion apps/meteor/app/apps/client/communication/websockets.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class AppWebsocketReceiver extends Emitter {

onCommandAddedOrUpdated = (command) => {
APIClient.get('/v1/commands.get', { command }).then((result) => {
slashCommands.commands[command] = result.command;
slashCommands.add(result.command);
});
};

Expand Down
14 changes: 5 additions & 9 deletions apps/meteor/client/components/Card/Col.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { Box } from '@rocket.chat/fuselage';
import React, { FC } from 'react';

const Col: FC<{ span?: number }> = ({ children, span = 1 }) => {
const w = span * 228 + (span - 1) * 2 * 24;

return (
<Box rcx-card-col display='flex' alignSelf='stretch' w={`x${w}`} flexDirection='column' fontScale='c1'>
{children}
</Box>
);
};
const Col: FC = ({ children }) => (
<Box rcx-card-col display='flex' alignSelf='stretch' flexGrow={1} flexDirection='column' fontScale='c1'>
{children}
</Box>
);

export default Col;
2 changes: 1 addition & 1 deletion apps/meteor/client/sidebar/footer/SidebarFooterDefault.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import colors from '@rocket.chat/fuselage-tokens/colors.json';
import React, { ReactElement } from 'react';

import { settings } from '../../../app/settings/client';
import { SidebarFooterWatermark } from './SidebarFooterWatermark';
import { SidebarFooterWatermark } from '../../../ee/client/sidebar/footer/SidebarFooterWatermark';

const SidebarFooterDefault = (): ReactElement => {
const sidebarFooterStyle = css`
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/client/sidebar/footer/voip/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import React, { ReactElement, useCallback, useMemo, useState } from 'react';

import { useHasLicenseModule } from '../../../../ee/client/hooks/useHasLicenseModule';
import { useVoipFooterMenu } from '../../../../ee/client/hooks/useVoipFooterMenu';
import { SidebarFooterWatermark } from '../../../../ee/client/sidebar/footer/SidebarFooterWatermark';
import {
useCallActions,
useCallCreateRoom,
Expand All @@ -14,7 +15,6 @@ import {
useQueueName,
} from '../../../contexts/CallContext';
import SidebarFooterDefault from '../SidebarFooterDefault';
import { SidebarFooterWatermark } from '../SidebarFooterWatermark';
import { VoipFooter as VoipFooterComponent } from './VoipFooter';

export const VoipFooter = (): ReactElement | null => {
Expand Down
4 changes: 2 additions & 2 deletions apps/meteor/client/startup/slashCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Tracker.autorun(async () => {
const newUserId = Meteor.userId();
if (oldUserId === null && newUserId) {
APIClient.get('/v1/commands.list').then((result) => {
result.commands.forEach(({ command, appId }) => {
slashCommands.add({ command, appId });
result.commands.forEach((command) => {
slashCommands.add(command);
});
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const FederationCard: FC = () => {
</Box>
</CardHeader>
<Card.Body>
<Card.Col span={2}>
<Card.Col>
<Section status={federationEnabledStatus} title={t('Federation_Enable')} subtitle={t('Federation_Is_working_correctly')} />
<Section status={federationSetupStatus} title={t('Federation_Adding_to_your_server')} subtitle={t('Federation_Changes_needed')}>
{!federationHealthy && <a onClick={handleModal}>{t('Federation_Fix_now')}</a>}
Expand Down
5 changes: 2 additions & 3 deletions apps/meteor/client/views/admin/info/InformationPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,13 @@ const InformationPage = memo(function InformationPage({
<Grid.Item xl={3}>
<LicenseCard />
</Grid.Item>
<Grid.Item xl={4}>
<Grid.Item xl={6} md={8} xs={4} sm={8}>
<UsageCard vertical={false} statistics={statistics} />
</Grid.Item>
<Grid.Item xl={2}></Grid.Item>
<Grid.Item xl={6}>
<FederationCard />
</Grid.Item>
<Grid.Item xl={6}>
<Grid.Item xl={3}>
<SeatsCard />
</Grid.Item>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { exec } from 'child_process';
import os from 'os';
import fs from 'fs';
import path from 'path';

import Future from 'fibers/future';
import async from 'async';
Expand All @@ -26,6 +24,8 @@ class VersionCompiler {
cpus: os.cpus().length,
};

output.marketplaceApiVersion = require('@rocket.chat/apps-engine/package.json').version.replace(/^[^0-9]/g, '');

exec("git log --pretty=format:'%H%n%ad%n%an%n%s' -n 1", function (err, result) {
if (err == null) {
result = result.split('\n');
Expand All @@ -46,9 +46,6 @@ class VersionCompiler {
output.commit.branch = result.replace('\n', '');
}

const pkg = JSON.parse(fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf8'));
output.marketplaceApiVersion = pkg.dependencies['@rocket.chat/apps-engine'].replace(/^[^0-9]/g, '');

output = `exports.Info = ${JSON.stringify(output, null, 4)};`;
file.addJavaScript({
data: output,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"jest": "jest",
"build": "rm -rf dist && tsc -p tsconfig.json",
"storybook": "start-storybook -p 6006",
"dev": "tsc -p tsconfig.json --watch --preserveWatchOutput "
"dev": "tsc -p tsconfig.json --watch --preserveWatchOutput"
},
"main": "./dist/index.js",
"typings": "./dist/index.d.ts",
Expand Down

0 comments on commit 815d459

Please sign in to comment.