discourse/app/assets/javascripts/admin/addon/controllers/admin-search-index.js
Martin Brennan 60607aa231
UX: Show keyboard shortcut on full admin search page (#31646)
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.
2025-04-03 14:12:31 +10:00

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>`;
}
}