diff --git a/.woodpecker.yml b/.woodpecker.yml index 34f13eb..47a4044 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,78 +1,47 @@ pipeline: dependencies: - image: node:16 - pull: true + image: gitnet.fr/deblan/devenv commands: - - npm i + - make dep when: event: [tag, push, pull_request] - branch: [master, develop, feature/*, fix/*, translations] + branch: [master, develop, feature/*, translations] - osv-detector: - image: gitnet.fr/deblan/osv-detector:v0.10 + osv_detector: + image: gitnet.fr/deblan/docker-osv-detector:v0.9 commands: - osv-detector package-lock.json failure: ignore - build-js: - image: node:16 + build: + image: gitnet.fr/deblan/devenv commands: - - npm run build + - make build when: - branch: [master, develop, feature/*, fix/*, translations] - event: [tag, push, pull_request] + branch: [master, develop, feature/*, translations] + event: [push, pull_request] - build-translations: - image: deblan/php:8.0 + code_quality: + image: sonarsource/sonar-scanner-cli + secrets: [sonar_token, sonar_host, sonar_project] commands: - - php bin/generate_l10n.php + - sonar-scanner + -Dsonar.projectKey=$SONAR_PROJECT + -Dsonar.sources=. + -Dsonar.host.url=$SONAR_HOST + -Dsonar.pullrequest.key=$CI_COMMIT_PULL_REQUEST + -Dsonar.pullrequest.branch=$CI_COMMIT_SOURCE_BRANCH + -Dsonar.pullrequest.base=$CI_COMMIT_TARGET_BRANCH + failure: ignore when: - branch: [master, develop, feature/*, fix/*, translations] - event: [tag, push, pull_request] + event: [pull_request] - create-signature: - image: nextcloud:25 - secrets: [app_certificate, app_public_certificate] - environment: - SQLITE_DATABASE: /var/www/data/data.db - NEXTCLOUD_ADMIN_USER: admin - NEXTCLOUD_ADMIN_PASSWORD: admin - commands: - - 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 - - /usr/src/nextcloud/occ integrity:sign-app - --privateKey=/tmp/side_menu.key - --certificate=/tmp/side_menu.crt - --path=/tmp/app - - mv /tmp/app/appinfo/signature.json appinfo/ - when: - event: [tag] - - # check-code-quality: - # image: sonarsource/sonar-scanner-cli - # secrets: [sonar_token, sonar_host, sonar_project] - # commands: - # - sonar-scanner - # -Dsonar.projectKey=$SONAR_PROJECT - # -Dsonar.sources=. - # -Dsonar.host.url=$SONAR_HOST - # -Dsonar.pullrequest.key=$CI_COMMIT_PULL_REQUEST - # -Dsonar.pullrequest.branch=$CI_COMMIT_SOURCE_BRANCH - # -Dsonar.pullrequest.base=$CI_COMMIT_TARGET_BRANCH - # failure: ignore - # when: - # event: [pull_request] - - create-package: - image: deblan/php:8.0 + package: + image: gitnet.fr/deblan/devenv volumes: - /var/www/html/artifacts:/var/www/html/artifacts secrets: [app_certificate] commands: - - apt-get update - - apt-get install -y zip make - mkdir -p "$HOME/.nextcloud/certificates" - echo "$APP_CERTIFICATE" > "$HOME/.nextcloud/certificates/side_menu.key" - export VERSION=$(grep "" appinfo/info.xml | grep -o "[0-9]*\.[0-9]*\.[0-9]*" --color=never) @@ -81,7 +50,7 @@ pipeline: when: event: [tag] - push-release: + release: image: plugins/gitea-release volumes: - /var/www/html/artifacts:/var/www/html/artifacts diff --git a/CHANGELOG.md b/CHANGELOG.md index d59a7d6..c979fe2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,39 +1,5 @@ ## [Unreleased] -## 3.9.1 -### Fixed -* fix fixed menu on dashboard (#262) - -## 3.9.0 -### Added -* add compatibility with NC27 -### Fixed -* fix app redirect (#261) - -## 3.8.0 -### Added -* add option to show hovered label only on top menu (fix #253) - -## 3.7.4 -### Fixed -* fix Integrity failed (#247) - -## 3.7.3 -### Fixed -* fix #244: use app href for redirection -### Added -* add signature on build - -## 3.7.2 -### Added -* update pipeline conditions allowing `fix/*` -### Fixed -* fix #233: load configuration and then retrieve apps in default side menu display - -## 3.7.1 -### Fixed -* fix build process (#230) - ## 3.7.0 ### Added * add translations (thanks to AHOHNMYC) diff --git a/Makefile b/Makefile index e5b6267..783bb6a 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ dep: npm link @nextcloud/vue || sudo npm link @nextcloud/vue .ONESHELL: -release: +release: build translations if [ -z "$$VERSION" ]; then echo "VERSION required" exit 1 diff --git a/README.md b/README.md index bf8abbb..449bc17 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,6 @@ [![Build Status](https://ci.gitnet.fr/api/badges/deblan/side_menu/status.svg)](https://ci.gitnet.fr/deblan/side_menu) [![Translations](https://translate.codeberg.org/widgets/custom-menu/-/application/svg-badge.svg)](https://translate.codeberg.org/engage/custom-menu/) -![Downloads](https://img.shields.io/badge/dynamic/json?color=brightgreen&label=downloads&query=%24.K_downloads&suffix=K&url=https%3A%2F%2Fapi-side-menu.deblan.org%2Fdownloads.php) Allows you to modify the position of the main menu by creating a panel on the left of the interface or with a big menu on the top. You can also add and sort custom categories, define apps that must be displayed in the top menu, etc. Fully customisable. diff --git a/appinfo/info.xml b/appinfo/info.xml index 4acf6f4..fc48124 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -32,7 +32,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/). ]]> - 3.9.1 + 3.7.0 agpl Simon Vieille SideMenu @@ -54,7 +54,7 @@ In case of downtime, you can download **Custom Menu** from [here](https://kim.de https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_big_menu.png https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png - + diff --git a/css/sideMenu.css b/css/sideMenu.css index 7fc71a2..7224803 100644 --- a/css/sideMenu.css +++ b/css/sideMenu.css @@ -239,23 +239,14 @@ left: 50px; } -.side-menu-always-displayed #header { - position: absolute !important; -} - .side-menu-always-displayed #side-menu { display: block; } .side-menu-always-displayed .side-menu-apps-list { - height: 100vh; - top: 0; - overflow: hidden; -} - -.side-menu-always-displayed .side-menu-apps-list--with-settings { height: calc(100vh - 49px); top: 49px; + overflow: hidden; } .side-menu-always-displayed .side-menu-apps-list:hover { diff --git a/lib/Controller/AppController.php b/lib/Controller/AppController.php index 588911f..83a0e8c 100644 --- a/lib/Controller/AppController.php +++ b/lib/Controller/AppController.php @@ -74,37 +74,33 @@ class AppController extends Controller $inTopMenuApps = in_array($app['id'], $topMenuApps); $inHiddenApps = in_array($app['id'], $hiddenApps); - if (!$inTopMenuApps && $inHiddenApps) { + if (!$inTopMenuApps || $inHiddenApps) { continue; } - return $this->redirectToApp($app, true); + return $this->redirectToApp($app['id']); } return $this->redirectToApp('files'); } - protected function redirectToApp($app, bool $isHref = false): RedirectResponse + protected function redirectToApp($appId): RedirectResponse { - if (!$isHref) { - $isIgnoreFrontController = true === OC::$server->getConfig()->getSystemValue( - 'htaccess.IgnoreFrontController', - false - ); + $isIgnoreFrontController = true === OC::$server->getConfig()->getSystemValue( + 'htaccess.IgnoreFrontController', + false + ); - $isFrontControllerActive = 'true' === getenv('front_controller_active'); + $isFrontControllerActive = 'true' === getenv('front_controller_active'); - if ($isIgnoreFrontController || $isFrontControllerActive) { - $path = '/apps/%s/'; - } else { - $path = '/index.php/apps/%s/'; - } - - $url = $this->urlGenerator->getAbsoluteURL(sprintf($path, $app)); + if ($isIgnoreFrontController || $isFrontControllerActive) { + $path = '/apps/%s/'; } else { - $url = $app['href']; + $path = '/index.php/apps/%s/'; } + $url = $this->urlGenerator->getAbsoluteURL(sprintf($path, $appId)); + return new RedirectResponse($url); } } diff --git a/lib/Controller/JsController.php b/lib/Controller/JsController.php index 13d803e..3abcdba 100644 --- a/lib/Controller/JsController.php +++ b/lib/Controller/JsController.php @@ -171,7 +171,7 @@ class JsController extends Controller 'avatar' => $avatar, 'top-menu-apps' => $topMenuApps, 'top-side-menu-apps' => $topSideMenuApps, - 'top-menu-mouse-over-hidden-label' => $this->config->getAppValueInt( + 'top-menu-mouse-over-hidden-label' => $this->config->getAppValueBool( 'top-menu-mouse-over-hidden-label', '0' ), diff --git a/src/AppMenu.vue b/src/AppMenu.vue index 52a9810..0e550d7 100644 --- a/src/AppMenu.vue +++ b/src/AppMenu.vue @@ -24,14 +24,14 @@