Repository navigation
Conversation
Adds a keyboard-driven overlay that searches the user's apps by title, tag and URL, shows recently opened apps first, and offers the configured web search provider as a fallback. A floating button opens it on touch devices. Items come from a new GET /search/items endpoint behind the allowed middleware, scoped to the current user and to roles when roles mode is on. The launcher is hidden on auth pages and on public-front dashboards until the visitor is logged in.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a quick launcher: press Ctrl+K (Cmd+K on Mac) on any page, type a few letters, hit Enter to open the app. On touch devices a small button in the bottom-left corner opens it.
The current homepage search only filters tiles that are on the page, so unpinned apps and apps in other tags can't be found from the keyboard.
How it works
A new
GET /search/itemsendpoint returns the current user's apps as JSON. It uses theallowedmiddleware, so password-protected users are covered, and it respects roles mode. The overlay isquicklauncher.jsplus a Blade partial, and the styles and English strings go in the existing_app.scssandlang/en/app.php.Two small refactors came along with it:
User::isOpenToVisitor()holds the "no password, or already logged in as this user" check thatCheckAllowedhad inline. The middleware behaves the same as before.Item::icon_urlreplaces the icon path logic initem.blade.php.public/buildisn't touched.Things you may want to change
quicklauncher.js.Tests
15 new feature tests in
tests/Feature/SearchItemsTest.phpcover per-user scoping, pinned and unpinned apps, tags, the password gate, roles mode, icon URLs, link targets, the web search row, and where the launcher does and doesn't render. The full suite passes (183 passed, 1 skipped as before) andnpm run lintis clean.I've used Heimdall for years and I found myself hunting for the right tile more and more as my dashboard grew, thus this PR. Happy to change anything to fit how you'd like it done, or if it takes things in the direction you don't want to go, that's fine too. Thanks for all your efforts!