Compare commits

..

12 Commits

Author SHA1 Message Date
Pierfrancesco Passerini
f98479469e
Translated using Weblate (Italian)
Currently translated at 77.3% (1454 of 1880 strings)
2026-01-13 19:32:57 +01:00
Pierfrancesco Passerini
4135745e09
Translated using Weblate (Italian)
Currently translated at 74.5% (1402 of 1880 strings)
2026-01-13 09:32:30 +01:00
Pierfrancesco Passerini
017c660fa2
Translated using Weblate (Italian)
Currently translated at 73.6% (1384 of 1880 strings)
2026-01-12 18:01:52 +01:00
Joseph Nuthalapati
958ac2e0a5
gitweb: Fix deleting last repo disables app
GitWeb requires authenticated access if there are no public
repositories left.

1. Create a public repository
2. Delete the repository (i.e. delete the last/only repository)
3. GitWeb app shows as disabled, but is still usable
4. If another repository is created, the app becomes enabled again

Not considering the component GitwebWebserverAuth when determining
whether the app is enabled or disabled.

This commit fixes the status shown in the configuration page, but keeps
the authentication requirement if there are no public repositories.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2026-01-12 11:10:14 +02:00
Pierfrancesco Passerini
54e0ead0e0
Translated using Weblate (Italian)
Currently translated at 68.3% (1285 of 1880 strings)
2026-01-11 17:30:12 +01:00
Pierfrancesco Passerini
bd42bae464
Translated using Weblate (Italian)
Currently translated at 67.8% (1275 of 1880 strings)
2026-01-11 16:41:28 +01:00
Pierfrancesco Passerini
72da938b8d
Translated using Weblate (Italian)
Currently translated at 61.0% (1148 of 1880 strings)
2026-01-11 09:53:00 +00:00
Joseph Nuthalapati
0f9fe4f111
notifications: Close dropdown when clicking outside
The notifications dropdown does not behave like the other 3 dropdowns in
the navigation bar, but a user would expect it to, since it is also
visually a dropdown like the others.

Added JavaScript for a click listener that would collapse the
notifications dropdown if the user clicks anywhere outside the dropdown
area.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2026-01-10 07:47:21 -05:00
Priit Jõerüüt
72c37e5209
Translated using Weblate (Estonian)
Currently translated at 19.7% (372 of 1880 strings)
2026-01-09 21:01:46 +01:00
Pierfrancesco Passerini
b377f94f77
Translated using Weblate (Italian)
Currently translated at 60.0% (1129 of 1880 strings)
2026-01-08 14:01:50 +00:00
Priit Jõerüüt
75e2c17089
Translated using Weblate (Estonian)
Currently translated at 18.4% (346 of 1880 strings)
2026-01-08 14:01:48 +00:00
Pierfrancesco Passerini
ae9b37d561
Translated using Weblate (Italian)
Currently translated at 59.3% (1115 of 1880 strings)
2026-01-07 13:01:51 +00:00
4 changed files with 680 additions and 468 deletions

View File

