Skip to content

Commit

Permalink
Merge pull request RocketChat#966 from WideChat/feature/include_deplo…
Browse files Browse the repository at this point in the history
…y_date_time_for_rcapps

[NEW] Add update date for RC Apps
  • Loading branch information
ear-dev committed Oct 29, 2021
2 parents 401ba96 + 0663335 commit 26d7964
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions client/views/admin/apps/AppDetailsPageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ExternalLink from '../../../components/ExternalLink';
import AppAvatar from '../../../components/avatar/AppAvatar';
import { useToastMessageDispatch } from '../../../contexts/ToastMessagesContext';
import { TranslationKey, useTranslation } from '../../../contexts/TranslationContext';
import { useFormatDateAndTime } from '../../../hooks/useFormatDateAndTime';
import AppMenu from './AppMenu';
import AppStatus from './AppStatus';
import PriceDisplay from './PriceDisplay';
Expand All @@ -17,11 +18,13 @@ type AppDetailsPageContentProps = {

const AppDetailsPageContent: FC<AppDetailsPageContentProps> = ({ data }) => {
const t = useTranslation();
const formatDateAndTime = useFormatDateAndTime();
const dispatchToastMessage = useToastMessageDispatch();
const {
iconFileData = '',
name,
commitHash,
updatedAt,
author: { name: authorName, homepage, support },
description,
categories = [],
Expand Down Expand Up @@ -66,6 +69,11 @@ const AppDetailsPageContent: FC<AppDetailsPageContentProps> = ({ data }) => {
</Box>
)}
</Box>
{updatedAt && (
<Box display='flex' flexDirection='row' color='hint' alignItems='center'>
<Box mie='x4'>{`${t('Updated_at')}: ${formatDateAndTime(updatedAt)}`}</Box>
</Box>
)}
<Box
display='flex'
flexDirection='row'
Expand Down
1 change: 1 addition & 0 deletions client/views/admin/apps/hooks/useAppInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export const useAppInfo = (appId: string): AppInfo => {
marketplace: false,
};
app.commitHash = localApp.commitHash;
app.updatedAt = localApp.updatedAt;

const [bundledIn, settings, apis] = await Promise.all([
app.marketplace === false ? [] : getBundledIn(app.id, app.version),
Expand Down
1 change: 1 addition & 0 deletions client/views/admin/apps/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export type App = {
iconFileData: string;
name: string;
commitHash: string;
updatedAt: Date;
author: {
name: string;
homepage: string;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 26d7964

Please sign in to comment.