Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1e68d6877d | |||
| 2ae08f7b77 | |||
| 489321081a | |||
| 68123ed45c | |||
| 66a1528341 | |||
| 64b7f3f534 |
@@ -1,5 +1,13 @@
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## 2.3.2
|
||||||
|
### Fixed
|
||||||
|
- fix hidden menu
|
||||||
|
|
||||||
|
## 2.3.1
|
||||||
|
### Fixed
|
||||||
|
- fix #88: does not work with default menu
|
||||||
|
|
||||||
## 2.3.0
|
## 2.3.0
|
||||||
### Added
|
### Added
|
||||||
- fix #82: add an option to keep visible an app in both menus
|
- fix #82: add an option to keep visible an app in both menus
|
||||||
|
|||||||
+1
-1
@@ -26,7 +26,7 @@ If you like this application and if you want to support the development:
|
|||||||
* [Donate with liberapay](https://liberapay.com/deblan)
|
* [Donate with liberapay](https://liberapay.com/deblan)
|
||||||
* [Leave a comment](https://apps.nextcloud.com/apps/side_menu#comments)
|
* [Leave a comment](https://apps.nextcloud.com/apps/side_menu#comments)
|
||||||
]]></description>
|
]]></description>
|
||||||
<version>2.3.0</version>
|
<version>2.3.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>
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ class CssController extends Controller
|
|||||||
{
|
{
|
||||||
$isForced = $this->config->getAppValueBool('force', '0');
|
$isForced = $this->config->getAppValueBool('force', '0');
|
||||||
$topMenuApps = $this->config->getAppValueArray('top-menu-apps', '[]');
|
$topMenuApps = $this->config->getAppValueArray('top-menu-apps', '[]');
|
||||||
|
$topSideMenuApps = $this->config->getAppValueArray('top-side-menu-apps', '[]');
|
||||||
|
|
||||||
$isAccessibilityAppEnabled = $this->config->getAppValueBool('enabled', '0', 'accessibility');
|
$isAccessibilityAppEnabled = $this->config->getAppValueBool('enabled', '0', 'accessibility');
|
||||||
$isBreezeDarkAppEnabled = $this->config->getAppValueBool('enabled', '0', 'breezedark');
|
$isBreezeDarkAppEnabled = $this->config->getAppValueBool('enabled', '0', 'breezedark');
|
||||||
@@ -94,11 +95,16 @@ class CssController extends Controller
|
|||||||
|
|
||||||
if ($this->user) {
|
if ($this->user) {
|
||||||
$userTopMenuApps = $this->config->getUserValueArray($this->user, 'top-menu-apps', '[]');
|
$userTopMenuApps = $this->config->getUserValueArray($this->user, 'top-menu-apps', '[]');
|
||||||
|
$userTopSideMenuApps = $this->config->getUserValueArray($this->user, 'top-side-menu-apps', '[]');
|
||||||
|
|
||||||
if (!empty($userTopMenuApps) && !$isForced) {
|
if (!empty($userTopMenuApps) && !$isForced) {
|
||||||
$topMenuApps = $userTopMenuApps;
|
$topMenuApps = $userTopMenuApps;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!empty($userTopSideMenuApps) && !$isForced) {
|
||||||
|
$topSideMenuApps = $userTopSideMenuApps;
|
||||||
|
}
|
||||||
|
|
||||||
$isDarkThemeUserEnabled = $this->config->getUserValue($this->user, 'theme', '', 'accessibility') === 'dark';
|
$isDarkThemeUserEnabled = $this->config->getUserValue($this->user, 'theme', '', 'accessibility') === 'dark';
|
||||||
$isBreezeDarkUserEnabled = $this->config->getUserValue($this->user, 'theme_enabled', '', 'breezedark');
|
$isBreezeDarkUserEnabled = $this->config->getUserValue($this->user, 'theme_enabled', '', 'breezedark');
|
||||||
|
|
||||||
@@ -162,6 +168,7 @@ class CssController extends Controller
|
|||||||
'always-displayed' => $this->config->getAppValueBool('always-displayed', '0'),
|
'always-displayed' => $this->config->getAppValueBool('always-displayed', '0'),
|
||||||
'big-menu' => $this->config->getAppValueBool('big-menu', '0'),
|
'big-menu' => $this->config->getAppValueBool('big-menu', '0'),
|
||||||
'top-menu-apps' => $topMenuApps,
|
'top-menu-apps' => $topMenuApps,
|
||||||
|
'top-side-menu-apps' => $topSideMenuApps,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -100,7 +100,7 @@ export default {
|
|||||||
var dataId = parent.getAttribute('data-id')
|
var dataId = parent.getAttribute('data-id')
|
||||||
dataId = dataId !== null ? dataId : ''
|
dataId = dataId !== null ? dataId : ''
|
||||||
|
|
||||||
if (!parent.classList.contains('app-hidden') && !menuIsHidden) {
|
if (!parent.classList.contains('app-top-side-menu') && !parent.classList.contains('app-hidden') && !menuIsHidden) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
}
|
}
|
||||||
|
|
||||||
<?php if (empty($_['top-menu-apps'])): ?>
|
<?php if (empty($_['top-menu-apps']) && empty($_['top-side-menu-apps'])): ?>
|
||||||
#appmenu {
|
#appmenu {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,10 @@ const updateTopMenu = function() {
|
|||||||
app.classList.remove('hidden')
|
app.classList.remove('hidden')
|
||||||
app.classList.add('app-external-site')
|
app.classList.add('app-external-site')
|
||||||
|
|
||||||
|
if (topSideMenuApps.indexOf(dataId) !== -1) {
|
||||||
|
app.classList.add('app-top-side-menu')
|
||||||
|
}
|
||||||
|
|
||||||
appShown.push(app)
|
appShown.push(app)
|
||||||
|
|
||||||
navigationAppsHtml = navigationAppsHtml + app.outerHTML
|
navigationAppsHtml = navigationAppsHtml + app.outerHTML
|
||||||
|
|||||||
Reference in New Issue
Block a user