Compare commits

...

68 commits

Author SHA1 Message Date
4d453676dc
Merge branch 'develop' into translations
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
2026-03-08 19:08:08 +01:00
5cd106640c Merge pull request 'bugfix/issue475-orm' (#476) from bugfix/issue475-orm into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
Reviewed-on: #476
2026-03-01 13:18:24 +01:00
d057cd7665
doc: update changelog
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/security Pipeline was successful
2026-03-01 13:11:26 +01:00
520225603b
fix(admin/*SaveButton): cast settings to string 2026-03-01 13:09:02 +01:00
c2ecc5bf98
fix(LangRepository): check orm capabilities to query entities 2026-03-01 13:08:26 +01:00
8cca320a43
chore: set side_menu as package name 2026-03-01 13:07:07 +01:00
19aaf0759b Merge pull request 'chore: app version' (#473) from feature/nc33 into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
Reviewed-on: #473
2026-02-27 09:18:16 +01:00
47a83f10cc
chore: app version
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2026-02-27 09:17:46 +01:00
e1a191121d Merge pull request 'chore: add compatibility with NC33' (#471) from feature/nc33 into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
Reviewed-on: #471
2026-02-27 09:16:32 +01:00
54f4dce09b
chore: add compatibility with NC33
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2026-02-27 09:16:02 +01:00
c0aaa206ed Merge pull request 'bugfix/issue468-logo' (#469) from bugfix/issue468-logo into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
Reviewed-on: #469
2026-02-16 11:52:40 +01:00
0124336558
doc: update changelog
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/security Pipeline was successful
2026-02-16 10:12:09 +01:00
5ccb56309a
fix #468: force nextcloud logo display css rule (opener-only) 2026-02-16 10:09:31 +01:00
be68f2ef55
fix(doc): fix curl cmd
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-10-29 17:48:09 +01:00
1bf9cee8d6 Merge pull request 'bugfix/build' (#446) from bugfix/build into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/tag/build Pipeline was successful
ci/woodpecker/tag/security Pipeline was successful
ci/woodpecker/tag/publish Pipeline was successful
Reviewed-on: #446
2025-09-29 00:19:56 +02:00
403a7a72fb
update changelog
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-09-29 00:18:55 +02:00
81ae76cdb7
build: add package-lock.json
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
2025-09-29 00:17:57 +02:00
32e5ecda8f
ci: rollback node to v20 2025-09-29 00:12:56 +02:00
de98967da5
ci: upgrade node to v22
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/tag/build Pipeline was successful
ci/woodpecker/tag/security Pipeline was successful
ci/woodpecker/tag/publish Pipeline was successful
2025-09-28 23:50:10 +02:00
f39f3b3aef
Merge branch 'translations' into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
ci/woodpecker/tag/build Pipeline was successful
ci/woodpecker/tag/security Pipeline was successful
ci/woodpecker/tag/publish Pipeline was successful
2025-09-28 19:49:28 +02:00
ce39df6c2d
update changelog 2025-09-28 19:47:42 +02:00
bc94b61c12
Merge branch 'translations' into develop 2025-09-28 19:46:14 +02:00
c54c969824
release v5.1.2
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-09-28 19:43:27 +02:00
e828a914cf Merge pull request '"Refactor Side Menu JsController to Use IAvatarManager via Dependency Injection for Nextcloud 32 Com' (#442) from AndyXheli/side_menu:develop into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
Reviewed-on: #442
2025-09-28 19:40:50 +02:00
9ad73c7bf7 Update lib/Controller/JsController.php
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/security Pipeline was successful
Signed-off-by: AndyXheli <andyxheli@gmail.com>
2025-09-20 16:43:41 +02:00
acde24ea71 Update lib/Controller/JsController.php
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-09-20 16:42:52 +02:00
8bd89b4565 Update lib/Controller/JsController.php
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-09-20 16:41:49 +02:00
58cfbc24af "Refactor Side Menu JsController to Use IAvatarManager via Dependency Injection for Nextcloud 32 Com
All checks were successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/security Pipeline was successful
🔧 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
d9051304c8
Merge branch 'translations' into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
2025-05-26 18:48:38 +02:00
yurtpage
95d7c1f0c7
Translated using Weblate (Slovak)
Currently translated at 52.2% (57 of 109 strings)

Translation: Custom menu/Application
Translate-URL: https://translate.codeberg.org/projects/custom-menu/application/sk/
2025-05-26 18:45:36 +02:00
yurtpage
c6fe0db0b6
Translated using Weblate (Russian)
Currently translated at 100.0% (111 of 111 strings)

Translation: Custom menu/Application
Translate-URL: https://translate.codeberg.org/projects/custom-menu/application/ru/
2025-05-26 18:45:35 +02:00
Outbreak2096
3fbfd36cba
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (111 of 111 strings)

Translation: Custom menu/Application
Translate-URL: https://translate.codeberg.org/projects/custom-menu/application/zh_Hans/
2025-05-26 18:45:35 +02:00
70a3fefb3d
Translated using Weblate (French)
Currently translated at 100.0% (111 of 111 strings)

Translation: Custom Menu/Application
Translate-URL: https://translate.gitnet.fr/projects/custom-menu/application/fr/
2025-05-26 18:45:35 +02:00
3f16a674e6
release v5.1.1
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/security Pipeline was successful
2025-05-23 09:02:11 +02:00
782faf6add
update changelog
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
2025-05-04 18:34:29 +02:00
92d15d161b Merge pull request 'fix #349: add custom controller to retrieve core apps' (#431) from bugfix/issue349-components-apps into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
Reviewed-on: #431
2025-05-04 18:31:36 +02:00
cd4b3b1054
fix #349: add custom controller to retrieve core apps
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-05-04 18:24:32 +02:00
f58dedf553
fix(build): define appName to fix this error: "The '@nextcloud/vue' library was used without setting / replacing the 'appName'"
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
2025-05-04 13:11:05 +02:00
8c6f0ad1da
release v5.1.0
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/tag/build Pipeline was successful
ci/woodpecker/tag/security Pipeline was successful
ci/woodpecker/tag/publish Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/security Pipeline was successful
2025-04-30 13:01:22 +02:00
7485a5b349 Merge pull request 'fix #425: allow to set a color using hex code' (#427) from feature/issue425-colorpicker into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
Reviewed-on: #427
2025-04-30 13:00:29 +02:00
b0e01c2eec
update changelog
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/security Pipeline was successful
2025-04-30 12:57:49 +02:00
d2730afe9f
fix #425: allow to set a color using hex code
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
2025-04-30 12:57:13 +02:00
33ab7dff97
update changelog
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
2025-04-30 12:50:51 +02:00
0da550e3eb Merge pull request 'Use Request object' (#426) from llaumgui-develop into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
Reviewed-on: #426
2025-04-30 12:47:23 +02:00
4bea4afb07
refactor(Application): add properties types
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-04-30 12:45:32 +02:00
d485b728e7 Use Request object
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-04-30 09:30:35 +02:00
8772504b76
release v5.0.3
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
ci/woodpecker/tag/build Pipeline is pending approval
ci/woodpecker/tag/publish Pipeline is pending approval
ci/woodpecker/tag/security Pipeline is pending approval
2025-04-30 08:41:10 +02:00
75bea4be38 Merge pull request 'Update lib/AppInfo/Application.php' (#421) from Monica-Wood/side_menu:http_user_agent_check_patch into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
Reviewed-on: #421
Reviewed-by: Simon Vieille <contact@deblan.fr>
2025-04-30 08:37:15 +02:00
8787918547 Update lib/AppInfo/Application.php
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
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
1fcbd89d19
release v5.0.2
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/security Pipeline was successful
2025-04-29 19:26:07 +02:00
f177340b13
update changelog
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
2025-04-29 19:24:04 +02:00
aaa7afac51 Merge pull request 'fix #418: allow non admin user to access their settings' (#419) from bugfix/issue418-userconfigaccess into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
Reviewed-on: #419
2025-04-29 19:23:27 +02:00
fd4628d209
update changelog
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-04-29 19:22:25 +02:00
f9aa59ca04
fix #418: allow non admin user to access their settings 2025-04-29 19:21:17 +02:00
95e4ef136e Merge pull request 'fix #413: add user-agent check for memories mobile app' (#414) from bugfix/issues413-memories into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
Reviewed-on: #414
2025-04-18 10:36:15 +02:00
c0eb65547d
fix #413: add user-agent check for memories mobile app
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/security Pipeline was successful
2025-04-17 15:15:03 +02:00
29d061c379
update readme
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
2025-04-17 08:48:14 +02:00
8e22d9ea62 Merge pull request 'bugfix/standard-menu-mobile' (#411) from bugfix/standard-menu-mobile into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
Reviewed-on: #411
2025-04-17 00:04:48 +02:00
8957f1ae78
update app info
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-04-17 00:03:04 +02:00
7b4b447754
fix(StandardMenu): appLimit must return a value > 0 2025-04-17 00:02:47 +02:00
e297a27f83
fix(build): remove css directory
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-04-16 20:09:45 +02:00
3f6ce2df34
fix(build): remove css directory
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-04-16 20:03:21 +02:00
15cc6a129b Merge pull request 'migration from vue2 to vue3' (#405) from feature/vue3 into develop
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
Reviewed-on: #405
2025-04-16 19:56:02 +02:00
174c80e654
update changelog
Some checks are pending
ci/woodpecker/push/build Pipeline is pending approval
ci/woodpecker/push/security Pipeline is pending approval
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
2025-04-16 19:55:07 +02:00
17f1d91851
upgrade app version
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/security Pipeline was successful
2025-04-16 19:46:51 +02:00
cdad60ca7a
update changelog 2025-04-16 19:46:40 +02:00
94efc26cd5
update screenshots 2025-04-16 19:39:51 +02:00
a47a8d6c63
remove route unused route 2025-04-16 19:37:28 +02:00
21 changed files with 8338 additions and 85 deletions

4
.gitignore vendored
View file

@ -2,8 +2,4 @@
/node_modules
/l10n/*
/releases
/package-lock.json
!/l10n/.gitkeep
/yarn*.log
/src/admin.js.bk
/templates/settings/admin-form.php.bk

View file

@ -32,7 +32,7 @@ steps:
- echo "$APP_CERTIFICATE" > "/tmp/side_menu.key"
- echo "$APP_PUBLIC_CERTIFICATE" > "/tmp/side_menu.crt"
- mkdir /tmp/app
- cp -r README.md CHANGELOG.md appinfo css lib img l10n js src templates screenshots vendor /tmp/app
- cp -r README.md CHANGELOG.md appinfo lib img l10n js src templates screenshots vendor /tmp/app
- /usr/src/nextcloud/occ integrity:sign-app
--privateKey=/tmp/side_menu.key
--certificate=/tmp/side_menu.crt

View file

@ -1,5 +1,70 @@
## [Unreleased]
## 5.2.1
### Added
- chore: set side_menu as package name
### Fixed
- fix(LangRepository): check orm capabilities to query entities
- fix(admin/\*SaveButton): cast settings to string
## 5.2.0
### Added
* add compatibility with NC33
### Fixed
* fix #468: force nextcloud logo display css rule (opener-only)
## 5.1.3
### Fixed
- fix #445: fix build by adding package-lock.json
## 5.1.2
### Added
* add new translations
### Fixed
* fix #441: Side bar not working with Nextcloud 32 (thanks to AndyXheli)
## 5.1.1
### Fixed
* fix(build): define appName to fix this error: "The `@nextcloud/vue` library was used without setting / replacing the `appName`"
* fix #349: add custom controller to retrieve core apps
## 5.1.0
### Added
* fix #425: allow to set a color using hex code
### Fixed
* #422: usage of `OC\AppFramework\Http\Request` instead of `$_SERVER`
## 5.0.3
### Fixed
* fix #422: undefined array key "HTTP_USER_AGENT"
## 5.0.2
### Fixed
* fix #413: add user-agent check for memories mobile app
* fix #418: allow non admin user to access their settings
## 5.0.1
### Fixed
* fix(StandardMenu): appLimit must return a value > 0
## 5.0.0
### Fixed
* fix apps's order in the standard menu
### Added
* add new translations
* add route `/apps/side_menu/user/config`
* add new UI for admin and personals settings
### Changed
* migrate to Vue 3 and so add/update or remove dependencies
* replace CSS with SCSS
* remove route `/apps/side_menu/js/script`
* remove generated Javascript using PHP
* rewrite the standard menu of Nextcloud
### Security
* fix CVE-2023-44270
* fix CVE-2024-9506
* fix CVE-2024-6783
## 4.1.1
### Fixed
* fix(CssController): add missing NoCSRFRequired import (#397)
@ -155,7 +220,7 @@
## 3.5.1
### Added
* add translations (thanks to p-bo adn gallegonovato)
* add translations (thanks to p-bo and gallegonovato)
### Fixed
* fix #189: sorting not applied on mobile

View file

@ -20,7 +20,7 @@ release:
test -d $$RELEASE_DIRECTORY/$$VERSION && rm -fr $$RELEASE_DIRECTORY/$$VERSION
mkdir -p $$RELEASE_DIRECTORY/$$VERSION/side_menu
cp -r README.md CHANGELOG.md appinfo css lib img l10n js src templates screenshots vendor $$RELEASE_DIRECTORY/$$VERSION/side_menu
cp -r README.md CHANGELOG.md appinfo lib img l10n js src templates screenshots vendor $$RELEASE_DIRECTORY/$$VERSION/side_menu
cd $$RELEASE_DIRECTORY/$$VERSION
zip -r side_menu_v$$VERSION.zip side_menu
tar cvzf side_menu_v$$VERSION.tar.gz side_menu

View file

@ -24,8 +24,7 @@ You like this app and you want to support me? ☕ [Buy me a coffee](https://www.
Requirements
------------
* PHP >= 8.0
* App `theming` enabled
* PHP >= 8.1
Installation and upgrade
------------------------
@ -41,7 +40,7 @@ If you want to install it from source, go to https://gitnet.fr/deblan/side_menu/
```
$ cd /path/to/nextcloud/apps
$ curl -sS https://gitnet.fr/attachments/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | tar xvfz -
$ VERSION=x.y.z; curl -sS "https://gitnet.fr/deblan/side_menu/releases/download/${VERSION}/side_menu_v${VERSION}.tar.gz" | tar xvfz -
```
Administrators can edit many settings using the administration page.

View file

@ -10,14 +10,13 @@ This application is rather suitable for instances that activate a lot of applica
Use the shortcut `Ctrl`+`o` to open and to hide the side menu. Use `tab` to navigate.
You can customize colors depending of the theme (Dark theme and Breeze Dark).
You can customize colors depending of the theme.
You can report a bug or request a feature by opening an issue.
To report a bug or request a feature, please open an issue.
Requirements:
* PHP >= 8.1
* App `theming` enabled
If you like this application and if you want to support the development:
@ -31,7 +30,7 @@ Notice
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**.
In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
]]></description>
<version>4.1.1</version>
<version>5.2.1</version>
<licence>agpl</licence>
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
<namespace>SideMenu</namespace>
@ -54,7 +53,7 @@ In case of downtime, you can download **Custom Menu** from [here](https://kim.de
<screenshot><![CDATA[https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png]]></screenshot>
<dependencies>
<php min-version="8.1" max-version="8.4" />
<nextcloud min-version="30" max-version="32"/>
<nextcloud min-version="31" max-version="33"/>
</dependencies>
<settings>
<admin>OCA\SideMenu\Settings\Admin</admin>

View file

@ -2,8 +2,9 @@
namespace OCA\SideMenu\AppInfo;
use OC;
use OC\AllConfig;
use OC\App\AppStore\Fetcher\CategoryFetcher;
use OC\AppFramework\Http\Request;
use OC\Security\CSP\ContentSecurityPolicyNonceManager;
use OC\User\User;
use OCA\SideMenu\Service\AppRepository;
@ -31,23 +32,12 @@ use Psr\Container\ContainerInterface;
class Application extends App implements IBootstrap
{
public const APP_ID = 'side_menu';
public const APP_NAME = 'Custom menu';
/**
* @var OC\AllConfig
*/
protected $config;
/**
* @var ContentSecurityPolicyNonceManager
*/
protected $cspnm;
/**
* @var User
*/
protected $user;
protected AllConfig $config;
protected ContentSecurityPolicyNonceManager $cspnm;
protected Request $request;
protected ?User $user = null;
public function __construct(array $urlParams = [])
{
@ -96,6 +86,7 @@ class Application extends App implements IBootstrap
$this->config = \OC::$server->getConfig();
$this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
$this->user = \OC::$server[IUserSession::class]->getUser();
$this->request = \OC::$server->getRequest();
if (!$this->isEnabled()) {
return;
@ -106,6 +97,10 @@ class Application extends App implements IBootstrap
protected function isEnabled(): bool
{
if (isset($this->request->server['HTTP_USER_AGENT']) && preg_match('/MemoriesNative/', $this->request->server['HTTP_USER_AGENT'])) {
return false;
}
$enabled = true;
$isForced = (bool) $this->config->getAppValue(self::APP_ID, 'force', '0');
@ -128,7 +123,6 @@ class Application extends App implements IBootstrap
protected function addAssets()
{
Util::addScript(self::APP_ID, 'side_menu-menu');
// Util::addStyle(self::APP_ID, 'sideMenu');
$assets = [
'stylesheet' => [
@ -139,14 +133,6 @@ class Application extends App implements IBootstrap
'rel' => 'stylesheet',
],
],
// 'script' => [
// 'route' => 'side_menu.Js.script',
// 'type' => 'script',
// 'route_attr' => 'src',
// 'attr' => [
// 'nonce' => $this->cspnm->getNonce(),
// ],
// ],
];
$cache = $this->config->getAppValue(self::APP_ID, 'cache', '0');

View file

@ -0,0 +1,74 @@
<?php
/**
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace OCA\SideMenu\Controller;
use OCA\SideMenu\Service\AppRepository;
use OCA\SideMenu\Service\ConfigProxy;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
use OCP\IUserSession;
class CoreController extends Controller
{
public function __construct(
string $appName,
IRequest $request,
protected ConfigProxy $config,
protected AppRepository $appRepository,
) {
parent::__construct($appName, $request);
}
#[NoCSRFRequired]
#[NoAdminRequired]
#[PublicPage]
#[FrontpageRoute(verb: 'GET', url: '/core/apps')]
public function items(): JSONResponse
{
$user = \OC::$server[IUserSession::class]->getUser();
$items = [];
if (!$user) {
return new JSONResponse([
'items' => $items,
]);
}
$apps = $this->appRepository->getOrderedApps($user);
$keys = ['id', 'name', 'category', 'href', 'icon'];
foreach ($apps as &$app) {
foreach ($app as $key => $value) {
if (!in_array($key, $keys)) {
unset($app[$key]);
}
}
}
return new JSONResponse([
'items' => $apps,
]);
}
}

View file

@ -20,7 +20,6 @@
namespace OCA\SideMenu\Controller;
use OC\User\User;
use OCA\SideMenu\AppInfo\Application;
use OCA\SideMenu\Service\ConfigProxy;
use OCA\Theming\ThemingDefaults;
use OCP\AppFramework\Controller;
@ -29,10 +28,12 @@ use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IRequest;
use OCP\IUserSession;
use OCP\L10N\IFactory;
use OCP\IAvatarManager;
use OCP\INavigationManager;
use OCP\IURLGenerator;
class JsController extends Controller
{
@ -44,26 +45,13 @@ class JsController extends Controller
protected ConfigProxy $config,
protected ThemingDefaults $themingDefaults,
protected IFactory $l10nFactory,
protected IAvatarManager $avatarManager,
protected IUserSession $userSession,
protected INavigationManager $navigationManager,
protected IURLGenerator $urlGenerator,
) {
parent::__construct($appName, $request);
$this->themingDefaults = $themingDefaults;
$this->user = \OC::$server[IUserSession::class]->getUser();
$this->config = $config;
$this->l10nFactory = $l10nFactory;
}
#[NoCSRFRequired]
#[NoAdminRequired]
#[PublicPage]
#[FrontpageRoute(verb: 'GET', url: '/js/script')]
public function script(): TemplateResponse
{
$response = new TemplateResponse(Application::APP_ID, 'js/script', $this->getConfig(), 'blank');
$response->addHeader('Content-Type', 'text/javascript');
return $response;
$this->user = $this->userSession->getUser();
}
#[NoCSRFRequired]
@ -111,25 +99,25 @@ class JsController extends Controller
$targetBlankApps = $userTargetBlankApps;
}
$isAvatarSet = \OC::$server->getAvatarManager()->getAvatar($this->user->getUid())->exists();
$isAvatarSet = $this->avatarManager->getAvatar($this->user->getUID())->exists();
if ($useAvatar && $isAvatarSet) {
$avatar = \OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', [
'userId' => $this->user->getUid(),
$avatar = $this->urlGenerator->linkToRoute('core.avatar.getAvatar', [
'userId' => $this->user->getUID(),
'size' => 128,
'v' => $this->config->getUserValueInt($this->user, 'avatar', 'version', 0),
]);
}
if ($this->config->getAppValueBool('show-settings', '0')) {
$settingsNav = \OC::$server->getNavigationManager()->getAll('settings');
$settingsNav = $this->navigationManager->getAll('settings');
if (isset($settingsNav['settings'])) {
$settings = [
'href' => $settingsNav['settings']['href'],
'name' => $settingsNav['settings']['name'],
'avatar' => \OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', [
'userId' => $this->user->getUid(),
'avatar' => $this->urlGenerator->linkToRoute('core.avatar.getAvatar', [
'userId' => $this->user->getUID(),
'size' => 32,
'v' => $this->config->getUserValueInt($this->user, 'avatar', 'version', 0),
]),
@ -138,7 +126,7 @@ class JsController extends Controller
}
}
$indexUrl = \OC::$server->getURLGenerator()->linkTo('', 'index.php');
$indexUrl = $this->urlGenerator->linkTo('', 'index.php');
return [
'opener-position' => $this->config->getAppValue('opener-position', 'before'),

View file

@ -98,6 +98,7 @@ class PersonalSettingController extends Controller
}
#[NoCSRFRequired]
#[NoAdminRequired]
#[FrontpageRoute(verb: 'GET', url: '/user/config')]
public function configuration(): JSONResponse
{

View file

@ -30,7 +30,12 @@ class LangRepository
->from('preferences')
;
// Nextcloud >=33+
if (method_exists($qb, 'executeQuery')) {
$stmt = $qb->executeQuery();
} else {
$stmt = $qb->execute();
}
$langs = ['en'];

8133
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 KiB

After

Width:  |  Height:  |  Size: 223 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 246 KiB

Before After
Before After

View file

@ -73,10 +73,10 @@ const save = async () => {
if (Array.isArray(value) || typeof value === 'object') {
value = JSON.stringify(value)
} else if (typeof value === 'boolean') {
value = value ? 1 : 0
value = value ? '1' : '0'
}
OCP.AppConfig.setValue('side_menu', key, value, {
OCP.AppConfig.setValue('side_menu', key, value.toString(), {
success() {
update()
},

View file

@ -69,11 +69,11 @@ const save = async () => {
if (Array.isArray(value) || typeof value === 'object') {
value = JSON.stringify(value)
} else if (typeof value === 'boolean') {
value = value ? 1 : 0
value = value ? '1' : '0'
}
formData.push('name=' + encodeURIComponent(key))
formData.push('value=' + encodeURIComponent(value))
formData.push('value=' + encodeURIComponent(value.toString()))
fetch(url, {
method: 'POST',

View file

@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<template>
<NcColorPicker
v-model="model"
:advancedFields="true"
class="cm-settings-form-colorpicker"
>
<div

View file

@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:data-app-id="app.id"
class="app-menu-entry"
:class="{
'app-menu-entry__active': app.active,
'app-menu-entry__active': app.id === activeApp,
'app-menu-entry__hidden-label': hiddenLabels === 1,
'app-menu-main__show-hovered': hiddenLabels === 2,
}"
@ -44,7 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:class="{ 'has-unread': app.unread > 0 }"
:aria-label="app.name"
:target="targetBlankApps.indexOf(app.id) !== -1 ? '_blank' : undefined"
:aria-current="app.active ? 'page' : false"
:aria-current="app.id === activeApp ? 'page' : false"
>
<img
:src="app.icon"
@ -69,7 +69,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
v-for="app in popoverAppList"
:key="app.id"
:aria-label="app.name"
:aria-current="app.active ? 'page' : false"
:aria-current="app.id === activeApp ? 'page' : false"
:href="app.href"
:style="makeStyle(app)"
class="cm-standardmenu-app-menu-popover-entry app-menu-popover-entry"
@ -101,6 +101,7 @@ import { ref, onMounted } from 'vue'
import { useConfigStore } from '../store/config.js'
import { useNavStore } from '../store/nav.js'
import { NcActions, NcActionLink } from '@nextcloud/vue'
import { getActiveAppId } from '../lib/app.js'
const navStore = useNavStore()
const configStore = useConfigStore()
@ -112,6 +113,7 @@ const topMenuApps = ref([])
const appsOrder = ref([])
const mainAppList = ref([])
const popoverAppList = ref([])
const activeApp = ref(null)
let resizeTimeout = null
const setApps = (value) => {
@ -142,7 +144,7 @@ const appLimit = () => {
})
}
return Math.floor((body.offsetWidth - size) / 70)
return Math.max(0, Math.floor((body.offsetWidth - size) / 70))
}
const makeStyle = (app) => {
@ -158,6 +160,11 @@ const computeLists = () => {
popoverAppList.value = appList.value.slice(appLimit()).sort((a, b) => a.order - b.order)
}
const reComputeLists = (delay) => {
window.clearTimeout(resizeTimeout)
resizeTimeout = window.setTimeout(computeLists, delay || 100)
}
onMounted(async () => {
const config = await configStore.getConfig()
@ -165,14 +172,12 @@ onMounted(async () => {
hiddenLabels.value = config['top-menu-mouse-over-hidden-label']
topMenuApps.value = config['top-menu-apps']
appsOrder.value = config['apps-order']
activeApp.value = getActiveAppId()
ready.value = true
setApps(await navStore.getCoreApps())
window.addEventListener('resize', () => {
window.clearTimeout(resizeTimeout)
resizeTimeout = window.setTimeout(computeLists, 100)
})
window.addEventListener('resize', reComputeLists)
})
</script>

View file

@ -41,10 +41,7 @@ export const useNavStore = defineStore('nav', () => {
async function getCoreApps() {
if (coreApps == null) {
coreApps = await axios
.get(generateOcsUrl('core/navigation', 2) + '/apps?format=json')
.then((response) => response.data)
.then((value) => value.ocs.data)
coreApps = await await axios.get(generateUrl('/apps/side_menu/core/apps')).then((response) => response.data.items)
}
return coreApps

View file

@ -38,7 +38,7 @@ body[data-theme-light], body[data-theme-light-highcontrast] {
<?php if ($_['opener-only']) { ?>
#nextcloud {
display: none;
display: none !important;
}
<?php } ?>

View file

@ -77,6 +77,10 @@ module.exports = {
new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
}),
new webpack.DefinePlugin({
appName: JSON.stringify(appName),
}),
],
resolve: {