Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
greg
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
it-bott-integrasjoner
greg
Commits
747f5242
Verified
Commit
747f5242
authored
3 years ago
by
Andreas Ellewsen
Browse files
Options
Downloads
Patches
Plain Diff
Add english links to frontend
Resolves: GREG-200
parent
9b1c7689
No related branches found
Branches containing commit
No related tags found
1 merge request
!273
Add english links to frontend
Pipeline
#114460
passed
3 years ago
Stage: venv update
Stage: tests and linting
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
frontend/.env
+2
-1
2 additions, 1 deletion
frontend/.env
frontend/src/appConfig.ts
+15
-2
15 additions, 2 deletions
frontend/src/appConfig.ts
frontend/src/routes/components/footer.tsx
+30
-6
30 additions, 6 deletions
frontend/src/routes/components/footer.tsx
with
47 additions
and
9 deletions
frontend/.env
+
2
−
1
View file @
747f5242
...
...
@@ -6,6 +6,7 @@ REACT_APP_GUEST_CONSENT_STEP_ENABLED=true
REACT_APP_SUPPORT_MAIL=test@example.org
REACT_APP_INST=uio
REACT_APP_SUPPORT_URL=https://example.org
REACT_APP_SUPPORT_URL_EN=https://example.org/en
REACT_APP_RESPONSIBLE_ORGANIZATION='Seksjon for integrasjon og elektroniske identiteter (INT)'
REACT_APP_RESPONSIBLE_ORGANIZATION_LINK='https://www.usit.uio.no/om/organisasjon/bnt/usitint/'
\ No newline at end of file
REACT_APP_RESPONSIBLE_ORGANIZATION_LINK='https://www.usit.uio.no/om/organisasjon/bnt/usitint/'
This diff is collapsed.
Click to expand it.
frontend/src/appConfig.ts
+
15
−
2
View file @
747f5242
...
...
@@ -28,13 +28,26 @@ export const guestConsentStepEnabled: boolean =
env
.
REACT_APP_GUEST_CONSENT_STEP_ENABLED
===
'
true
'
/* Footer content */
export
const
responsibleOrganization
:
string
=
env
.
REACT_APP_RESPONSIBLE_ORGANIZATION
as
string
/* no links */
export
const
itRulesLink
:
string
=
env
.
REACT_APP_IT_RULES_LINK
as
string
export
const
privacyPolicyLink
:
string
=
env
.
REACT_APP_PRIVACY_POLICY_LINK
as
string
export
const
technicalSupportLink
:
string
=
env
.
REACT_APP_SUPPORT_URL
as
string
export
const
documentationLink
:
string
=
env
.
REACT_APP_DOCUMENTATION_LINK
as
string
export
const
responsibleOrganization
:
string
=
env
.
REACT_APP_RESPONSIBLE_ORGANIZATION
as
string
export
const
responsibleOrganizationLink
:
string
=
env
.
REACT_APP_RESPONSIBLE_ORGANIZATION_LINK
as
string
/* en links */
export
const
itRulesLinkEn
:
string
=
env
.
REACT_APP_IT_RULES_LINK_EN
as
string
export
const
privacyPolicyLinkEn
:
string
=
env
.
REACT_APP_PRIVACY_POLICY_LINK_EN
as
string
export
const
technicalSupportLinkEn
:
string
=
env
.
REACT_APP_SUPPORT_URL_EN
as
string
export
const
documentationLinkEn
:
string
=
env
.
REACT_APP_DOCUMENTATION_LINK_EN
as
string
export
const
responsibleOrganizationLinkEn
:
string
=
env
.
REACT_APP_RESPONSIBLE_ORGANIZATION_LINK_EN
as
string
This diff is collapsed.
Click to expand it.
frontend/src/routes/components/footer.tsx
+
30
−
6
View file @
747f5242
...
...
@@ -5,10 +5,15 @@ import { Link } from '@mui/material'
import
{
responsibleOrganization
,
responsibleOrganizationLink
,
responsibleOrganizationLinkEn
,
itRulesLink
,
itRulesLinkEn
,
privacyPolicyLink
,
privacyPolicyLinkEn
,
technicalSupportLink
,
technicalSupportLinkEn
,
documentationLink
,
documentationLinkEn
,
}
from
'
appConfig
'
import
{
getFooterLogo
}
from
'
./logos
'
...
...
@@ -70,7 +75,26 @@ StyledLink.defaultProps = {
const
LogoContainer
=
styled
(
'
div
'
)({})
function
Footer
()
{
const
{
t
}
=
useTranslation
([
'
common
'
,
'
footer
'
])
const
{
t
,
i18n
}
=
useTranslation
([
'
common
'
,
'
footer
'
])
const
getLink
=
(
enLink
:
string
|
null
,
noLink
:
string
|
null
)
=>
{
let
link
if
(
i18n
.
language
===
'
en
'
)
{
link
=
enLink
||
noLink
}
else
{
link
=
noLink
||
enLink
}
return
link
||
''
}
const
getItRulesLink
=
()
=>
getLink
(
itRulesLinkEn
,
itRulesLink
)
const
getTechnicalSupportLink
=
()
=>
getLink
(
technicalSupportLinkEn
,
technicalSupportLink
)
const
getPrivacyPolicyLink
=
()
=>
getLink
(
privacyPolicyLinkEn
,
privacyPolicyLink
)
const
getDocumentationLink
=
()
=>
getLink
(
documentationLinkEn
,
documentationLink
)
const
getResponsibleOrganizationLink
=
()
=>
getLink
(
responsibleOrganizationLinkEn
,
responsibleOrganizationLink
)
return
(
<
FooterWrapper
>
<
InfoSection
>
...
...
@@ -79,20 +103,20 @@ function Footer() {
<
LinkContainer
>
<
LinkSection
>
<
LinkHeader
>
{
t
(
'
footer:link.terms.header
'
)
}
</
LinkHeader
>
<
StyledLink
href
=
{
i
tRulesLink
}
>
<
StyledLink
href
=
{
getI
tRulesLink
()
}
>
{
t
(
'
footer:link.terms.ITRules
'
)
}
</
StyledLink
>
<
StyledLink
href
=
{
p
rivacyPolicyLink
}
>
<
StyledLink
href
=
{
getP
rivacyPolicyLink
()
}
>
{
t
(
'
footer:link.terms.privacy
'
)
}
</
StyledLink
>
</
LinkSection
>
<
LinkSection
>
<
LinkHeader
>
{
t
(
'
footer:link.help.header
'
)
}
</
LinkHeader
>
<
StyledLink
href
=
{
t
echnicalSupportLink
}
>
<
StyledLink
href
=
{
getT
echnicalSupportLink
()
}
>
{
t
(
'
footer:link.help.contact
'
)
}
</
StyledLink
>
<
StyledLink
href
=
{
d
ocumentationLink
}
>
<
StyledLink
href
=
{
getD
ocumentationLink
()
}
>
{
t
(
'
footer:link.help.doc
'
)
}
</
StyledLink
>
</
LinkSection
>
...
...
@@ -101,7 +125,7 @@ function Footer() {
<
LinkHeader
>
{
t
(
'
footer:link.responsibleOrganization.header
'
)
}
</
LinkHeader
>
<
StyledLink
href
=
{
r
esponsibleOrganizationLink
}
>
<
StyledLink
href
=
{
getR
esponsibleOrganizationLink
()
}
>
{
responsibleOrganization
}
</
StyledLink
>
</
LinkSection
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment