9039 Commits

Author SHA1 Message Date
James Valleroy
e02ffd086c
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-04 20:36:41 -05:00
James Valleroy
8b46fbdd1d
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-04 20:12:32 -05:00
Sunil Mohan Adapa
5cca536765
index: css: Move the 'powered by' logo further down
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:20 -04:00
Sunil Mohan Adapa
5c41a67267
base: Add link to about for unauthenticated users
Since the about page is now public, adding a link to it in the navbar allows the
users to easily discover it and find out about FreedomBox.

Tests:

- In mobile view, the hamburger menu show the icon and text. Link works.

- In desktop mode, only the icon is visible. Link works.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:18 -04:00
Sunil Mohan Adapa
6bb13140e8
index: Remove links and about text and link to about page
- Make a separate image for 'FreedomBox Powered'.

- Link to the now publicly available about page.

Tests:

- Clicking on the new 'Powered' image leads to about page which is available to
logged in and logged out users.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:15 -04:00
Sunil Mohan Adapa
6084b95a65
help: Add all footer links to about page
Fixes: #2464.

- This page will act as replacement for the footer links in the home page.

- Remove link to FreedomBox Foundation and add link to Weblate project. We
already have a donate link to the foundation website.

Tests:

- About page is shown as expected. Old 'Learn more' button is no more. So is the
last paragraph.

- Styling is as expected. All the section have equal width.

- All links work.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:13 -04:00
Sunil Mohan Adapa
62e67c6c99
help: Make about page available to unauthenticated users
- This page will replace the rather large footer in the front page.

Tests:

- Log out. Visit the help about page. It is available without redirection to
login page. Version related alert is not shown.

- Log in. Visit the help about page. It is available. Version related alert is
shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 21:20:10 -04:00
Sunil Mohan Adapa
5db6c46e8b
ui: Remove the border around content container
- The container border is, strictly speaking, no longer required as the background and
content container don't have different styles.

- This makes the mobile and desktop interfaces a lot more similar.

- Don't change any margins and padding for the content container.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 09:25:12 -04:00
Sunil Mohan Adapa
c8c753af29
ui: Remove the noise background
- Update the mediawiki functional tests which were using this image.

- Slightly increase the darkness of the shadow around the cards to compensate
for the loss of the contrast with the noise background.

Tests:

- Re-run mediawiki functional tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-02 09:25:07 -04:00
Sunil Mohan Adapa
6cb51719aa
ui: Move app names below app icons
Fixes: #2418.

- This resolves a issue that icons being misaligned when the name of the app
flows into multiple lines. The increase in size of the card is not very
bothering as long as icons are not still aligning. If the noise background is
removed (to be proposed later), the increased size of the icon is even less
bothering.

- The other options would have been to reflect the increased size of the tile to
neighboring apps in that row (does not seem possible with CSS) or ellipsize the
title when it overflows.

- Redo all the spacing in spacing inside the card to better match the new
layout. The height of the card reduces slightly due this change, which looks
better and closer to other icons grids in other UIs.

Tests:

- In index, apps, and help:index pages, the title has change location. Spacings
are as expected and appealing. System page is unaffected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-01 18:02:21 -04:00
Sunil Mohan Adapa
2d3e6b6cfa
ui: Don't bold titles in card lists
- Making most of text that is read in a page bold is useless. Emphasis should
instead be used for some text that should stand out of the rest of the text.

- The need to make the text bold goes away if the text color is not such a
lighter shade of gray. Reset this to the regular text color.

Tests:

- Observe changes in home, apps, system, and help index pages.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-01 18:02:18 -04:00
Sunil Mohan Adapa
11038b477a
system: Increase the size of items in listing page
Fixes: #2179.

Tests:

- Set language to Magyar (hu). Test that items in the system page are large enough to
accommodate most names/descriptions.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-01 18:02:15 -04:00
Sunil Mohan Adapa
cb5435dacd
ui: Increase the width of app and system listings
- Increase the width of the containers that hold home cards, app cards, system
cards, and help cards. This helps in:

  - Showing system page layout better with wider cards for each item.

  - Showing more apps in the app page. This does not decrease the readability in
  the same way that increasing the size of the paragraph does beyond a certain
  point.

