Added displaying version from appsettings.json (api/2.0/settings.json)
This commit is contained in:
parent
1ebc588a93
commit
e81c3df0be
@ -45,6 +45,7 @@
|
||||
"enabled": "enabled"
|
||||
},
|
||||
"version": {
|
||||
"number": "1.0.0",
|
||||
"release": {
|
||||
"date": "",
|
||||
"sign": ""
|
||||
|
@ -82,6 +82,7 @@ class SettingsStore {
|
||||
appId: "",
|
||||
measurementId: "",
|
||||
};
|
||||
version = "";
|
||||
|
||||
constructor() {
|
||||
makeAutoObservable(this);
|
||||
|
@ -300,7 +300,8 @@ namespace ASC.Api.Settings
|
||||
{
|
||||
Culture = Tenant.GetCulture().ToString(),
|
||||
GreetingSettings = Tenant.Name,
|
||||
Personal = CoreBaseSettings.Personal
|
||||
Personal = CoreBaseSettings.Personal,
|
||||
Version = Configuration["version:number"] ?? ""
|
||||
};
|
||||
|
||||
if (AuthContext.IsAuthenticated)
|
||||
|
@ -67,6 +67,8 @@ namespace ASC.Api.Settings
|
||||
|
||||
public FirebaseWrapper Firebase { get; set; }
|
||||
|
||||
public string Version { get; set; }
|
||||
|
||||
public static SettingsWrapper GetSample()
|
||||
{
|
||||
return new SettingsWrapper
|
||||
|
@ -7,7 +7,6 @@ import styled from "styled-components";
|
||||
import { isMobile } from "react-device-detect";
|
||||
import { setDocumentTitle } from "../../../helpers/utils";
|
||||
import i18n from "./i18n";
|
||||
import config from "../../../../package.json";
|
||||
import withLoader from "../Confirm/withLoader";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { ReactSVG } from "react-svg";
|
||||
@ -78,7 +77,7 @@ const VersionStyle = styled.div`
|
||||
padding: 8px 0px 20px 0px;
|
||||
`;
|
||||
|
||||
const Body = ({ t, personal }) => {
|
||||
const Body = ({ t, personal, version }) => {
|
||||
useEffect(() => {
|
||||
setDocumentTitle(t("Common:About"));
|
||||
}, [t]);
|
||||
@ -124,7 +123,7 @@ const Body = ({ t, personal }) => {
|
||||
|
||||
<VersionStyle>
|
||||
<Text className="text_style" fontSize="14px" color="#A3A9AE">
|
||||
{`${t("Common:Version")}: ${config.version}`}
|
||||
{`${t("Common:Version")}: ${version}`}
|
||||
</Text>
|
||||
</VersionStyle>
|
||||
|
||||
@ -198,6 +197,7 @@ const Body = ({ t, personal }) => {
|
||||
|
||||
const BodyWrapper = inject(({ auth }) => ({
|
||||
personal: auth.settingsStore,
|
||||
version: auth.settingsStore.version,
|
||||
}))(withTranslation(["About", "Common"])(withLoader(observer(Body))));
|
||||
|
||||
const About = (props) => {
|
||||
|
Loading…
Reference in New Issue
Block a user