Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 711d169d22 | |||
| ddcd10f7b0 | |||
| ab8b745496 | |||
| 401b351fbd | |||
| b6a529d65e | |||
| b30e822bde | |||
| 13688cd3d3 | |||
| 22fd48cf8d | |||
| f9c41e9407 | |||
| 1da1cff551 | |||
| 1c2c413eef | |||
| 36388bd472 | |||
| 0c304b06a0 | |||
| 538467dc99 | |||
| eba06e8ef8 | |||
| 3cf8b685ba | |||
| ed8f0e0959 | |||
| ba7f0673b4 | |||
| d2b589a644 | |||
| ca08a26e1b | |||
| 6347403ed7 | |||
| 80532ead63 | |||
| 7b8d8800fc | |||
| a20b0d4709 | |||
| 47c2beae4a | |||
| 49f45534de | |||
| fd99827390 | |||
| e802e05888 | |||
| 13f535250a | |||
| d837f1acf5 | |||
| f058ec10d3 | |||
| d3b3989e02 | |||
| 984bfcdc05 | |||
| 983fabd460 | |||
| ca7e8674e4 | |||
| 69e2c0670a | |||
| 4676243b2e | |||
| 84b50710a6 | |||
| 059002ef1c | |||
| fa9d5abf62 | |||
| 280c1d72ae | |||
| 373b8393bf | |||
| 6205c9a6b6 | |||
| d381d479da | |||
| ce9d6b93b1 |
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"rules": {
|
||||||
|
"indentation": 4
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -5,7 +5,7 @@ pipeline:
|
|||||||
- npm install
|
- npm install
|
||||||
when:
|
when:
|
||||||
event: [tag, push, pull_request]
|
event: [tag, push, pull_request]
|
||||||
branch: [master, develop, feature/*]
|
branch: [master, develop, v2.x, feature/*]
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: deblan/devenv
|
image: deblan/devenv
|
||||||
|
|||||||
@@ -1,5 +1,24 @@
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## 2.5.2
|
||||||
|
### Fixed
|
||||||
|
* add check if menu exists before adding event listeners (#210)
|
||||||
|
|
||||||
|
## 2.5.1
|
||||||
|
### Fixed
|
||||||
|
* fix icon render (#133)
|
||||||
|
|
||||||
|
## 2.5.0
|
||||||
|
### Changed
|
||||||
|
* upgrade dependencies
|
||||||
|
### Fixed
|
||||||
|
* remove duplicated code
|
||||||
|
* remove unused variables and packages
|
||||||
|
* replace repeated strings with variables
|
||||||
|
* add html attributes
|
||||||
|
* replace var with let
|
||||||
|
* replace v-html with v-text to prevent xss
|
||||||
|
|
||||||
## 2.4.3
|
## 2.4.3
|
||||||
### Fixed
|
### Fixed
|
||||||
* fix translations
|
* fix translations
|
||||||
|
|||||||
@@ -26,3 +26,8 @@ release: npm-build translations
|
|||||||
|
|
||||||
translations:
|
translations:
|
||||||
php bin/generate_l10n.php
|
php bin/generate_l10n.php
|
||||||
|
|
||||||
|
.ONESHELL:
|
||||||
|
run-code-quality-analysis:
|
||||||
|
export SONAR_TOKEN="$$SONAR_TOKEN_DEBLAN_SIDE_MENU"
|
||||||
|
sonar-scanner -Dsonar.projectKey=deblan-side_menu -Dsonar.sources=. -Dsonar.host.url=https://cq.gitnet.fr
|
||||||
|
|||||||
+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.4.3</version>
|
<version>2.5.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>
|
||||||
|
|||||||
+1
-4
@@ -315,6 +315,7 @@
|
|||||||
@media screen and (max-width: 1024px) {
|
@media screen and (max-width: 1024px) {
|
||||||
#side-menu.side-menu-big {
|
#side-menu.side-menu-big {
|
||||||
max-width: 290px;
|
max-width: 290px;
|
||||||
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.side-menu-categories {
|
.side-menu-categories {
|
||||||
@@ -325,10 +326,6 @@
|
|||||||
.side-menu-category {
|
.side-menu-category {
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#side-menu.side-menu-big {
|
|
||||||
height: 100vh;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 1024px) {
|
@media screen and (min-width: 1024px) {
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class Application extends App implements IBootstrap
|
|||||||
|
|
||||||
$cache = $this->config->getAppValue(self::APP_ID, 'cache', '0');
|
$cache = $this->config->getAppValue(self::APP_ID, 'cache', '0');
|
||||||
|
|
||||||
foreach ($assets as $key => $value) {
|
foreach ($assets as $value) {
|
||||||
$route = OC::$server->getURLGenerator()->linkToRoute($value['route'], ['v' => $cache]);
|
$route = OC::$server->getURLGenerator()->linkToRoute($value['route'], ['v' => $cache]);
|
||||||
$value['attr'][$value['route_attr']] = $route;
|
$value['attr'][$value['route_attr']] = $route;
|
||||||
|
|
||||||
@@ -106,15 +106,15 @@ class Application extends App implements IBootstrap
|
|||||||
|
|
||||||
public function register(IRegistrationContext $context): void
|
public function register(IRegistrationContext $context): void
|
||||||
{
|
{
|
||||||
$context->registerService('AppRepository', function (ContainerInterface $c) {
|
$context->registerService('AppRepository', function () {
|
||||||
return new AppRepository();
|
return new AppRepository();
|
||||||
});
|
});
|
||||||
|
|
||||||
$context->registerService('CategoryRepository', function (ContainerInterface $c) {
|
$context->registerService('CategoryRepository', function () {
|
||||||
return new CategoryRepository();
|
return new CategoryRepository();
|
||||||
});
|
});
|
||||||
|
|
||||||
$context->registerService('ConfigProxy', function (ContainerInterface $c) {
|
$context->registerService('ConfigProxy', function () {
|
||||||
return new ConfigProxy();
|
return new ConfigProxy();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class AdminSettingController extends Controller
|
|||||||
public function exportConfiguration()
|
public function exportConfiguration()
|
||||||
{
|
{
|
||||||
$keys = $this->config->getAppKeys(Application::APP_ID);
|
$keys = $this->config->getAppKeys(Application::APP_ID);
|
||||||
$config = [];
|
$appConfig = [];
|
||||||
$excludedKeys = [
|
$excludedKeys = [
|
||||||
'cache',
|
'cache',
|
||||||
'cache-categories',
|
'cache-categories',
|
||||||
@@ -80,11 +80,11 @@ class AdminSettingController extends Controller
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
$config[$key] = $this->config->getAppValue(Application::APP_ID, $key);
|
$appConfig[$key] = $this->config->getAppValue(Application::APP_ID, $key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new DataDownloadResponse(
|
return new DataDownloadResponse(
|
||||||
json_encode($config, JSON_PRETTY_PRINT),
|
json_encode($appConfig, JSON_PRETTY_PRINT),
|
||||||
'config.json',
|
'config.json',
|
||||||
'text/json'
|
'text/json'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -53,7 +53,6 @@ class AppRepository
|
|||||||
{
|
{
|
||||||
$navigation = $this->ocApp->getNavigation();
|
$navigation = $this->ocApp->getNavigation();
|
||||||
$appCategoriesCustom = $this->config->getAppValueArray('apps-categories-custom', '[]');
|
$appCategoriesCustom = $this->config->getAppValueArray('apps-categories-custom', '[]');
|
||||||
$categoriesCustom = $this->config->getAppValueArray('categories-custom', '[]');
|
|
||||||
$categories = $this->categoryRepository->getOrderedCategories();
|
$categories = $this->categoryRepository->getOrderedCategories();
|
||||||
$apps = $this->ocApp->listAllApps();
|
$apps = $this->ocApp->listAllApps();
|
||||||
$visibleApps = [];
|
$visibleApps = [];
|
||||||
|
|||||||
+15
-15
@@ -2,7 +2,7 @@
|
|||||||
"license": "agpl",
|
"license": "agpl",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "NODE_ENV=production webpack --progress --hide-modules --config webpack.js",
|
"build": "NODE_ENV=production webpack --progress --config webpack.js",
|
||||||
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
|
"dev": "NODE_ENV=development webpack --progress --config webpack.js",
|
||||||
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
|
"watch": "NODE_ENV=development webpack --progress --watch --config webpack.js",
|
||||||
"lint": "eslint --ext .js,.vue src",
|
"lint": "eslint --ext .js,.vue src",
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
"@nextcloud/axios": "^1.8.0",
|
"@nextcloud/axios": "^1.8.0",
|
||||||
"@nextcloud/vue": "^1.5.0",
|
"@nextcloud/vue": "^1.5.0",
|
||||||
"axios": "^0.24.0",
|
"axios": "^0.24.0",
|
||||||
"trim": "0.0.1",
|
"trim": "^1.0.1",
|
||||||
"vue": "^2.6.11"
|
"vue": "^2.6.11"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
@@ -28,32 +28,32 @@
|
|||||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||||
"@babel/preset-env": "^7.9.0",
|
"@babel/preset-env": "^7.9.0",
|
||||||
"@nextcloud/browserslist-config": "^1.0.0",
|
"@nextcloud/browserslist-config": "^1.0.0",
|
||||||
|
"@nextcloud/eslint-config": "^8.1.2",
|
||||||
"babel-eslint": "^10.1.0",
|
"babel-eslint": "^10.1.0",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
"css-loader": "^3.4.2",
|
"css-loader": "^3.4.2",
|
||||||
"eslint": "^5.16.0",
|
"eslint": "^8.0.0",
|
||||||
"eslint-config-nextcloud": "0.1.1",
|
"eslint-config-standard": "^17.0.0",
|
||||||
"eslint-config-standard": "^12.0.0",
|
|
||||||
"eslint-import-resolver-webpack": "^0.12.1",
|
"eslint-import-resolver-webpack": "^0.12.1",
|
||||||
"eslint-loader": "^3.0.3",
|
|
||||||
"eslint-plugin-import": "^2.20.0",
|
"eslint-plugin-import": "^2.20.0",
|
||||||
"eslint-plugin-nextcloud": "^0.3.0",
|
"eslint-plugin-nextcloud": "^0.3.0",
|
||||||
"eslint-plugin-node": "^10.0.0",
|
"eslint-plugin-node": "^10.0.0",
|
||||||
"eslint-plugin-promise": "^4.2.1",
|
"eslint-plugin-promise": "^6.0.0",
|
||||||
"eslint-plugin-standard": "^4.0.1",
|
"eslint-plugin-standard": "^4.0.1",
|
||||||
"eslint-plugin-vue": "^5.2.3",
|
"eslint-plugin-vue": "^9.0.0",
|
||||||
|
"eslint-webpack-plugin": "^3.0.0",
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
"sass-loader": "^8.0.2",
|
|
||||||
"stylelint": "^8.4.0",
|
|
||||||
"sass": "^1.49.9",
|
"sass": "^1.49.9",
|
||||||
"stylelint-config-recommended-scss": "^3.3.0",
|
"sass-loader": "^13.0.2",
|
||||||
"stylelint-scss": "^3.16.0",
|
"stylelint": "^14.0.0",
|
||||||
"stylelint-webpack-plugin": "^0.10.5",
|
"stylelint-config-recommended-scss": "^7.0.0",
|
||||||
|
"stylelint-scss": "^4.0.0",
|
||||||
|
"stylelint-webpack-plugin": "^3.3.0",
|
||||||
"url-loader": "^4.0.0",
|
"url-loader": "^4.0.0",
|
||||||
"vue-loader": "^15.9.1",
|
"vue-loader": "^15.9.1",
|
||||||
"vue-template-compiler": "^2.6.11",
|
"vue-template-compiler": "^2.6.11",
|
||||||
"webpack": "^4.42.0",
|
"webpack": "^5.0.0",
|
||||||
"webpack-cli": "^3.3.11",
|
"webpack-cli": "^4.0.0",
|
||||||
"webpack-merge": "^4.2.2",
|
"webpack-merge": "^4.2.2",
|
||||||
"webpack-node-externals": "^1.7.2"
|
"webpack-node-externals": "^1.7.2"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<div>
|
<div>
|
||||||
<ul class="side-menu-setting-list">
|
<ul class="side-menu-setting-list">
|
||||||
<li v-for="item in values" class="side-menu-setting-list-item" v-on:click="showEditForm(item)">
|
<li v-for="item in values" class="side-menu-setting-list-item" v-on:click="showEditForm(item)">
|
||||||
<span v-html="item.en"></span>
|
<span v-text="item.en"></span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<Modal v-if="addForm" @close="hideAddForm">
|
<Modal v-if="addForm" @close="hideAddForm">
|
||||||
<div class="modal__content">
|
<div class="modal__content">
|
||||||
<div v-for="lang in langs">
|
<div v-for="lang in langs">
|
||||||
<span class="lang" v-html="lang"></span>
|
<span class="lang" v-text="lang"></span>
|
||||||
<input type="text" v-model="newValue[lang]" required>
|
<input type="text" v-model="newValue[lang]" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<Modal v-if="editForm" @close="hideEditForm">
|
<Modal v-if="editForm" @close="hideEditForm">
|
||||||
<div class="modal__content">
|
<div class="modal__content">
|
||||||
<div v-for="lang in langs">
|
<div v-for="lang in langs">
|
||||||
<span class="lang" v-html="lang"></span>
|
<span class="lang" v-text="lang"></span>
|
||||||
<input type="text" v-model="editValue[lang]" required>
|
<input type="text" v-model="editValue[lang]" required>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -17,9 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<template>
|
<template>
|
||||||
<div v-bind:class="classes">
|
<div v-bind:class="classes">
|
||||||
<a v-if="link !== null" v-bind:href="link">
|
<a v-if="link !== null" v-bind:href="link">
|
||||||
<img v-bind:src="image">
|
<img v-bind:src="image" alt="Logo">
|
||||||
</a>
|
</a>
|
||||||
<img v-else v-bind:src="image">
|
<img v-else v-bind:src="image" alt="Logo">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -91,13 +91,13 @@ export default {
|
|||||||
|
|
||||||
for (let element of links) {
|
for (let element of links) {
|
||||||
let href = element.getAttribute('href')
|
let href = element.getAttribute('href')
|
||||||
var parent = element.parentNode
|
let parent = element.parentNode
|
||||||
|
|
||||||
if (!parent) {
|
if (!parent) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
var dataId = parent.getAttribute('data-id')
|
let dataId = parent.getAttribute('data-id')
|
||||||
dataId = dataId !== null ? dataId : ''
|
dataId = dataId !== null ? dataId : ''
|
||||||
|
|
||||||
if (!parent.classList.contains('app-top-side-menu') && !parent.classList.contains('app-hidden') && !menuIsHidden) {
|
if (!parent.classList.contains('app-top-side-menu') && !parent.classList.contains('app-hidden') && !menuIsHidden) {
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<li v-bind:class="classes">
|
<li v-bind:class="classes">
|
||||||
<a v-bind:href="href" :target="target" v-bind:title="label">
|
<a v-bind:href="href" :target="target" v-bind:title="label">
|
||||||
<span class="side-menu-app-icon" v-html="icon"></span>
|
<span class="side-menu-app-icon" v-html="icon"></span>
|
||||||
<span class="side-menu-app-text" v-html="label"></span>
|
<span class="side-menu-app-text" v-text="label"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
+1
-2
@@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<Loader v-if="!items.length" />
|
<Loader v-if="!items.length" />
|
||||||
|
|
||||||
<div class="side-menu-category" v-for="category in items">
|
<div class="side-menu-category" v-for="category in items">
|
||||||
<h2 class="side-menu-category-title" v-if="category.name != ''" v-html="category.name"></h2>
|
<h2 class="side-menu-category-title" v-if="category.name != ''" v-text="category.name"></h2>
|
||||||
|
|
||||||
<ul class="side-menu-apps-list">
|
<ul class="side-menu-apps-list">
|
||||||
<SideMenuBigApp
|
<SideMenuBigApp
|
||||||
@@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import trim from 'trim'
|
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import OpenerButton from './OpenerButton'
|
import OpenerButton from './OpenerButton'
|
||||||
import CloserButton from './CloserButton'
|
import CloserButton from './CloserButton'
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<template>
|
<template>
|
||||||
<li v-bind:class="classes">
|
<li v-bind:class="classes">
|
||||||
<a v-bind:href="href" :target="target" v-bind:title="label">
|
<a v-bind:href="href" :target="target" v-bind:title="label">
|
||||||
<img class="side-menu-app-icon" v-bind:src="icon"></span>
|
<img class="side-menu-app-icon" v-bind:src="icon" v-bind:alt="label" />
|
||||||
<span class="side-menu-app-text" v-html="label"></span>
|
<span class="side-menu-app-text" v-text="label"></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<Loader v-if="!items.length" />
|
<Loader v-if="!items.length" />
|
||||||
|
|
||||||
<div class="side-menu-category" v-for="category in items">
|
<div class="side-menu-category" v-for="category in items">
|
||||||
<h2 class="side-menu-category-title" v-if="category.name != ''" v-html="category.name"></h2>
|
<h2 class="side-menu-category-title" v-if="category.name != ''" v-text="category.name"></h2>
|
||||||
|
|
||||||
<ul class="side-menu-apps-list">
|
<ul class="side-menu-apps-list">
|
||||||
<SideMenuBigApp
|
<SideMenuBigApp
|
||||||
@@ -51,7 +51,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import trim from 'trim'
|
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import OpenerButton from './OpenerButton'
|
import OpenerButton from './OpenerButton'
|
||||||
import CloserButton from './CloserButton'
|
import CloserButton from './CloserButton'
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ const alwaysDisplayed = function() {
|
|||||||
const elements = querySelectorAll('*')
|
const elements = querySelectorAll('*')
|
||||||
const fixedElements = []
|
const fixedElements = []
|
||||||
|
|
||||||
for (var element of elements) {
|
for (let element of elements) {
|
||||||
if (typeof element !== 'object') {
|
if (typeof element !== 'object') {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,7 @@ const alwaysDisplayed = function() {
|
|||||||
fixedElements.push(element)
|
fixedElements.push(element)
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i in fixedElements) {
|
for (let i in fixedElements) {
|
||||||
const element = fixedElements[i]
|
const element = fixedElements[i]
|
||||||
const computedStyle = window.getComputedStyle(element, null)
|
const computedStyle = window.getComputedStyle(element, null)
|
||||||
const left = computedStyle.getPropertyValue('left')
|
const left = computedStyle.getPropertyValue('left')
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const updateTopMenu = function() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
navigationAppsHtml = ''
|
let navigationAppsHtml = ''
|
||||||
|
|
||||||
for (let app of apps) {
|
for (let app of apps) {
|
||||||
const dataId = app.getAttribute('data-id')
|
const dataId = app.getAttribute('data-id')
|
||||||
|
|||||||
+11
-5
@@ -96,6 +96,10 @@ if ($_['always-displayed']) {
|
|||||||
const headerMenuOpener = querySelector('#header .side-menu-opener')
|
const headerMenuOpener = querySelector('#header .side-menu-opener')
|
||||||
const sideMenuOpener = querySelectorAll('#side-menu .side-menu-opener')
|
const sideMenuOpener = querySelectorAll('#side-menu .side-menu-opener')
|
||||||
|
|
||||||
|
if (!headerMenuOpener) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
sideMenuFocus = () => {
|
sideMenuFocus = () => {
|
||||||
let a = querySelector('.side-menu-app.active a', sideMenu)
|
let a = querySelector('.side-menu-app.active a', sideMenu)
|
||||||
|
|
||||||
@@ -197,11 +201,13 @@ if ($_['always-displayed']) {
|
|||||||
<?php require_once __DIR__.'/_loaderEnabled.js'; ?>
|
<?php require_once __DIR__.'/_loaderEnabled.js'; ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if ($_['opener-position'] === 'before'): ?>
|
if (nextcloud) {
|
||||||
nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud)
|
<?php if ($_['opener-position'] === 'before'): ?>
|
||||||
<?php else: ?>
|
nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud)
|
||||||
nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud.nextSibling)
|
<?php else: ?>
|
||||||
<?php endif; ?>
|
nextcloud.parentNode.insertBefore(sideMenuOpener, nextcloud.nextSibling)
|
||||||
|
<?php endif; ?>
|
||||||
|
}
|
||||||
|
|
||||||
<?php if (!empty($_['top-menu-apps']) || !empty($_['top-side-menu-apps'])): ?>
|
<?php if (!empty($_['top-menu-apps']) || !empty($_['top-side-menu-apps'])): ?>
|
||||||
const topMenuApps = <?php echo json_encode($_['top-menu-apps']), "\n"; ?>
|
const topMenuApps = <?php echo json_encode($_['top-menu-apps']), "\n"; ?>
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ $choicesSizes = [
|
|||||||
'Big' => 'big',
|
'Big' => 'big',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
$labelShowHideApps = 'Show and hide the list of applications';
|
||||||
|
$labelReset = 'Reset to default';
|
||||||
?>
|
?>
|
||||||
<div id="side-menu-section">
|
<div id="side-menu-section">
|
||||||
<div class="section">
|
<div class="section">
|
||||||
@@ -67,7 +69,7 @@ $choicesSizes = [
|
|||||||
class="side-menu-setting side-menu-setting-live"
|
class="side-menu-setting side-menu-setting-live"
|
||||||
value="<?php print_unescaped($_['background-color-to']); ?>">
|
value="<?php print_unescaped($_['background-color-to']); ?>">
|
||||||
|
|
||||||
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t('Reset to default')); ?>" data-reset="<?php echo htmlentities(json_encode([
|
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t($labelReset)); ?>" data-reset="<?php echo htmlentities(json_encode([
|
||||||
'side-menu-background-color' => $_['defaults']['background-color'],
|
'side-menu-background-color' => $_['defaults']['background-color'],
|
||||||
'side-menu-background-color-to' => $_['defaults']['background-color-to'],
|
'side-menu-background-color-to' => $_['defaults']['background-color-to'],
|
||||||
])) ?>"></div>
|
])) ?>"></div>
|
||||||
@@ -107,7 +109,7 @@ $choicesSizes = [
|
|||||||
class="side-menu-setting side-menu-setting-live"
|
class="side-menu-setting side-menu-setting-live"
|
||||||
value="<?php print_unescaped($_['current-app-background-color']); ?>">
|
value="<?php print_unescaped($_['current-app-background-color']); ?>">
|
||||||
|
|
||||||
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t('Reset to default')); ?>" data-reset="<?php echo htmlentities(json_encode([
|
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t($labelReset)); ?>" data-reset="<?php echo htmlentities(json_encode([
|
||||||
'side-menu-current-app-background-color' => $_['defaults']['current-app-background-color'],
|
'side-menu-current-app-background-color' => $_['defaults']['current-app-background-color'],
|
||||||
])) ?>"></div>
|
])) ?>"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -127,7 +129,7 @@ $choicesSizes = [
|
|||||||
class="side-menu-setting side-menu-setting-live"
|
class="side-menu-setting side-menu-setting-live"
|
||||||
value="<?php print_unescaped($_['text-color']); ?>">
|
value="<?php print_unescaped($_['text-color']); ?>">
|
||||||
|
|
||||||
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t('Reset to default')); ?>" data-reset="<?php echo htmlentities(json_encode([
|
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t($labelReset)); ?>" data-reset="<?php echo htmlentities(json_encode([
|
||||||
'side-menu-text-color' => $_['defaults']['text-color'],
|
'side-menu-text-color' => $_['defaults']['text-color'],
|
||||||
])) ?>"></div>
|
])) ?>"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -147,7 +149,7 @@ $choicesSizes = [
|
|||||||
class="side-menu-setting"
|
class="side-menu-setting"
|
||||||
value="<?php print_unescaped($_['loader-color']); ?>">
|
value="<?php print_unescaped($_['loader-color']); ?>">
|
||||||
|
|
||||||
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t('Reset to default')); ?>" data-reset="<?php echo htmlentities(json_encode([
|
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t($labelReset)); ?>" data-reset="<?php echo htmlentities(json_encode([
|
||||||
'side-menu-loader-color' => $_['defaults']['loader-color'],
|
'side-menu-loader-color' => $_['defaults']['loader-color'],
|
||||||
])) ?>"></div>
|
])) ?>"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -255,7 +257,7 @@ $choicesSizes = [
|
|||||||
class="side-menu-setting"
|
class="side-menu-setting"
|
||||||
value="<?php print_unescaped($_['dark-mode-background-color-to']); ?>">
|
value="<?php print_unescaped($_['dark-mode-background-color-to']); ?>">
|
||||||
|
|
||||||
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t('Reset to default')); ?>" data-reset="<?php echo htmlentities(json_encode([
|
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t($labelReset)); ?>" data-reset="<?php echo htmlentities(json_encode([
|
||||||
'side-menu-dark-mode-background-color' => $_['defaults']['dark-mode-background-color'],
|
'side-menu-dark-mode-background-color' => $_['defaults']['dark-mode-background-color'],
|
||||||
'side-menu-dark-mode-background-color-to' => $_['defaults']['dark-mode-background-color-to'],
|
'side-menu-dark-mode-background-color-to' => $_['defaults']['dark-mode-background-color-to'],
|
||||||
])) ?>"></div>
|
])) ?>"></div>
|
||||||
@@ -295,7 +297,7 @@ $choicesSizes = [
|
|||||||
class="side-menu-setting"
|
class="side-menu-setting"
|
||||||
value="<?php print_unescaped($_['dark-mode-current-app-background-color']); ?>">
|
value="<?php print_unescaped($_['dark-mode-current-app-background-color']); ?>">
|
||||||
|
|
||||||
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t('Reset to default')); ?>" data-reset="<?php echo htmlentities(json_encode([
|
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t($labelReset)); ?>" data-reset="<?php echo htmlentities(json_encode([
|
||||||
'side-menu-dark-mode-current-app-background-color' => $_['defaults']['dark-mode-current-app-background-color'],
|
'side-menu-dark-mode-current-app-background-color' => $_['defaults']['dark-mode-current-app-background-color'],
|
||||||
])) ?>"></div>
|
])) ?>"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -315,7 +317,7 @@ $choicesSizes = [
|
|||||||
class="side-menu-setting"
|
class="side-menu-setting"
|
||||||
value="<?php print_unescaped($_['dark-mode-text-color']); ?>">
|
value="<?php print_unescaped($_['dark-mode-text-color']); ?>">
|
||||||
|
|
||||||
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t('Reset to default')); ?>" data-reset="<?php echo htmlentities(json_encode([
|
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t($labelReset)); ?>" data-reset="<?php echo htmlentities(json_encode([
|
||||||
'side-menu-dark-mode-text-color' => $_['defaults']['dark-mode-text-color'],
|
'side-menu-dark-mode-text-color' => $_['defaults']['dark-mode-text-color'],
|
||||||
])) ?>"></div>
|
])) ?>"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -335,7 +337,7 @@ $choicesSizes = [
|
|||||||
class="side-menu-setting"
|
class="side-menu-setting"
|
||||||
value="<?php print_unescaped($_['dark-mode-loader-color']); ?>">
|
value="<?php print_unescaped($_['dark-mode-loader-color']); ?>">
|
||||||
|
|
||||||
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t('Reset to default')); ?>" data-reset="<?php echo htmlentities(json_encode([
|
<div class="theme-undo icon icon-history btn-reset" data-toggle="tooltip" data-original-title="<?php echo p($l->t($labelReset)); ?>" data-reset="<?php echo htmlentities(json_encode([
|
||||||
'side-menu-dark-mode-loader-color' => $_['defaults']['dark-mode-loader-color'],
|
'side-menu-dark-mode-loader-color' => $_['defaults']['dark-mode-loader-color'],
|
||||||
])) ?>"></div>
|
])) ?>"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -649,7 +651,7 @@ $choicesSizes = [
|
|||||||
</div>
|
</div>
|
||||||
<div class="side-menu-setting-form">
|
<div class="side-menu-setting-form">
|
||||||
<a class="side-menu-toggler" data-target="#big-menu-hidden-apps" href="#_">
|
<a class="side-menu-toggler" data-target="#big-menu-hidden-apps" href="#_">
|
||||||
🖱️ <?php p($l->t('Show and hide the list of applications')); ?>
|
🖱️ <?php p($l->t($labelShowHideApps)); ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="side-menu-setting" data-name="big-menu-hidden-apps" id="big-menu-hidden-apps" data-checkbox style="display: none">
|
<div class="side-menu-setting" data-name="big-menu-hidden-apps" id="big-menu-hidden-apps" data-checkbox style="display: none">
|
||||||
@@ -718,7 +720,7 @@ $choicesSizes = [
|
|||||||
</div>
|
</div>
|
||||||
<div class="side-menu-setting-form">
|
<div class="side-menu-setting-form">
|
||||||
<a class="side-menu-toggler" data-target="#target-blank-apps" href="#_">
|
<a class="side-menu-toggler" data-target="#target-blank-apps" href="#_">
|
||||||
🖱️ <?php p($l->t('Show and hide the list of applications')); ?>
|
🖱️ <?php p($l->t($labelShowHideApps)); ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="side-menu-setting" data-name="target-blank-apps" id="target-blank-apps" data-checkbox style="display: none">
|
<div class="side-menu-setting" data-name="target-blank-apps" id="target-blank-apps" data-checkbox style="display: none">
|
||||||
@@ -772,7 +774,7 @@ $choicesSizes = [
|
|||||||
</div>
|
</div>
|
||||||
<div class="side-menu-setting-form">
|
<div class="side-menu-setting-form">
|
||||||
<a class="side-menu-toggler" data-target="#top-menu-apps" href="#_">
|
<a class="side-menu-toggler" data-target="#top-menu-apps" href="#_">
|
||||||
🖱️ <?php p($l->t('Show and hide the list of applications')); ?>
|
🖱️ <?php p($l->t($labelShowHideApps)); ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="side-menu-setting" data-name="top-menu-apps" id="top-menu-apps" data-checkbox style="display: none">
|
<div class="side-menu-setting" data-name="top-menu-apps" id="top-menu-apps" data-checkbox style="display: none">
|
||||||
@@ -805,7 +807,7 @@ $choicesSizes = [
|
|||||||
</div>
|
</div>
|
||||||
<div class="side-menu-setting-form">
|
<div class="side-menu-setting-form">
|
||||||
<a class="side-menu-toggler" data-target="#top-side-menu-apps" href="#_">
|
<a class="side-menu-toggler" data-target="#top-side-menu-apps" href="#_">
|
||||||
🖱️ <?php p($l->t('Show and hide the list of applications')); ?>
|
🖱️ <?php p($l->t($labelShowHideApps)); ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div class="side-menu-setting" data-name="top-side-menu-apps" id="top-side-menu-apps" data-checkbox style="display: none">
|
<div class="side-menu-setting" data-name="top-side-menu-apps" id="top-side-menu-apps" data-checkbox style="display: none">
|
||||||
@@ -878,7 +880,7 @@ $choicesSizes = [
|
|||||||
</div>
|
</div>
|
||||||
<div class="side-menu-setting-form">
|
<div class="side-menu-setting-form">
|
||||||
<a class="side-menu-toggler" data-target="#apps-categories-custom-list" href="#_">
|
<a class="side-menu-toggler" data-target="#apps-categories-custom-list" href="#_">
|
||||||
🖱️ <?php p($l->t('Show and hide the list of applications')); ?>
|
🖱️ <?php p($l->t($labelShowHideApps)); ?>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<div id="apps-categories-custom-list" style="display: none">
|
<div id="apps-categories-custom-list" style="display: none">
|
||||||
@@ -997,7 +999,7 @@ $choicesSizes = [
|
|||||||
<progress max="100" value="0" id="side-menu-save-progress"></progress>
|
<progress max="100" value="0" id="side-menu-save-progress"></progress>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<a href="<?php echo $urlGenerator->linkToRoute('side_menu.AdminSetting.exportConfiguration') ?>" target="_blank">
|
<a href="<?php echo $urlGenerator->linkToRoute('side_menu.AdminSetting.exportConfiguration') ?>" target="_blank" rel="noopener">
|
||||||
<button class="btn btn-primary" >
|
<button class="btn btn-primary" >
|
||||||
<?php p($l->t('Export the configuration')); ?>
|
<?php p($l->t('Export the configuration')); ?>
|
||||||
</button>
|
</button>
|
||||||
@@ -1015,7 +1017,7 @@ $choicesSizes = [
|
|||||||
<span for="side-menu-opener">
|
<span for="side-menu-opener">
|
||||||
<?php p($l->t('You like this app and you want to support me?')); ?>
|
<?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">
|
<a style="margin-left: 10px" target="_blank" href="https://www.buymeacoffee.com/deblan" rel="noopener">
|
||||||
<button>
|
<button>
|
||||||
<?php p($l->t('Buy me a coffee ☕')); ?>
|
<?php p($l->t('Buy me a coffee ☕')); ?>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ $choicesYesNo = [
|
|||||||
'Yes' => '1',
|
'Yes' => '1',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
$labelShowHideApps = 'Show and hide the list of applications';
|
||||||
?>
|
?>
|
||||||
<div id="side-menu-section">
|
<div id="side-menu-section">
|
||||||
<?php if ($_['force']): ?>
|
<?php if ($_['force']): ?>
|
||||||
@@ -85,7 +87,7 @@ $choicesYesNo = [
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a class="side-menu-toggler" data-target="#target-blank-apps" href="#_">
|
<a class="side-menu-toggler" data-target="#target-blank-apps" href="#_">
|
||||||
🖱️ <?php p($l->t('Show and hide the list of applications')); ?>
|
🖱️ <?php p($l->t($labelShowHideApps)); ?>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -131,7 +133,7 @@ $choicesYesNo = [
|
|||||||
<div class="side-menu-setting-form">
|
<div class="side-menu-setting-form">
|
||||||
<p>
|
<p>
|
||||||
<a class="side-menu-toggler" data-target="#top-menu-apps" href="#_">
|
<a class="side-menu-toggler" data-target="#top-menu-apps" href="#_">
|
||||||
🖱️ <?php p($l->t('Show and hide the list of applications')); ?>
|
🖱️ <?php p($l->t($labelShowHideApps)); ?>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -171,7 +173,7 @@ $choicesYesNo = [
|
|||||||
<div class="side-menu-setting-form">
|
<div class="side-menu-setting-form">
|
||||||
<p>
|
<p>
|
||||||
<a class="side-menu-toggler" data-target="#top-side-menu-apps" href="#_">
|
<a class="side-menu-toggler" data-target="#top-side-menu-apps" href="#_">
|
||||||
🖱️ <?php p($l->t('Show and hide the list of applications')); ?>
|
🖱️ <?php p($l->t($labelShowHideApps)); ?>
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@@ -216,7 +218,7 @@ $choicesYesNo = [
|
|||||||
<span for="side-menu-opener">
|
<span for="side-menu-opener">
|
||||||
<?php p($l->t('You like this app and you want to support me?')); ?>
|
<?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">
|
<a style="margin-left: 10px" target="_blank" href="https://www.buymeacoffee.com/deblan" rel="noopener">
|
||||||
<button>
|
<button>
|
||||||
<?php p($l->t('Buy me a coffee ☕')); ?>
|
<?php p($l->t('Buy me a coffee ☕')); ?>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user