mirror of https://gitee.com/answerdev/answer.git
fix(footer): gitlab#1342
This commit is contained in:
parent
065b6ce87f
commit
8e52165229
|
@ -529,7 +529,7 @@ ui:
|
|||
footer:
|
||||
build_on: >-
|
||||
Built on <1> Answer </1>- the open-source software that power Q&A
|
||||
communities<br />Made with love © 2022 Answer
|
||||
communities.<br />Made with love © {{cc}}.
|
||||
upload_img:
|
||||
name: Change
|
||||
loading: loading...
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
export const DEFAULT_SITE_NAME = 'Answer';
|
||||
export const DEFAULT_LANG = 'en_US';
|
||||
export const CURRENT_LANG_STORAGE_KEY = '_a_lang_';
|
||||
export const LANG_RESOURCE_STORAGE_KEY = '_a_lang_r_';
|
||||
|
|
|
@ -2,12 +2,20 @@ import React from 'react';
|
|||
import { Container } from 'react-bootstrap';
|
||||
import { Trans } from 'react-i18next';
|
||||
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
import { siteInfoStore } from '@/stores';
|
||||
import { DEFAULT_SITE_NAME } from '@/common/constants';
|
||||
|
||||
const Index = () => {
|
||||
const fullYear = dayjs().format('YYYY');
|
||||
const siteName = siteInfoStore.getState().siteInfo.name || DEFAULT_SITE_NAME;
|
||||
const cc = `${fullYear} ${siteName}`;
|
||||
return (
|
||||
<footer className="bg-light py-3">
|
||||
<Container>
|
||||
<p className="text-center mb-0 fs-14 text-secondary">
|
||||
<Trans i18nKey="footer.build_on">
|
||||
<Trans i18nKey="footer.build_on" values={{ cc }}>
|
||||
Built on
|
||||
{/* eslint-disable-next-line react/jsx-no-target-blank */}
|
||||
<a href="https://answer.dev/" target="_blank">
|
||||
|
@ -15,7 +23,7 @@ const Index = () => {
|
|||
</a>
|
||||
- the open-source software that powers Q&A communities.
|
||||
<br />
|
||||
Made with love. © 2022 Answer .
|
||||
Made with love. © 2022 Answer.
|
||||
</Trans>
|
||||
</p>
|
||||
</Container>
|
||||
|
|
|
@ -20,6 +20,7 @@ import {
|
|||
import { loggedUserInfoStore, siteInfoStore, brandingStore } from '@/stores';
|
||||
import { logout, useQueryNotificationStatus } from '@/services';
|
||||
import { RouteAlias } from '@/router/alias';
|
||||
import { DEFAULT_SITE_NAME } from '@/common/constants';
|
||||
|
||||
import NavItems from './components/NavItems';
|
||||
|
||||
|
@ -88,7 +89,7 @@ const Header: FC = () => {
|
|||
/>
|
||||
</>
|
||||
) : (
|
||||
<span>{siteInfo.name || 'Answer'}</span>
|
||||
<span>{siteInfo.name || DEFAULT_SITE_NAME}</span>
|
||||
)}
|
||||
</Navbar.Brand>
|
||||
|
||||
|
|
Loading…
Reference in New Issue