Compare commits

..

49 Commits

Author SHA1 Message Date
Simon Vieille 12604b44fc Merge pull request 'fix(StandardMenu): appLimit must return a value > 0' (#412) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/412
2025-04-17 00:05:38 +02:00
Simon Vieille b1e19ac965 Merge pull request 'fix(build): remove css directory' (#408) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/408
2025-04-16 20:10:25 +02:00
Simon Vieille ea83cc050c Merge pull request 'fix(build): remove css directory' (#407) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/407
2025-04-16 20:04:19 +02:00
Simon Vieille 36750532f6 Merge pull request 'release v5.0.0' (#406) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/406
2025-04-16 19:56:55 +02:00
Simon Vieille cf9495de46 Merge pull request 'v4.1.1' (#400) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/400
2025-03-12 18:41:47 +01:00
Simon Vieille 076435dc8e Merge pull request 'update changelog' (#396) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/396
2025-03-10 19:17:35 +01:00
Simon Vieille fe5f0287c3 Merge pull request 'release v4.1.0' (#395) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/395
2025-03-10 19:15:37 +01:00
Simon Vieille eff18bb143 Merge pull request 'v4.0.1' (#372) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/372
2024-10-30 19:08:49 +01:00
Simon Vieille 29826d3c54 Merge pull request 'develop' (#364) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/364
2024-10-27 18:53:20 +01:00
Simon Vieille 695934c28b Merge pull request 'v4.0.0' (#363) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/363
2024-10-27 17:20:18 +01:00
Simon Vieille aa2246a1ec Merge pull request 'release v3.13.1' (#356) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/356
2024-07-10 19:58:09 +02:00
Simon Vieille da04cf4222 Merge pull request 'release v3.13.0' (#353) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/353
2024-07-05 13:02:19 +02:00
Simon Vieille 7b33271d00 Merge pull request 'ci: rollback tag check' (#346) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/346
2024-04-08 14:33:50 +02:00
Simon Vieille e4e054835d Merge pull request 'ci: fix signature step (volumes)' (#345) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/345
2024-04-08 14:14:59 +02:00
Simon Vieille eae8ce80fb Merge pull request 'release v3.12.0' (#344) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/344
2024-04-08 11:59:32 +02:00
Simon Vieille 972c69d880 Merge pull request 'release v3.11.8' (#336) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/336
2024-02-20 21:26:26 +01:00
Simon Vieille dd8561e691 Merge pull request 'release v3.11.7' (#331) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/331
2024-02-14 19:10:56 +01:00
Simon Vieille 61a4689eb2 Merge pull request 'release v3.11.6' (#328) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/328
2024-02-12 23:22:28 +01:00
Simon Vieille 4532dd345e Merge pull request 'update app info' (#317) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/317
2024-01-28 23:07:31 +01:00
Simon Vieille 6effdc6eed Merge pull request 'release 3.11.5' (#316) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/316
2024-01-28 23:06:25 +01:00
Simon Vieille 810d83880b Merge pull request 'release v3.11.4' (#313) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/313
2024-01-27 10:47:53 +01:00
Simon Vieille 25e70f276f Merge pull request 'fix appinfo version' (#308) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/308
2024-01-16 20:40:28 +01:00
Simon Vieille d06b6b9e31 Merge pull request 'release 3.11.3' (#307) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/307
2024-01-16 20:14:53 +01:00
Simon Vieille 5c218bff2a Merge pull request 'releave v3.11.2' (#300) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/300
2023-11-12 20:30:56 +01:00
Simon Vieille b0385c172b Merge pull request 'release v3.11.1' (#297) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/297
2023-11-12 17:03:21 +01:00
Simon Vieille 04ac7e5ed1 Merge pull request 'update changelogs' (#293) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/293
2023-11-05 18:46:46 +01:00
Simon Vieille 67743485cb Merge pull request 'release v3.11.0' (#292) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/292
2023-11-05 18:45:25 +01:00
Simon Vieille 0ce318d6ec Merge pull request 'fix ci syntax' (#281) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/281
2023-09-29 16:48:36 +02:00
Simon Vieille c26c5f26df Merge pull request 'release v3.10.3' (#276) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/276
2023-07-24 21:35:58 +02:00
Simon Vieille 6ce7d3223f Merge pull request 'release v3.10.2' (#272) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/272
2023-07-15 15:22:53 +02:00
Simon Vieille 6eb977dad5 Merge pull request 'release v3.10.1' (#271) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/271
2023-07-15 15:03:26 +02:00
Simon Vieille 5f307cd046 Merge pull request 'release v3.10.0' (#268) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/268
2023-07-13 22:30:27 +02:00
Simon Vieille d2421f90bf Merge pull request 'release v3.9.1' (#266) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/266
2023-06-29 13:04:13 +02:00
Simon Vieille b16da36507 Merge pull request 'release v3.9.0' (#263) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/263
2023-06-23 12:33:54 +02:00
Simon Vieille 29f0ead9cc Merge pull request 'release v3.8.0' (#255) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/255
2023-05-25 13:49:08 +02:00
Simon Vieille e1567b0689 Merge pull request 'v3.7.4' (#249) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/249
2023-04-16 18:05:46 +02:00
Simon Vieille aa139bc671 Merge pull request 'release v3.7.3' (#246) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/246
2023-04-14 21:13:10 +02:00
Simon Vieille b133ba3a97 Merge pull request 'release of v3.7.2' (#238) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/238
2023-03-27 18:47:15 +02:00
Simon Vieille aaf2bb55db Merge pull request 'release v3.7.1' (#232) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/232
2023-03-19 10:00:00 +01:00
Simon Vieille 749f25a231 Merge pull request 'add badge of downloads' (#228) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/228
2023-03-11 00:30:39 +01:00
Simon Vieille 04026f5c75 Merge pull request 'release v3.7.0' (#227) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/227
2023-03-09 16:57:33 +01:00
Simon Vieille 48b2b30406 Merge pull request 'update issue template' (#223) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/223
2023-02-20 14:06:23 +01:00
Simon Vieille 22e5445330 Merge pull request 'release v3.6.0' (#221) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/221
2023-02-17 11:53:27 +01:00
Simon Vieille 0544fd3765 Merge pull request 'doc' (#218) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/218
2023-02-12 16:56:39 +01:00
Simon Vieille 2635dd89ca Merge pull request 'Doc' (#217) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/217
2023-02-12 00:34:56 +01:00
Simon Vieille aa203bb406 Merge pull request 'release v3.5.2' (#213) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/213
2023-01-21 22:31:21 +01:00
Simon Vieille 368c59a2bd Merge pull request 'next release' (#200) from develop into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/200
2023-01-07 10:40:14 +01:00
Simon Vieille ab7b1e96fe Merge pull request 'add gitea ISSUE/FEATURE templates' (#202) from gitea into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/202
2022-12-29 22:45:50 +01:00
Simon Vieille f4322a8d71 Merge pull request 'add gitea ISSUE/FEATURE templates' (#201) from gitea into master
Reviewed-on: https://gitnet.fr/deblan/side_menu/pulls/201
2022-12-29 22:45:03 +01:00
40 changed files with 349 additions and 10394 deletions
+4
View File
@@ -2,4 +2,8 @@
/node_modules /node_modules
/l10n/* /l10n/*
/releases /releases
/package-lock.json
!/l10n/.gitkeep !/l10n/.gitkeep
/yarn*.log
/src/admin.js.bk
/templates/settings/admin-form.php.bk
+120 -562
View File
File diff suppressed because it is too large Load Diff
+3 -2
View File
@@ -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/${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.
+3 -3
View File
@@ -30,7 +30,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>6.2.0</version> <version>5.0.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>
@@ -52,8 +52,8 @@ 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_big_menu.png]]></screenshot> <screenshot><![CDATA[https://gitnet.fr/deblan/side_menu/raw/branch/master/screenshots/nc25_big_menu.png]]></screenshot>
<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.5" /> <php min-version="8.1" max-version="8.4" />
<nextcloud min-version="34" max-version="35"/> <nextcloud min-version="31" max-version="32"/>
</dependencies> </dependencies>
<settings> <settings>
<admin>OCA\SideMenu\Settings\Admin</admin> <admin>OCA\SideMenu\Settings\Admin</admin>
+20 -18
View File
@@ -2,11 +2,9 @@
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\Security\CSRF\CsrfTokenManager;
use OC\User\User; use OC\User\User;
use OCA\SideMenu\Service\AppRepository; use OCA\SideMenu\Service\AppRepository;
use OCA\SideMenu\Service\CategoryRepository; use OCA\SideMenu\Service\CategoryRepository;
@@ -20,11 +18,8 @@ use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\EventDispatcher\IEventDispatcher; use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig; use OCP\IConfig;
use OCP\INavigationManager; use OCP\INavigationManager;
use OCP\IRequest;
use OCP\IURLGenerator;
use OCP\IUserSession; use OCP\IUserSession;
use OCP\L10N\IFactory; use OCP\L10N\IFactory;
use OCP\Server;
use OCP\Util; use OCP\Util;
use Psr\Container\ContainerInterface; use Psr\Container\ContainerInterface;
@@ -36,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 IConfig $config; /**
protected ContentSecurityPolicyNonceManager $cspnm; * @var OC\AllConfig
protected IRequest $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 = [])
{ {
@@ -87,9 +93,9 @@ class Application extends App implements IBootstrap
public function boot(IBootContext $context): void public function boot(IBootContext $context): void
{ {
$this->config = Server::get(IConfig::class); $this->config = \OC::$server->getConfig();
$this->user = Server::get(IUserSession::class)->getUser(); $this->cspnm = \OC::$server->getContentSecurityPolicyNonceManager();
$this->request = Server::get(IRequest::class); $this->user = \OC::$server[IUserSession::class]->getUser();
if (!$this->isEnabled()) { if (!$this->isEnabled()) {
return; return;
@@ -100,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');
@@ -141,7 +143,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 $value) { foreach ($assets as $value) {
$route = Server::get(IURLGenerator::class)->linkToRoute( $route = \OC::$server->getURLGenerator()->linkToRoute(
$value['route'], $value['route'],
['v' => $cache] ['v' => $cache]
); );
+1 -13
View File
@@ -97,7 +97,6 @@ class AdminSettingController extends Controller
'use-avatar', 'use-avatar',
'add-logo-link', 'add-logo-link',
'show-settings', 'show-settings',
'show-search-form',
'loader-enabled', 'loader-enabled',
'always-displayed', 'always-displayed',
'enabled', 'enabled',
@@ -138,7 +137,6 @@ class AdminSettingController extends Controller
'use-avatar' => '0', 'use-avatar' => '0',
'add-logo-link' => '1', 'add-logo-link' => '1',
'show-settings' => '0', 'show-settings' => '0',
'show-search-form' => '1',
'loader-enabled' => '1', 'loader-enabled' => '1',
'always-displayed' => '0', 'always-displayed' => '0',
'enabled' => '1', 'enabled' => '1',
@@ -208,17 +206,7 @@ class AdminSettingController extends Controller
} }
foreach ($defaults as $key => $default) { foreach ($defaults as $key => $default) {
if (array_key_exists($key, $config)) { if (!array_key_exists($key, $config)) {
continue;
}
if (in_array($key, $booleans)) {
$config[$key] = $default === '1';
} elseif (in_array($key, $arrays)) {
$config[$key] = json_decode($default);
} elseif (in_array($key, $integers)) {
$config[$key] = (int) $default;
} else {
$config[$key] = $default; $config[$key] = $default;
} }
} }
-74
View File
@@ -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,
]);
}
}
+15 -16
View File
@@ -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,14 @@ 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] #[NoCSRFRequired]
@@ -99,25 +99,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 +126,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'),
@@ -135,7 +135,6 @@ class JsController extends Controller
'force-light-icon' => $this->config->getAppValueBool('force-light-icon', '0'), 'force-light-icon' => $this->config->getAppValueBool('force-light-icon', '0'),
'display-logo' => $this->config->getAppValueBool('display-logo', '1'), 'display-logo' => $this->config->getAppValueBool('display-logo', '1'),
'use-avatar' => $this->config->getAppValueBool('use-avatar', '0'), 'use-avatar' => $this->config->getAppValueBool('use-avatar', '0'),
'show-search-form' => $this->config->getAppValueBool('show-search-form', '1'),
'hide-when-no-apps' => $this->config->getAppValueBool('hide-when-no-apps', '0'), 'hide-when-no-apps' => $this->config->getAppValueBool('hide-when-no-apps', '0'),
'loader-enabled' => $this->config->getAppValueBool('loader-enabled', '1'), 'loader-enabled' => $this->config->getAppValueBool('loader-enabled', '1'),
'always-displayed' => $this->config->getAppValueBool('always-displayed', '0'), 'always-displayed' => $this->config->getAppValueBool('always-displayed', '0'),
@@ -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
{ {
-5
View File
@@ -30,12 +30,7 @@ class LangRepository
->from('preferences') ->from('preferences')
; ;
// Nextcloud >=33+
if (method_exists($qb, 'executeQuery')) {
$stmt = $qb->executeQuery();
} else {
$stmt = $qb->execute(); $stmt = $qb->execute();
}
$langs = ['en']; $langs = ['en'];
-9300
View File
File diff suppressed because it is too large Load Diff
+1 -2
View File
@@ -11,9 +11,8 @@
}, },
"dependencies": { "dependencies": {
"@babel/core": ">=7.12.0 <8.0.0", "@babel/core": ">=7.12.0 <8.0.0",
"@formatjs/intl-segmenter": "^12.0.8",
"@nextcloud/router": "^3.0.1", "@nextcloud/router": "^3.0.1",
"@nextcloud/vue": "^9.9.0", "@nextcloud/vue": "^9.0.0-alpha.8",
"node-polyfill-webpack-plugin": "^4.1.0", "node-polyfill-webpack-plugin": "^4.1.0",
"pinia": "^3.0.1", "pinia": "^3.0.1",
"postcss": "^7.0.0 || ^8.0.1", "postcss": "^7.0.0 || ^8.0.1",
-2
View File
@@ -17,8 +17,6 @@
import './scss/admin.scss' import './scss/admin.scss'
import '@formatjs/intl-segmenter/polyfill.js'
import { createApp } from 'vue' import { createApp } from 'vue'
import { createPinia } from 'pinia' import { createPinia } from 'pinia'
import { waitContainer } from './lib/dom.js' import { waitContainer } from './lib/dom.js'
+2 -2
View File
@@ -73,10 +73,10 @@ const save = async () => {
if (Array.isArray(value) || typeof value === 'object') { if (Array.isArray(value) || typeof value === 'object') {
value = JSON.stringify(value) value = JSON.stringify(value)
} else if (typeof value === 'boolean') { } else if (typeof value === 'boolean') {
value = value ? '1' : '0' value = value ? 1 : 0
} }
OCP.AppConfig.setValue('side_menu', key, value.toString(), { OCP.AppConfig.setValue('side_menu', key, value, {
success() { success() {
update() update()
}, },
+2 -2
View File
@@ -69,11 +69,11 @@ const save = async () => {
if (Array.isArray(value) || typeof value === 'object') { if (Array.isArray(value) || typeof value === 'object') {
value = JSON.stringify(value) value = JSON.stringify(value)
} else if (typeof value === 'boolean') { } else if (typeof value === 'boolean') {
value = value ? '1' : '0' value = value ? 1 : 0
} }
formData.push('name=' + encodeURIComponent(key)) formData.push('name=' + encodeURIComponent(key))
formData.push('value=' + encodeURIComponent(value.toString())) formData.push('value=' + encodeURIComponent(value))
fetch(url, { fetch(url, {
method: 'POST', method: 'POST',
@@ -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
+13 -14
View File
@@ -94,19 +94,18 @@
'Search': 'Hledat' 'Search': 'Hledat'
'Toggle the menu': 'Vyp/zap nabídku' 'Toggle the menu': 'Vyp/zap nabídku'
'Open the documentation': 'Open the documentation' 'Open the documentation': 'Open the documentation'
'Ask the developer': 'Zeptejte se vývojáře' 'Ask the developer': 'Ask the developer'
'New request': 'Nový požadavek' 'New request': 'New request'
'Report a bug': 'Nahlásit chybu' 'Report a bug': 'Report a bug'
'Show the configuration': 'Zobrazit nastavení' 'Show the configuration': 'Show the configuration'
'Configuration:': 'Configuration:' 'Configuration:': 'Configuration:'
'Done!': 'Hotovo!' 'Done!': 'Done!'
'Copy': 'Zkopírovat' 'Copy': 'Copy'
'Need help': 'Potřebuji pomoc' 'Need help': 'Need help'
'I would like a new feature': 'Rád bych novou funkci v aplikaci' 'I would like a new feature': 'I would like a new feature'
'Something went wrong': 'Něco se pokazilo' 'Something went wrong': 'Something went wrong'
'Select apps': 'Vyberte aplikace' 'Select apps': 'Select apps'
'Sort': 'Seřadit' 'Sort': 'Sort'
'Customize': 'Přizpůsobit' 'Customize': 'Customize'
'Custom': 'Custom' 'Custom': 'Custom'
'Close': 'Zavřít' 'Close': 'Close'
'Show the search form': 'Show the search form'
-1
View File
@@ -109,4 +109,3 @@
'Customize': 'Customize' 'Customize': 'Customize'
'Custom': 'Custom' 'Custom': 'Custom'
'Close': 'Close' 'Close': 'Close'
'Show the search form': 'Show the search form'
+13 -14
View File
@@ -94,19 +94,18 @@
'Search': 'Buscar' 'Search': 'Buscar'
'Toggle the menu': 'Alternar el menú' 'Toggle the menu': 'Alternar el menú'
'Open the documentation': 'Open the documentation' 'Open the documentation': 'Open the documentation'
'Ask the developer': 'Pregúntale al desarrollador' 'Ask the developer': 'Ask the developer'
'New request': 'Nueva solicitud' 'New request': 'New request'
'Report a bug': 'Informar de un fallo' 'Report a bug': 'Report a bug'
'Show the configuration': 'Mostrar los ajustes' 'Show the configuration': 'Show the configuration'
'Configuration:': 'Configuration:' 'Configuration:': 'Configuration:'
'Done!': '¡Realizado!' 'Done!': 'Done!'
'Copy': 'Copiar' 'Copy': 'Copy'
'Need help': 'Ayudame' 'Need help': 'Need help'
'I would like a new feature': 'Me gustaría una nueva función' 'I would like a new feature': 'I would like a new feature'
'Something went wrong': 'Algo salió mal' 'Something went wrong': 'Something went wrong'
'Select apps': 'Selecciona las aplicaciones' 'Select apps': 'Select apps'
'Sort': 'Ordenar' 'Sort': 'Sort'
'Customize': 'Personalizar' 'Customize': 'Customize'
'Custom': 'Custom' 'Custom': 'Custom'
'Close': 'Cerrar' 'Close': 'Close'
'Show the search form': 'Show the search form'
+17 -37
View File
@@ -3,18 +3,13 @@
'No': 'Non' 'No': 'Non'
'Yes': 'Oui' 'Yes': 'Oui'
'Menu': 'Menu' 'Menu': 'Menu'
'Use the shortcut Ctrl+o to open and to hide the side menu. Use tab key to navigate.': 'Utiliser 'Use the shortcut Ctrl+o to open and to hide the side menu. Use tab key to navigate.': 'Utiliser le raccourcis clavier Ctrl+o pour ouvrir et fermer le menu latéral. Utiliser tab key pour naviguer.'
le raccourcis clavier Ctrl+o pour ouvrir et fermer le menu latéral. Utiliser tab
key pour naviguer.'
'Top menu': 'Menu supérieur' 'Top menu': 'Menu supérieur'
'Apps that not must be moved in the side menu': 'Les applications qui ne doivent pas 'Apps that not must be moved in the side menu': 'Les applications qui ne doivent pas être affichées dans le menu latéral'
être affichées dans le menu latéral' 'If there is no selection then the global configuration is applied.': "Si il n'y a aucune sélection alors la configuration globale sera appliquée."
'If there is no selection then the global configuration is applied.': "Si il n'y a
aucune sélection alors la configuration globale sera appliquée."
'Experimental': 'Expérimental' 'Experimental': 'Expérimental'
'Save': 'Sauvegarder' 'Save': 'Sauvegarder'
'You like this app and you want to support me?': "Vous aimer cette application et 'You like this app and you want to support me?': "Vous aimer cette application et vous souhaitez m'aider ?"
vous souhaitez m'aider ?"
'Buy me a coffee ☕': 'Offrez moi un café ☕' 'Buy me a coffee ☕': 'Offrez moi un café ☕'
'Hidden': 'Caché' 'Hidden': 'Caché'
'Small': 'Petit' 'Small': 'Petit'
@@ -48,22 +43,17 @@
'Before the logo': 'Avant le logo' 'Before the logo': 'Avant le logo'
'After the logo': 'Après le logo' 'After the logo': 'Après le logo'
'Position': 'Position' 'Position': 'Position'
'Show only the opener (hidden logo)': "Afficher uniquement le bouton d'ouverture (masquer 'Show only the opener (hidden logo)': "Afficher uniquement le bouton d'ouverture (masquer le logo)"
le logo)" 'Do not display the side menu and the opener if there is no application (eg: public pages).': "Ne pas afficher le menu latéral et le bouton d'ouverture s'il n'y a aucune application (exemple : page publiques)."
'Do not display the side menu and the opener if there is no application (eg: public pages).': "Ne
pas afficher le menu latéral et le bouton d'ouverture s'il n'y a aucune application
(exemple : page publiques)."
'Panel': 'Panneau' 'Panel': 'Panneau'
'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': 'Ouvrir 'Open the menu when the mouse is hover the opener (automatically disabled on touch screens)': 'Ouvrir le menu au passage de la souris (automatiquement désactivé sur les écrans tactiles)'
le menu au passage de la souris (automatiquement désactivé sur les écrans tactiles)'
'Display the big menu': 'Afficher le menu large' 'Display the big menu': 'Afficher le menu large'
'Display the logo': 'Afficher le logo' 'Display the logo': 'Afficher le logo'
'Icons and texts': 'Icônes et textes' 'Icons and texts': 'Icônes et textes'
'Loader enabled': "Activation de l'indicateur de chargement" 'Loader enabled': "Activation de l'indicateur de chargement"
'Tips': 'Astuces' 'Tips': 'Astuces'
'Always displayed': 'Toujours affiché' 'Always displayed': 'Toujours affiché'
'This is the automatic behavior when the menu is always displayed.': "C'est le comportement 'This is the automatic behavior when the menu is always displayed.': "C'est le comportement automatique lorsque le menu est toujours affiché."
automatique lorsque le menu est toujours affiché."
'Not compatible with touch screens.': 'Incompatible avec les écrans tactiles.' 'Not compatible with touch screens.': 'Incompatible avec les écrans tactiles.'
'Big menu': 'Menu large' 'Big menu': 'Menu large'
'Live preview': 'Aperçu en direct' 'Live preview': 'Aperçu en direct'
@@ -72,21 +62,16 @@
'Use my selection': 'Utiliser ma sélection' 'Use my selection': 'Utiliser ma sélection'
'Show and hide the list of applications': 'Afficher et masquer la liste des applications' 'Show and hide the list of applications': 'Afficher et masquer la liste des applications'
'Use the avatar instead of the logo': "Utiliser l'avatar à la place du logo" 'Use the avatar instead of the logo': "Utiliser l'avatar à la place du logo"
'You do not have permission to change the settings.': "Vous n'avez pas la permission 'You do not have permission to change the settings.': "Vous n'avez pas la permission de changer les paramètres."
de changer les paramètres."
'Force this configuration to users': 'Forcer cette configuration aux utilisateurs' 'Force this configuration to users': 'Forcer cette configuration aux utilisateurs'
'Export the configuration': 'Exporter la configuration' 'Export the configuration': 'Exporter la configuration'
'Purge the cache': 'Purger le cache' 'Purge the cache': 'Purger le cache'
'Show the link to settings': 'Afficher le lien vers les paramètres' 'Show the link to settings': 'Afficher le lien vers les paramètres'
'The menu is enabled by default for users': 'Le menu est activé par défaut pour les 'The menu is enabled by default for users': 'Le menu est activé par défaut pour les utilisateurs'
utilisateurs'
'Except when the configuration is forced.': 'Sauf lorsque la configuration est forcée.' 'Except when the configuration is forced.': 'Sauf lorsque la configuration est forcée.'
'Apps that should not be displayed in the menu': 'Applications qui ne doivent pas 'Apps that should not be displayed in the menu': 'Applications qui ne doivent pas être affichées dans le menu'
être affichées dans le menu' 'This feature is only compatible with the <code>big menu</code> display.': "Compatible avec l'affichage <code>Menu large</code>."
'This feature is only compatible with the <code>big menu</code> display.': "Compatible 'The logo is a link to the default app': "Le logo est un lien vers l'application par défaut"
avec l'affichage <code>Menu large</code>."
'The logo is a link to the default app': "Le logo est un lien vers l'application par
défaut"
'Others': 'Autres' 'Others': 'Autres'
'Categories': 'Catégories' 'Categories': 'Catégories'
'Customize sorting': 'Personnaliser le tri' 'Customize sorting': 'Personnaliser le tri'
@@ -94,8 +79,7 @@
'Name': 'Nom' 'Name': 'Nom'
'Customed': 'Personnalisé' 'Customed': 'Personnalisé'
'Show and hide the list of categories': 'Afficher et masquer la liste des catégories' 'Show and hide the list of categories': 'Afficher et masquer la liste des catégories'
'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Ces 'This parameters are used when Dark theme or Breeze Dark Theme are enabled.': 'Ces paramètres sont utilisés lorsque le thème sombre ou le thème Breeze Dark sont activés.'
paramètres sont utilisés lorsque le thème sombre ou le thème Breeze Dark sont activés.'
'Dark mode colors': 'Couleurs du mode sombre' 'Dark mode colors': 'Couleurs du mode sombre'
'With categories': 'Avec les catégories' 'With categories': 'Avec les catégories'
'Custom categories': 'Catégories personnalisées' 'Custom categories': 'Catégories personnalisées'
@@ -103,12 +87,9 @@
'Reset to default': 'Restaurer les valeurs par défaut' 'Reset to default': 'Restaurer les valeurs par défaut'
'Applications': 'Applications' 'Applications': 'Applications'
'Applications kept in the top menu': 'Applications conservées dans le menu supérieur' 'Applications kept in the top menu': 'Applications conservées dans le menu supérieur'
'Applications kept in the top menu but also shown in side menu': 'Applications conservées 'Applications kept in the top menu but also shown in side menu': 'Applications conservées dans le menu supérieur mais également affichées dans le menu latéral'
dans le menu supérieur mais également affichées dans le menu latéral' 'These applications must be selected in the previous option.': "Ces applications doivent également être sélectionnées dans l'option précédente."
'These applications must be selected in the previous option.': "Ces applications doivent 'Hide labels on mouse over': 'Masquer le libellé des applications au passage de la souris'
également être sélectionnées dans l'option précédente."
'Hide labels on mouse over': 'Masquer le libellé des applications au passage de la
souris'
'Except the hovered app': "À l'exception de l'application survolée" 'Except the hovered app': "À l'exception de l'application survolée"
'Search': 'Rechercher' 'Search': 'Rechercher'
'Toggle the menu': 'Basculer le menu' 'Toggle the menu': 'Basculer le menu'
@@ -128,4 +109,3 @@
'Customize': 'Personnaliser' 'Customize': 'Personnaliser'
'Custom': 'Personnalisé' 'Custom': 'Personnalisé'
'Close': 'Fermer' 'Close': 'Fermer'
'Show the search form': 'Afficher le formulaire de recherche'
+16 -17
View File
@@ -3,7 +3,7 @@
'No': 'Non' 'No': 'Non'
'Yes': 'Si' 'Yes': 'Si'
'Menu': 'Menú' 'Menu': 'Menú'
'Use the shortcut Ctrl+o to open and to hide the side menu. Use tab key to navigate.': 'Use o atallo Ctrl+o para abrir e agochar o menú lateral. Use a tecla Tab para navegar.' '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.'
'Top menu': 'Top menu' 'Top menu': 'Top menu'
'Apps that not must be moved in the side menu': 'As aplicacións que non deben moverse no menú lateral' 'Apps that not must be moved in the side menu': 'As aplicacións que non deben moverse no menú lateral'
'If there is no selection then the global configuration is applied.': 'Se non hai selección, aplícase a configuración global.' 'If there is no selection then the global configuration is applied.': 'Se non hai selección, aplícase a configuración global.'
@@ -94,19 +94,18 @@
'Search': 'Buscar' 'Search': 'Buscar'
'Toggle the menu': 'Alternar o menú' 'Toggle the menu': 'Alternar o menú'
'Open the documentation': 'Open the documentation' 'Open the documentation': 'Open the documentation'
'Ask the developer': 'Preguntar ao desenvolvedor' 'Ask the developer': 'Ask the developer'
'New request': 'Nova solicitude' 'New request': 'New request'
'Report a bug': 'Informar dun fallo' 'Report a bug': 'Report a bug'
'Show the configuration': 'Amosar a configuración' 'Show the configuration': 'Show the configuration'
'Configuration:': 'Configuración:' 'Configuration:': 'Configuration:'
'Done!': 'Feito!' 'Done!': 'Done!'
'Copy': 'Copiar' 'Copy': 'Copy'
'Need help': 'Necesito axuda' 'Need help': 'Need help'
'I would like a new feature': 'Gustaríame unha nova característica' 'I would like a new feature': 'I would like a new feature'
'Something went wrong': 'Algo foi mal' 'Something went wrong': 'Something went wrong'
'Select apps': 'Seleccionar as aplicacións' 'Select apps': 'Select apps'
'Sort': 'Ordenar' 'Sort': 'Sort'
'Customize': 'Personalizar' 'Customize': 'Customize'
'Custom': 'Personalizado' 'Custom': 'Custom'
'Close': 'Pechar' 'Close': 'Close'
'Show the search form': 'Show the search form'
-1
View File
@@ -109,4 +109,3 @@
'Customize': 'Customize' 'Customize': 'Customize'
'Custom': 'Custom' 'Custom': 'Custom'
'Close': 'Close' 'Close': 'Close'
'Show the search form': 'Show the search form'
-1
View File
@@ -107,4 +107,3 @@
'Customize': 'Customize' 'Customize': 'Customize'
'Custom': 'Custom' 'Custom': 'Custom'
'Close': 'Close' 'Close': 'Close'
'Show the search form': 'Show the search form'
+21 -22
View File
@@ -1,4 +1,4 @@
'Custom menu': 'Пользовательское меню' 'Custom menu': 'Custom menu'
'Enable the custom menu': 'Включить пользовательское меню' 'Enable the custom menu': 'Включить пользовательское меню'
'No': 'Нет' 'No': 'Нет'
'Yes': 'Да' 'Yes': 'Да'
@@ -43,8 +43,8 @@
'Before the logo': 'Перед логотипом' 'Before the logo': 'Перед логотипом'
'After the logo': 'После логотипа' 'After the logo': 'После логотипа'
'Position': 'Положение' 'Position': 'Положение'
'Show only the opener (hidden logo)': 'Показать только открывающую кнопку (скрытый логотип)' 'Show only the opener (hidden logo)': 'Показать только открывающую часть (скрытый логотип)'
'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).': 'Не отображать боковое меню и открывалку, если нет приложения (например, публичные страницы).'
'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)': 'Открывать меню при наведении мыши на открывалку (автоматически отключается на сенсорных экранах)'
'Display the big menu': 'Отобразить большое меню' 'Display the big menu': 'Отобразить большое меню'
@@ -63,21 +63,21 @@
'Show and hide the list of applications': 'Показать или скрыть список приложений' 'Show and hide the list of applications': 'Показать или скрыть список приложений'
'Use the avatar instead of the logo': 'Использовать аватар вместо логотипа' 'Use the avatar instead of the logo': 'Использовать аватар вместо логотипа'
'You do not have permission to change the settings.': 'У вас нет разрешения изменять настройки.' 'You do not have permission to change the settings.': 'У вас нет разрешения изменять настройки.'
'Force this configuration to users': 'Для обеспечения соблюдения этих настроек пользователями' 'Force this configuration to users': 'Принудительно предоставить эту конфигурацию пользователям'
'Export the configuration': 'Экспортировать конфигурацию' 'Export the configuration': 'Экспортировать конфигурацию'
'Purge the cache': 'Очистить кэш' 'Purge the cache': 'Очистить кэш'
'Show the link to settings': 'Показать ссылку на настройки' 'Show the link to settings': 'Показать ссылку на настройки'
'The menu is enabled by default for users': 'Это меню включено по умолчанию для пользователей' 'The menu is enabled by default for users': 'Это меню включено по умолчанию для пользователей'
'Except when the configuration is forced.': 'За исключением случаев, когда настройка принудительная.' 'Except when the configuration is forced.': 'За исключением случаев, когда конфигурация является принудительной.'
'Apps that should not be displayed in the menu': 'Ппрограммы, скрытые из меню' 'Apps that should not be displayed in the menu': 'Ппрограммы, скрытые из меню'
'This feature is only compatible with the <code>big menu</code> display.': 'Эта возможность совместима только с отображением <code>большого меню</code>.' 'This feature is only compatible with the <code>big menu</code> display.': 'Эта функция совместима только с отображением <code>большого меню</code>.'
'The logo is a link to the default app': 'Логотип открывает приложение по умолчанию' 'The logo is a link to the default app': 'Логотип открывает приложение по умолчанию'
'Others': 'Прочие' 'Others': 'Прочие'
'Categories': 'Категории' 'Categories': 'Категории'
'Customize sorting': 'Настроить сортировку' 'Customize sorting': 'Настроить сортировку'
'Order by': 'В порядке' 'Order by': 'В порядке'
'Name': 'Название' 'Name': 'Название'
'Customed': 'Пользовательское' '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': 'Цвета тёмной темы'
@@ -90,23 +90,22 @@
'Applications kept in the top menu but also shown in side menu': 'Приложения хранящиеся в верхнем меню, но также отображающиеся в боковом меню' 'Applications kept in the top menu but also shown in side menu': 'Приложения хранящиеся в верхнем меню, но также отображающиеся в боковом меню'
'These applications must be selected in the previous option.': 'Эти приложения необходимо выбрать в предыдущем выборе.' 'These applications must be selected in the previous option.': 'Эти приложения необходимо выбрать в предыдущем выборе.'
'Hide labels on mouse over': 'Скрыть название при наведении мыши' 'Hide labels on mouse over': 'Скрыть название при наведении мыши'
'Except the hovered app': 'Кроме приложения на котором сейчас' 'Except the hovered app': 'Кроме приложения, на котором курсор'
'Search': 'Поиск' 'Search': 'Поиск'
'Toggle the menu': 'Переключить меню' 'Toggle the menu': 'Переключить меню'
'Open the documentation': 'Open the documentation' 'Open the documentation': 'Open the documentation'
'Ask the developer': 'Спросить разработчика' 'Ask the developer': 'Ask the developer'
'New request': 'Новый запрос' 'New request': 'New request'
'Report a bug': 'Пожаловаться на ошибку' 'Report a bug': 'Report a bug'
'Show the configuration': 'Показать конфигурацию' 'Show the configuration': 'Show the configuration'
'Configuration:': 'Configuration:' 'Configuration:': 'Configuration:'
'Done!': 'Готово!' 'Done!': 'Done!'
'Copy': 'Копировать' 'Copy': 'Copy'
'Need help': 'Нужна помощь' 'Need help': 'Need help'
'I would like a new feature': 'Я хочу новую возможность' 'I would like a new feature': 'I would like a new feature'
'Something went wrong': 'Что-то пошло не так' 'Something went wrong': 'Something went wrong'
'Select apps': 'Выберете приложения' 'Select apps': 'Select apps'
'Sort': 'Сортировать' 'Sort': 'Sort'
'Customize': 'Приспособить' 'Customize': 'Customize'
'Custom': 'Custom' 'Custom': 'Custom'
'Close': 'Закрыть' 'Close': 'Close'
'Show the search form': 'Show the search form'
+1 -2
View File
@@ -90,7 +90,7 @@
'Applications kept in the top menu but also shown in side menu': 'Applications kept in the top menu but also shown in side menu' 'Applications kept in the top menu but also shown in side menu': 'Applications kept in the top menu but also shown in side menu'
'These applications must be selected in the previous option.': 'These applications must be selected in the previous option.' 'These applications must be selected in the previous option.': 'These applications must be selected in the previous option.'
'Hide labels on mouse over': 'Hide labels on mouse over' 'Hide labels on mouse over': 'Hide labels on mouse over'
'Toggle the menu': 'Prepnite ponuku' 'Toggle the menu': 'Toggle the menu'
'Open the documentation': 'Open the documentation' 'Open the documentation': 'Open the documentation'
'Ask the developer': 'Ask the developer' 'Ask the developer': 'Ask the developer'
'New request': 'New request' 'New request': 'New request'
@@ -107,4 +107,3 @@
'Customize': 'Customize' 'Customize': 'Customize'
'Custom': 'Custom' 'Custom': 'Custom'
'Close': 'Close' 'Close': 'Close'
'Show the search form': 'Show the search form'
-112
View File
@@ -1,112 +0,0 @@
'Custom menu': 'Anpassad meny'
'Enable the custom menu': 'Aktivera den anpassade menyn'
'No': 'Nej'
'Yes': 'Ja'
'Menu': 'Meny'
'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': 'Toppmeny'
'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.': 'Om inget val har gjorts tillämpas den globala konfigurationen.'
'Experimental': 'Experimentell'
'Save': 'Spara'
'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 ☕': 'Bjud mig på en kaffe ☕'
'Hidden': 'Dold'
'Small': 'Liten'
'Normal': 'Normal'
'Big': 'Stor'
'Hidden icon': 'Dold ikon'
'Small icon': 'Liten ikon'
'Normal icon': 'Normal ikon'
'Big icon': 'Stor ikon'
'Hidden text': 'Dold text'
'Small text': 'Liten text'
'Normal text': 'Normal text'
'Big text': 'Stor text'
'Colors': 'Färger'
'Background color': 'Bakgrundsfärg'
'Background color of current app': 'Bakgrundsfärg för aktuell app'
'Text color': 'Textfärg'
'Loader': 'Laddare'
'Icon': 'Ikon'
'Same color': 'Samma färg'
'Opposite color': 'Motsatt färg'
'Transparent': 'Transparent'
'Opaque': 'Ogenomskinlig'
'Opener': 'Öppnare'
'Default': 'Standard'
'Default (dark)': 'Standard(mörk)'
'Hamburger': 'Hamburgermeny'
'Hamburger (dark)': 'Hamburgermeny(mörk)'
'Hamburger 2': 'Hamburgermeny 2'
'Hamburger 2 (dark)': 'Hamburgermeny 2 (mörk)'
'Before the logo': 'Före logotypen'
'After the logo': 'Efter logotypen'
'Position': 'Position'
'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).': 'Visa inte sidomenyn eller öppnaren om det inte finns någon applikation (t.ex. publika sidor).'
'Panel': 'Panel'
'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': 'Visa den stora menyn'
'Display the logo': 'Visa logotypen'
'Icons and texts': 'Ikoner och texter'
'Loader enabled': 'Laddare aktiverad'
'Tips': 'Tips'
'Always displayed': 'Alltid visad'
'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.': 'Inte kompatibel med pekskärmar.'
'Big menu': 'Stor meny'
'Live preview': 'Förhandsgranskning i realtid'
'Open apps in new tab': 'Öppna appar i ny flik'
'Use the global setting': 'Använd den globala inställningen'
'Use my selection': 'Använd mitt val'
'Show and hide the list of applications': 'Visa och dölj listan över applikationer'
'Use the avatar instead of the logo': 'Använd avataren istället för logotypen'
'You do not have permission to change the settings.': 'Du har inte behörighet att ändra inställningarna.'
'Force this configuration to users': 'Tvinga denna konfiguration för användare'
'Export the configuration': 'Exportera konfigurationen'
'Purge the cache': 'Rensa cachen'
'Show the link to settings': 'Visa länken till inställningarna'
'The menu is enabled by default for users': 'Menyn är aktiverad som standard för användare'
'Except when the configuration is forced.': 'Förutom när konfigurationen är tvingad.'
'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.': 'Denna funktion är endast kompatibel med <code>stor meny</code>.'
'The logo is a link to the default app': 'Logotypen är en länk till standardappen'
'Others': 'Övriga'
'Categories': 'Kategorier'
'Customize sorting': 'Anpassa sortering'
'Order by': 'Sortera efter'
'Name': 'Namn'
'Customed': 'Anpassad'
'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.': 'Dessa parametrar används när mörkt tema eller Breeze Dark Theme är aktiverade.'
'Dark mode colors': 'Färger för mörkt läge'
'With categories': 'Med kategorier'
'Custom categories': 'Anpassade kategorier'
'Customize application categories': 'Anpassa app kategorier'
'Reset to default': 'Återställ till standardvärden'
'Applications': 'Applikationer'
'Applications kept in the top menu': 'Applikationer som hålls i toppmenyn'
'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.': 'Dessa applikationer måste väljas i föregående alternativ.'
'Hide labels on mouse over': 'Dölj etiketter när muspekaren är över'
'Except the hovered app': 'Förutom den app som muspekaren är över'
'Search': 'Sök'
'Toggle the menu': 'Växla menyn'
'Open the documentation': 'Öppna dokumentationen'
'Ask the developer': 'Fråga utvecklaren'
'New request': 'Ny förfrågan'
'Report a bug': 'Rapportera ett fel'
'Show the configuration': 'Visa konfigurationen'
'Configuration:': 'Konfiguration:'
'Done!': 'Klar!'
'Copy': 'Kopiera'
'Need help': 'Behöver hjälp'
'I would like a new feature': 'Jag skulle vilja ha en ny funktion'
'Something went wrong': 'Något gick fel'
'Select apps': 'Välj appar'
'Sort': 'Sortera'
'Customize': 'Anpassa'
'Custom': 'Anpassad'
'Close': 'Stäng'
'Show the search form': 'Show the search form'
-1
View File
@@ -109,4 +109,3 @@
'Customize': 'Customize' 'Customize': 'Customize'
'Custom': 'Custom' 'Custom': 'Custom'
'Close': 'Close' 'Close': 'Close'
'Show the search form': 'Show the search form'
+32 -33
View File
@@ -1,9 +1,9 @@
'Custom menu': '自定义菜单' 'Custom menu': '自定义菜单'
'Enable the custom menu': '启用自定义菜单' 'Enable the custom menu': '启用自定义菜单'
'No': '否' 'No': '取消'
'Yes': '是' 'Yes': '确定'
'Menu': '菜单' 'Menu': '菜单'
'Use the shortcut Ctrl+o to open and to hide the side menu. Use <span class="keyboard-key">tab</span> to navigate.': '使用快捷键 Ctrl+o 打开或隐藏侧边栏菜单。使用 <span class="keyboard-key">Tab</span> 键来导航。' 'Use the shortcut Ctrl+o to open and to hide the side menu. Use <span class="keyboard-key">tab</span> to navigate.': '使用快捷键 Ctrl+o 打开或隐藏侧边栏菜单。使用<span class="keyboard-key">tab</span> 来导航。'
'Top menu': '顶部菜单' 'Top menu': '顶部菜单'
'Apps that not must be moved in the side menu': '禁止在侧边栏菜单移动的应用' 'Apps that not must be moved in the side menu': '禁止在侧边栏菜单移动的应用'
'If there is no selection then the global configuration is applied.': '如果没有选择,则应用全局配置。' 'If there is no selection then the global configuration is applied.': '如果没有选择,则应用全局配置。'
@@ -25,7 +25,7 @@
'Opposite color': '相反颜色' 'Opposite color': '相反颜色'
'Transparent': '透明' 'Transparent': '透明'
'Opaque': '不透明' 'Opaque': '不透明'
'Opener': '触发器' 'Opener': '容器'
'Default': '默认' 'Default': '默认'
'Default (dark)': '默认(深色)' 'Default (dark)': '默认(深色)'
'Hamburger': 'Hamburger' 'Hamburger': 'Hamburger'
@@ -35,10 +35,10 @@
'Before the logo': '在徽标之前' 'Before the logo': '在徽标之前'
'After the logo': '在徽标之后' 'After the logo': '在徽标之后'
'Position': '位置' 'Position': '位置'
'Show only the opener (hidden logo)': '仅显示触发器(隐藏徽标)' 'Show only the opener (hidden logo)': '只显示容器(隐藏徽标)'
'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).': '如果没有应用程序(例如:公共页面),则不要显示侧边栏菜单和容器。'
'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)': '鼠标悬停时打开菜单 (触摸屏时将自动禁用)'
'Display the big menu': '显示大型菜单' 'Display the big menu': '显示大型菜单'
'Display the logo': '显示徽标' 'Display the logo': '显示徽标'
'Icons and texts': '图标和文本' 'Icons and texts': '图标和文本'
@@ -63,7 +63,7 @@
'Except when the configuration is forced.': '除非强制配置。' 'Except when the configuration is forced.': '除非强制配置。'
'Apps that should not be displayed in the menu': '禁止在菜单中显示的应用' 'Apps that should not be displayed in the menu': '禁止在菜单中显示的应用'
'This feature is only compatible with the <code>big menu</code> display.': '此功能只和<code>大型菜单</code>兼容。' 'This feature is only compatible with the <code>big menu</code> display.': '此功能只和<code>大型菜单</code>兼容。'
'The logo is a link to the default app': '徽标链接到默认应用' 'The logo is a link to the default app': 'logo链接到默认应用'
'Others': '其他' 'Others': '其他'
'Categories': '类别' 'Categories': '类别'
'Customize sorting': '自定义排序' 'Customize sorting': '自定义排序'
@@ -85,28 +85,27 @@
'Small text': '小文本' 'Small text': '小文本'
'Normal text': '普通文本' 'Normal text': '普通文本'
'Big text': '大文本' 'Big text': '大文本'
'Applications': '应用程序' 'Applications': 'Applications'
'Applications kept in the top menu': '应用程序保留在顶部菜单中' 'Applications kept in the top menu': 'Applications kept in the top menu'
'Applications kept in the top menu but also shown in side menu': '应用程序保留在顶部菜单中,但也显示在侧边栏菜单中' 'Applications kept in the top menu but also shown in side menu': 'Applications kept in the top menu but also shown in side menu'
'These applications must be selected in the previous option.': '必须在上一个选项中选择这些应用程序。' 'These applications must be selected in the previous option.': 'These applications must be selected in the previous option.'
'Hide labels on mouse over': '鼠标悬停时隐藏标签' 'Hide labels on mouse over': 'Hide labels on mouse over'
'Except the hovered app': '除了悬停的应用' 'Except the hovered app': 'Except the hovered app'
'Search': '搜索' 'Search': 'Search'
'Toggle menu': '切换菜单' 'Toggle menu': 'Toggle menu'
'Open the documentation': '打开文档' 'Open the documentation': 'Open the documentation'
'Ask the developer': '询问开发者' 'Ask the developer': 'Ask the developer'
'New request': '新请求' 'New request': 'New request'
'Report a bug': '报告错误' 'Report a bug': 'Report a bug'
'Show the configuration': '显示配置' 'Show the configuration': 'Show the configuration'
'Configuration:': '配置:' 'Configuration:': 'Configuration:'
'Done!': '完成!' 'Done!': 'Done!'
'Copy': '复制' 'Copy': 'Copy'
'Need help': '需要帮助' 'Need help': 'Need help'
'I would like a new feature': '我想要一个新功能' 'I would like a new feature': 'I would like a new feature'
'Something went wrong': '出了点问题' 'Something went wrong': 'Something went wrong'
'Select apps': '选择应用' 'Select apps': 'Select apps'
'Sort': '排序' 'Sort': 'Sort'
'Customize': '自定义' 'Customize': 'Customize'
'Custom': '自定义' 'Custom': 'Custom'
'Close': '关闭' 'Close': 'Close'
'Show the search form': 'Show the search form'
-2
View File
@@ -17,8 +17,6 @@
import './scss/menu.scss' import './scss/menu.scss'
import '@formatjs/intl-segmenter/polyfill.js'
import { createApp } from 'vue' import { createApp } from 'vue'
import { createPinia } from 'pinia' import { createPinia } from 'pinia'
import { createElement, waitContainer } from './lib/dom.js' import { createElement, waitContainer } from './lib/dom.js'
+1 -3
View File
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:label="settings.name" :label="settings.name"
:avatar="settings.avatar" :avatar="settings.avatar"
/> />
<AppSearch v-if="showSearchForm" v-model="search" /> <AppSearch v-model="search" />
<OpenerButton <OpenerButton
v-if="!openerHover" v-if="!openerHover"
@click="$emit('close')" @click="$emit('close')"
@@ -102,7 +102,6 @@ const activeApp = ref(null)
const targetBlankApps = ref([]) const targetBlankApps = ref([])
const settings = ref(null) const settings = ref(null)
const search = ref('') const search = ref('')
const showSearchForm = ref(true)
const openerHover = ref(false) const openerHover = ref(false)
const menu = useTemplateRef('menu') const menu = useTemplateRef('menu')
const isTouchDevice = window.matchMedia('(pointer: coarse)').matches const isTouchDevice = window.matchMedia('(pointer: coarse)').matches
@@ -121,7 +120,6 @@ onMounted(async () => {
targetBlankApps.value = config['target-blank-apps'] targetBlankApps.value = config['target-blank-apps']
settings.value = config['settings'] settings.value = config['settings']
showSearchForm.value = config['show-search-form']
openerHover.value = config['opener-hover'] && !isTouchDevice openerHover.value = config['opener-hover'] && !isTouchDevice
items.value = await navStore.getCategories() items.value = await navStore.getCategories()
+1 -3
View File
@@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:avatar="settings.avatar" :avatar="settings.avatar"
/> />
<AppSearch <AppSearch
v-if="showSearchForm && open" v-if="open"
v-model="search" v-model="search"
/> />
<OpenerButton <OpenerButton
@@ -103,7 +103,6 @@ const openerHover = ref(false)
const alwaysDisplayed = ref(false) const alwaysDisplayed = ref(false)
const displayLogo = ref(false) const displayLogo = ref(false)
const useAvatarAsLogo = ref(false) const useAvatarAsLogo = ref(false)
const showSearchForm = ref(true)
const search = ref('') const search = ref('')
const apps = ref([]) const apps = ref([])
const menu = useTemplateRef('menu') const menu = useTemplateRef('menu')
@@ -152,7 +151,6 @@ onMounted(async () => {
alwaysDisplayed.value = config['always-displayed'] alwaysDisplayed.value = config['always-displayed']
targetBlankApps.value = config['target-blank-apps'] targetBlankApps.value = config['target-blank-apps']
forceLightIcon.value = config['force-light-icon'] forceLightIcon.value = config['force-light-icon']
showSearchForm.value = config['show-search-form']
avatar.value = config['avatar'] avatar.value = config['avatar']
logo.value = config['logo'] logo.value = config['logo']
+15 -23
View File
@@ -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"
@@ -62,15 +62,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</li> </li>
</ul> </ul>
<NcActions <NcActions
class="cm-standardmenu-app-menu-more" class="cm-standardmenu-app-menu-more app-menu-more"
:aria-label="t('core', 'More apps')" :aria-label="t('core', 'More apps')"
:forceMenu="true"
> >
<NcActionLink <NcActionLink
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"
@@ -102,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()
@@ -114,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) => {
@@ -133,27 +130,19 @@ const setApps = (value) => {
const appLimit = () => { const appLimit = () => {
const headerStart = document.querySelector('#header .header-start') const headerStart = document.querySelector('#header .header-start')
const headerEnd = document.querySelector('#header .header-end') const headerEnd = document.querySelector('#header .header-end')
const unifiedSearch = document.querySelector('#header .unified-search-input')
const body = document.querySelector('body') const body = document.querySelector('body')
let totalWidth = body.offsetWidth let size = (headerEnd ? headerEnd.offsetWidth : 0) + 70
let otherElementsWidth = headerEnd ? headerEnd.offsetWidth : 0
if (unifiedSearch && headerEnd.offsetWidth < unifiedSearch.offsetWidth) {
otherElementsWidth += unifiedSearch.offsetWidth
}
let maxWidth = body.offsetWidth - otherElementsWidth
if (headerStart) { if (headerStart) {
Array.from(headerStart.children).forEach((child) => { Array.from(headerStart.children).forEach((child) => {
if (child.id !== 'app-menu-container') { if (child.id !== 'app-menu-container') {
maxWidth -= child.offsetWidth size += child.offsetWidth
} }
}) })
} }
return Math.max(0, Math.floor(maxWidth / 60) - 1) return Math.max(0, Math.floor((body.offsetWidth - size) / 70))
} }
const makeStyle = (app) => { const makeStyle = (app) => {
@@ -165,9 +154,13 @@ const makeStyle = (app) => {
} }
const computeLists = () => { const computeLists = () => {
const limit = appLimit() mainAppList.value = appList.value.slice(0, appLimit())
mainAppList.value = appList.value.slice(0, limit) popoverAppList.value = appList.value.slice(appLimit()).sort((a, b) => a.order - b.order)
popoverAppList.value = appList.value.slice(limit).sort((a, b) => a.order - b.order) }
const reComputeLists = (delay) => {
window.clearTimeout(resizeTimeout)
resizeTimeout = window.setTimeout(computeLists, delay || 100)
} }
onMounted(async () => { onMounted(async () => {
@@ -177,12 +170,11 @@ 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.setInterval(computeLists, 100) window.addEventListener('resize', reComputeLists)
}) })
</script> </script>
+1 -3
View File
@@ -31,7 +31,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:label="settings.name" :label="settings.name"
:avatar="settings.avatar" :avatar="settings.avatar"
/> />
<AppSearch v-if="showSearchForm" v-model="search" /> <AppSearch v-model="search" />
<OpenerButton <OpenerButton
v-if="!openerHover" v-if="!openerHover"
@click="$emit('close')" @click="$emit('close')"
@@ -107,7 +107,6 @@ const activeApp = ref(null)
const targetBlankApps = ref([]) const targetBlankApps = ref([])
const settings = ref(null) const settings = ref(null)
const search = ref('') const search = ref('')
const showSearchForm = ref(true)
const openerHover = ref(false) const openerHover = ref(false)
const menu = useTemplateRef('menu') const menu = useTemplateRef('menu')
const isTouchDevice = window.matchMedia('(pointer: coarse)').matches const isTouchDevice = window.matchMedia('(pointer: coarse)').matches
@@ -126,7 +125,6 @@ onMounted(async () => {
targetBlankApps.value = config['target-blank-apps'] targetBlankApps.value = config['target-blank-apps']
settings.value = config['settings'] settings.value = config['settings']
showSearchForm.value = config['show-search-form']
openerHover.value = config['opener-hover'] && !isTouchDevice openerHover.value = config['opener-hover'] && !isTouchDevice
items.value = await navStore.getCategories() items.value = await navStore.getCategories()
-15
View File
@@ -29,8 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/> />
</NcAppNavigation> </NcAppNavigation>
<NcAppContent class="cm-settings cm-settings--nav"> <NcAppContent class="cm-settings cm-settings--nav">
<button @click="toggleNav" class="cm-settings-nav-toggle">{{ trans('Toggle menu') }}</button>
<SettingsSection :hidden="section !== 'panel'"> <SettingsSection :hidden="section !== 'panel'">
<SectionTitle label="Panel" /> <SectionTitle label="Panel" />
@@ -82,15 +80,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<FormYesNo v-model="config['show-settings']" /> <FormYesNo v-model="config['show-settings']" />
</SettingValue> </SettingValue>
</SettingItem> </SettingItem>
<SettingItem :disabled="config['always-displayed']">
<SettingLabel
label="Show the search form"
:middle="true"
/>
<SettingValue>
<FormYesNo v-model="config['show-search-form']" />
</SettingValue>
</SettingItem>
<SettingItem> <SettingItem>
<SettingLabel <SettingLabel
label="Icons" label="Icons"
@@ -630,10 +619,6 @@ const filterConfig = (value) => {
return result return result
} }
const toggleNav = () => {
document.querySelector('.cm-settings-nav .app-navigation-toggle-wrapper > button').click()
}
onMounted(async () => { onMounted(async () => {
config.value = await configStore.getAppConfig() config.value = await configStore.getAppConfig()
+5 -16
View File
@@ -15,25 +15,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
.cm-settings-nav {
padding-top: 30px !important;
}
.cm-settings-nav-toggle {
margin-top: 40px !important;
margin-left: 15px !important;
}
.cm-settings-nav .app-navigation-toggle-wrapper > button {
display: none;
}
.cm-settings { .cm-settings {
&-nav { &--nav {
max-width: 50vw !important; padding-top: 30px;
}
&-nav {
.app-navigation__content { .app-navigation__content {
padding: 20px 10px 20px 10px; padding: 20px;
} }
.app-navigation-entry-icon { .app-navigation-entry-icon {
+10 -46
View File
@@ -287,6 +287,14 @@
} }
} }
.cm-standardmenu {
visibility: hidden;
&.show {
visibility: visible;
}
}
.cm-always-displayed { .cm-always-displayed {
body { body {
width: calc(100% - 50px) !important; width: calc(100% - 50px) !important;
@@ -355,16 +363,6 @@
right: 0 !important; right: 0 !important;
margin-left: 0 !important; margin-left: 0 !important;
} }
#content {
left: 53px;
width: calc(100% - (var(--body-container-margin) * 2) - 62px);
}
#content-vue {
width: calc(100% - (var(--body-container-margin) * 2) - 60px);
margin-left: 11px;
}
} }
@media screen and (max-width: 1024px) { @media screen and (max-width: 1024px) {
@@ -387,16 +385,6 @@
padding: 10px 0; padding: 10px 0;
} }
} }
#header {
.unified-search-input {
width: 80px !important;
.unified-search-input__label {
display: none;
}
}
}
} }
@media screen and (min-width: 1024px) { @media screen and (min-width: 1024px) {
@@ -418,25 +406,11 @@
$header-icon-size: 20px; $header-icon-size: 20px;
.cm-standardmenu { .cm-standardmenu {
visibility: hidden;
width: 100%; width: 100%;
display: flex; display: flex;
flex-shrink: 1; flex-shrink: 1;
flex-wrap: wrap; flex-wrap: wrap;
&.show {
visibility: visible;
}
svg {
color: var(--color-background-plain-text) !important;
}
.app-menu-entry--label {
color: var(--color-background-plain-text) !important;
filter: var(--background-image-invert-if-bright, var(--primary-invert-if-bright)) !important;
}
.app-menu-main { .app-menu-main {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
@@ -496,7 +470,7 @@ $header-icon-size: 20px;
color: var(--color-primary-text); color: var(--color-primary-text);
text-align: center; text-align: center;
left: 50%; left: 50%;
top: 55%; top: 45%;
display: block; display: block;
min-width: 100%; min-width: 100%;
transform: translateX(-50%); transform: translateX(-50%);
@@ -568,10 +542,7 @@ $header-icon-size: 20px;
} }
} }
&-app-menu-more { .app-menu-more .button-vue--vue-tertiary {
padding-top: 9px !important;
.button-vue--vue-tertiary {
opacity: 0.7; opacity: 0.7;
margin: 8px 3px 3px 3px; margin: 8px 3px 3px 3px;
filter: var(--background-image-invert-if-bright, var(--primary-invert-if-bright)); filter: var(--background-image-invert-if-bright, var(--primary-invert-if-bright));
@@ -590,7 +561,6 @@ $header-icon-size: 20px;
outline: none !important; outline: none !important;
} }
} }
}
&-app-menu-popover-entry { &-app-menu-popover-entry {
.app-icon { .app-icon {
@@ -629,9 +599,3 @@ $header-icon-size: 20px;
display: none; display: none;
} }
} }
#header {
.unified-search-input:not(.unified-search-input--mobile) {
position: unset !important;
}
}
+4 -1
View File
@@ -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
-2
View File
@@ -17,8 +17,6 @@
import './scss/admin.scss' import './scss/admin.scss'
import '@formatjs/intl-segmenter/polyfill.js'
import { createApp } from 'vue' import { createApp } from 'vue'
import { createPinia } from 'pinia' import { createPinia } from 'pinia'
import { waitContainer } from './lib/dom.js' import { waitContainer } from './lib/dom.js'
+13 -1
View File
@@ -38,7 +38,7 @@ body[data-theme-light], body[data-theme-light-highcontrast] {
<?php if ($_['opener-only']) { ?> <?php if ($_['opener-only']) { ?>
#nextcloud { #nextcloud {
display: none !important; display: none;
} }
<?php } ?> <?php } ?>
@@ -117,3 +117,15 @@ body[data-theme-light], body[data-theme-light-highcontrast] {
font-size: 16px; font-size: 16px;
} }
<?php } ?> <?php } ?>
<?php if ($_['always-displayed']) { ?>
#content {
left: 53px;
width: calc(100% - (var(--body-container-margin) * 2) - 62px);
}
#content-vue {
width: calc(100% - (var(--body-container-margin) * 2) - 60px);
margin-left: 11px;
}
<?php } ?>
-6
View File
@@ -7,7 +7,6 @@ const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin') const TerserPlugin = require('terser-webpack-plugin')
const appName = 'side_menu' const appName = 'side_menu'
const appVersion = '6.x'
const buildMode = process.env.NODE_ENV const buildMode = process.env.NODE_ENV
const isDev = buildMode === 'development' const isDev = buildMode === 'development'
@@ -78,11 +77,6 @@ module.exports = {
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'], Buffer: ['buffer', 'Buffer'],
}), }),
new webpack.DefinePlugin({
appName: JSON.stringify(appName),
appVersion: JSON.stringify(appVersion),
}),
], ],
resolve: { resolve: {