Commit Graph

141 Commits

Author SHA1 Message Date
dillard 73dea84d89 fix(config): keep the category cache in the memory cache when available
A cache belongs in Nextcloud's memory cache rather than in the app
config. Use the distributed cache (e.g. Redis) with a one-week TTL when
one is available; Nextcloud falls back to the local cache (APCu) when
only that is configured. Without any memory cache the lazy app config
value stays as the fallback. A leftover app config value is removed
when the categories are stored in the memory cache, and saving the
settings clears both.
2026-09-30 13:26:45 +02:00
dillard 22e87e12ad fix(config): only cache category names in the languages in use
The cache held the category names in all 96 app store languages
(about 49 KB), while an instance typically uses one or two. Keep only
English, the default language and the languages users have set, as the
two-letter codes the lookup uses; on a Dutch instance this is about
1.3 KB.

A user who switches to a language that is not cached yet sees English
names until the cache is refreshed after a week, or right away when an
admin saves the settings. The README mentions this.
2026-09-30 13:17:37 +02:00
dillard ccefefa6f7 fix(config): keep the category cache small and save settings at once
The app store category cache (cache-categories) held the name and
description of every category in every language, about 170 KB, stored
as a regular app config value. Nextcloud loads all regular values of
all apps on every request, so this one value was read on every page
load. It was only refreshed with the "remove cache" button.

- Keep only the category ids and names, store the cache as a lazy
  value so it is only loaded when categories are needed, and refresh
  it after a week.
- Only load the categories where they are used: the menus with
  categories, and the app list when custom categories are set.
- Save all settings in one request to a new admin endpoint, which
  accepts only known settings, then clears the category cache and
  changes the stylesheet cache key. The settings page sent one request
  per setting and reloaded right after; with Nextcloud's short-lived
  local config cache, the reloaded page could show a half-saved
  configuration, so a change sometimes had to be made twice.
