chore(style&dashboard): optimize scss variable file & add version field to Dashboard

This commit is contained in:
haitao(lj) 2022-10-19 11:06:31 +08:00
parent 8ab5dde21e
commit 16db109186
8 changed files with 14 additions and 8 deletions

View File

@ -1,2 +1,2 @@
REACT_APP_API_URL=/ REACT_APP_API_URL=/
CDN_PATH=/ REACT_APP_VERSION=

View File

@ -1,2 +1,2 @@
REACT_APP_API_URL=http://10.0.10.98:2060 REACT_APP_API_URL=http://10.0.10.98:206
CDN_PATH=https://cdn.dev.segmentfault.com/<projectName>/<version>/ REACT_APP_VERSION=

View File

@ -68,7 +68,7 @@ const Index: FC = () => {
{t('edit')} {t('edit')}
</Button> </Button>
</Card.Header> </Card.Header>
<Card.Body className="mx-n1"> <Card.Body className="m-n1">
{followingTags?.length ? ( {followingTags?.length ? (
<> <>
{followingTags.map((item) => { {followingTags.map((item) => {

View File

@ -6,7 +6,6 @@
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15), $box-shadow-sm; box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15), $box-shadow-sm;
.logo { .logo {
max-height: 1.75rem; max-height: 1.75rem;
line-height: 1;
} }
.nav-link { .nav-link {
color: rgba(255, 255, 255, 0.7); color: rgba(255, 255, 255, 0.7);

View File

@ -738,7 +738,8 @@
}, },
"dashboard": { "dashboard": {
"title": "Dashboard", "title": "Dashboard",
"welcome": "Welcome to Answer Admin !" "welcome": "Welcome to Answer Admin !",
"version": "Version"
}, },
"flags": { "flags": {
"title": "Flags", "title": "Flags",
@ -858,4 +859,4 @@
} }
} }
} }
} }

View File

@ -54,7 +54,7 @@ a {
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
left: 20px; left: 20px;
top: 0px; top: 0;
border: 1px solid #fff; border: 1px solid #fff;
} }

View File

@ -7,6 +7,12 @@ const Dashboard: FC = () => {
<> <>
<h3 className="text-capitalize">{t('title')}</h3> <h3 className="text-capitalize">{t('title')}</h3>
<p className="mt-4">{t('welcome')}</p> <p className="mt-4">{t('welcome')}</p>
{process.env.REACT_APP_VERSION && (
<p className="mt-4">
{`${t('version')} `}
{process.env.REACT_APP_VERSION}
</p>
)}
</> </>
); );
}; };