mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 18:15:24 +00:00
feat(ui): OS-aware search shortcuts and mobile settings titles
Show ⌘K or Ctrl+K by platform in the sidebar and command palette. Add mobile-only section headers and descriptions on settings layouts.
This commit is contained in:
1 parent
5de6f97256
commit
d6db943453
11 files changed
+112
-10
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
it('uses OS-aware modifier key labels in the global search palette', function () {
|
||||
$bladeFile = file_get_contents(__DIR__.'/../../resources/views/livewire/global-search.blade.php');
|
||||
|
||||
expect($bladeFile)
|
||||
->toContain('modKeyLabel')
|
||||
->toContain("return /Mac|iPhone|iPad|iPod/i.test(platform) || /Mac OS X|Macintosh/i.test(ua) ? '⌘' : 'Ctrl+';")
|
||||
->toContain("x-text=\"modKeyLabel + 'K'\"")
|
||||
->not->toContain('>⌘K</span>');
|
||||
});
|
||||
|
||||
it('uses OS-aware modifier key labels in the sidebar search trigger', function () {
|
||||
$bladeFile = file_get_contents(__DIR__.'/../../resources/views/components/navbar.blade.php');
|
||||
|
||||
expect($bladeFile)
|
||||
->toContain('modKeyLabel')
|
||||
->toContain("return /Mac|iPhone|iPad|iPod/i.test(platform) || /Mac OS X|Macintosh/i.test(ua) ? '⌘' : 'Ctrl+';")
|
||||
->toContain(":title=\"'Search (Press / or ' + modKeyLabel + 'K)'\"")
|
||||
->toContain("x-text=\"modKeyLabel + 'K'\"")
|
||||
->not->toContain('>⌘K</kbd>')
|
||||
->not->toContain('title="Search (Press / or ⌘K)"');
|
||||
});
|
||||
Reference in new issue
Block a user