imported current state of the mockup into the public repo

Co-authored-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
Signed-off-by: Philip Molares <philip.molares@udo.edu>
Signed-off-by: Tilman Vatteroth <tilman.vatteroth@tu-dortmund.de>
This commit is contained in:
Philip Molares 2020-05-14 15:41:38 +02:00
commit 93ce059577
161 changed files with 17419 additions and 0 deletions

View file

@ -0,0 +1,51 @@
import {Trans, useTranslation} from "react-i18next";
import {TranslatedLink} from "./translated-link";
import React, {Fragment} from "react";
import {ExternalLink} from "./external-link";
import {useSelector} from "react-redux";
import {ApplicationState} from "../../../../redux";
const PoweredByLinks: React.FC = () => {
useTranslation();
const defaultLinks = [
{
href: '/s/release-notes',
i18nKey: 'releases'
},
{
href: 'https://github.com/codimd/server/tree/41b13e71b6b1d499238c04b15d65e3bd76442f1d',
i18nKey: 'sourceCode'
}
]
const config = useSelector((state: ApplicationState) => state.applicationConfig);
const specialLinks = Object.entries(config.specialLinks)
.filter(([_, value]) => value !== "")
.map(([key, value]) => {
return {
href: value,
i18nKey: key
}
})
return (
<p>
<Trans i18nKey="poweredBy" components={[<ExternalLink href="https://codimd.org" text="CodiMD"/>]}/>
{
(defaultLinks.concat(specialLinks)).map(({href, i18nKey}) =>
<Fragment key={i18nKey}>
&nbsp;|&nbsp;
<TranslatedLink
href={href}
i18nKey={i18nKey}
/>
</Fragment>
)
}
</p>
)
}
export { PoweredByLinks }