refactor: change powered-by

This commit is contained in:
sealday 2024-03-19 12:23:38 +08:00
parent d3c3322fd4
commit f82dc6a052
3 changed files with 27 additions and 1 deletions

View File

@ -38,6 +38,7 @@ export * from './nocobase-buildin-plugin';
export * from './plugin-manager';
export * from './pm';
export * from './powered-by';
export * from './powered-by-v2';
export * from './record-provider';
export * from './route-switch';
export * from './schema-component';

View File

@ -0,0 +1,25 @@
import { css } from '@emotion/css';
import React from 'react';
import { useToken } from '../style';
export const PoweredByV2 = () => {
const { token } = useToken();
const date = new Date();
const year = date.getFullYear();
return (
<div
className={css`
text-align: center;
color: ${token.colorTextDescription};
a {
color: ${token.colorTextDescription};
&:hover {
color: ${token.colorText};
}
}
`}
>
©2023-{year} ICP备2023024678号
</div>
);
};

View File

@ -1,7 +1,7 @@
import { css } from '@emotion/css';
import React from 'react';
import { Outlet } from 'react-router-dom';
import { useSystemSettings, PoweredBy, useRequest, useAPIClient } from '@nocobase/client';
import { useSystemSettings, PoweredByV2 as PoweredBy, useRequest, useAPIClient } from '@nocobase/client';
import { AuthenticatorsContext } from '../authenticator';
export function AuthLayout(props: any) {