Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1715ae5d52 | |||
| 847fa23345 | |||
| 0495046d02 | |||
| 0474ef55e8 | |||
| 7c9653943a | |||
| 457bfc282b | |||
| 84c78538f0 | |||
| f0d17a61bd | |||
| fdbeaf6677 | |||
| 9d18b33715 | |||
| bfb2b5d819 | |||
| a6e789c859 | |||
| 0cceb03213 | |||
| 91db830ea7 | |||
| af69d64e87 | |||
| f4ec00c9f7 | |||
| 8b20b11ce2 | |||
| e597ed95a3 | |||
| bf3493bb03 |
@@ -39,7 +39,7 @@ $ unzip -d side_menu /path/to/side_menu_vX.Y.Z.zip
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
How to contribute?
|
How to contribute?
|
||||||
|
|||||||
+20
-10
@@ -24,6 +24,11 @@ use OCP\Util;
|
|||||||
|
|
||||||
$config = \OC::$server->getConfig();
|
$config = \OC::$server->getConfig();
|
||||||
$cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
|
$cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
|
||||||
|
|
||||||
|
|
||||||
|
Util::addScript('side_menu', 'sideMenu');
|
||||||
|
Util::addStyle('side_menu', 'sideMenu');
|
||||||
|
|
||||||
$stylesheet = \OC::$server->getURLGenerator()->linkToRoute(
|
$stylesheet = \OC::$server->getURLGenerator()->linkToRoute(
|
||||||
'side_menu.Css.stylesheet',
|
'side_menu.Css.stylesheet',
|
||||||
[
|
[
|
||||||
@@ -31,6 +36,13 @@ $stylesheet = \OC::$server->getURLGenerator()->linkToRoute(
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$script = \OC::$server->getURLGenerator()->linkToRoute(
|
||||||
|
'side_menu.Js.script',
|
||||||
|
[
|
||||||
|
'v' => $config->getAppValue('side_menu', 'cache', '0'),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
Util::addHeader(
|
Util::addHeader(
|
||||||
'link',
|
'link',
|
||||||
[
|
[
|
||||||
@@ -40,13 +52,11 @@ Util::addHeader(
|
|||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
Util::addScript('side_menu', 'main');
|
Util::addHeader(
|
||||||
Util::addScript('side_menu', 'sideMenu');
|
'script',
|
||||||
Util::addStyle('side_menu', 'sideMenu');
|
[
|
||||||
// whitelist the URL to allow loading JS from this external domain
|
'src' => $script,
|
||||||
// $CSPManager = \OC::$server->getContentSecurityPolicyManager();
|
'nonce' => $cspnm->getNonce(),
|
||||||
// $policy = new ContentSecurityPolicy();
|
],
|
||||||
// $policy->addAllowedScriptDomain($url);
|
''
|
||||||
// $policy->addAllowedImageDomain($url);
|
);
|
||||||
// $policy->addAllowedConnectDomain($url);
|
|
||||||
// $CSPManager->addDefaultPolicy($policy);
|
|
||||||
|
|||||||
+2
-2
@@ -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.3.2</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>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<repository type="git">https://gitnet.fr/deblan/side_menu</repository>
|
<repository type="git">https://gitnet.fr/deblan/side_menu</repository>
|
||||||
<screenshot>https://upload.deblan.org/u/2020-03/5e7fab2b.jpg</screenshot>
|
<screenshot>https://upload.deblan.org/u/2020-03/5e7fab2b.jpg</screenshot>
|
||||||
<screenshot>https://upload.deblan.org/u/2020-03/5e81b219.jpg</screenshot>
|
<screenshot>https://upload.deblan.org/u/2020-03/5e81b219.jpg</screenshot>
|
||||||
<screenshot>https://upload.deblan.org/u/2020-04/5e8ee1f7.jpg</screenshot>
|
<screenshot>https://upload.deblan.org/u/2020-04/5e9d9058.png</screenshot>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<nextcloud min-version="18" max-version="18"/>
|
<nextcloud min-version="18" max-version="18"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|||||||
+2
-1
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'routes' => [
|
'routes' => [
|
||||||
['name' => 'Css#stylesheet', 'url' => '/css/stylesheet.css', 'verb' => 'GET'],
|
['name' => 'Css#stylesheet', 'url' => '/css/stylesheet', 'verb' => 'GET'],
|
||||||
|
['name' => 'Js#script', 'url' => '/js/script', 'verb' => 'GET'],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -45,6 +45,10 @@
|
|||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#side-menu.hide-opener .side-menu-opener {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.side-menu-apps-list {
|
.side-menu-apps-list {
|
||||||
height: calc(100vh - 150px);
|
height: calc(100vh - 150px);
|
||||||
z-index: 2200;
|
z-index: 2200;
|
||||||
@@ -94,3 +98,7 @@
|
|||||||
padding-top: 2px;
|
padding-top: 2px;
|
||||||
top: 0;
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#side-menu.hide-opener .side-menu-logo {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* @license GNU AGPL version 3 or any later version
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License as
|
||||||
|
* published by the Free Software Foundation, either version 3 of the
|
||||||
|
* License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU Affero General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace OCA\SideMenu\Controller;
|
||||||
|
|
||||||
|
use OCP\AppFramework\Controller;
|
||||||
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
|
use OCP\AppFramework\Http\Response;
|
||||||
|
use OCP\IConfig;
|
||||||
|
use OCP\IRequest;
|
||||||
|
|
||||||
|
class JsController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
/** @var \OCP\IConfig */
|
||||||
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $appName
|
||||||
|
* @param IRequest $request
|
||||||
|
* @param IConfig $config
|
||||||
|
*/
|
||||||
|
public function __construct($appName, IRequest $request, IConfig $config)
|
||||||
|
{
|
||||||
|
parent::__construct($appName, $request);
|
||||||
|
|
||||||
|
$this->config = $config;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @NoAdminRequired
|
||||||
|
* @NoCSRFRequired
|
||||||
|
* @PublicPage
|
||||||
|
*
|
||||||
|
* @return Response
|
||||||
|
*/
|
||||||
|
public function script()
|
||||||
|
{
|
||||||
|
$parameters = [
|
||||||
|
'opener-position' => $this->config->getAppValue('side_menu', 'opener-position', 'before'),
|
||||||
|
'opener-hover' => (bool) $this->config->getAppValue('side_menu', 'opener-hover', '0'),
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = new TemplateResponse('side_menu', 'js/script', $parameters, 'blank');
|
||||||
|
$response->addHeader('Content-Type', 'text/javascript');
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -54,6 +54,8 @@ class Admin implements ISettings
|
|||||||
'cache' => $this->config->getAppValue('side_menu', 'cache', '0'),
|
'cache' => $this->config->getAppValue('side_menu', 'cache', '0'),
|
||||||
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
|
'opener' => $this->config->getAppValue('side_menu', 'opener', 'side-menu-opener'),
|
||||||
'display-logo' => $this->config->getAppValue('side_menu', 'display-logo', '1'),
|
'display-logo' => $this->config->getAppValue('side_menu', 'display-logo', '1'),
|
||||||
|
'opener-position' => $this->config->getAppValue('side_menu', 'opener-position', 'before'),
|
||||||
|
'opener-hover' => $this->config->getAppValue('side_menu', 'opener-hover', '0'),
|
||||||
];
|
];
|
||||||
|
|
||||||
return new TemplateResponse('side_menu', 'settings/admin-form', $parameters, '');
|
return new TemplateResponse('side_menu', 'settings/admin-form', $parameters, '');
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ const mountSideMenuComponent = () => {
|
|||||||
|
|
||||||
if (sideMenuContainer) {
|
if (sideMenuContainer) {
|
||||||
sideMenu.$mount('#side-menu')
|
sideMenu.$mount('#side-menu')
|
||||||
|
$('body').trigger('side-menu.ready')
|
||||||
} else {
|
} else {
|
||||||
window.setTimeout(mountSideMenuComponent, 50)
|
window.setTimeout(mountSideMenuComponent, 50)
|
||||||
}
|
}
|
||||||
|
|||||||
+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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ const elements = [
|
|||||||
'side-menu-current-app-background-color',
|
'side-menu-current-app-background-color',
|
||||||
'side-menu-text-color',
|
'side-menu-text-color',
|
||||||
'side-menu-opener',
|
'side-menu-opener',
|
||||||
|
'side-menu-opener-position',
|
||||||
|
'side-menu-opener-hover',
|
||||||
'side-menu-display-logo',
|
'side-menu-display-logo',
|
||||||
'side-menu-cache',
|
'side-menu-cache',
|
||||||
];
|
];
|
||||||
|
|||||||
-30
@@ -1,30 +0,0 @@
|
|||||||
/**
|
|
||||||
* @license GNU AGPL version 3 or any later version
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const sideMenuContainer = $('<div id="side-menu-container">')
|
|
||||||
const sideMenuOpener = $('<button class="side-menu-opener"></button>')
|
|
||||||
const sideMenu = $('<div id="side-menu">')
|
|
||||||
|
|
||||||
sideMenuContainer.append(sideMenu);
|
|
||||||
|
|
||||||
$('body').append(sideMenuContainer);
|
|
||||||
|
|
||||||
sideMenuOpener.insertBefore('#nextcloud');
|
|
||||||
|
|
||||||
$('body').on('click', '.side-menu-opener', () => {
|
|
||||||
$('#side-menu').toggleClass('open');
|
|
||||||
})
|
|
||||||
@@ -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 print_unescaped(image_path('side_menu', $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; ?>
|
||||||
@@ -21,4 +21,13 @@
|
|||||||
height: calc(100vh - 60px);
|
height: calc(100vh - 60px);
|
||||||
top: 60px;
|
top: 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#side-menu.hide-opener .side-menu-header {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#side-menu.hide-opener .side-menu-apps-list {
|
||||||
|
height: calc(100vh);
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
(function() {
|
||||||
|
var sideMenuContainer = $('<div id="side-menu-container">')
|
||||||
|
var sideMenuOpener = $('<button class="side-menu-opener"></button>')
|
||||||
|
var sideMenu = $('<div id="side-menu">')
|
||||||
|
var body = $('body')
|
||||||
|
|
||||||
|
body.append(sideMenuContainer)
|
||||||
|
|
||||||
|
sideMenuContainer.append(sideMenu)
|
||||||
|
|
||||||
|
<?php if ($_['opener-position'] === 'before'): ?>
|
||||||
|
sideMenuOpener.insertBefore('#nextcloud')
|
||||||
|
<?php else: ?>
|
||||||
|
sideMenuOpener.insertAfter('#nextcloud')
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
var isTouchDevice = window.matchMedia("(pointer: coarse)").matches
|
||||||
|
|
||||||
|
body.on('side-menu.ready', function() {
|
||||||
|
sideMenu = $('#side-menu')
|
||||||
|
|
||||||
|
var headerMenuOpener = $('#header .side-menu-opener')
|
||||||
|
var sideMenuOpener = $('#side-menu .side-menu-opener')
|
||||||
|
|
||||||
|
<?php if ($_['opener-hover']): ?>
|
||||||
|
var sideMenuMouseLeave = function() {
|
||||||
|
sideMenu
|
||||||
|
.removeClass('open')
|
||||||
|
.off('mouseleave', sideMenuMouseLeave)
|
||||||
|
}
|
||||||
|
|
||||||
|
var sideMenuMouseEnter = function() {
|
||||||
|
sideMenu.on('mouseleave', sideMenuMouseLeave)
|
||||||
|
}
|
||||||
|
|
||||||
|
var sideMenuOpenerMouseEnter = function() {
|
||||||
|
sideMenu
|
||||||
|
.addClass('open')
|
||||||
|
.on('mouseenter', sideMenuMouseEnter)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isTouchDevice) {
|
||||||
|
headerMenuOpener.on('mouseenter', sideMenuOpenerMouseEnter)
|
||||||
|
|
||||||
|
sideMenu.addClass('hide-opener')
|
||||||
|
}
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
|
headerMenuOpener.on('click', function() {
|
||||||
|
sideMenu.addClass('open');
|
||||||
|
})
|
||||||
|
|
||||||
|
sideMenuOpener.on('click', function() {
|
||||||
|
sideMenu.removeClass('open');
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})();
|
||||||
@@ -18,11 +18,19 @@
|
|||||||
|
|
||||||
script('side_menu', 'admin');
|
script('side_menu', 'admin');
|
||||||
style('side_menu', 'admin');
|
style('side_menu', 'admin');
|
||||||
|
style('side_menu', 'support');
|
||||||
|
|
||||||
|
$choicesYesNo = [
|
||||||
|
'No' => '0',
|
||||||
|
'Yes' => '1',
|
||||||
|
];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div id="side-menu-section" class="section">
|
<div id="side-menu-section">
|
||||||
<h2 class="inlineblock"><?php p($l->t('Side menu settings')); ?></h2>
|
<div class="section">
|
||||||
|
<h2>
|
||||||
|
<?php p($l->t('Colors')); ?>
|
||||||
|
</h2>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="side-menu-background-color" class="settings-hint">
|
<label for="side-menu-background-color" class="settings-hint">
|
||||||
@@ -62,13 +70,13 @@ style('side_menu', 'admin');
|
|||||||
type="color"
|
type="color"
|
||||||
value="<?php print_unescaped($_['text-color']); ?>">
|
value="<?php print_unescaped($_['text-color']); ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
|
||||||
<label for="side-menu-opener" class="settings-hint">
|
|
||||||
<?php p($l->t('Opener icon')); ?>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h2>
|
||||||
|
<?php p($l->t('Opener')); ?>
|
||||||
|
</h2>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
$choices = [
|
$choices = [
|
||||||
'Default' => 'side-menu-opener',
|
'Default' => 'side-menu-opener',
|
||||||
@@ -76,6 +84,12 @@ style('side_menu', 'admin');
|
|||||||
];
|
];
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="side-menu-opener" class="settings-hint">
|
||||||
|
<?php p($l->t('Icon')); ?>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<select id="side-menu-opener" name="opener">
|
<select id="side-menu-opener" name="opener">
|
||||||
<?php foreach ($choices as $label => $value): ?>
|
<?php foreach ($choices as $label => $value): ?>
|
||||||
@@ -86,32 +100,87 @@ style('side_menu', 'admin');
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$choices = [
|
||||||
|
'Before the logo' => 'before',
|
||||||
|
'After the logo' => 'after',
|
||||||
|
];
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="side-menu-opener-position" class="settings-hint">
|
||||||
|
<?php p($l->t('Position')); ?>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<select id="side-menu-opener-position" name="opener-position">
|
||||||
|
<?php foreach ($choices as $label => $value): ?>
|
||||||
|
<option value="<?php echo $value ?>" <?php if ($value === $_['opener-position']): ?>selected<?php endif; ?>>
|
||||||
|
<?php echo $l->t($label); ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
|
<h2>
|
||||||
|
<?php p($l->t('Panel')); ?>
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<label for="side-menu-opener" class="settings-hint">
|
||||||
|
<?php p($l->t('Open the menu when the mouse is hover the opener (automatically disabled on touch screens)')); ?>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<select id="side-menu-opener-hover" name="opener-hover">
|
||||||
|
<?php foreach ($choicesYesNo as $label => $value): ?>
|
||||||
|
<option value="<?php echo $value ?>" <?php if ($value === $_['opener-hover']): ?>selected<?php endif; ?>>
|
||||||
|
<?php echo $l->t($label); ?>
|
||||||
|
</option>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label for="side-menu-opener" class="settings-hint">
|
<label for="side-menu-opener" class="settings-hint">
|
||||||
<?php p($l->t('Display the logo')); ?>
|
<?php p($l->t('Display the logo')); ?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php
|
|
||||||
$choices = [
|
|
||||||
'yes' => '1',
|
|
||||||
'No' => '0',
|
|
||||||
];
|
|
||||||
?>
|
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<select id="side-menu-display-logo" name="display-logo">
|
<select id="side-menu-display-logo" name="display-logo">
|
||||||
<?php foreach ($choices as $label => $value): ?>
|
<?php foreach ($choicesYesNo as $label => $value): ?>
|
||||||
<option value="<?php echo $value ?>" <?php if ($value === $_['display-logo']): ?>selected<?php endif; ?>>
|
<option value="<?php echo $value ?>" <?php if ($value === $_['display-logo']): ?>selected<?php endif; ?>>
|
||||||
<?php echo $l->t($label); ?>
|
<?php echo $l->t($label); ?>
|
||||||
</option>
|
</option>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section">
|
||||||
<input type="hidden" id="side-menu-cache" name="cache" value="<?php print_unescaped($_['cache']); ?>">
|
<input type="hidden" id="side-menu-cache" name="cache" value="<?php print_unescaped($_['cache']); ?>">
|
||||||
|
|
||||||
<button id="side-menu-save" class="btn btn-primary"><?php p($l->t('Save')); ?></button>
|
<button id="side-menu-save" class="btn btn-primary"><?php p($l->t('Save')); ?></button>
|
||||||
|
|
||||||
<span id="side-menu-message" class="msg"></span>
|
<span id="side-menu-message" class="msg"></span>
|
||||||
|
|
||||||
|
<div style="height: 30px"></div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<span for="side-menu-opener" class="settings-hint">
|
||||||
|
<?php p($l->t('You like this app and you want to support me?')); ?>
|
||||||
|
|
||||||
|
<a style="margin-left: 10px" target="_blank" href="https://www.buymeacoffee.com/deblan">
|
||||||
|
<button>
|
||||||
|
<?php p($l->t('Buy me a coffe ☕')); ?>
|
||||||
|
</button>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ const StyleLintPlugin = require('stylelint-webpack-plugin')
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: {
|
entry: {
|
||||||
'main': path.join(__dirname, 'src', 'main.js'),
|
|
||||||
'admin': path.join(__dirname, 'src', 'admin.js'),
|
'admin': path.join(__dirname, 'src', 'admin.js'),
|
||||||
'sideMenu': path.join(__dirname, 'src', 'SideMenu.js'),
|
'sideMenu': path.join(__dirname, 'src', 'SideMenu.js'),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user