Merge branch 'develop' into translations
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2023-02-17 10:54:42 +01:00
commit ce969b4061
4 changed files with 19 additions and 7 deletions

View file

@ -1,5 +1,9 @@
## [Unreleased] ## [Unreleased]
## 3.5.2
### Fixed
* add check if menu exists before adding event listeners (#210)
## 3.5.1 ## 3.5.1
### Added ### Added
* add translations (thanks to p-bo adn gallegonovato) * add translations (thanks to p-bo adn gallegonovato)

View file

@ -18,6 +18,8 @@ You can customize colors depending of the theme (Dark theme and Breeze Dark).
You like this app and you want to support me? ☕ [Buy me a coffee](https://www.buymeacoffee.com/deblan) or [Donate with liberapay](https://liberapay.com/deblan) You like this app and you want to support me? ☕ [Buy me a coffee](https://www.buymeacoffee.com/deblan) or [Donate with liberapay](https://liberapay.com/deblan)
## [📘 Read the documentation](https://deblan.gitnet.page/side_menu_doc/)
Requirements Requirements
------------ ------------

View file

@ -32,12 +32,12 @@ Notice
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**. 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/). In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
]]></description> ]]></description>
<version>3.5.1</version> <version>3.5.2</version>
<licence>agpl</licence> <licence>agpl</licence>
<author mail="contact@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author> <author mail="contact@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
<namespace>SideMenu</namespace> <namespace>SideMenu</namespace>
<documentation> <documentation>
<admin>https://gitnet.fr/deblan/side_menu/src/branch/master/README.md</admin> <admin>https://deblan.gitnet.page/side_menu_doc/</admin>
<developer>https://gitnet.fr/deblan/side_menu/src/branch/master/README.md</developer> <developer>https://gitnet.fr/deblan/side_menu/src/branch/master/README.md</developer>
</documentation> </documentation>
<category>customization</category> <category>customization</category>

View file

@ -73,6 +73,10 @@ if ($_['always-displayed']) {
const headerMenuOpener = document.querySelector('#header .side-menu-opener') const headerMenuOpener = document.querySelector('#header .side-menu-opener')
const sideMenuOpener = document.querySelectorAll('#side-menu .side-menu-opener') const sideMenuOpener = document.querySelectorAll('#side-menu .side-menu-opener')
if (!headerMenuOpener) {
return
}
sideMenuFocus = () => { sideMenuFocus = () => {
let a = document.querySelector('.side-menu-app.active a', sideMenu) let a = document.querySelector('.side-menu-app.active a', sideMenu)
@ -174,9 +178,11 @@ if ($_['always-displayed']) {
PageLoader() PageLoader()
<?php endif; ?> <?php endif; ?>
<?php if ($_['opener-position'] === 'before'): ?> if (nextcloud) {
nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud) <?php if ($_['opener-position'] === 'before'): ?>
<?php else: ?> nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud)
nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud.nextSibling) <?php else: ?>
<?php endif; ?> nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud.nextSibling)
<?php endif; ?>
}
})(); })();