Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| af69d64e87 | |||
| f4ec00c9f7 | |||
| 8b20b11ce2 | |||
| e597ed95a3 | |||
| bf3493bb03 |
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
<description>Move the top menu to the left side.</description>
|
<description>Move the top menu to the left side.</description>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author mail="dev+sidemenu@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
|
<author mail="dev+sidemenu@deblan.fr" homepage="https://www.deblan.io/">Simon Vieille</author>
|
||||||
<version>1.2.2</version>
|
<version>1.2.4</version>
|
||||||
<namespace>SideMenu</namespace>
|
<namespace>SideMenu</namespace>
|
||||||
<category>customization</category>
|
<category>customization</category>
|
||||||
<website>https://gitnet.fr/deblan/side_menu</website>
|
<website>https://gitnet.fr/deblan/side_menu</website>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ class CssController extends Controller
|
|||||||
public function __construct($appName, IRequest $request, IConfig $config)
|
public function __construct($appName, IRequest $request, IConfig $config)
|
||||||
{
|
{
|
||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
|
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,6 +51,10 @@ class CssController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function stylesheet()
|
public function stylesheet()
|
||||||
{
|
{
|
||||||
|
$requestUri = $this->request->server['REQUEST_URI'];
|
||||||
|
$assetsRoot = str_replace('/index.php', '', $requestUri);
|
||||||
|
$assetsRoot = preg_replace('#apps/side_menu/.*#s', 'apps/side_menu', $assetsRoot);
|
||||||
|
|
||||||
$parameters = [
|
$parameters = [
|
||||||
'vars' => [
|
'vars' => [
|
||||||
'background-color' => $this->config->getAppValue('side_menu', 'background-color', '#333333'),
|
'background-color' => $this->config->getAppValue('side_menu', 'background-color', '#333333'),
|
||||||
@@ -58,6 +63,7 @@ class CssController extends Controller
|
|||||||
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
|
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
|
||||||
],
|
],
|
||||||
'display-logo' => (bool) $this->config->getAppValue('side_menu', 'display-logo', 1),
|
'display-logo' => (bool) $this->config->getAppValue('side_menu', 'display-logo', 1),
|
||||||
|
'assetsRoot' => $assetsRoot,
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = new TemplateResponse('side_menu', 'css/stylesheet', $parameters, 'blank');
|
$response = new TemplateResponse('side_menu', 'css/stylesheet', $parameters, 'blank');
|
||||||
|
|||||||
+5
-1
@@ -67,10 +67,14 @@ export default {
|
|||||||
const ncLogo = document.querySelector('#nextcloud .logo')
|
const ncLogo = document.querySelector('#nextcloud .logo')
|
||||||
|
|
||||||
if (ncLogo) {
|
if (ncLogo) {
|
||||||
this.logo = window.getComputedStyle(ncLogo, null)
|
const url = window.getComputedStyle(ncLogo, null)
|
||||||
.getPropertyValue('background-image')
|
.getPropertyValue('background-image')
|
||||||
.replace('url("', '')
|
.replace('url("', '')
|
||||||
.replace('")', '')
|
.replace('")', '')
|
||||||
|
|
||||||
|
if (url && url !== 'none') {
|
||||||
|
this.logo = url
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
:root {
|
:root {
|
||||||
<?php foreach ($_['vars'] as $key => $value): ?>
|
<?php foreach ($_['vars'] as $key => $value): ?>
|
||||||
<?php if ($key === 'opener'): ?>
|
<?php if ($key === 'opener'): ?>
|
||||||
--side-menu-<?php echo $key ?>: url('../img/<?php echo $value ?>.svg');
|
--side-menu-<?php echo $key ?>: url('<?php echo $_['assetsRoot'] ?>/img/<?php echo $value ?>.svg');
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
--side-menu-<?php echo $key ?>: <?php echo $value ?>;
|
--side-menu-<?php echo $key ?>: <?php echo $value ?>;
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ style('side_menu', 'admin');
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
$choices = [
|
$choices = [
|
||||||
'yes' => '1',
|
'Yes' => '1',
|
||||||
'No' => '0',
|
'No' => '0',
|
||||||
];
|
];
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user