Skip to content
Snippets Groups Projects
Unverified Commit 4bb7e72d authored by gabriellsh's avatar gabriellsh Committed by GitHub
Browse files

chore: get more assets through CDN (#30743)

parent df2b9898
No related branches found
No related tags found
No related merge requests found
......@@ -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';
......@@ -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);
......
......@@ -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';
......@@ -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')}
......
......@@ -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';
......@@ -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)}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment