Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cleanup #256

Merged
merged 12 commits into from
Sep 11, 2024
Merged
1 change: 1 addition & 0 deletions .github/workflows/deploy_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ jobs:
echo "STUDY_PROGRAMS=${{ vars.STUDY_PROGRAMS }}" >> .env.prod
echo "STUDY_DEGREES=${{ vars.STUDY_DEGREES }}" >> .env.prod
echo "GENDERS=${{ vars.GENDERS }}" >> .env.prod
echo "LANGUAGES=${{ vars.LANGUAGES }}" >> .env.prod
echo "CUSTOM_DATA=${{ vars.CUSTOM_DATA }}" >> .env.prod

echo "MAIL_SENDER=${{ vars.MAIL_SENDER }}" >> .env.prod
Expand Down
284 changes: 184 additions & 100 deletions client/package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@
"@tiptap/extension-text-align": "2.6.6",
"@tiptap/extension-underline": "2.6.6",
"@tiptap/starter-kit": "2.6.6",
"i18n-iso-countries": "7.11.3",
"i18n-iso-countries": "7.12.0",
"jwt-decode": "4.0.0",
"keycloak-js": "25.0.4",
"mantine-datatable": "7.12.4",
"phosphor-react": "1.4.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-router-dom": "6.26.1"
"react-router-dom": "6.26.2"
},
"devDependencies": {
"@eslint/compat": "1.1.1",
"@eslint/eslintrc": "3.1.0",
"@eslint/js": "9.10.0",
"@types/react": "18.3.5",
"@types/react-dom": "18.3.0",
"@typescript-eslint/eslint-plugin": "8.4.0",
"@typescript-eslint/parser": "8.4.0",
"@typescript-eslint/eslint-plugin": "8.5.0",
"@typescript-eslint/parser": "8.5.0",
"clean-webpack-plugin": "4.0.0",
"compression-webpack-plugin": "11.1.0",
"copy-webpack-plugin": "12.0.2",
Expand All @@ -66,7 +66,7 @@
"terser-webpack-plugin": "5.3.10",
"ts-loader": "9.5.1",
"ts-node": "10.9.2",
"typescript": "5.5.4",
"typescript": "5.6.2",
"typescript-plugin-css-modules": "5.1.0",
"webpack": "5.94.0",
"webpack-bundle-analyzer": "4.10.2",
Expand Down
1 change: 1 addition & 0 deletions client/public/generate-runtime-env.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ const ALLOWED_ENVIRONMENT_VARIABLES = [
'GENDERS',
'STUDY_DEGREES',
'STUDY_PROGRAMS',
'LANGUAGES',
'CUSTOM_DATA',
'CALDAV_URL',
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import { DataTable, DataTableColumn } from 'mantine-datatable'
import { IPublishedPresentation, IThesisPresentation } from '../../requests/responses/thesis'
import { formatDate, formatPresentationType } from '../../utils/format'
import { GLOBAL_CONFIG } from '../../config/global'

interface IPresentationsTableProps<T> {
presentations: T[] | undefined
Expand Down Expand Up @@ -46,6 +47,13 @@ const PresentationsTable = <T extends IThesisPresentation | IPublishedPresentati
</a>
),
},
{
accessor: 'language',
title: 'Language',
width: 120,
ellipsis: true,
render: (presentation) => GLOBAL_CONFIG.languages[presentation.language] ?? presentation.language,
},
{
accessor: 'scheduledAt',
title: 'Scheduled At',
Expand Down
5 changes: 5 additions & 0 deletions client/src/config/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ export const GLOBAL_CONFIG: IGlobalConfig = {
GUIDED_RESEARCH: 'Guided Research',
},

languages: getEnvironmentVariable<Record<string, string>>('LANGUAGES', true) || {
ENGLISH: 'English',
GERMAN: 'German',
},

custom_data: getEnvironmentVariable<Record<string, string>>('CUSTOM_DATA', true) || {
GITHUB: 'Github Profile',
},
Expand Down
1 change: 1 addition & 0 deletions client/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface IGlobalConfig {
study_degrees: Record<string, string>
thesis_types: Record<string, string>
custom_data: Record<string, string>
languages: Record<string, string>

privacy_text: string
imprint_text: string
Expand Down

This file was deleted.

Loading