2026-09-30 12:01:50 +02:00
Simon Vieille f4833d1956 feat: add search toggle option (fix #509) 2026-09-05 13:06:24 +02:00
Simon Vieille b32e4ded42 fix(app): add compatibility with Nextcloud 34 2026-07-17 18:31:25 +02:00
Simon Vieille c2ecc5bf98 fix(LangRepository): check orm capabilities to query entities 2026-03-01 13:08:26 +01:00
AndyXheli 9ad73c7bf7 Update lib/Controller/JsController.php
Signed-off-by: AndyXheli <andyxheli@gmail.com>
2025-09-20 16:43:41 +02:00
AndyXheli acde24ea71 Update lib/Controller/JsController.php 2025-09-20 16:42:52 +02:00
AndyXheli 8bd89b4565 Update lib/Controller/JsController.php 2025-09-20 16:41:49 +02:00
AndyXheli 58cfbc24af "Refactor Side Menu JsController to Use IAvatarManager via Dependency Injection for Nextcloud 32 Com
🔧 Problem: The Side Menu app was calling OC\Server::getAvatarManager(), which no longer exists in Nextcloud 32.

✅ Fix:

Injected IAvatarManager using Nextcloud’s public API instead of accessing it via OC::$server.

Updated the constructor to accept IAvatarManager, IUserSession, INavigationManager, and IURLGenerator.

Replaced all direct calls to OC::$server->getAvatarManager() and similar with the injected services.

This makes the app compatible with Nextcloud 32 and avoids deprecated internal method calls.

Signed-off-by: AndyXheli <andyxheli@gmail.com>
2025-09-20 16:25:58 +02:00
Simon Vieille cd4b3b1054 fix #349: add custom controller to retrieve core apps 2025-05-04 18:24:32 +02:00
Simon Vieille 4bea4afb07 refactor(Application): add properties types 2025-04-30 12:45:32 +02:00
llaumgui d485b728e7 Use Request object 2025-04-30 09:30:35 +02:00
Monica-Wood 8787918547 Update lib/AppInfo/Application.php
The current change is currently filling the nextcloud logs up with the error:
`Undefined array key \"HTTP_USER_AGENT\" at /srv/www/nextcloud/apps/side_menu/lib/AppInfo/Application.php#109`

This adds a check to ensure the index exists before read it.
2025-04-30 07:31:13 +02:00
Simon Vieille f9aa59ca04 fix #418: allow non admin user to access their settings 2025-04-29 19:21:17 +02:00
Simon Vieille c0eb65547d fix #413: add user-agent check for memories mobile app 2025-04-17 15:15:03 +02:00
Simon Vieille a47a8d6c63 remove route unused route 2025-04-16 19:37:28 +02:00
Simon Vieille cbd8462333 scss: set root vars depending of the theme 2025-04-16 09:16:15 +02:00
Simon Vieille fdd8f8850d add user settings 2025-04-16 09:14:06 +02:00
Simon Vieille 6c4f9120ff format code 2025-04-16 09:13:54 +02:00
Simon Vieille 89ca510897 add categories customization 2025-04-16 09:13:38 +02:00
Simon Vieille f9c3f96919 migrate admin settings 2025-04-16 09:07:10 +02:00
Simon Vieille 52b2d18a03 refactor of menus
begin work on settings
2025-04-16 09:06:34 +02:00
Simon Vieille d8a622ce0f refactoring: update severals components 2025-04-16 09:04:18 +02:00
Simon Vieille 788affe386 fix: add missing NoCSRFRequired import in CssController (#397) 2025-03-12 17:57:49 +01:00
Simon Vieille 214cdaa330 apply lint (php) 2025-03-10 18:45:26 +01:00
Simon Vieille 7ab3269fbe fix(settings): remove non-existing and unused ILogger service 2025-03-10 18:42:12 +01:00
Simon Vieille 44fd4fab52 fix(service): add service constructor arguments 2025-03-10 18:41:09 +01:00
Simon Vieille 3058c225e0 style: apply php linter 2025-03-05 21:55:53 +01:00
Simon Vieille b03a7f7bad refactor(controller): usage of attributes instead of annotations 2025-03-05 21:54:59 +01:00
Simon Vieille 7c5654f3bc add constructor property promotion
add return type of methods
2024-06-27 20:27:31 +02:00
Simon Vieille 05c35b9a63 retrieve tables apps 2024-06-27 20:08:56 +02:00
Simon Vieille 33bb8646f4 release v3.10.2 2023-07-15 15:22:09 +02:00
Simon Vieille b8a5a82fd2 fix #269: use php7 syntax 2023-07-15 14:50:15 +02:00
Vitor Mattos 04af12691c Remove deprecated method
Fix the follow error:

```
Message: Call to undefined method OC_App::getNavigation() in file '/var/www/html/apps-extra/side_menu/lib/Service/AppRepository.php' line 54
```

Reference: https://github.com/nextcloud/server/commit/167763d3125779fc642f7b169389dea029bb73ed

Signed-off-by: Vitor Mattos <vitor@php.rio>
2023-07-10 15:15:41 -03:00
Simon Vieille dd9fbcb654 fix default menu redirect (#257) 2023-06-17 12:59:45 +02:00
Simon Vieille a96e6e3c70 fix default menu redirect (#257) 2023-06-17 12:53:10 +02:00
Simon Vieille 93fef37033 add option to show hovered label only on top menu 2023-05-23 14:09:55 +02:00
Simon Vieille dca727c120 use app href for redirection (fix #244) 2023-04-14 20:58:56 +02:00
Simon Vieille 4258327a70 add 'top-menu-mouse-over-hidden-label' as window property and use it in the AppMenu component 2022-12-26 12:57:07 +01:00
Simon Vieille 37e00c51c3 add the 'top-menu-mouse-over-hidden-label' 2022-12-26 12:56:32 +01:00
Simon Vieille e1797e1e03 split long lines 2022-12-04 13:01:56 +01:00
Simon Vieille 3f04546a6e split long lines 2022-12-04 00:57:17 +01:00
Simon Vieille 0bd1a5baaf split long lines 2022-12-04 00:56:05 +01:00
Simon Vieille 4d05079c70 split long lines 2022-12-04 00:45:29 +01:00
Simon Vieille 053615c2c4 remove this unused "$topMenuAppsOrder" local variable 2022-12-04 00:08:20 +01:00
Simon Vieille a4060c8db7 add possibility to define side_menu as default app and redirect to the first top menu app (#177) 2022-11-20 14:00:26 +01:00
Simon Vieille 0ac55b7ba4 fix #162: top and side app is broken 2022-11-05 15:40:52 +01:00
Simon Vieille 1d06c1b212 fix issue with top and side apps (#162 #159) 2022-11-04 21:43:18 +01:00
Simon Vieille 52d88771d9 add apps sorter is user side (fix #160) 2022-11-04 21:07:44 +01:00