Skip to content

Commit

Permalink
Updating frontends
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmstr committed Nov 19, 2024
1 parent a7b6450 commit d0e13b5
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 46 deletions.
15 changes: 15 additions & 0 deletions server/src/uds/core/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,21 @@ class GlobalConfig:
type=Config.FieldType.HIDDEN,
help=''
)

# Cookies consent
COOKIES_CONSENT_TEXT: Config.Value = Config.section(Config.SectionType.CUSTOM).value(
'Cookies consent text',
'',
type=Config.FieldType.TEXT,
help=_('Cookies consent text. If empty, a default multi language text will be used'),
)
COOKIES_CONSENT_ENABLED: Config.Value = Config.section(Config.SectionType.CUSTOM).value(
'Cookies consent enabled',
'1',
type=Config.FieldType.BOOLEAN,
help=_('Enable cookies consent'),
)


@staticmethod
def is_initialized() -> bool:
Expand Down
52 changes: 26 additions & 26 deletions server/src/uds/static/admin/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion server/src/uds/static/admin/styles.css

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions server/src/uds/static/modern/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion server/src/uds/static/modern/styles.css

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions server/src/uds/static/modern/translations-fakejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,14 @@ gettext("Are you sure?");
gettext("Username");
gettext("Password");
gettext("Domain");
gettext("We use cookies to track usage and preferences");
gettext("I Understand");
gettext("We use cookies to authenticate users and remember preferences.");
gettext("If you do not agree, please");
gettext("leave this site");
gettext("I Accept");
gettext("Refuse and leave");
gettext("I Accept");
gettext("Learn more");
gettext("Cookie Policy");
gettext("Launching service");
gettext("Invalid UDS URL");
gettext("Please wait until the service is launched.");
Expand Down
6 changes: 3 additions & 3 deletions server/src/uds/templates/uds/admin/index.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions server/src/uds/templates/uds/modern/index.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions server/src/uds/web/util/configjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ def _get_auth_info(auth: Authenticator) -> dict[str, typing.Any]:
'site_information': GlobalConfig.SITE_INFO.get(),
'site_filter_on_top': GlobalConfig.SITE_FILTER_ONTOP.as_bool(True),
'launcher_wait_time': 5000,
'cookies_consent': {
'text': GlobalConfig.COOKIES_CONSENT_TEXT.get(True),
'enabled': GlobalConfig.COOKIES_CONSENT_ENABLED.as_bool(True),
},
'messages': {
# Calendar denied message
'calendar_denied': GlobalConfig.LIMITED_BY_CALENDAR_TEXT.get().strip()
Expand Down

0 comments on commit d0e13b5

Please sign in to comment.