mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-14 17:54:35 +08:00
This commit adds an indicator of the shortcut for admin search to the full page version of the search. In addition, this commit does extensive refactoring of `AdminSearchDataSource` and adds many more tests for it to account for all the variations of label/url formatting.
11 lines
387 B
JavaScript
11 lines
387 B
JavaScript
import Controller from "@ember/controller";
|
|
import { PLATFORM_KEY_MODIFIER } from "discourse/lib/keyboard-shortcuts";
|
|
import { translateModKey } from "discourse/lib/utilities";
|
|
|
|
export default class AdminSearchIndexController extends Controller {
|
|
queryParams = ["filter"];
|
|
|
|
get shortcutHTML() {
|
|
return `<kbd>${translateModKey(PLATFORM_KEY_MODIFIER)}</kbd> + <kbd>/</kbd>`;
|
|
}
|
|
}
|