- Also increase the width of the navbar to make it appear consistent.

- Other containers such as content container remain at the same width.
Increasing this width would make a reading a paragraph harder.

- Behavior is mobile layouts is unchanged.

Tests:

- Test that apps, system, home and help views show cards in a wider layout.

- Success/error messages shown in apps, system, home and help views are narrow
and are not effected.

- In home and help:index pages (reached when clicking help icon without JS), the
icons are wide but the content is narrow.

- Individual app pages, confirmation pages, and help pages remain at the older
width.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-11-01 18:02:12 -04:00
Coucouf
6a53458e10
Translated using Weblate (French)
Currently translated at 89.3% (1582 of 1770 strings)
2024-11-01 18:00:27 +01:00
gallegonovato
8a8e5c78e8
Translated using Weblate (Spanish)
Currently translated at 94.5% (1674 of 1770 strings)
2024-11-01 18:00:26 +01:00
Sunil Mohan Adapa
e6fb96b381
backups: Sort list of apps in backup, restore, and schedules
Fixes: #2364

Tests:

- Set language to English. Go to backups -> create. List of apps is sorted
alphabetically and case is ignored. Take a backup.

- Click on restore for the new backup. The list of apps is again sorted
alphabetically and case is ignored.

- Click on schedules. List of apps is sorted and alphabetically and case is
ignored.

- Repeat tests with Spanish locale.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-28 10:14:01 +02:00
Sunil Mohan Adapa
15e9c6cad9
backups: Better explanation for the format of upload file
Fixes: #2115.

Tests:

- Visit the backups upload page. Notice that the new help text is as expected.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-28 09:50:55 +02:00
Sunil Mohan Adapa
d85105a428
middleware: tests: Drop some obsolete mock code
- setup_helper was removed long ago.

Tests:

- Re-run unit tests.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
[vexch: Removed unused global variable setup_helper]
Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
2024-10-28 09:40:49 +02:00
Sunil Mohan Adapa
24382c298c
Translated using Weblate (Norwegian Bokmål)
Currently translated at 64.9% (1150 of 1770 strings)
2024-10-28 00:30:40 +01:00
Ettore Atalan
e4a2a6b9a6
Translated using Weblate (German)
Currently translated at 94.7% (1677 of 1770 strings)
2024-10-27 01:15:46 +02:00
James Valleroy
33b41a66c3
ejabberd: Set mod_mam default to always
This helps various clients to use MAM.

Fixes: #2338

Tests:

- Functional tests for ejabberd pass.

- Install ejabberd and enable MAM. Check that default is set to always
  in the configuration.

- Without this change, install ejabberd and enable MAM. Then restart
  plinth with this change. The configuration is changed from never to
  always. After several minutes, ejabberd is running again.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-24 10:33:38 -07:00
Jiří Podhorecký
a87c3b102e
Translated using Weblate (Czech)
Currently translated at 100.0% (1770 of 1770 strings)
2024-10-24 17:15:48 +02:00
Ettore Atalan
e80bd01de7
Translated using Weblate (German)
Currently translated at 90.4% (1601 of 1770 strings)
2024-10-24 17:15:46 +02:00
Veiko Aasa
df52acc329
users: tests: functional: Check LDAP information is correct after renaming user
Tests performed in stable and testing containers:
  - All the users module tests pass.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-23 21:24:35 -07:00
Veiko Aasa
b67ce15f89
functional tests: Add pytest testinfra plugin
Adds ability to run local commands with functional tests.

By default, commands are run locally. It is possible to set remote
host connection parameters from pytest command line, for example:
`--hosts 'fbx@IP' --ssh-identity-file '.container/ssh/id_ed25519'`

For more options, see documentation
https://testinfra.readthedocs.io/en/latest/backends.html#ssh.

Includes a fixture `host_sudo` to run commands as sudo.

Relates to
https://salsa.debian.org/freedombox-team/freedombox/-/issues/2451#note_530752.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-23 21:24:28 -07:00
Veiko Aasa
f12e634bc9
users: Delete or move home folder when user is deleted or renamed
On user deletion, user's home folder is also deleted. Admins have an
option to avoid deleting user's home by inactivating the user instead.