@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-12-16 01:18+0000\n"
"PO-Revision-Date: 2025-12-22 16:03+0000\n"
"PO-Revision-Date: 2026-01-09 20:01+0000\n"
"Last-Translator: Priit Jõerüüt <jrthwlate@users.noreply.hosted.weblate.org>\n"
"Language-Team: Estonian <https://hosted.weblate.org/projects/freedombox/"
"freedombox/et/>\n"
@ -1951,7 +1951,7 @@ msgstr ""
#: plinth/modules/letsencrypt/templates/letsencrypt.html:27
#: plinth/modules/storage/templates/storage.html:28
msgid "Actions"
msgstr "Teegvused"
msgstr "Tegevused"
#: plinth/modules/dynamicdns/templates/dynamicdns.html:37
#: plinth/modules/dynamicdns/templates/dynamicdns.html:72
@ -2213,7 +2213,7 @@ msgstr ""
#: plinth/modules/email/__init__.py:62
msgid "Postfix/Dovecot"
msgstr ""
msgstr "Postfix/Dovecot"
#: plinth/modules/email/__init__.py:80
msgid "More emails"
@ -3124,11 +3124,11 @@ msgstr ""
#: plinth/modules/help/templates/help_about.html:129
msgid "Support"
msgstr ""
msgstr "Kasutajatugi"
#: plinth/modules/help/templates/help_about.html:133
msgid "Forum"
msgstr ""
msgstr "Foorum"
#: plinth/modules/help/templates/help_about.html:138
msgid "IRC Chatroom"
@ -4292,7 +4292,7 @@ msgstr ""
#: plinth/modules/miniflux/__init__.py:42
#: plinth/modules/miniflux/manifest.py:10
msgid "Miniflux"
msgstr ""
msgstr "Miniflux"
#: plinth/modules/miniflux/forms.py:12
msgid "Enter a username for the user."
@ -4423,7 +4423,7 @@ msgstr ""
#: plinth/modules/mumble/__init__.py:46 plinth/modules/mumble/manifest.py:9
msgid "Mumble"
msgstr ""
msgstr "Mumble"
#: plinth/modules/mumble/__init__.py:158
msgid "Mumble server is configured"
@ -5674,7 +5674,7 @@ msgstr ""
#: plinth/modules/networks/views.py:105 plinth/modules/wireguard/__init__.py:47
#: plinth/modules/wireguard/manifest.py:14
msgid "WireGuard"
msgstr ""
msgstr "WireGuard"
#: plinth/modules/networks/views.py:112
msgid "ad-hoc"
@ -5786,7 +5786,7 @@ msgstr ""
#: plinth/modules/nextcloud/manifest.py:11
#: plinth/modules/nextcloud/manifest.py:18
msgid "Nextcloud"
msgstr ""
msgstr "Nextcloud"
#: plinth/modules/nextcloud/forms.py:19
msgid "Not set"
@ -5833,7 +5833,7 @@ msgstr ""
#: plinth/modules/nextcloud/manifest.py:56
#: plinth/modules/sharing/__init__.py:34
msgid "Sharing"
msgstr ""
msgstr "Jagamine"
#: plinth/modules/nextcloud/manifest.py:56 plinth/modules/sogo/manifest.py:72
msgid "Groupware"
@ -5860,7 +5860,7 @@ msgstr ""
#: plinth/modules/openvpn/__init__.py:46 plinth/modules/openvpn/manifest.py:17
msgid "OpenVPN"
msgstr ""
msgstr "OpenVPN"
#: plinth/modules/openvpn/__init__.py:57
#, python-brace-format
@ -6253,7 +6253,7 @@ msgstr ""
#: plinth/modules/privoxy/__init__.py:53
msgid "Privoxy"
msgstr ""
msgstr "Privoxy"
#: plinth/modules/privoxy/__init__.py:119
#, python-brace-format
@ -6291,7 +6291,7 @@ msgstr ""
#: plinth/modules/quassel/__init__.py:51 plinth/modules/quassel/manifest.py:9
msgid "Quassel"
msgstr ""
msgstr "Quassel"
#: plinth/modules/quassel/manifest.py:33
msgid "Quasseldroid"
@ -6299,7 +6299,7 @@ msgstr ""
#: plinth/modules/quassel/manifest.py:54
msgid "IRC"
msgstr ""
msgstr "IRC"
#: plinth/modules/radicale/__init__.py:25
#, python-brace-format
@ -6320,7 +6320,7 @@ msgstr ""
#: plinth/modules/radicale/__init__.py:53
#: plinth/modules/radicale/manifest.py:74
msgid "Radicale"
msgstr ""
msgstr "Radicale"
#: plinth/modules/radicale/forms.py:14
msgid "Only the owner of a calendar/addressbook can view or make changes."
@ -6470,7 +6470,7 @@ msgstr ""
#: plinth/modules/rssbridge/__init__.py:52
#: plinth/modules/rssbridge/manifest.py:7
msgid "RSS-Bridge"
msgstr ""
msgstr "RSS-Bridge"
#: plinth/modules/rssbridge/forms.py:12 plinth/modules/searx/forms.py:17
msgid "Allow Public Access"
@ -6525,7 +6525,7 @@ msgstr ""
#: plinth/modules/samba/__init__.py:53
msgid "Samba"
msgstr ""
msgstr "Samba"
#: plinth/modules/samba/manifest.py:12
msgid "SambaLite"
@ -6818,7 +6818,7 @@ msgstr ""
#: plinth/modules/shaarli/__init__.py:36 plinth/modules/shaarli/manifest.py:25
msgid "Shaarli"
msgstr ""
msgstr "Shaarli"
#: plinth/modules/shaarli/manifest.py:12
msgid "Shaarlier"
@ -6826,7 +6826,7 @@ msgstr ""
#: plinth/modules/shaarli/manifest.py:34
msgid "Bookmarks"
msgstr ""
msgstr "Järjehoidjad"
#: plinth/modules/shaarli/manifest.py:34
msgid "Link blog"
@ -6869,7 +6869,7 @@ msgstr ""
#: plinth/modules/shadowsocks/__init__.py:50
msgid "Shadowsocks Client"
msgstr ""
msgstr "Shadowsocksi klient"
#: plinth/modules/shadowsocks/forms.py:25
msgid "Server hostname or IP address"
@ -6911,7 +6911,7 @@ msgstr ""
#: plinth/modules/shadowsocksserver/__init__.py:47
msgid "Shadowsocks Server"
msgstr ""
msgstr "Shadowsocksi server"
#: plinth/modules/shadowsocksserver/forms.py:10
#: plinth/modules/shadowsocksserver/forms.py:11
@ -7660,7 +7660,7 @@ msgstr ""
#: plinth/modules/syncthing/__init__.py:59
#: plinth/modules/syncthing/manifest.py:12
msgid "Syncthing"
msgstr ""
msgstr "Syncthing"
#: plinth/modules/tiddlywiki/__init__.py:25
#, python-brace-format
@ -7695,7 +7695,7 @@ msgstr ""
#: plinth/modules/tiddlywiki/__init__.py:64
#: plinth/modules/tiddlywiki/manifest.py:9
msgid "TiddlyWiki"
msgstr ""
msgstr "TiddlyWiki"
#: plinth/modules/tiddlywiki/forms.py:39
msgid "A TiddlyWiki file with .html file extension"
@ -7753,7 +7753,7 @@ msgstr ""
#: plinth/modules/tor/__init__.py:63 plinth/modules/tor/manifest.py:61
#: plinth/modules/torproxy/manifest.py:58
msgid "Tor"
msgstr ""
msgstr "Tor"
#: plinth/modules/tor/__init__.py:77
msgid "Tor Onion Service"
@ -7889,7 +7889,7 @@ msgstr ""
#: plinth/modules/torproxy/__init__.py:57
msgid "Tor Proxy"
msgstr ""
msgstr "Tori proksi"
#: plinth/modules/torproxy/__init__.py:81
msgid "Tor Socks Proxy"
@ -7970,7 +7970,7 @@ msgstr ""
#: plinth/modules/transmission/__init__.py:74
#: plinth/modules/transmission/manifest.py:8
msgid "Transmission"
msgstr ""
msgstr "Transmission"
#: plinth/modules/transmission/manifest.py:15
msgid "Tremotesf"
@ -8990,7 +8990,7 @@ msgstr ""
#: plinth/modules/wordpress/__init__.py:53
#: plinth/modules/wordpress/manifest.py:6
msgid "WordPress"
msgstr ""
msgstr "WordPress"
#: plinth/modules/wordpress/forms.py:14
msgid "Public access"
@ -9029,7 +9029,7 @@ msgstr ""
#: plinth/modules/zoph/__init__.py:57 plinth/modules/zoph/manifest.py:6
msgid "Zoph"
msgstr ""
msgstr "Zoph"
#: plinth/modules/zoph/forms.py:14
msgid "Enable OpenStreetMap for maps"

