소스 검색

fix(admin-ui): Fix top left logo when using setBranding

Relates to #2225
Michael Bromley 2 년 전
부모
커밋
120a0bbe5a
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      packages/ui-devkit/scaffold/angular.json
  2. 4 2
      packages/ui-devkit/src/compiler/helpers.ts

+ 1 - 1
packages/ui-devkit/scaffold/angular.json

@@ -40,7 +40,7 @@
               "src/assets",
               "src/i18n-messages",
               {
-                "glob": "logo-*.png",
+                "glob": "logo-*.*",
                 "input": "static-assets",
                 "output": "assets"
               }

+ 4 - 2
packages/ui-devkit/src/compiler/helpers.ts

@@ -10,7 +10,9 @@ import { BrandingOptions, StaticAssetDefinition, StaticAssetExtension } from './
  *   outputPath: path.join(__dirname, '../admin-ui'),
  *   extensions: [
  *     setBranding({
+ *       // This is used as the branding in the top-left above the navigation
  *       smallLogoPath: path.join(__dirname, 'images/my-logo-sm.png'),
+ *       // This is used on the login page
  *       largeLogoPath: path.join(__dirname, 'images/my-logo-lg.png'),
  *       faviconPath: path.join(__dirname, 'images/my-favicon.ico'),
  *     }),
@@ -26,13 +28,13 @@ export function setBranding(options: BrandingOptions): StaticAssetExtension {
     if (options.smallLogoPath) {
         staticAssets.push({
             path: options.smallLogoPath,
-            rename: 'logo-75px.png',
+            rename: 'logo-top.webp',
         });
     }
     if (options.largeLogoPath) {
         staticAssets.push({
             path: options.largeLogoPath,
-            rename: 'logo-300px.png',
+            rename: 'logo-login.webp',
         });
     }
     if (options.faviconPath) {