Skip to content

Commit

Permalink
chore: get more assets through CDN (#30743)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh authored Oct 26, 2023
1 parent df2b989 commit 4bb7e72
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions apps/meteor/app/ui-master/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Tracker } from 'meteor/tracker';

import { withDebouncing } from '../../../lib/utils/highOrderFunctions';
import { settings } from '../../settings/server';
import { getURL } from '../../utils/server/getURL';
import { applyHeadInjections, headInjections, injectIntoBody, injectIntoHead } from './inject';

import './scripts';
Expand Down Expand Up @@ -41,14 +42,14 @@ Meteor.startup(() => {

settings.watch('Assets_SvgFavicon_Enable', (value) => {
const standardFavicons = `
<link rel="icon" sizes="16x16" type="image/png" href="assets/favicon_16.png" />
<link rel="icon" sizes="32x32" type="image/png" href="assets/favicon_32.png" />`;
<link rel="icon" sizes="16x16" type="image/png" href=${getURL('assets/favicon_16.png')} />
<link rel="icon" sizes="32x32" type="image/png" href=${getURL('assets/favicon_32.png')} />`;

if (value) {
injectIntoHead(
'Assets_SvgFavicon_Enable',
`${standardFavicons}
<link rel="icon" sizes="any" type="image/svg+xml" href="assets/favicon.svg" />`,
<link rel="icon" sizes="any" type="image/svg+xml" href=${getURL('assets/favicon.svg')} />`,
);
} else {
injectIntoHead('Assets_SvgFavicon_Enable', standardFavicons);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { usePermission, useRouter, useSetModal, useCurrentModal, useTranslation
import type { ReactElement } from 'react';
import React, { useEffect } from 'react';

import { getURL } from '../../../../../app/utils/client/getURL';
import GenericUpsellModal from '../../../../../client/components/GenericUpsellModal';
import { useUpsellActions } from '../../../../../client/components/GenericUpsellModal/hooks';
import PageSkeleton from '../../../../../client/components/PageSkeleton';
Expand All @@ -25,7 +26,7 @@ const DeviceManagementAdminRoute = (): ReactElement => {
setModal(
<GenericUpsellModal
title={t('Device_Management')}
img='images/device-management.png'
img={getURL('images/device-management.png')}
subtitle={t('Ensure_secure_workspace_access')}
description={t('Manage_which_devices')}
cancelText={t('Talk_to_an_expert')}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { usePermission, useRouter, useSetModal, useCurrentModal, useTranslation
import type { ReactElement } from 'react';
import React, { useEffect } from 'react';

import { getURL } from '../../../../../app/utils/client/getURL';
import GenericUpsellModal from '../../../../../client/components/GenericUpsellModal';
import { useUpsellActions } from '../../../../../client/components/GenericUpsellModal/hooks';
import PageSkeleton from '../../../../../client/components/PageSkeleton';
Expand Down Expand Up @@ -32,7 +33,7 @@ const EngagementDashboardRoute = (): ReactElement | null => {
setModal(
<GenericUpsellModal
title={t('Engagement_Dashboard')}
img='images/engagement.png'
img={getURL('images/engagement.png')}
subtitle={t('Analyze_practical_usage')}
description={t('Enrich_your_workspace')}
onClose={() => setModal(null)}
Expand Down

0 comments on commit 4bb7e72

Please sign in to comment.