-
Notifications
You must be signed in to change notification settings - Fork 32
feat: Add UI elements to modify navigation display #1295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
blizzz
merged 18 commits into
enh/1177/enable-nav-display-logic
from
nav-display-frontend
Jan 9, 2025
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7f8da4a
feat: add UI elements to change nav display
enjeck afcbe45
fix: update context navigation display elements
enjeck e05745a
fix(Context): fix wrong parameters to permission check
blizzz 6a693aa
fix(DB): override mapper::update() where tables has no id column
blizzz 04cd53e
fix: use NcDialog
enjeck 41b5b24
fix: properly update navigation display via checkbox
enjeck 4be1a7c
enh: add share to oneself to control context nav display
enjeck bd37daf
enh: use checkbox for default nav display mode
enjeck 1ab79e7
enh: modify display mode update for owner
enjeck b00f1c0
fix(Navigation): use default display mode when there is no user override
blizzz 454844e
fix(DB): NavigationMapper has to override insert due to not having an id
blizzz efab19c
fix: update display mode when editing context
enjeck f4f3277
enh: set visibility also when context is provided by group shares
blizzz 4ab44af
feat(Contexts): dynamic navigation bar update on config toggle
blizzz e1e3737
enh: remove usages of NAV_ENTRY_MODE_RECIPIENTS
enjeck 30748c4
fix: add copyright and update openapi
enjeck c925f42
ci: suppress psalm warning against private NavigationController class
blizzz 4d5a063
fix: Make labels translatable
juliusknorr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <?php | ||
|
|
||
| /** | ||
| * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
|
|
||
| namespace OCA\Tables\Controller; | ||
|
|
||
| use OCA\Tables\Service\ContextService; | ||
| use OCP\AppFramework\Http\Attribute\NoAdminRequired; | ||
| use OCP\AppFramework\Http\Attribute\NoCSRFRequired; | ||
| use OCP\AppFramework\Http\Attribute\OpenAPI; | ||
| use OCP\AppFramework\Http\DataResponse; | ||
| use OCP\INavigationManager; | ||
| use OCP\IRequest; | ||
| use OCP\IURLGenerator; | ||
| use OCP\IUserSession; | ||
|
|
||
| /** | ||
| * This is a workaround until https://github.com/nextcloud/server/pull/49904 is | ||
| * settled in all covered NC versions; expected >= 31. | ||
| */ | ||
| class NavigationController extends \OC\Core\Controller\NavigationController { | ||
| public function __construct( | ||
| protected ContextService $contextService, | ||
| protected IUserSession $userSession, | ||
| string $appName, | ||
| IRequest $request, | ||
| INavigationManager $navigationManager, | ||
| IURLGenerator $urlGenerator | ||
| ) { | ||
| parent::__construct($appName, $request, $navigationManager, $urlGenerator); | ||
| } | ||
|
|
||
| #[NoAdminRequired] | ||
| #[NoCSRFRequired] | ||
| #[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)] | ||
| public function getAppsNavigation(bool $absolute = false): DataResponse { | ||
| $this->contextService->addToNavigation($this->userSession->getUser()?->getUID()); | ||
| return parent::getAppsNavigation($absolute); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.