forked from deblan/side_menu
Compare commits
3 commits
develop
...
translatio
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a00fcb1423 |
||
|
|
f335c086b6 |
||
|
|
7bc8cd857c |
17 changed files with 187 additions and 283 deletions
|
|
@ -32,7 +32,7 @@ steps:
|
||||||
- echo "$APP_CERTIFICATE" > "/tmp/side_menu.key"
|
- echo "$APP_CERTIFICATE" > "/tmp/side_menu.key"
|
||||||
- echo "$APP_PUBLIC_CERTIFICATE" > "/tmp/side_menu.crt"
|
- echo "$APP_PUBLIC_CERTIFICATE" > "/tmp/side_menu.crt"
|
||||||
- mkdir /tmp/app
|
- mkdir /tmp/app
|
||||||
- cp -r README.md CHANGELOG.md appinfo lib img l10n js src templates screenshots vendor /tmp/app
|
- cp -r README.md CHANGELOG.md appinfo css lib img l10n js src templates screenshots vendor /tmp/app
|
||||||
- /usr/src/nextcloud/occ integrity:sign-app
|
- /usr/src/nextcloud/occ integrity:sign-app
|
||||||
--privateKey=/tmp/side_menu.key
|
--privateKey=/tmp/side_menu.key
|
||||||
--certificate=/tmp/side_menu.crt
|
--certificate=/tmp/side_menu.crt
|
||||||
|
|
|
||||||
42
CHANGELOG.md
42
CHANGELOG.md
|
|
@ -1,47 +1,5 @@
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
## 5.1.1
|
|
||||||
### Fixed
|
|
||||||
* fix(build): define appName to fix this error: "The `@nextcloud/vue` library was used without setting / replacing the `appName`"
|
|
||||||
* fix #349: add custom controller to retrieve core apps
|
|
||||||
|
|
||||||
## 5.1.0
|
|
||||||
### Added
|
|
||||||
* fix #425: allow to set a color using hex code
|
|
||||||
### Fixed
|
|
||||||
* #422: usage of `OC\AppFramework\Http\Request` instead of `$_SERVER`
|
|
||||||
|
|
||||||
## 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
|
|
||||||
### Added
|
|
||||||
* add new translations
|
|
||||||
* add route `/apps/side_menu/user/config`
|
|
||||||
* add new UI for admin and personals settings
|
|
||||||
### Changed
|
|
||||||
* migrate to Vue 3 and so add/update or remove dependencies
|
|
||||||
* replace CSS with SCSS
|
|
||||||
* remove route `/apps/side_menu/js/script`
|
|
||||||
* remove generated Javascript using PHP
|
|
||||||
* rewrite the standard menu of Nextcloud
|
|
||||||
### Security
|
|
||||||
* fix CVE-2023-44270
|
|
||||||
* fix CVE-2024-9506
|
|
||||||
* fix CVE-2024-6783
|
|
||||||
|
|
||||||
## 4.1.1
|
## 4.1.1
|
||||||
### Fixed
|
### Fixed
|
||||||
* fix(CssController): add missing NoCSRFRequired import (#397)
|
* fix(CssController): add missing NoCSRFRequired import (#397)
|
||||||
|
|
|
||||||
2
Makefile
2
Makefile
|
|
@ -20,7 +20,7 @@ release:
|
||||||
|
|
||||||
test -d $$RELEASE_DIRECTORY/$$VERSION && rm -fr $$RELEASE_DIRECTORY/$$VERSION
|
test -d $$RELEASE_DIRECTORY/$$VERSION && rm -fr $$RELEASE_DIRECTORY/$$VERSION
|
||||||
mkdir -p $$RELEASE_DIRECTORY/$$VERSION/side_menu
|
mkdir -p $$RELEASE_DIRECTORY/$$VERSION/side_menu
|
||||||
cp -r README.md CHANGELOG.md appinfo lib img l10n js src templates screenshots vendor $$RELEASE_DIRECTORY/$$VERSION/side_menu
|
cp -r README.md CHANGELOG.md appinfo css lib img l10n js src templates screenshots vendor $$RELEASE_DIRECTORY/$$VERSION/side_menu
|
||||||
cd $$RELEASE_DIRECTORY/$$VERSION
|
cd $$RELEASE_DIRECTORY/$$VERSION
|
||||||
zip -r side_menu_v$$VERSION.zip side_menu
|
zip -r side_menu_v$$VERSION.zip side_menu
|
||||||
tar cvzf side_menu_v$$VERSION.tar.gz side_menu
|
tar cvzf side_menu_v$$VERSION.tar.gz side_menu
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@ You like this app and you want to support me? ☕ [Buy me a coffee](https://www.
|
||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
|
|
||||||
* PHP >= 8.1
|
* PHP >= 8.0
|
||||||
|
* App `theming` enabled
|
||||||
|
|
||||||
Installation and upgrade
|
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
|
$ 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.
|
Administrators can edit many settings using the administration page.
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,14 @@ This application is rather suitable for instances that activate a lot of applica
|
||||||
|
|
||||||
Use the shortcut `Ctrl`+`o` to open and to hide the side menu. Use `tab` to navigate.
|
Use the shortcut `Ctrl`+`o` to open and to hide the side menu. Use `tab` to navigate.
|
||||||
|
|
||||||
You can customize colors depending of the theme.
|
You can customize colors depending of the theme (Dark theme and Breeze Dark).
|
||||||
|
|
||||||
To report a bug or request a feature, please open an issue.
|
You can report a bug or request a feature by opening an issue.
|
||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
|
|
||||||
* PHP >= 8.1
|
* PHP >= 8.1
|
||||||
|
* App `theming` enabled
|
||||||
|
|
||||||
If you like this application and if you want to support the development:
|
If you like this application and if you want to support the development:
|
||||||
|
|
||||||
|
|
@ -30,7 +31,7 @@ Notice
|
||||||
Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**.
|
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/).
|
In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/).
|
||||||
]]></description>
|
]]></description>
|
||||||
<version>5.1.1</version>
|
<version>4.1.1</version>
|
||||||
<licence>agpl</licence>
|
<licence>agpl</licence>
|
||||||
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
|
<author mail="contact@deblan.fr" homepage="https://www.deblan.fr/">Simon Vieille</author>
|
||||||
<namespace>SideMenu</namespace>
|
<namespace>SideMenu</namespace>
|
||||||
|
|
@ -53,7 +54,7 @@ In case of downtime, you can download **Custom Menu** from [here](https://kim.de
|
||||||
<screenshot><![CDATA[https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png]]></screenshot>
|
<screenshot><![CDATA[https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_default_menu.png]]></screenshot>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<php min-version="8.1" max-version="8.4" />
|
<php min-version="8.1" max-version="8.4" />
|
||||||
<nextcloud min-version="31" max-version="32"/>
|
<nextcloud min-version="30" max-version="32"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<settings>
|
<settings>
|
||||||
<admin>OCA\SideMenu\Settings\Admin</admin>
|
<admin>OCA\SideMenu\Settings\Admin</admin>
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@
|
||||||
|
|
||||||
namespace OCA\SideMenu\AppInfo;
|
namespace OCA\SideMenu\AppInfo;
|
||||||
|
|
||||||
use OC\AllConfig;
|
use OC;
|
||||||
use OC\App\AppStore\Fetcher\CategoryFetcher;
|
use OC\App\AppStore\Fetcher\CategoryFetcher;
|
||||||
use OC\AppFramework\Http\Request;
|
|
||||||
use OC\Security\CSP\ContentSecurityPolicyNonceManager;
|
use OC\Security\CSP\ContentSecurityPolicyNonceManager;
|
||||||
use OC\User\User;
|
use OC\User\User;
|
||||||
use OCA\SideMenu\Service\AppRepository;
|
use OCA\SideMenu\Service\AppRepository;
|
||||||
|
|
@ -32,12 +31,23 @@ use Psr\Container\ContainerInterface;
|
||||||
class Application extends App implements IBootstrap
|
class Application extends App implements IBootstrap
|
||||||
{
|
{
|
||||||
public const APP_ID = 'side_menu';
|
public const APP_ID = 'side_menu';
|
||||||
|
|
||||||
public const APP_NAME = 'Custom menu';
|
public const APP_NAME = 'Custom menu';
|
||||||
|
|
||||||
protected AllConfig $config;
|
/**
|
||||||
protected ContentSecurityPolicyNonceManager $cspnm;
|
* @var OC\AllConfig
|
||||||
protected Request $request;
|
*/
|
||||||
protected ?User $user = null;
|
protected $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var ContentSecurityPolicyNonceManager
|
||||||
|
*/
|
||||||
|
protected $cspnm;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var User
|
||||||
|
*/
|
||||||
|
protected $user;
|
||||||
|
|
||||||
public function __construct(array $urlParams = [])
|
public function __construct(array $urlParams = [])
|
||||||
{
|
{
|
||||||
|
|
@ -86,7 +96,6 @@ class Application extends App implements IBootstrap
|
||||||
$this->config = \OC::$server->getConfig();
|
$this->config = \OC::$server->getConfig();
|
||||||
$this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
|
$this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
|
||||||
$this->user = \OC::$server[IUserSession::class]->getUser();
|
$this->user = \OC::$server[IUserSession::class]->getUser();
|
||||||
$this->request = \OC::$server->getRequest();
|
|
||||||
|
|
||||||
if (!$this->isEnabled()) {
|
if (!$this->isEnabled()) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -97,10 +106,6 @@ class Application extends App implements IBootstrap
|
||||||
|
|
||||||
protected function isEnabled(): bool
|
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;
|
$enabled = true;
|
||||||
$isForced = (bool) $this->config->getAppValue(self::APP_ID, 'force', '0');
|
$isForced = (bool) $this->config->getAppValue(self::APP_ID, 'force', '0');
|
||||||
|
|
||||||
|
|
@ -123,6 +128,7 @@ class Application extends App implements IBootstrap
|
||||||
protected function addAssets()
|
protected function addAssets()
|
||||||
{
|
{
|
||||||
Util::addScript(self::APP_ID, 'side_menu-menu');
|
Util::addScript(self::APP_ID, 'side_menu-menu');
|
||||||
|
// Util::addStyle(self::APP_ID, 'sideMenu');
|
||||||
|
|
||||||
$assets = [
|
$assets = [
|
||||||
'stylesheet' => [
|
'stylesheet' => [
|
||||||
|
|
@ -133,6 +139,14 @@ class Application extends App implements IBootstrap
|
||||||
'rel' => 'stylesheet',
|
'rel' => 'stylesheet',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
// 'script' => [
|
||||||
|
// 'route' => 'side_menu.Js.script',
|
||||||
|
// 'type' => 'script',
|
||||||
|
// 'route_attr' => 'src',
|
||||||
|
// 'attr' => [
|
||||||
|
// 'nonce' => $this->cspnm->getNonce(),
|
||||||
|
// ],
|
||||||
|
// ],
|
||||||
];
|
];
|
||||||
|
|
||||||
$cache = $this->config->getAppValue(self::APP_ID, 'cache', '0');
|
$cache = $this->config->getAppValue(self::APP_ID, 'cache', '0');
|
||||||
|
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
<?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 OCA\SideMenu\Service\AppRepository;
|
|
||||||
use OCA\SideMenu\Service\ConfigProxy;
|
|
||||||
use OCP\AppFramework\Controller;
|
|
||||||
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
|
||||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
|
||||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
|
||||||
use OCP\IRequest;
|
|
||||||
use OCP\IUserSession;
|
|
||||||
|
|
||||||
class CoreController extends Controller
|
|
||||||
{
|
|
||||||
public function __construct(
|
|
||||||
string $appName,
|
|
||||||
IRequest $request,
|
|
||||||
protected ConfigProxy $config,
|
|
||||||
protected AppRepository $appRepository,
|
|
||||||
) {
|
|
||||||
parent::__construct($appName, $request);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[NoCSRFRequired]
|
|
||||||
#[NoAdminRequired]
|
|
||||||
#[PublicPage]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/core/apps')]
|
|
||||||
public function items(): JSONResponse
|
|
||||||
{
|
|
||||||
$user = \OC::$server[IUserSession::class]->getUser();
|
|
||||||
$items = [];
|
|
||||||
|
|
||||||
if (!$user) {
|
|
||||||
return new JSONResponse([
|
|
||||||
'items' => $items,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
$apps = $this->appRepository->getOrderedApps($user);
|
|
||||||
$keys = ['id', 'name', 'category', 'href', 'icon'];
|
|
||||||
|
|
||||||
foreach ($apps as &$app) {
|
|
||||||
foreach ($app as $key => $value) {
|
|
||||||
if (!in_array($key, $keys)) {
|
|
||||||
unset($app[$key]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return new JSONResponse([
|
|
||||||
'items' => $apps,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
namespace OCA\SideMenu\Controller;
|
namespace OCA\SideMenu\Controller;
|
||||||
|
|
||||||
use OC\User\User;
|
use OC\User\User;
|
||||||
|
use OCA\SideMenu\AppInfo\Application;
|
||||||
use OCA\SideMenu\Service\ConfigProxy;
|
use OCA\SideMenu\Service\ConfigProxy;
|
||||||
use OCA\Theming\ThemingDefaults;
|
use OCA\Theming\ThemingDefaults;
|
||||||
use OCP\AppFramework\Controller;
|
use OCP\AppFramework\Controller;
|
||||||
|
|
@ -28,12 +29,10 @@ use OCP\AppFramework\Http\Attribute\NoAdminRequired;
|
||||||
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
|
||||||
use OCP\AppFramework\Http\Attribute\PublicPage;
|
use OCP\AppFramework\Http\Attribute\PublicPage;
|
||||||
use OCP\AppFramework\Http\JSONResponse;
|
use OCP\AppFramework\Http\JSONResponse;
|
||||||
|
use OCP\AppFramework\Http\TemplateResponse;
|
||||||
use OCP\IRequest;
|
use OCP\IRequest;
|
||||||
use OCP\IUserSession;
|
use OCP\IUserSession;
|
||||||
use OCP\L10N\IFactory;
|
use OCP\L10N\IFactory;
|
||||||
use OCP\IAvatarManager;
|
|
||||||
use OCP\INavigationManager;
|
|
||||||
use OCP\IURLGenerator;
|
|
||||||
|
|
||||||
class JsController extends Controller
|
class JsController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -45,13 +44,26 @@ class JsController extends Controller
|
||||||
protected ConfigProxy $config,
|
protected ConfigProxy $config,
|
||||||
protected ThemingDefaults $themingDefaults,
|
protected ThemingDefaults $themingDefaults,
|
||||||
protected IFactory $l10nFactory,
|
protected IFactory $l10nFactory,
|
||||||
protected IAvatarManager $avatarManager,
|
|
||||||
protected IUserSession $userSession,
|
|
||||||
protected INavigationManager $navigationManager,
|
|
||||||
protected IURLGenerator $urlGenerator,
|
|
||||||
) {
|
) {
|
||||||
parent::__construct($appName, $request);
|
parent::__construct($appName, $request);
|
||||||
$this->user = $this->userSession->getUser();
|
|
||||||
|
$this->themingDefaults = $themingDefaults;
|
||||||
|
|
||||||
|
$this->user = \OC::$server[IUserSession::class]->getUser();
|
||||||
|
$this->config = $config;
|
||||||
|
$this->l10nFactory = $l10nFactory;
|
||||||
|
}
|
||||||
|
|
||||||
|
#[NoCSRFRequired]
|
||||||
|
#[NoAdminRequired]
|
||||||
|
#[PublicPage]
|
||||||
|
#[FrontpageRoute(verb: 'GET', url: '/js/script')]
|
||||||
|
public function script(): TemplateResponse
|
||||||
|
{
|
||||||
|
$response = new TemplateResponse(Application::APP_ID, 'js/script', $this->getConfig(), 'blank');
|
||||||
|
$response->addHeader('Content-Type', 'text/javascript');
|
||||||
|
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoCSRFRequired]
|
#[NoCSRFRequired]
|
||||||
|
|
@ -99,25 +111,25 @@ class JsController extends Controller
|
||||||
$targetBlankApps = $userTargetBlankApps;
|
$targetBlankApps = $userTargetBlankApps;
|
||||||
}
|
}
|
||||||
|
|
||||||
$isAvatarSet = $this->avatarManager->getAvatar($this->user->getUID())->exists();
|
$isAvatarSet = \OC::$server->getAvatarManager()->getAvatar($this->user->getUid())->exists();
|
||||||
|
|
||||||
if ($useAvatar && $isAvatarSet) {
|
if ($useAvatar && $isAvatarSet) {
|
||||||
$avatar = $this->urlGenerator->linkToRoute('core.avatar.getAvatar', [
|
$avatar = \OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', [
|
||||||
'userId' => $this->user->getUID(),
|
'userId' => $this->user->getUid(),
|
||||||
'size' => 128,
|
'size' => 128,
|
||||||
'v' => $this->config->getUserValueInt($this->user, 'avatar', 'version', 0),
|
'v' => $this->config->getUserValueInt($this->user, 'avatar', 'version', 0),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->config->getAppValueBool('show-settings', '0')) {
|
if ($this->config->getAppValueBool('show-settings', '0')) {
|
||||||
$settingsNav = $this->navigationManager->getAll('settings');
|
$settingsNav = \OC::$server->getNavigationManager()->getAll('settings');
|
||||||
|
|
||||||
if (isset($settingsNav['settings'])) {
|
if (isset($settingsNav['settings'])) {
|
||||||
$settings = [
|
$settings = [
|
||||||
'href' => $settingsNav['settings']['href'],
|
'href' => $settingsNav['settings']['href'],
|
||||||
'name' => $settingsNav['settings']['name'],
|
'name' => $settingsNav['settings']['name'],
|
||||||
'avatar' => $this->urlGenerator->linkToRoute('core.avatar.getAvatar', [
|
'avatar' => \OC::$server->getURLGenerator()->linkToRoute('core.avatar.getAvatar', [
|
||||||
'userId' => $this->user->getUID(),
|
'userId' => $this->user->getUid(),
|
||||||
'size' => 32,
|
'size' => 32,
|
||||||
'v' => $this->config->getUserValueInt($this->user, 'avatar', 'version', 0),
|
'v' => $this->config->getUserValueInt($this->user, 'avatar', 'version', 0),
|
||||||
]),
|
]),
|
||||||
|
|
@ -126,7 +138,7 @@ class JsController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$indexUrl = $this->urlGenerator->linkTo('', 'index.php');
|
$indexUrl = \OC::$server->getURLGenerator()->linkTo('', 'index.php');
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'opener-position' => $this->config->getAppValue('opener-position', 'before'),
|
'opener-position' => $this->config->getAppValue('opener-position', 'before'),
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,6 @@ class PersonalSettingController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
#[NoCSRFRequired]
|
#[NoCSRFRequired]
|
||||||
#[NoAdminRequired]
|
|
||||||
#[FrontpageRoute(verb: 'GET', url: '/user/config')]
|
#[FrontpageRoute(verb: 'GET', url: '/user/config')]
|
||||||
public function configuration(): JSONResponse
|
public function configuration(): JSONResponse
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 380 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 79 KiB |
|
|
@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
<template>
|
<template>
|
||||||
<NcColorPicker
|
<NcColorPicker
|
||||||
v-model="model"
|
v-model="model"
|
||||||
:advancedFields="true"
|
|
||||||
class="cm-settings-form-colorpicker"
|
class="cm-settings-form-colorpicker"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
'Custom menu': 'Custom menu'
|
'Custom menu': 'Пользовательское меню'
|
||||||
'Enable the custom menu': 'Включить пользовательское меню'
|
'Enable the custom menu': 'Включить пользовательское меню'
|
||||||
'No': 'Нет'
|
'No': 'Нет'
|
||||||
'Yes': 'Да'
|
'Yes': 'Да'
|
||||||
|
|
@ -77,7 +77,7 @@
|
||||||
'Customize sorting': 'Настроить сортировку'
|
'Customize sorting': 'Настроить сортировку'
|
||||||
'Order by': 'В порядке'
|
'Order by': 'В порядке'
|
||||||
'Name': 'Название'
|
'Name': 'Название'
|
||||||
'Customed': 'Приспособлено'
|
'Customed': 'Пользовательское'
|
||||||
'Show and hide the list of categories': 'Показать или скрыть список категорий'
|
'Show and hide the list of categories': 'Показать или скрыть список категорий'
|
||||||
'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Эти настройки используются темами Тёмная и Тёмная Breeze.'
|
'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Эти настройки используются темами Тёмная и Тёмная Breeze.'
|
||||||
'Dark mode colors': 'Цвета тёмной темы'
|
'Dark mode colors': 'Цвета тёмной темы'
|
||||||
|
|
|
||||||
|
|
@ -1,111 +1,111 @@
|
||||||
'Custom menu': ''
|
'Custom menu': 'Anpassad meny'
|
||||||
'Enable the custom menu': ''
|
'Enable the custom menu': 'Aktivera den anpassade menyn'
|
||||||
'No': ''
|
'No': 'Nej'
|
||||||
'Yes': ''
|
'Yes': 'Ja'
|
||||||
'Menu': ''
|
'Menu': 'Meny'
|
||||||
'Use the shortcut Ctrl+o to open and to hide the side menu. Use tab key to navigate.': ''
|
'Use the shortcut Ctrl+o to open and to hide the side menu. Use tab key to navigate.': 'Använd genvägen Ctrl+o för att visa eller dölja sidomenyn. Använd tabb-tangenten för att navigera.'
|
||||||
'Top menu': ''
|
'Top menu': 'Toppmeny'
|
||||||
'Apps that not must be moved in the side menu': ''
|
'Apps that not must be moved in the side menu': 'Appar som inte får flyttas i sidomenyn'
|
||||||
'If there is no selection then the global configuration is applied.': ''
|
'If there is no selection then the global configuration is applied.': 'Om inget val har gjorts tillämpas den globala konfigurationen.'
|
||||||
'Experimental': ''
|
'Experimental': 'Experimentell'
|
||||||
'Save': ''
|
'Save': 'Spara'
|
||||||
'You like this app and you want to support me?': ''
|
'You like this app and you want to support me?': 'Gillar du den här appen och vill stödja mig?'
|
||||||
'Buy me a coffee ☕': ''
|
'Buy me a coffee ☕': 'Bjud mig på en kaffe ☕'
|
||||||
'Hidden': ''
|
'Hidden': 'Dold'
|
||||||
'Small': ''
|
'Small': 'Liten'
|
||||||
'Normal': ''
|
'Normal': 'Normal'
|
||||||
'Big': ''
|
'Big': 'Stor'
|
||||||
'Hidden icon': ''
|
'Hidden icon': 'Dold ikon'
|
||||||
'Small icon': ''
|
'Small icon': 'Liten ikon'
|
||||||
'Normal icon': ''
|
'Normal icon': 'Normal ikon'
|
||||||
'Big icon': ''
|
'Big icon': 'Stor ikon'
|
||||||
'Hidden text': ''
|
'Hidden text': 'Dold text'
|
||||||
'Small text': ''
|
'Small text': 'Liten text'
|
||||||
'Normal text': ''
|
'Normal text': 'Normal text'
|
||||||
'Big text': ''
|
'Big text': 'Stor text'
|
||||||
'Colors': ''
|
'Colors': 'Färger'
|
||||||
'Background color': ''
|
'Background color': 'Bakgrundsfärg'
|
||||||
'Background color of current app': ''
|
'Background color of current app': 'Bakgrundsfärg för aktuell app'
|
||||||
'Text color': ''
|
'Text color': 'Textfärg'
|
||||||
'Loader': ''
|
'Loader': 'Laddare'
|
||||||
'Icon': ''
|
'Icon': 'Ikon'
|
||||||
'Same color': ''
|
'Same color': 'Samma färg'
|
||||||
'Opposite color': ''
|
'Opposite color': 'Motsatt färg'
|
||||||
'Transparent': ''
|
'Transparent': 'Transparent'
|
||||||
'Opaque': ''
|
'Opaque': 'Ogenomskinlig'
|
||||||
'Opener': ''
|
'Opener': 'Öppnare'
|
||||||
'Default': ''
|
'Default': 'Standard'
|
||||||
'Default (dark)': ''
|
'Default (dark)': 'Standard(mörk)'
|
||||||
'Hamburger': ''
|
'Hamburger': 'Hamburgermeny'
|
||||||
'Hamburger (dark)': ''
|
'Hamburger (dark)': 'Hamburgermeny(mörk)'
|
||||||
'Hamburger 2': ''
|
'Hamburger 2': 'Hamburgermeny 2'
|
||||||
'Hamburger 2 (dark)': ''
|
'Hamburger 2 (dark)': 'Hamburgermeny 2 (mörk)'
|
||||||
'Before the logo': ''
|
'Before the logo': 'Före logotypen'
|
||||||
'After the logo': ''
|
'After the logo': 'Efter logotypen'
|
||||||
'Position': ''
|
'Position': 'Position'
|
||||||
'Show only the opener (hidden logo)': ''
|
'Show only the opener (hidden logo)': 'Visa endast öppnaren (gömd logotyp)'
|
||||||
'Do not display the side menu and the opener if there is no application (eg: public pages).': ''
|
'Do not display the side menu and the opener if there is no application (eg: public pages).': 'Visa inte sidomenyn eller öppnaren om det inte finns någon applikation (t.ex. publika sidor).'
|
||||||
'Panel': ''
|
'Panel': 'Panel'
|
||||||
'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': ''
|
'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': 'Öppna menyn när muspekaren hovrar över öppnaren (automatiskt avaktiverat på pekskärmar)'
|
||||||
'Display the big menu': ''
|
'Display the big menu': 'Visa den stora menyn'
|
||||||
'Display the logo': ''
|
'Display the logo': 'Visa logotypen'
|
||||||
'Icons and texts': ''
|
'Icons and texts': 'Ikoner och texter'
|
||||||
'Loader enabled': ''
|
'Loader enabled': 'Laddare aktiverad'
|
||||||
'Tips': ''
|
'Tips': 'Tips'
|
||||||
'Always displayed': ''
|
'Always displayed': 'Alltid visad'
|
||||||
'This is the automatic behavior when the menu is always displayed.': ''
|
'This is the automatic behavior when the menu is always displayed.': 'Detta är det automatiska beteendet när menyn alltid är visad.'
|
||||||
'Not compatible with touch screens.': ''
|
'Not compatible with touch screens.': 'Inte kompatibel med pekskärmar.'
|
||||||
'Big menu': ''
|
'Big menu': 'Stor meny'
|
||||||
'Live preview': ''
|
'Live preview': 'Förhandsgranskning i realtid'
|
||||||
'Open apps in new tab': ''
|
'Open apps in new tab': 'Öppna appar i ny flik'
|
||||||
'Use the global setting': ''
|
'Use the global setting': 'Använd den globala inställningen'
|
||||||
'Use my selection': ''
|
'Use my selection': 'Använd mitt val'
|
||||||
'Show and hide the list of applications': ''
|
'Show and hide the list of applications': 'Visa och dölj listan över applikationer'
|
||||||
'Use the avatar instead of the logo': ''
|
'Use the avatar instead of the logo': 'Använd avataren istället för logotypen'
|
||||||
'You do not have permission to change the settings.': ''
|
'You do not have permission to change the settings.': 'Du har inte behörighet att ändra inställningarna.'
|
||||||
'Force this configuration to users': ''
|
'Force this configuration to users': 'Tvinga denna konfiguration för användare'
|
||||||
'Export the configuration': ''
|
'Export the configuration': 'Exportera konfigurationen'
|
||||||
'Purge the cache': ''
|
'Purge the cache': 'Rensa cachen'
|
||||||
'Show the link to settings': ''
|
'Show the link to settings': 'Visa länken till inställningarna'
|
||||||
'The menu is enabled by default for users': ''
|
'The menu is enabled by default for users': 'Menyn är aktiverad som standard för användare'
|
||||||
'Except when the configuration is forced.': ''
|
'Except when the configuration is forced.': 'Förutom när konfigurationen är tvingad.'
|
||||||
'Apps that should not be displayed in the menu': ''
|
'Apps that should not be displayed in the menu': 'Appar som inte ska visas i menyn'
|
||||||
'This feature is only compatible with the <code>big menu</code> display.': ''
|
'This feature is only compatible with the <code>big menu</code> display.': 'Denna funktion är endast kompatibel med <code>stor meny</code>.'
|
||||||
'The logo is a link to the default app': ''
|
'The logo is a link to the default app': 'Logotypen är en länk till standardappen'
|
||||||
'Others': ''
|
'Others': 'Övriga'
|
||||||
'Categories': ''
|
'Categories': 'Kategorier'
|
||||||
'Customize sorting': ''
|
'Customize sorting': 'Anpassa sortering'
|
||||||
'Order by': ''
|
'Order by': 'Sortera efter'
|
||||||
'Name': ''
|
'Name': 'Namn'
|
||||||
'Customed': ''
|
'Customed': 'Anpassad'
|
||||||
'Show and hide the list of categories': ''
|
'Show and hide the list of categories': 'Visa och dölj listan över kategorier'
|
||||||
'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': ''
|
'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Dessa parametrar används när mörkt tema eller Breeze Dark Theme är aktiverade.'
|
||||||
'Dark mode colors': ''
|
'Dark mode colors': 'Färger för mörkt läge'
|
||||||
'With categories': ''
|
'With categories': 'Med kategorier'
|
||||||
'Custom categories': ''
|
'Custom categories': 'Anpassade kategorier'
|
||||||
'Customize application categories': ''
|
'Customize application categories': 'Anpassa app kategorier'
|
||||||
'Reset to default': ''
|
'Reset to default': 'Återställ till standardvärden'
|
||||||
'Applications': ''
|
'Applications': 'Applikationer'
|
||||||
'Applications kept in the top menu': ''
|
'Applications kept in the top menu': 'Applikationer som hålls i toppmenyn'
|
||||||
'Applications kept in the top menu but also shown in side menu': ''
|
'Applications kept in the top menu but also shown in side menu': 'Applikationer som visas både i toppmenyn och i sidomenyn'
|
||||||
'These applications must be selected in the previous option.': ''
|
'These applications must be selected in the previous option.': 'Dessa applikationer måste väljas i föregående alternativ.'
|
||||||
'Hide labels on mouse over': ''
|
'Hide labels on mouse over': 'Dölj etiketter när muspekaren är över'
|
||||||
'Except the hovered app': ''
|
'Except the hovered app': 'Förutom den app som muspekaren är över'
|
||||||
'Search': ''
|
'Search': 'Sök'
|
||||||
'Toggle the menu': ''
|
'Toggle the menu': 'Växla menyn'
|
||||||
'Open the documentation': ''
|
'Open the documentation': 'Öppna dokumentationen'
|
||||||
'Ask the developer': ''
|
'Ask the developer': 'Fråga utvecklaren'
|
||||||
'New request': ''
|
'New request': 'Ny förfrågan'
|
||||||
'Report a bug': ''
|
'Report a bug': 'Rapportera ett fel'
|
||||||
'Show the configuration': ''
|
'Show the configuration': 'Visa konfigurationen'
|
||||||
'Configuration:': ''
|
'Configuration:': 'Konfiguration:'
|
||||||
'Done!': ''
|
'Done!': 'Klar!'
|
||||||
'Copy': ''
|
'Copy': 'Kopiera'
|
||||||
'Need help': ''
|
'Need help': 'Behöver hjälp'
|
||||||
'I would like a new feature': ''
|
'I would like a new feature': 'Jag skulle vilja ha en ny funktion'
|
||||||
'Something went wrong': ''
|
'Something went wrong': 'Något gick fel'
|
||||||
'Select apps': ''
|
'Select apps': 'Välj appar'
|
||||||
'Sort': ''
|
'Sort': 'Sortera'
|
||||||
'Customize': ''
|
'Customize': 'Anpassa'
|
||||||
'Custom': ''
|
'Custom': 'Anpassad'
|
||||||
'Close': ''
|
'Close': 'Stäng'
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
:data-app-id="app.id"
|
:data-app-id="app.id"
|
||||||
class="app-menu-entry"
|
class="app-menu-entry"
|
||||||
:class="{
|
:class="{
|
||||||
'app-menu-entry__active': app.id === activeApp,
|
'app-menu-entry__active': app.active,
|
||||||
'app-menu-entry__hidden-label': hiddenLabels === 1,
|
'app-menu-entry__hidden-label': hiddenLabels === 1,
|
||||||
'app-menu-main__show-hovered': hiddenLabels === 2,
|
'app-menu-main__show-hovered': hiddenLabels === 2,
|
||||||
}"
|
}"
|
||||||
|
|
@ -44,7 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
:class="{ 'has-unread': app.unread > 0 }"
|
:class="{ 'has-unread': app.unread > 0 }"
|
||||||
:aria-label="app.name"
|
:aria-label="app.name"
|
||||||
:target="targetBlankApps.indexOf(app.id) !== -1 ? '_blank' : undefined"
|
:target="targetBlankApps.indexOf(app.id) !== -1 ? '_blank' : undefined"
|
||||||
:aria-current="app.id === activeApp ? 'page' : false"
|
:aria-current="app.active ? 'page' : false"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
:src="app.icon"
|
:src="app.icon"
|
||||||
|
|
@ -69,7 +69,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
v-for="app in popoverAppList"
|
v-for="app in popoverAppList"
|
||||||
:key="app.id"
|
:key="app.id"
|
||||||
:aria-label="app.name"
|
:aria-label="app.name"
|
||||||
:aria-current="app.id === activeApp ? 'page' : false"
|
:aria-current="app.active ? 'page' : false"
|
||||||
:href="app.href"
|
:href="app.href"
|
||||||
:style="makeStyle(app)"
|
:style="makeStyle(app)"
|
||||||
class="cm-standardmenu-app-menu-popover-entry app-menu-popover-entry"
|
class="cm-standardmenu-app-menu-popover-entry app-menu-popover-entry"
|
||||||
|
|
@ -101,7 +101,6 @@ import { ref, onMounted } from 'vue'
|
||||||
import { useConfigStore } from '../store/config.js'
|
import { useConfigStore } from '../store/config.js'
|
||||||
import { useNavStore } from '../store/nav.js'
|
import { useNavStore } from '../store/nav.js'
|
||||||
import { NcActions, NcActionLink } from '@nextcloud/vue'
|
import { NcActions, NcActionLink } from '@nextcloud/vue'
|
||||||
import { getActiveAppId } from '../lib/app.js'
|
|
||||||
|
|
||||||
const navStore = useNavStore()
|
const navStore = useNavStore()
|
||||||
const configStore = useConfigStore()
|
const configStore = useConfigStore()
|
||||||
|
|
@ -113,7 +112,6 @@ const topMenuApps = ref([])
|
||||||
const appsOrder = ref([])
|
const appsOrder = ref([])
|
||||||
const mainAppList = ref([])
|
const mainAppList = ref([])
|
||||||
const popoverAppList = ref([])
|
const popoverAppList = ref([])
|
||||||
const activeApp = ref(null)
|
|
||||||
let resizeTimeout = null
|
let resizeTimeout = null
|
||||||
|
|
||||||
const setApps = (value) => {
|
const setApps = (value) => {
|
||||||
|
|
@ -144,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) => {
|
const makeStyle = (app) => {
|
||||||
|
|
@ -160,11 +158,6 @@ const computeLists = () => {
|
||||||
popoverAppList.value = appList.value.slice(appLimit()).sort((a, b) => a.order - b.order)
|
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 () => {
|
onMounted(async () => {
|
||||||
const config = await configStore.getConfig()
|
const config = await configStore.getConfig()
|
||||||
|
|
||||||
|
|
@ -172,12 +165,14 @@ onMounted(async () => {
|
||||||
hiddenLabels.value = config['top-menu-mouse-over-hidden-label']
|
hiddenLabels.value = config['top-menu-mouse-over-hidden-label']
|
||||||
topMenuApps.value = config['top-menu-apps']
|
topMenuApps.value = config['top-menu-apps']
|
||||||
appsOrder.value = config['apps-order']
|
appsOrder.value = config['apps-order']
|
||||||
activeApp.value = getActiveAppId()
|
|
||||||
ready.value = true
|
ready.value = true
|
||||||
|
|
||||||
setApps(await navStore.getCoreApps())
|
setApps(await navStore.getCoreApps())
|
||||||
|
|
||||||
window.addEventListener('resize', reComputeLists)
|
window.addEventListener('resize', () => {
|
||||||
|
window.clearTimeout(resizeTimeout)
|
||||||
|
resizeTimeout = window.setTimeout(computeLists, 100)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,10 @@ export const useNavStore = defineStore('nav', () => {
|
||||||
|
|
||||||
async function getCoreApps() {
|
async function getCoreApps() {
|
||||||
if (coreApps == null) {
|
if (coreApps == null) {
|
||||||
coreApps = await await axios.get(generateUrl('/apps/side_menu/core/apps')).then((response) => response.data.items)
|
coreApps = await axios
|
||||||
|
.get(generateOcsUrl('core/navigation', 2) + '/apps?format=json')
|
||||||
|
.then((response) => response.data)
|
||||||
|
.then((value) => value.ocs.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
return coreApps
|
return coreApps
|
||||||
|
|
|
||||||
|
|
@ -77,10 +77,6 @@ module.exports = {
|
||||||
new webpack.ProvidePlugin({
|
new webpack.ProvidePlugin({
|
||||||
Buffer: ['buffer', 'Buffer'],
|
Buffer: ['buffer', 'Buffer'],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
new webpack.DefinePlugin({
|
|
||||||
appName: JSON.stringify(appName),
|
|
||||||
}),
|
|
||||||
],
|
],
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue