Skip to content

Commit

Permalink
add “favicon” feconfig (#467)
Browse files Browse the repository at this point in the history
* add favicon config

* add default
  • Loading branch information
newfish-cmyk authored Nov 13, 2023
1 parent d91551e commit 4593eef
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/global/common/system/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type FeConfigsType = {
exportLimitMinutes?: number;
};
scripts?: { [key: string]: string }[];
favicon?: string;
};

export type SystemEnvType = {
Expand Down
2 changes: 1 addition & 1 deletion projects/app/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function App({ Component, pageProps }: AppProps) {
name="viewport"
content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no, viewport-fit=cover"
/>
<link rel="icon" href="/favicon.ico" />
<link rel="icon" href={feConfigs.favicon || '/favicon.ico'} />
</Head>
{scripts?.map((item, i) => <Script key={i} strategy="lazyOnload" {...item}></Script>)}

Expand Down
3 changes: 2 additions & 1 deletion projects/app/src/pages/api/system/getInitData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ const defaultFeConfigs: FeConfigsType = {
limit: {
exportLimitMinutes: 0
},
scripts: []
scripts: [],
favicon: '/favicon.ico'
};

export function initGlobal() {
Expand Down

0 comments on commit 4593eef

Please sign in to comment.