diff --git a/CHANGELOG.md b/CHANGELOG.md index 9279c3a..54b00a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,18 +1,5 @@ ## [Unreleased] -## 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 diff --git a/README.md b/README.md index 48614bf..bf8abbb 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,8 @@ You like this app and you want to support me? ☕ [Buy me a coffee](https://www. Requirements ------------ -* PHP >= 8.1 +* PHP >= 8.0 +* App `theming` enabled Installation and upgrade ------------------------ @@ -40,7 +41,7 @@ If you want to install it from source, go to https://gitnet.fr/deblan/side_menu/ ``` $ cd /path/to/nextcloud/apps -$ VERSION=x.y.z; curl -sS https://gitnet.fr/deblan/side_menu/releases/download/v${VERSION}/side_menu_v${VERSION}.tar.gz | tar xvfz - +$ curl -sS https://gitnet.fr/attachments/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | tar xvfz - ``` Administrators can edit many settings using the administration page. diff --git a/appinfo/info.xml b/appinfo/info.xml index ad353fd..f98f716 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -30,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/). ]]> - 5.0.3 + 5.0.0 agpl Simon Vieille SideMenu diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index 21e0421..2d4f364 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -49,11 +49,6 @@ class Application extends App implements IBootstrap */ protected $user; - /** - * @var Request - */ - protected $request; - public function __construct(array $urlParams = []) { parent::__construct(self::APP_ID, $urlParams); @@ -101,7 +96,6 @@ 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; @@ -112,10 +106,6 @@ 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'); diff --git a/lib/Controller/PersonalSettingController.php b/lib/Controller/PersonalSettingController.php index 285f89c..9b63576 100644 --- a/lib/Controller/PersonalSettingController.php +++ b/lib/Controller/PersonalSettingController.php @@ -98,7 +98,6 @@ class PersonalSettingController extends Controller } #[NoCSRFRequired] - #[NoAdminRequired] #[FrontpageRoute(verb: 'GET', url: '/user/config')] public function configuration(): JSONResponse { diff --git a/package.json b/package.json index 0a23693..b94a22b 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,7 @@ "css-loader": "^7.1.2", "eslint": "^9.19.0", "eslint-config-prettier": "^10.0.1", - "eslint-plugin-vue": "^9.32.0", + "eslint-plugin-vue": "^10.0.0", "file-loader": "^6.2.0", "mini-css-extract-plugin": "^2.9.1", "postcss-loader": "^8.1.1", diff --git a/src/menus/StandardMenu.vue b/src/menus/StandardMenu.vue index fb16b59..5e817ee 100644 --- a/src/menus/StandardMenu.vue +++ b/src/menus/StandardMenu.vue @@ -142,7 +142,7 @@ const appLimit = () => { }) } - return Math.max(0, Math.floor((body.offsetWidth - size) / 70)) + return Math.floor((body.offsetWidth - size) / 70) } const makeStyle = (app) => { @@ -158,11 +158,6 @@ 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() @@ -174,7 +169,10 @@ onMounted(async () => { setApps(await navStore.getCoreApps()) - window.addEventListener('resize', reComputeLists) + window.addEventListener('resize', () => { + window.clearTimeout(resizeTimeout) + resizeTimeout = window.setTimeout(computeLists, 100) + }) })