Skip to content

A Q&A platform software for teams at any scales. Whether it's a community forum, help center, or knowledge management platform, you can always count on Apache Answer.

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

haitao(lj)16db10918603
diff --git a/ui/.env b/ui/.env
index a41cd62e..164bd903 100644
--- a/ui/.env
+++ b/ui/.env
@@ -1,2 +1,2 @@
REACT_APP_API_URL=/
-CDN_PATH=/
+REACT_APP_VERSION=
diff --git a/ui/.env.development b/ui/.env.development
index fb45a724..de0cab05 100644
--- a/ui/.env.development
+++ b/ui/.env.development
@@ -1,2 +1,2 @@
-REACT_APP_API_URL=http://10.0.10.98:2060
-CDN_PATH=https://cdn.dev.segmentfault.com/<projectName>/<version>/
+REACT_APP_API_URL=http://10.0.10.98:206
+REACT_APP_VERSION=
diff --git a/ui/src/common/variable.scss b/ui/src/common/_variable.scss
similarity index 100%
rename from ui/src/common/variable.scss
rename to ui/src/common/_variable.scss
diff --git a/ui/src/components/FollowingTags/index.tsx b/ui/src/components/FollowingTags/index.tsx
index 993efaf7..7f93a205 100644
--- a/ui/src/components/FollowingTags/index.tsx
+++ b/ui/src/components/FollowingTags/index.tsx
@@ -68,7 +68,7 @@ const Index: FC = () => {
{t('edit')}
</Button>
</Card.Header>
- <Card.Body className="mx-n1">
+ <Card.Body className="m-n1">
{followingTags?.length ? (
<>
{followingTags.map((item) => {
diff --git a/ui/src/components/Header/index.scss b/ui/src/components/Header/index.scss
index e47358be..64a3d67f 100644
--- a/ui/src/components/Header/index.scss
+++ b/ui/src/components/Header/index.scss
@@ -6,7 +6,6 @@
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15), $box-shadow-sm;
.logo {
max-height: 1.75rem;
- line-height: 1;
}
.nav-link {
color: rgba(255, 255, 255, 0.7);
diff --git a/ui/src/i18n/locales/en.json b/ui/src/i18n/locales/en.json
index f56c61ac..30a9d1b5 100644
--- a/ui/src/i18n/locales/en.json
+++ b/ui/src/i18n/locales/en.json
@@ -738,7 +738,8 @@
},
"dashboard": {
"title": "Dashboard",
- "welcome": "Welcome to Answer Admin !"
+ "welcome": "Welcome to Answer Admin !",
+ "version": "Version"
},
"flags": {
"title": "Flags",
@@ -858,4 +859,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/ui/src/index.scss b/ui/src/index.scss
index 2ee37d23..09807a9e 100644
--- a/ui/src/index.scss
+++ b/ui/src/index.scss
@@ -54,7 +54,7 @@ a {
border-radius: 50%;
position: absolute;
left: 20px;
- top: 0px;
+ top: 0;
border: 1px solid #fff;
}
diff --git a/ui/src/pages/Admin/Dashboard/index.tsx b/ui/src/pages/Admin/Dashboard/index.tsx
index fd64456c..45c19721 100644
--- a/ui/src/pages/Admin/Dashboard/index.tsx
+++ b/ui/src/pages/Admin/Dashboard/index.tsx
@@ -7,6 +7,12 @@ const Dashboard: FC = () => {
<>
<h3 className="text-capitalize">{t('title')}</h3>
<p className="mt-4">{t('welcome')}</p>
+ {process.env.REACT_APP_VERSION && (
+ <p className="mt-4">
+ {`${t('version')} `}
+ {process.env.REACT_APP_VERSION}
+ </p>
+ )}
</>
);
};