Merge remote-tracking branch 'github/feat/1.1.2/ui' into feat/1.1.2/user-center
This commit is contained in:
@@ -11,8 +11,8 @@ const Index = () => {
|
||||
const siteName = siteInfoStore((state) => state.siteInfo.name);
|
||||
const cc = `${fullYear} ${siteName}`;
|
||||
return (
|
||||
<footer className="bg-light py-3">
|
||||
<Container>
|
||||
<footer className="bg-light">
|
||||
<Container className="py-3">
|
||||
<p className="text-center mb-0 fs-14 text-secondary">
|
||||
<Trans i18nKey="footer.build_on" values={{ cc }}>
|
||||
Built on
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
import { memo } from 'react';
|
||||
import { Container, Col } from 'react-bootstrap';
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { userCenterStore } from '@/stores';
|
||||
import { USER_AGENT_NAMES } from '@/common/constants';
|
||||
import { usePageTags } from '@/hooks';
|
||||
|
||||
import WeComAuth from './components/WeCom';
|
||||
|
||||
const Index = () => {
|
||||
const { t } = useTranslation('translation');
|
||||
const [searchParam] = useSearchParams();
|
||||
const { agent: ucAgent } = userCenterStore();
|
||||
let agentName = ucAgent?.agent_info.name || '';
|
||||
if (searchParam.get('agent_name')) {
|
||||
agentName = searchParam.get('agent_name') || '';
|
||||
}
|
||||
usePageTags({
|
||||
title: t('login', { keyPrefix: 'page_title' }),
|
||||
});
|
||||
return (
|
||||
<Container style={{ paddingTop: '5rem', paddingBottom: '5rem' }}>
|
||||
<Col md={4} className="mx-auto">
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
import { memo } from 'react';
|
||||
import { Container } from 'react-bootstrap';
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { userCenterStore } from '@/stores';
|
||||
import { USER_AGENT_NAMES } from '@/common/constants';
|
||||
import { usePageTags } from '@/hooks';
|
||||
|
||||
import WeCom from './components/WeCom';
|
||||
|
||||
const Index = () => {
|
||||
const { t } = useTranslation('translation');
|
||||
const [searchParam] = useSearchParams();
|
||||
const { agent: ucAgent } = userCenterStore();
|
||||
let agentName = ucAgent?.agent_info.name || '';
|
||||
if (searchParam.get('agent_name')) {
|
||||
agentName = searchParam.get('agent_name') || '';
|
||||
}
|
||||
usePageTags({
|
||||
title: t('login', { keyPrefix: 'page_title' }),
|
||||
});
|
||||
return (
|
||||
<Container>
|
||||
{USER_AGENT_NAMES.WeCom.toLowerCase() === agentName.toLowerCase() ? (
|
||||
|
||||
@@ -365,6 +365,10 @@ const routes: RouteNode[] = [
|
||||
{
|
||||
path: '/user-center/auth',
|
||||
page: 'pages/UserCenter/Auth',
|
||||
guard: () => {
|
||||
const notLogged = guard.notLogged();
|
||||
return notLogged;
|
||||
},
|
||||
},
|
||||
{
|
||||
path: '/user-center/auth-failed',
|
||||
|
||||
@@ -33,7 +33,9 @@ const pageTags = create<HelmetStore>((set) => ({
|
||||
o.pageTitle = makePageTitle(params.title, params.subtitle);
|
||||
}
|
||||
o.description =
|
||||
params.description || siteInfoStore.getState().siteInfo.description;
|
||||
params.description ||
|
||||
siteInfoStore.getState().siteInfo?.description ||
|
||||
'';
|
||||
o.keywords = params.keywords || '';
|
||||
|
||||
set({
|
||||
|
||||
@@ -9,6 +9,7 @@ import {
|
||||
themeSettingStore,
|
||||
seoSettingStore,
|
||||
loginToContinueStore,
|
||||
pageTagStore,
|
||||
} from '@/stores';
|
||||
import { RouteAlias } from '@/router/alias';
|
||||
import {
|
||||
@@ -373,6 +374,10 @@ export const initAppSettingsStore = async () => {
|
||||
.updateVersion(appSettings.version, appSettings.revision);
|
||||
siteInfoStore.getState().updateUsers(appSettings.site_users);
|
||||
interfaceStore.getState().update(appSettings.interface);
|
||||
pageTagStore.getState().update({
|
||||
title: appSettings.general?.name,
|
||||
description: appSettings.general?.description,
|
||||
});
|
||||
brandingStore.getState().update(appSettings.branding);
|
||||
loginSettingStore.getState().update(appSettings.login);
|
||||
customizeStore.getState().update(appSettings.custom_css_html);
|
||||
|
||||
Reference in New Issue
Block a user