File diff suppressed because it is too large Load Diff

View File

@ -109,14 +109,14 @@ class GitwebApp(app_module.App):
def _enable_public_access(self):
"""Allow Gitweb app to be accessed by anyone with access."""
if self.auth_webserver.is_conf_enabled():
if self.is_enabled():
self.auth_webserver.disable()
self.set_shortcut_login_required(False)
def _disable_public_access(self):
"""Allow Gitweb app to be accessed by logged-in users only."""
if self.is_enabled() and not self.auth_webserver.is_conf_enabled():
if self.is_enabled():
self.auth_webserver.enable()
self.set_shortcut_login_required(True)
@ -137,14 +137,7 @@ class GitwebApp(app_module.App):
class GitwebWebserverAuth(Webserver):
"""Component to handle Gitweb authentication webserver configuration."""
def is_conf_enabled(self):
"""Check whether Gitweb authentication configuration is enabled."""
return super().is_enabled()
def is_enabled(self):
"""Return if configuration is enabled or public access is enabled."""
repos = get_repo_list()
return have_public_repos(repos) or super().is_enabled()
is_leader = False
def enable(self):
"""Enable apache configuration only if no public repository exists."""

View File

@ -272,7 +272,7 @@ document.addEventListener('DOMContentLoaded', async () => {
/*
* Text areas showing log lines have special behavior.
*/
document.addEventListener('DOMContentLoaded', function(event) {
document.addEventListener('DOMContentLoaded', function (event) {
const logElements = document.querySelectorAll('textarea.log');
// Scroll the textarea to the bottom so that last lines are visible.
@ -280,3 +280,26 @@ document.addEventListener('DOMContentLoaded', function(event) {
element.scrollTop = element.scrollHeight;
}
});
/*
* Close notifications dropdown when clicking outside, like the other dropdowns.
*/
document.addEventListener('click', function (event) {
// Ignore if notifications dropdown is not open
const notifications = document.querySelector('.notifications');
if (!notifications?.classList.contains('show')) {
return;
}
// Ignore if the click happened inside the notifications area or on the toggle button
const toggles = document.querySelectorAll('[data-bs-target=".notifications"]');
const clickedInsideToggle = Array.from(toggles).some(toggle => toggle.contains(event.target));
if (notifications.contains(event.target) || clickedInsideToggle) {
return;
}
if (typeof bootstrap !== 'undefined' && bootstrap.Collapse) {
let bsCollapse = bootstrap.Collapse.getInstance(notifications);
bsCollapse.hide();
}
});