mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-18 04:13:43 +08:00
Previously, clicking "Groups" on the admin dashboard would bring you to the public groups page. Historically, the public and admin actions have been mixed together on that page. This is a bit of a frustrating experience when working on the admin dashboard, and also prevented us from adding a "Settings" tab for group-related site settings. This PR adds an "admin groups" page, which is just an exact copy of the public groups index for now. This allows us to add the "Settings" tab, and lets us gradually work un disentangling the public- and admin parts of groups.
27 lines
647 B
JavaScript
27 lines
647 B
JavaScript
import Controller from "@ember/controller";
|
|
import { action } from "@ember/object";
|
|
import discourseDebounce from "discourse/lib/debounce";
|
|
import { INPUT_DELAY } from "discourse/lib/environment";
|
|
|
|
export default class AdminGroupsIndexController extends Controller {
|
|
queryParams = ["order", "asc", "filter", "type"];
|
|
order = null;
|
|
asc = null;
|
|
filter = "";
|
|
type = null;
|
|
groups = null;
|
|
|
|
@action
|
|
onTypeChanged(type) {
|
|
this.set("type", type);
|
|
}
|
|
|
|
@action
|
|
onFilterChanged(filter) {
|
|
discourseDebounce(this, this._debouncedFilter, filter, INPUT_DELAY);
|
|
}
|
|
|
|
_debouncedFilter(filter) {
|
|
this.set("filter", filter);
|
|
}
|
|
}
|