-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
88 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React, { useState, useEffect } from 'react'; | ||
import Typography from '@material-ui/core/Typography'; | ||
import { Tooltip } from '@material-ui/core'; | ||
import dayjs from 'dayjs'; | ||
import GitInfo from 'react-git-info/macro'; | ||
import { Configuration, getConfiguration } from 'js/api/configuration'; | ||
import FilDAriane, { fil } from 'js/components/commons/fil-d-ariane'; | ||
|
||
const EnTete = () => ( | ||
<div className="en-tete"> | ||
<Typography variant="h2" align="center" color="textPrimary" gutterBottom> | ||
A propos d'Onyxia | ||
</Typography> | ||
</div> | ||
); | ||
|
||
const About = () => { | ||
const [configuration, setConfiguration] = useState<Configuration>(); | ||
|
||
useEffect(() => { | ||
getConfiguration().then((resp) => setConfiguration(resp)); | ||
}, []); | ||
|
||
const gitInfo = GitInfo(); | ||
return ( | ||
<> | ||
<EnTete /> | ||
<FilDAriane fil={fil.about} /> | ||
<div className="contenu accueil"> | ||
<Typography gutterBottom noWrap> | ||
<Tooltip title={gitInfo.commit.message}> | ||
<> | ||
Interface : | ||
{gitInfo.tags.length > 0 ? gitInfo.tags[0] : gitInfo.branch}( | ||
{gitInfo.commit.date}) | ||
<br /> | ||
Serveur : | ||
{configuration | ||
? `${configuration.build.version} ( | ||
${dayjs(configuration.build.timestamp * 1000).format()} | ||
)` | ||
: ' introuvable'} | ||
<br /> | ||
Region :{' '} | ||
{configuration?.regions?.length > 0 | ||
? configuration.regions[0].regionId | ||
: ' introuvable'} | ||
</> | ||
</Tooltip> | ||
</Typography> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default About; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from './About'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
const dictionary = { | ||
about: { | ||
fr: 'A propos', | ||
en: 'About', | ||
}, | ||
}; | ||
|
||
export default dictionary; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.