This commit also removes user deletion buttons from the user's list
page and adds this option to the user edit page. The user's edit form
asks for a confirmation if the user deletion is requested. This change
also means that the confirmation password is now required to delete a user.

Also:
  - Add a simple username validation to the privileged actions.
  - Functional tests: Create a fixture to login as an admin before every test.
  - Functional tests: Add a test to check that SSH passwordless login works
    after user is renamed to validate correct SSH related path permissions.
  - Privileged tests: Add `test_` prefix to the generated random string which
    makes easier to check and cleanup created home folders.
  - Minor quote fixes.

Tests performed in stable and testing containers:
  - Run all the users module tests twice, no failures in tests.
  - When user is the last admin, both "Active" and "Delete user"
    checkboxes are disabled.

Closes #2451.

[sunil]

- Refactor the JS code:

  - Ensure that DOM elements are lookup after DOM content is loaded.

  - Styling changes. Reduce the number of globals, name the global names
  somewhat more unique.

  - Click the button instead of submitting the form to disable the button.

- Template changes:

  - Add a body for the confirmation dialog to talk about disabling the user and
  deleting the home directory.

  - Change the label of the confirm button to make it more
  explicit (recommendation from many UX guides).

  - Styling.

- Functional tests:

  - Fix visibility checking of an element to use the correct splinter API.

  - Simplify clicking the edit user link.

- Minor update to form checkbox help text.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-23 21:13:25 -07:00
Besnik Bleta
0eac9c3260
Translated using Weblate (Albanian)
Currently translated at 99.6% (1764 of 1770 strings)
2024-10-23 07:15:48 +02:00
109247019824
b997703c71
Translated using Weblate (Bulgarian)
Currently translated at 46.4% (823 of 1770 strings)
2024-10-23 07:15:47 +02:00
大王叫我来巡山
7e92d0fdba
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 63.8% (1130 of 1770 strings)
2024-10-23 07:15:46 +02:00
Burak Yavuz
7105c3ce59
Translated using Weblate (Turkish)
Currently translated at 100.0% (1770 of 1770 strings)
2024-10-23 07:15:45 +02:00
James Valleroy
822fcc8f2b
Release v24.22 to unstable
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
v24.22
2024-10-21 20:43:13 -04:00
James Valleroy
30c9609e04
doc: Fetch latest manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 20:42:31 -04:00
James Valleroy
66208dfa2c
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 20:14:41 -04:00
Ihor Hordiichuk
15883150ff
Translated using Weblate (Ukrainian)
Currently translated at 94.2% (1582 of 1678 strings)
2024-10-22 01:16:25 +02:00
Sunil Mohan Adapa
e9adc5ce68
setup: Translate errors when installing/updating/repairing apps
- Currently, we are taking a error string and formatting it before it can be
looked up for translation. This causes the lookups to always fail.

- Don't format the error messages and send them as is. Let the
Operation.translate_message and Notification take care of translation.
Formatting will be them after translation. Set the formatting keys as they need
so that exception string is inserted into the message

Tests:

- Set language to Spanish. Through code changes raise an exception in
bepasty.privileged.setup(). Try to install bepasty app. Setup will fail and
error message will shown. The error message will be localized and formatted with
the patch. This is true in the app error message and in the notification.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 12:47:13 -04:00
Sunil Mohan Adapa
9459ef4be4
middleware: Show translated error messages when operation completes
Tests:

- Change locale to Spanish. Raise an exception in bepasty.privileged.setup().
Try to install bepasty. Without the patch, error is not translated. With the
patch, it is.

- Successful installation of an app shows translated success message.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 12:47:10 -04:00
Sunil Mohan Adapa
fbed7e93e8
operation: Use safe formatter for translating messages
- When an app install fails, there is a small chance that the failure message is
show in the area where operation spinner is shown. If that happens,
operation.translated_message is accessed from the HTML template. This throws an
exception if the error message that made contains excepted formatting keys.
Example:
"{include_once("/var/www/html/config/config.php");print($CONFIG["dbpassword"] ??
""); }".

