diff --git a/graylog2-web-interface/package.json b/graylog2-web-interface/package.json index 03071c4f37..a3877a7a2d 100644 --- a/graylog2-web-interface/package.json +++ b/graylog2-web-interface/package.json @@ -70,7 +70,7 @@ "leaflet": "^1.5.1", "lodash": "^4.17.4", "marked": "^16.2.1", - "material-symbols": "^0.35.1", + "@material-symbols/font-700": "^0.39.0", "md5": "^2.2.1", "moment-duration-format": "2.3.2", "moment-precise-range-plugin": "^1.3.0", diff --git a/graylog2-web-interface/src/components/common/Icon/types.ts b/graylog2-web-interface/src/components/common/Icon/types.ts index df65ab199d..56f885abf6 100644 --- a/graylog2-web-interface/src/components/common/Icon/types.ts +++ b/graylog2-web-interface/src/components/common/Icon/types.ts @@ -15,7 +15,7 @@ * . */ -import type { MaterialSymbol as IconName } from 'material-symbols'; +import type { MaterialSymbol as IconName } from '@material-symbols/font-700'; export type SizeProp = 'xs' | 'sm' | 'lg' | 'xl' | '2x' | '3x' | '4x' | '5x' | 'huge'; export type RotateProp = 0 | 90 | 180 | 270; diff --git a/graylog2-web-interface/src/preflight/theme/PreflightThemeProvider.tsx b/graylog2-web-interface/src/preflight/theme/PreflightThemeProvider.tsx index ee09e780b6..91090bfd50 100644 --- a/graylog2-web-interface/src/preflight/theme/PreflightThemeProvider.tsx +++ b/graylog2-web-interface/src/preflight/theme/PreflightThemeProvider.tsx @@ -24,8 +24,6 @@ import SawmillMantine from '@graylog/sawmill/mantine'; import { DEFAULT_THEME_MODE } from './constants'; -import 'material-symbols/rounded.css'; - type Props = { children: React.ReactNode; }; diff --git a/graylog2-web-interface/src/preload.ts b/graylog2-web-interface/src/preload.ts new file mode 100644 index 0000000000..bb48d92db9 --- /dev/null +++ b/graylog2-web-interface/src/preload.ts @@ -0,0 +1,17 @@ +/* + * Copyright (C) 2020 Graylog, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the Server Side Public License, version 1, + * as published by MongoDB, Inc. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * Server Side Public License for more details. + * + * You should have received a copy of the Server Side Public License + * along with this program. If not, see + * . + */ +import '@material-symbols/font-700/rounded.css'; diff --git a/graylog2-web-interface/src/theme/GraylogThemeProvider.tsx b/graylog2-web-interface/src/theme/GraylogThemeProvider.tsx index 937be7d1c5..06c0bad8e6 100644 --- a/graylog2-web-interface/src/theme/GraylogThemeProvider.tsx +++ b/graylog2-web-interface/src/theme/GraylogThemeProvider.tsx @@ -23,8 +23,6 @@ import useThemes from 'theme/hooks/useThemes'; import ColorSchemeContext from './ColorSchemeContext'; -import 'material-symbols/rounded.css'; - type Props = { children: React.ReactNode; initialThemeModeOverride?: ColorScheme; diff --git a/graylog2-web-interface/webpack.config.js b/graylog2-web-interface/webpack.config.js index 505b0f4529..926263fc77 100644 --- a/graylog2-web-interface/webpack.config.js +++ b/graylog2-web-interface/webpack.config.js @@ -39,6 +39,7 @@ const webpackConfig = merge(coreConfig, { dependencies: ['vendor'], entry: { app: APP_PATH, + preload: [path.resolve(APP_PATH, 'preload.ts')], polyfill: [path.resolve(APP_PATH, 'polyfill.js')], }, module: { diff --git a/graylog2-web-interface/webpack.preflight.ts b/graylog2-web-interface/webpack.preflight.ts index d8427a9520..bb209a2ffc 100644 --- a/graylog2-web-interface/webpack.preflight.ts +++ b/graylog2-web-interface/webpack.preflight.ts @@ -41,6 +41,7 @@ const baseConfig = { mode, name: 'preflight', entry: { + preload: path.resolve(PREFLIGHT_PATH, '..', 'preload.ts'), preflight: PREFLIGHT_PATH, }, output: { diff --git a/graylog2-web-interface/yarn.lock b/graylog2-web-interface/yarn.lock index edceea53e9..e9d65b5321 100644 --- a/graylog2-web-interface/yarn.lock +++ b/graylog2-web-interface/yarn.lock @@ -2652,6 +2652,11 @@ sort-object "^3.0.3" tinyqueue "^3.0.0" +"@material-symbols/font-700@^0.39.0": + version "0.39.0" + resolved "https://registry.yarnpkg.com/@material-symbols/font-700/-/font-700-0.39.0.tgz#28f45a6a9d0672cae88a3e74cd022dd3f583ccf6" + integrity sha512-3VvpRdWVLEcU7LYFXRW91co0nq4aLGfM5Lqw2BTJww47VsrZ/JOGauQdFGJWbsnq35R55gQQ/1xi2N7AIg+7YA== + "@mdn/browser-compat-data@^5.5.35", "@mdn/browser-compat-data@^5.6.19": version "5.6.37" resolved "https://registry.yarnpkg.com/@mdn/browser-compat-data/-/browser-compat-data-5.6.37.tgz#228d97894a0f0d6a77273e3f707fc31e30ce8112" @@ -11168,11 +11173,6 @@ material-colors@^1.2.1: resolved "https://registry.yarnpkg.com/material-colors/-/material-colors-1.2.6.tgz#6d1958871126992ceecc72f4bcc4d8f010865f46" integrity sha512-6qE4B9deFBIa9YSpOc9O0Sgc43zTeVYbgDT5veRKSlB2+ZuHNoVVxA1L/ckMUayV9Ay9y7Z/SZCLcGteW9i7bg== -material-symbols@^0.35.1: - version "0.35.1" - resolved "https://registry.yarnpkg.com/material-symbols/-/material-symbols-0.35.1.tgz#deb4db7717026c8143abe33792584adda1944997" - integrity sha512-QnWsPGnSZyrB+fzvt51EVnOiiw7ne6FpgUp91VrFwsoEfwkVO/eaGYVSW30lgsb2hEw37ekSLisslIh5+AA8Cg== - math-intrinsics@^1.0.0, math-intrinsics@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz#a0dd74be81e2aa5c2f27e65ce283605ee4e2b7f9"