- Also change the formatting key {exception_message} to {exception} as this
would help in translation when Notification is shown which has {exception} as
data dictionary value.

Tests:

- In the operation update message such as 'Installing app', insert unexpected
formatting strings. 'Installing app {foo}'. Notice the error without the patch
and how the patch fixes it.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 12:47:08 -04:00
Sunil Mohan Adapa
f456a58118
utils: Improve safe formatter by handling more cases
Fixes: #2462.

- When there are field retrievals and subscript based retrievals in the format
string, exceptions are raised. Handle these safely.

- This eliminates are error such as "Notification missing required key during
translation: 'str' object has no attribute 'php");print($CONFIG'". when the
notification message contains
"{include_once("/var/www/html/config/config.php");print($CONFIG["dbpassword"] ??
""); }"

Tests:

- Updated unit tests pass.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 12:47:04 -04:00
Sunil Mohan Adapa
4bde5309c5
nextcloud: Fix install failure due to PrivateTmp=yes
Fixes: #2463.

- When FreedomBox service is run via systemd and if the unit has PrivateTmp=yes
as was recently introduced, then 'podman exec --user www-data' fails with error
'Error: unable to find user www-data: no matching entries in passwd file'.

- The problem seems isolated to this specific instance and does not seem to
effect the container start up (which happens via systemd).

Tests:

- Without the patch, start FreedomBox service via systemd and install Nextcloud.
It fails.

- With the patch, install succeeds and functional tests for Nextcloud succeed.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2024-10-21 11:06:19 -04:00
Sunil Mohan Adapa
7e2b365bac
*: Remove unused imports to fix flake8 errors
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-19 09:32:09 -07:00
Sunil Mohan Adapa
f6fbb2f021
help: tests: Fix tests failing due to tags related changes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-18 19:16:41 -07:00
Sunil Mohan Adapa
6a6382b1a2
ci: Enable showing test failures immediately as they fail
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-17 19:39:56 -07:00
Sunil Mohan Adapa
a63c632496
tests: functional: Add package for printing test failures instantly
- Makes it easy to investigate functional test failures as the test are run.

- This will help functional tests that are timing out before failure stack
traces can be shown.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-17 19:39:53 -07:00
109247019824
5689baf5c0
Translated using Weblate (Bulgarian)
Currently translated at 47.0% (790 of 1678 strings)
2024-10-17 15:16:04 +02:00
Sunil Mohan Adapa
89781c8c88
tags: Localization fixes
- Sort tags in the dropdown using user's locale.

- Fix localized tags being used for filtering. This happens when the application
freshly starts and list_tags() is called using user's non-default locale.

- Avoid using element.textContent in JS. Instead use datasets.

- Add functional test for checking localization issues.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:08:29 -07:00
Sunil Mohan Adapa
3f954f9549
tests: functional: Create utility to set user preferred locale
- Move it from the users app functional tests file.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:08:25 -07:00
Sunil Mohan Adapa
00a5377d9e
tags: js: Minor fixes and refactoring
- Drop changing the history as even without it, back/forward work just fine.

- Drop debouncing as there was a bug that prevented it from working. Since we
have a small number of tags, running the operations immediately seems to work
fine.

- Update incorrect docstring.

- Flatten and isolate the event handlers code further for readability.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:08:13 -07:00
Sunil Mohan Adapa
5ce7385f60
tags: css: Minor styling cleanups
- Use CSS based styling instead of styling based on bootstrap classes.

- Add a placeholder for the input box to easily locate it and convey what it
does.

- Drop dead code for '.tag-input .tag'.

- Drop some repeated data- attributes by using DOM navigation.

- Drop redundant styling.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:08:10 -07:00
Sunil Mohan Adapa
44aab658ed
context_processors: Stop adding unused 'submenu' to context
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:08:07 -07:00
Sunil Mohan Adapa
079b4324f6
help, system: Stop using submenu.sorted_items
- This fixes a regression in showing menu items on the help:index page.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
2024-10-16 21:08:03 -07:00